Nothing Special   »   [go: up one dir, main page]

CN112527515B - State synchronization method, device, equipment and storage medium - Google Patents

State synchronization method, device, equipment and storage medium Download PDF

Info

Publication number
CN112527515B
CN112527515B CN202011412916.XA CN202011412916A CN112527515B CN 112527515 B CN112527515 B CN 112527515B CN 202011412916 A CN202011412916 A CN 202011412916A CN 112527515 B CN112527515 B CN 112527515B
Authority
CN
China
Prior art keywords
sdk
state
synchronized
target application
service program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011412916.XA
Other languages
Chinese (zh)
Other versions
CN112527515A (en
Inventor
廖超民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Yealink Network Technology Co Ltd
Original Assignee
Xiamen Yealink Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Yealink Network Technology Co Ltd filed Critical Xiamen Yealink Network Technology Co Ltd
Priority to CN202011412916.XA priority Critical patent/CN112527515B/en
Publication of CN112527515A publication Critical patent/CN112527515A/en
Application granted granted Critical
Publication of CN112527515B publication Critical patent/CN112527515B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application provides a state synchronization method, a state synchronization device, state synchronization equipment and a storage medium, and relates to the technical field of data transmission. The method comprises the following steps: the SDK of the target application in the plurality of call applications requests the SDK service program for the synchronization authority of the state to be synchronized; and if the SDK of the target application acquires the request success message of the SDK service program, synchronizing the state to be synchronized to the external equipment by the SDK of the target application through the communication interface. Compared with the prior art, the method and the device avoid the problem that the states can be disordered synchronously when a plurality of software are used simultaneously because the plurality of software are not considered to synchronize the states of the external equipment simultaneously.

Description

State synchronization method, device, equipment and storage medium
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a state synchronization method, apparatus, device, and storage medium.
Background
There are a large number of external devices such as external headphones, external cameras, etc. on the market, and these external devices are often used together with a soft phone after being connected to an electronic device.
In the prior art, a soft phone generally transmits a call state of the current soft phone to an external device through a corresponding SDK, for example, an incoming call state, a Hold state, a Mute state, and the like, and the external device performs corresponding performance after receiving the state synchronization. In this way, a better interactive experience is brought to the user.
However, in the above method, the situation that the state is confused synchronously when the plurality of software are used simultaneously is not considered because the situation that the plurality of software are synchronized with the external device is not considered.
Disclosure of Invention
The application aims to provide a state synchronization method, a device, equipment and a storage medium for solving the problem that the state may be disordered synchronously when a plurality of pieces of software are used simultaneously because the condition that the plurality of pieces of software synchronously synchronize with the external equipment is not considered in the prior art.
In order to achieve the above purpose, the technical scheme adopted by the embodiment of the application is as follows:
In a first aspect, an embodiment of the present application provides a state synchronization method applied to an electronic device supporting a plurality of call applications, where each call application is integrated with a software development kit SDK, the electronic device is further installed with an SDK service program, and the electronic device is connected to an external device through a communication interface, where the method includes:
The SDK of the target application in the plurality of call applications requests the SDK service program for the synchronization authority of the state to be synchronized;
and if the SDK of the target application acquires the request success message of the SDK service program, synchronizing the state to be synchronized to the external equipment by the SDK of the target application through the communication interface.
Optionally, before the SDK of the target application synchronizes the to-be-synchronized state with the external device through the communication interface if the SDK of the target application obtains the request success message of the SDK service program, the method further includes:
Judging whether the synchronous authority of the state to be synchronized is occupied or not by the SDK service program;
And if the synchronization authority of the state to be synchronized is not occupied, the SDK service program returns the request success message to the SDK of the target application.
Optionally, the method further comprises:
if the synchronization authority of the state to be synchronized is occupied, the SDK service program returns a request failure message to the SDK of the target application;
And caching the state to be synchronized by the SDK of the target application.
Optionally, before the SDK of the target application in the plurality of call applications requests the SDK service program for the synchronization authority of the state to be synchronized, the method further includes:
Judging whether the SDK of the target application has the synchronous authority of the state to be synchronized or not;
The request, by the SDK of the target application in the plurality of call applications, for the synchronization authority of the state to be synchronized from the SDK service program includes:
And if the SDK service program does not have the synchronization authority of the state to be synchronized, the SDK of the target application requests the synchronization authority of the state to be synchronized from the SDK service program.
Optionally, the method further comprises:
And if the SDK has the synchronization authority of the state to be synchronized, synchronizing the state to be synchronized to the external equipment through the communication interface by the SDK of the target application.
Optionally, after the SDK of the target application obtains the request success message of the SDK service program, the method further includes:
recording the synchronization authority of the target application with the state to be synchronized by the SDK of the target application;
after the SDK service returns the request success message to the SDK of the target application, the method further includes:
And recording that the synchronous authority of the state to be synchronized is occupied by the target application by the SDK service program.
Optionally, the method further comprises:
If the synchronization of the state to be synchronized is finished, the SDK of the target application clears the record with the synchronization authority of the state to be synchronized;
Requesting, by the SDK of the target application, to the SDK service program to release the occupation of the synchronization authority of the target application on the state to be synchronized;
And the SDK service program releases the occupation of the synchronous authority of the target application to the state to be synchronized.
Optionally, the method further comprises:
And the SDK service program sends a notification of the target application for relieving the synchronization authority of the state to be synchronized to SDKs of other applications in the plurality of call applications.
Optionally, the method further comprises:
Judging whether the other applications have the state to be synchronized or not by the SDK of the other applications according to the state cached in advance;
if the state to be synchronized is needed to be synchronized, the SDK of the other applications requests the SDK service program for the synchronization authority of the state to be synchronized;
And if the SDKs of the other applications acquire the request success message of the SDK service program, synchronizing the state to be synchronized to the external equipment through the communication interface by the SDKs of the other applications.
Optionally, the method further comprises:
And under the condition that the SDK service program monitors that the connection of a data pipeline between the SDK service program and the SDK of the target application is disconnected, the SDK service program releases the occupation of the synchronous authority of the target application to the state to be synchronized, and informs the SDK of the target application to clear the record with the synchronous authority of the state to be synchronized.
Optionally, before the SDK of the target application in the plurality of call applications requests the SDK service program for the synchronization authority of the state to be synchronized, the method further includes:
After the SDK service program is started, a preset pipeline service of the SDK service program side is created;
and creating a communication pipeline by the SDK of the target application to connect to the SDK service program through the preset pipeline service.
In a second aspect, another embodiment of the present application provides a state synchronization device applied to an electronic device supporting a plurality of call applications, where a software development kit SDK is integrated in each call application, the electronic device further installs an SDK service program, and the electronic device is connected to an external device through a communication interface, where the device includes: a request module and a synchronization module disposed within the SDK, wherein:
The request module is used for requesting the SDK service program for the synchronous authority of the state to be synchronized;
And the synchronization module is used for synchronizing the state to be synchronized with the external equipment through the communication interface if the SDK of the target application acquires a successful request message of the SDK service program.
Optionally, the apparatus further comprises: the first judging module and the first returning module are arranged in the SDK service program, wherein:
The first judging module is used for judging whether the synchronous authority of the state to be synchronized is occupied or not;
And the first return module is used for returning the request success message to the SDK of the target application if the synchronization authority of the state to be synchronized is not occupied.
Optionally, the apparatus further comprises: a cache module disposed within the SDK, wherein:
The first return module is specifically configured to return a request failure message to the SDK of the target application if the synchronization authority of the state to be synchronized is occupied;
and the caching module is used for caching the state to be synchronized.
Optionally, the apparatus further comprises: the second judging module is arranged in the SDK and is used for judging whether the synchronous authority of the state to be synchronized exists or not;
The request module is specifically configured to request the SDK service program for the synchronization authority of the state to be synchronized if the request module does not have the synchronization authority of the state to be synchronized.
Optionally, the synchronization module is specifically configured to synchronize the state to be synchronized with the external device through the communication interface if the synchronization module has the synchronization authority of the state to be synchronized.
Optionally, the apparatus further comprises: a first recording module disposed within the SDK and a second recording module disposed within the SDK service program, wherein:
the first recording module is used for recording that the target application has the synchronization authority of the state to be synchronized;
the second recording module is used for recording that the synchronous authority of the state to be synchronized is occupied by the target application.
Optionally, the apparatus further comprises: a clearing module arranged in the SDK, and a relieving module arranged in the SDK service program, wherein:
the clearing module is used for clearing records with the synchronization authority of the state to be synchronized if the synchronization of the state to be synchronized is finished;
The request module is used for requesting the SDK service program to release the occupation of the synchronous authority of the target application on the state to be synchronized;
the releasing module is used for releasing the occupation of the synchronous authority of the target application to the state to be synchronized.
Optionally, the apparatus further comprises: and the notification module is arranged in the SDK service program and is used for sending the unoccupied notification of the target application for the synchronization authority of the state to be synchronized to the SDKs of other applications in the plurality of call applications.
Optionally, the second judging module is specifically configured to judge, according to a pre-cached state, whether the other applications have the state to be synchronized and need to be synchronized;
The request module is used for requesting the SDK service program for the synchronization authority of the state to be synchronized if the state to be synchronized needs to be synchronized;
The synchronization module is specifically configured to synchronize the to-be-synchronized state with the external device through the communication interface if the SDK of the other application obtains a success message of receiving the request of the SDK service program.
Optionally, the releasing module is specifically configured to release the target application from occupying the synchronization authority of the state to be synchronized when the SDK service program monitors that the connection of the data pipe with the SDK of the target application is disconnected;
and the notification module is used for notifying the SDK of the target application to clear the record with the synchronization authority of the state to be synchronized.
Optionally, the apparatus further comprises: a first creation module disposed within the SDK and a second creation module disposed within the SDK service program, wherein:
The first creating module is configured to create a preset pipeline service on the SDK service program side after the SDK service program is started.
The second creation module is configured to create a communication pipe to connect to the SDK service program through the preset pipe service.
In a third aspect, another embodiment of the present application provides an electronic device, including: a processor, a storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over a bus when the electronic device is running, the processor executing the machine-readable instructions to perform the steps of the method as described in any of the first aspects above.
In a fourth aspect, another embodiment of the application provides a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of the first aspects described above.
The beneficial effects of the application are as follows: when a plurality of call applications request the synchronous right of the state to be synchronized from the SDK service program, each call application requests the state to be synchronized from the SDK service program through the corresponding SDK, only the SDK of the target application which acquires the request success message of the SDK service program can synchronize the state to be synchronized to the external device through the communication interface, and only one target application can acquire the synchronous right at the same time, namely, only one target application can be synchronously filled at the same time and cannot synchronously synchronize at multiple ends, so that the synchronous mode avoids the synchronous states of the plurality of applications to the external device at the same time, and the mutual conflict among the synchronous states received by the external device is caused, thereby influencing the normal use of users.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a state synchronization system according to an embodiment of the present application;
FIG. 2 is a flow chart of a state synchronization method according to an embodiment of the application;
FIG. 3 is a flowchart illustrating a state synchronization method according to another embodiment of the present application;
FIG. 4 is a flowchart of a state synchronization method according to another embodiment of the present application;
FIG. 5 is a flowchart of a state synchronization method according to another embodiment of the present application;
FIG. 6 is a flowchart of a state synchronization method according to another embodiment of the present application;
FIG. 7 is a schematic structural diagram of a state synchronization device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application.
The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
Additionally, flowcharts used in this disclosure illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art under the direction of the present disclosure.
A state synchronization method provided by the embodiment of the present application is explained below in conjunction with a plurality of specific application examples. Fig. 1 is a schematic structural diagram of a state synchronization system according to an embodiment of the present application, as shown in fig. 1, where the system includes an electronic device and an external device, and the method includes:
Multiple telephony applications may be supported on an electronic device, which may include, for example: call application a, call application B, call application C, etc.; and each call application is integrated with a Software Development Kit (SDK), the electronic equipment is also provided with an SDK service program for managing the synchronous authority, the electronic equipment is connected with the external equipment through a communication interface, after the external equipment is in communication connection with the electronic equipment through a preset communication interface, only call information of a target application which acquires the synchronous authority in the electronic equipment can be acquired, for example, call voice or call video and the like, and only one target application in a plurality of call applications can acquire the synchronous authority at the same moment.
Optionally, in an embodiment of the present application, the call application may be a soft phone, for example, teams, avaya, swyx, zoiper, ringcentral, and the type included in the specific call application may be flexibly adjusted according to the needs of the user, which is not limited to the above embodiment.
The states corresponding to the call application may be, for example, an incoming call state, a Hold state (Hold state), and a non-Hold state (non-Hold state), where: if the call application is in the synchronous state with the external device, the current state is the incoming call state, and the external device is provided with a flash lamp and rings a ring; if the current state is Hold, the external equipment slowly flashes a lamp and sounds a beep; if the state is not Hold, the external equipment lamp is always on and does not flash; the states included in the specific call application and the reactions corresponding to the external device in different states can be flexibly adjusted according to the needs of the user, and are not limited by the above embodiments.
Each call application has its corresponding SDK, each SDK is integrated inside the corresponding call application, each SDK can obtain the current state of the call application where it is located, but cannot obtain the current states of other call applications.
The SDK in each call application is the SDK of the call application for operating the external device through the preset communication interface, if the external device is a USB device, the SDK in each call application is the SDK for operating the USB, and the operation may include, for example, controlling the USB device, and obtaining information from the USB device.
Illustratively, in some possible embodiments, the external device may be, for example: external earphone, external camera etc., external equipment passes through communication interface and is connected with electronic equipment, and communication interface can be universal serial bus (Universal Serial Bus, USB), type-C interface, lightning interface etc. and the interface Type of specific connection interface can be adjusted in a flexible way according to user's needs, and is not limited by the embodiment given above.
Fig. 2 is a flow chart of a state synchronization method according to an embodiment of the present application, which is applied to an electronic device supporting a plurality of call applications, as shown in fig. 2, and the method includes:
S101: the SDK of the target application in the plurality of call applications requests the SDK service program for the synchronization authority of the state to be synchronized.
Optionally, when the target application needs to synchronize the state, the current state of the call application corresponding to the target application is the state to be synchronized, and at this time, a request is sent to the SDK service program (SDK SERVER) through the SDK corresponding to the target application.
If the SDK of the target application acquires the request success message of the SDK service program, S102 is executed.
S102: and synchronizing the state to be synchronized to the external equipment by the SDK of the target application through the communication interface.
If the SDK of the target application acquires the request success message, the current target application is indicated to successfully acquire the synchronization authority, and the state to be synchronized can be synchronized to the external device through the communication interface.
When a plurality of call applications request the synchronous right of the state to be synchronized from the SDK service program, each call application requests the state to be synchronized from the SDK service program through the corresponding SDK, only the SDK of the target application which acquires the request success message of the SDK service program can synchronize the state to be synchronized to the external device through the communication interface, and only one target application can acquire the synchronous right at the same time, namely, only one target application can be synchronously filled at the same time and cannot synchronously synchronize at multiple ends, so that the synchronous mode avoids the synchronous states of the plurality of applications to the external device at the same time, and the mutual conflict among the synchronous states received by the external device is caused, thereby influencing the normal use of users.
Optionally, on the basis of the foregoing embodiment, the embodiment of the present application may further provide a state synchronization method, and an implementation procedure of the method is described below by way of example with reference to the accompanying drawings. Fig. 3 is a flowchart of a state synchronization method according to another embodiment of the present application, as shown in fig. 3, before S102, the method further includes:
s103: and judging whether the synchronous authority of the state to be synchronized is occupied or not by the SDK service program.
If the synchronization authority of the state to be synchronized is not occupied, S104a is executed.
S104a: a request success message is returned by the SDK service program to the SDK of the target application.
If the synchronization authority of the state to be synchronized is occupied, S104b is executed.
And S104b, returning a request failure message to the SDK of the target application by the SDK service program.
S105: and caching the to-be-synchronized state by the SDK of the target application.
For example, in some possible embodiments, the SDK of the target application that requests the failure of the synchronization authority may, for example, send a request for the synchronization status to the SDK service program again at a preset time interval, or after the synchronization authority is unoccupied, the SDK service program sends a notification to each target application that is to be synchronized and has failed, notifying each target application that the current synchronization authority is unoccupied, each target application may send a synchronization request again, and the SDK of the specific target application may flexibly adjust the subsequent operation after buffering the to-be-synchronized status according to the user needs, which is not limited by the above embodiment.
Optionally, on the basis of the foregoing embodiment, the embodiment of the present application may further provide a state synchronization method, and an implementation procedure of the method is described below by way of example with reference to the accompanying drawings. Fig. 4 is a flow chart of a state synchronization method according to another embodiment of the present application, as shown in fig. 4, where the method further includes:
S106: and judging whether the SDK of the target application has the synchronous authority of the state to be synchronized or not.
Correspondingly, S101 may include:
If the synchronization authority of the state to be synchronized is not available, S107a is executed.
S107a: and requesting the SDK service program for the synchronous authority of the state to be synchronized by the SDK of the target application.
Subsequently, S103 to S105 are executed, and after the SDK service program determines that the synchronization authority of its state to be synchronized is not occupied, S102 is executed.
If the synchronization authority of the state to be synchronized is available, S102 is directly executed.
Optionally, in one embodiment of the present application, if the SDK of the target application acquires the request success message of the SDK service program, it is further required that the SDK of the target application records the synchronization authority of the target application having a state to be synchronized; after the SDK service program returns a request success message to the SDK of the target application, the SDK service program records that the synchronous authority of the state to be synchronized is occupied by the target application.
Optionally, on the basis of the foregoing embodiment, the embodiment of the present application may further provide a state synchronization method, and an implementation procedure of the method is described below by way of example with reference to the accompanying drawings. Fig. 5 is a flow chart of a state synchronization method according to another embodiment of the present application, as shown in fig. 5, where the method further includes:
s108: and if the synchronization of the state to be synchronized is finished, the SDK of the target application clears the record with the synchronization authority of the state to be synchronized.
If the target application no longer has a state to be synchronized, and the target software does not occupy the synchronization authority, the synchronization of the current state to be synchronized is determined to be ended.
S109: and requesting the SDK service program to release the occupation of the synchronous authority of the target application to the synchronous state by the SDK of the target application.
S110: and the SDK service program removes the occupation of the synchronous authority of the target application to the synchronous state.
Optionally, in one embodiment of the present application, the SDK service program may send a notification of unoccupied synchronization rights of the target application to the synchronization state to the SDKs of other applications in the plurality of call applications; in another embodiment of the present application, a query request may be sent to the SDK service program for the SDK of other applications in real time or at preset time intervals, to query whether the synchronization authority of the SDK service program is currently occupied; the specific method for determining whether the synchronization authority is occupied can be flexibly adjusted according to the needs of the user, and the limitation given by the two embodiments is not limited.
After the SDK service program releases the occupation of the target application to the synchronous authority, the synchronous authority can be occupied by other applications needing synchronous states.
Optionally, in an embodiment of the present application, an example is described in which the SDK service program sends a notification of unoccupied synchronization rights of a target application to a synchronization state to be performed by an SDK of another application in the multiple call applications, and after receiving the notification of unoccupied synchronization, the SDK of the another application determines, according to a pre-cached state, whether the another application has a state to be synchronized, and needs to be synchronized; if the state to be synchronized is needed to be synchronized, the SDK of other applications requests the SDK service program for the synchronization authority of the state to be synchronized; and if the SDK of the other application acquires the successful request message of the SDK service program, synchronizing the to-be-synchronized state to the external device by the SDK of the other application through the communication interface.
The time of the synchronous authority of the state to be synchronized is slightly different, so that even if a plurality of call applications send the requests at the same moment, only one call application can successfully preempt the synchronous authority.
For example, in some possible embodiments, the target application that may have successfully synchronized with the external device fails during use, resulting in abnormal exit or other abnormal conditions, which cause a problem that the target application cannot be used normally, and since the abnormal exit will not trigger the SDK of the target application to send a release request to the SDK service program, the synchronization authority will not be released all the time, so that when other software acquires the synchronization authority, success cannot be obtained all the time, in order to ensure that other software acquires the synchronization authority normally, the SDK service program will implement monitoring of the connection condition between the SDK of the target application and the SDK service program, if the SDK service program monitors that the connection with the data pipe between the SDK of the target application is disconnected, the SDK service program releases the occupation of the synchronization authority of the target application to the synchronization state, and notifies the SDK of the target application to clear the record of the synchronization authority having the synchronization authority to the synchronization state.
Optionally, on the basis of the foregoing embodiment, the embodiment of the present application may further provide a state synchronization method, and an implementation procedure of the method is described below by way of example with reference to the accompanying drawings. Fig. 6 is a flow chart of a state synchronization method according to another embodiment of the present application, as shown in fig. 6, where the method further includes:
S111: after the SDK service program is started, a preset pipeline service of the SDK service program side is created.
After the external device is connected with the electronic device, in the process of initializing the external device, judging whether the SDK service program is running, if the SDK service program is not running currently, starting the SDK service program, and if the SDK service program is running currently, not starting the SDK service program.
The preset pipeline service may be, for example, sdk_server, and is used for SDK connection of other applications.
S112: a communication pipe is created by the SDK of the target application to connect to the SDK service program through a preset pipe service.
Optionally, in one embodiment of the present application, the SDK of the target application creates the communication pipe by calling an SDK initialization function; the communication pipeline established between the SDK of the target application and the SDK service program exists until the target application program or the SDK service program exits or goes offline.
For example, in some possible embodiments, the authority of the synchronization state is not only one of the above, any one of the states that needs to control the synchronization conflict may have a corresponding authority, and the user may freely expand according to his own needs, which is not limited to the above embodiments.
By adopting the state synchronization method provided by the application, the synchronization authority is managed by introducing one SDK service program running in the electronic equipment, when a plurality of call applications request the synchronization authority of the state to be synchronized to the SDK service program, each call application requests the state to be synchronized to the SDK service program through the corresponding SDK, only the SDK of the target application which acquires the request success message of the SDK service program can synchronize the state to be synchronized to the external equipment through the communication interface, and only one target application can acquire the synchronization authority at the same moment, namely, only one target application can be synchronously filled at the same moment and cannot be synchronously synchronized at multiple ends.
The following explanation is made on the state synchronization device provided by the present application with reference to the accompanying drawings, and the state synchronization device can execute any one of the state synchronization methods of fig. 1 to 6, and the specific implementation and the beneficial effects thereof are referred to the above and are not repeated herein.
Fig. 7 is a schematic structural diagram of a state synchronization device according to an embodiment of the present application, which is applied to an electronic device supporting a plurality of call applications, wherein a software development kit SDK is integrated in each call application, an SDK service program is further installed in the electronic device, and the electronic device is connected to an external device through a communication interface, as shown in fig. 7, and the device includes: a request module 201 and a synchronization module 202 disposed within the SDK, wherein:
A request module 201, configured to request the SDK service program for the synchronization authority of the state to be synchronized.
The synchronization module 202 is configured to synchronize the to-be-synchronized state with the external device through the communication interface if the SDK of the target application obtains a request success message of the SDK service program.
Optionally, the apparatus further comprises: the first judging module and the first returning module are arranged in the SDK service program, wherein:
The first judging module is used for judging whether the synchronous authority of the state to be synchronized is occupied or not;
And the first return module is used for returning a request success message to the SDK of the target application if the synchronous authority of the state to be synchronized is not occupied.
Optionally, the apparatus further comprises: a cache module disposed within the SDK, wherein:
The first return module is specifically configured to return a request failure message to the SDK of the target application if the synchronization authority of the state to be synchronized is occupied;
and the caching module is used for caching the state to be synchronized.
Optionally, the apparatus further comprises: the second judging module is arranged in the SDK and is used for judging whether the synchronous permission of the state to be synchronized exists or not;
The request module is specifically configured to request the SDK service program for the synchronization authority of the state to be synchronized if the request module does not have the synchronization authority of the state to be synchronized.
Optionally, the synchronization module is specifically configured to synchronize the state to be synchronized with the external device through the communication interface if the synchronization module has the synchronization authority of the state to be synchronized.
Optionally, the apparatus further comprises: a first recording module disposed within the SDK and a second recording module disposed within the SDK service program, wherein:
The first recording module is used for recording the synchronous authority of the target application with the state to be synchronized;
And the second recording module is used for recording that the synchronous authority of the state to be synchronized is occupied by the target application.
Optionally, the apparatus further comprises: a clearing module arranged in the SDK, and a relieving module arranged in the SDK service program, wherein:
the clearing module is used for clearing records with the synchronization authority of the state to be synchronized if the synchronization of the state to be synchronized is finished;
The request module is used for requesting the SDK service program to release the occupation of the synchronous authority of the target application to the synchronous state;
and the releasing module is used for releasing the occupation of the synchronous authority of the target application to the synchronous state.
Optionally, the apparatus further comprises: and the notification module is arranged in the SDK service program and is used for sending a notification of unoccupied synchronization authority of the target application to the state to be synchronized to the SDKs of other applications in the plurality of call applications.
Optionally, the second determining module is specifically configured to determine, according to the pre-cached state, whether the other applications have a state to be synchronized and need to be synchronized.
And the request module is used for requesting the SDK service program for the synchronization authority of the state to be synchronized if the state to be synchronized needs to be synchronized.
And the synchronization module is specifically configured to synchronize the to-be-synchronized state with the external device through the communication interface if the SDKs of other applications acquire a request success message of the SDK service program.
Optionally, the releasing module is specifically configured to release the target application from occupying the synchronization right of the state to be synchronized when the SDK service program monitors that the connection between the SDK and the data pipe of the target application is disconnected.
And the notification module is used for notifying the SDK of the target application to clear the record with the synchronization authority of the state to be synchronized.
Optionally, the apparatus further comprises: a first creation module disposed within the SDK and a second creation module disposed within the SDK service program, wherein:
the first creating module is used for creating the preset pipeline service of the SDK service program side after the SDK service program is started.
And the second creation module is used for creating a communication pipeline to be connected to the SDK service program through a preset pipeline service.
The foregoing apparatus is used for executing the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
The above modules may be one or more integrated circuits configured to implement the above methods, for example: one or more Application SPECIFIC INTEGRATED Circuits (ASIC), or one or more microprocessors (DIGITAL SINGNAL processor, DSP), or one or more field programmable gate arrays (Field Programmable GATE ARRAY, FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device may be integrated in a terminal device or a chip of the terminal device.
The electronic device includes: a processor 501, a storage medium 502, and a bus 503.
The processor 501 is configured to store a program, and the processor 501 invokes the program stored in the storage medium 502 to execute the method embodiments corresponding to fig. 1 to fig. 6. The specific implementation manner and the technical effect are similar, and are not repeated here.
Optionally, the present application also provides a program product, such as a storage medium, on which a computer program is stored, including a program which, when being executed by a processor, performs the corresponding embodiments of the above-mentioned method.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods according to the embodiments of the application. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.

Claims (12)

1. The state synchronization method is characterized by being applied to electronic equipment supporting a plurality of call applications, wherein a Software Development Kit (SDK) is integrated in each call application, the electronic equipment is also provided with an SDK service program, and the electronic equipment is connected with external equipment through a communication interface, and the method comprises the following steps:
The SDK of the target application in the plurality of call applications requests the SDK service program for the synchronization authority of the state to be synchronized;
if the SDK of the target application acquires a request success message of the SDK service program, the SDK of the target application synchronizes the state to be synchronized to the external device through the communication interface;
If the SDK of the target application obtains the request success message of the SDK service program, before the SDK of the target application synchronizes the to-be-synchronized state to the external device through the communication interface, the method further includes:
if the synchronization authority of the state to be synchronized is not occupied, the SDK service program returns the request success message to the SDK of the target application;
if the synchronization authority of the state to be synchronized is occupied, the SDK service program returns a request failure message to the SDK of the target application;
And caching the state to be synchronized by the SDK of the target application.
2. The method of claim 1, wherein before the synchronization authority of the state to be synchronized is requested from the SDK service by the SDK of the target application of the plurality of telephony applications, the method further comprises:
Judging whether the SDK of the target application has the synchronous authority of the state to be synchronized or not;
The SDK of the target application in the plurality of call applications requests the SDK service program for a synchronization authority of a state to be synchronized, including:
And if the SDK service program does not have the synchronization authority of the state to be synchronized, the SDK of the target application requests the synchronization authority of the state to be synchronized from the SDK service program.
3. The method of claim 2, wherein the method further comprises:
And if the SDK has the synchronization authority of the state to be synchronized, synchronizing the state to be synchronized to the external equipment through the communication interface by the SDK of the target application.
4. The method of claim 2, wherein after the SDK of the target application obtains the request success message of the SDK service program, the method further comprises:
recording the synchronization authority of the target application with the state to be synchronized by the SDK of the target application;
after the SDK service returns the request success message to the SDK of the target application, the method further includes:
and recording that the synchronous authority of the state to be synchronized is occupied by the target application by the SDK service program.
5. The method of claim 4, wherein the method further comprises:
If the synchronization of the state to be synchronized is finished, the SDK of the target application clears the record with the synchronization authority of the state to be synchronized;
Requesting, by the SDK of the target application, to the SDK service program to release the occupation of the synchronization authority of the target application on the state to be synchronized;
And the SDK service program releases the occupation of the synchronous authority of the target application to the state to be synchronized.
6. The method of claim 5, wherein the method further comprises:
And the SDK service program sends a notification of the target application for relieving the synchronization authority of the state to be synchronized to SDKs of other applications in the plurality of call applications.
7. The method of claim 6, wherein the method further comprises:
Judging whether the other applications have the state to be synchronized or not by the SDK of the other applications according to the state cached in advance;
if the state to be synchronized is needed to be synchronized, the SDK of the other applications requests the SDK service program for the synchronization authority of the state to be synchronized;
And if the SDKs of the other applications acquire the request success message of the SDK service program, synchronizing the state to be synchronized to the external equipment through the communication interface by the SDKs of the other applications.
8. The method of claim 4, wherein the method further comprises:
And under the condition that the SDK service program monitors that the connection of a data pipeline between the SDK service program and the SDK of the target application is disconnected, the SDK service program releases the occupation of the synchronous authority of the target application to the state to be synchronized, and informs the SDK of the target application to clear the record with the synchronous authority of the state to be synchronized.
9. The method of claim 1, wherein before the synchronization authority of the state to be synchronized is requested from the SDK service by the SDK of the target application of the plurality of telephony applications, the method further comprises:
After the SDK service program is started, a preset pipeline service of the SDK service program side is created;
and creating a communication pipeline by the SDK of the target application to connect to the SDK service program through the preset pipeline service.
10. A state synchronization device, which is applied to an electronic device supporting a plurality of call applications, wherein a software development kit SDK is integrated in each call application, the electronic device is further provided with an SDK service program, and the electronic device is connected with an external device through a communication interface, the device comprises: a request module and a synchronization module disposed within the SDK, wherein:
The request module is used for requesting the SDK service program for the synchronous authority of the state to be synchronized;
the synchronization module is configured to synchronize the to-be-synchronized state with the external device through the communication interface if the SDK of the target application obtains a request success message of the SDK service program;
the apparatus further comprises: and the first return module is arranged in the SDK service program and is used for returning the request success message to the SDK of the target application if the synchronous authority of the state to be synchronized is not occupied.
11. An electronic device, the device comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the method of any of the preceding claims 1-9.
12. A storage medium having stored thereon a computer program which, when executed by a processor, performs the method of any of the preceding claims 1-9.
CN202011412916.XA 2020-12-02 2020-12-02 State synchronization method, device, equipment and storage medium Active CN112527515B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011412916.XA CN112527515B (en) 2020-12-02 2020-12-02 State synchronization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011412916.XA CN112527515B (en) 2020-12-02 2020-12-02 State synchronization method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112527515A CN112527515A (en) 2021-03-19
CN112527515B true CN112527515B (en) 2024-08-09

Family

ID=74997793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011412916.XA Active CN112527515B (en) 2020-12-02 2020-12-02 State synchronization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112527515B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008000121A1 (en) * 2006-06-19 2008-01-03 Zte Corporation Method for transmitting the service state of the voice call continuity service
CN106326015A (en) * 2015-06-17 2017-01-11 派斡信息技术(上海)有限公司 Networked cooperative work method and machine applying same

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES8105912A1 (en) * 1979-07-26 1981-06-16 Israel Electronics Corp A communication system by interpolation of dialogue (Machine-translation by Google Translate, not legally binding)
JP3894922B2 (en) * 2004-02-19 2007-03-22 株式会社日立国際電気 Wireless communication system
KR101489967B1 (en) * 2007-08-17 2015-02-05 삼성전자주식회사 System and method for updating presence satus information
JP2009049822A (en) * 2007-08-21 2009-03-05 Aruze Corp Ip telephone system
WO2014068364A1 (en) * 2012-10-30 2014-05-08 Wijetunga Sagara Method and systems for chunk-level peer-to-peer (p2p) file sharing
JP6101088B2 (en) * 2012-10-31 2017-03-22 株式会社Nttドコモ Status change notification method, subscriber authentication device, status change detection device, and mobile communication system
WO2015035396A1 (en) * 2013-09-09 2015-03-12 Layer, Inc. Federated authentication of client computers in networked data communications services callable by applications
US20150099588A1 (en) * 2013-10-09 2015-04-09 Zynga Inc. Systems and methods of distributing game network features
US10855760B2 (en) * 2013-11-07 2020-12-01 Cole Asher Ratias Systems and methods for synchronizing content and information on multiple computing devices
KR101759443B1 (en) * 2016-07-21 2017-07-19 강영진 A private data security apparatus of the communication terminal for remote service
CN108111374B (en) * 2017-11-16 2019-09-20 百度在线网络技术(北京)有限公司 Method, apparatus, equipment and the computer storage medium of synchronizer list
CN110971638B (en) * 2018-09-30 2022-04-29 北京奇虎科技有限公司 Message processing method and device, electronic equipment and readable storage medium
CN111045753A (en) * 2018-10-15 2020-04-21 陈旭 Synchronous switching control system and method
CN110113407B (en) * 2019-04-30 2021-08-17 上海连尚网络科技有限公司 Applet state synchronization method, apparatus and computer storage medium
CN111309747A (en) * 2020-02-18 2020-06-19 京东数字科技控股有限公司 Data synchronization method, system and device
CN111935316B (en) * 2020-09-25 2020-12-22 武汉中科通达高新技术股份有限公司 Method and device for acquiring front-end equipment catalog

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008000121A1 (en) * 2006-06-19 2008-01-03 Zte Corporation Method for transmitting the service state of the voice call continuity service
CN106326015A (en) * 2015-06-17 2017-01-11 派斡信息技术(上海)有限公司 Networked cooperative work method and machine applying same

Also Published As

Publication number Publication date
CN112527515A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
CN110601903B (en) Data processing method and device based on message queue middleware
CN105677380B (en) Method and device for board-by-board upgrading of double master control isolations
US11452162B2 (en) Session management method, mobility management functional entity and session management functional entity
USH1882H (en) System and method for transferring data to redundant components
CN110138753B (en) Distributed message service system, method, apparatus, and computer-readable storage medium
WO2021082733A1 (en) Mobile communication method and apparatus, storage medium, and electronic apparatus
JP5859634B2 (en) Mobile communication system, communication system, call processing node, and communication control method
KR101712542B1 (en) Data Backup QoS System on Failover and Method thereof
GB2587756A (en) Media/communications system
CA3156410A1 (en) Method of and device for networking access of client ends in p2p system
CN112422634B (en) Internet-based cross-network-segment distributed scheduling method and system
CN112527515B (en) State synchronization method, device, equipment and storage medium
JP5579224B2 (en) Mobile communication system, call processing node, and communication control method
JP2004266610A (en) Communication system, remote access server device, resource management method and program
CN106534758B (en) Conference backup method and device
CN110046138B (en) iSCSI target multi-instance processing method and distributed storage system
KR101883671B1 (en) Method and management server for dtitributing node
TW201722119A (en) Requesting and receiving a media stream within a networked system
JP6635525B1 (en) Exchange, communication system, registration method and registration program
JP5220059B2 (en) Network communication system and network communication method
CN111083182B (en) Distributed Internet of things equipment management method and device
CN108768828B (en) Synchronization method for adjusting local address book and mapping WeChat enterprise number address book
WO2013000212A1 (en) Method for accessing trunking service by terminal, terminal and base station
WO2020015606A1 (en) Communication method, device and system
CN114301763A (en) Distributed cluster fault processing method and system, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant