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

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

Info

Publication number
CN112527515A
CN112527515A CN202011412916.XA CN202011412916A CN112527515A CN 112527515 A CN112527515 A CN 112527515A CN 202011412916 A CN202011412916 A CN 202011412916A CN 112527515 A CN112527515 A CN 112527515A
Authority
CN
China
Prior art keywords
sdk
state
synchronized
target application
synchronization
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.)
Granted
Application number
CN202011412916.XA
Other languages
Chinese (zh)
Other versions
CN112527515B (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

Images

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 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 permission of the state to be synchronized; and if the SDK of the target application acquires the request success message of the SDK service program, the SDK of the target application synchronizes the state to be synchronized to the external equipment through the communication interface. Compared with the prior art, the method and the device avoid the problem that the state can be synchronized and disordered when a plurality of pieces of software are used simultaneously due to the fact that the condition that the state of the plurality of pieces of software is synchronized with the external equipment is not considered.

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 method, an apparatus, a device, and a storage medium for state synchronization.
Background
At present, a large number of external devices such as an external earphone and an external camera are available on the market, and the external devices are often connected with electronic equipment and then used together with a soft phone.
In the prior art, a softphone generally transmits a current call state of the softphone to an external device through a corresponding SDK, such as an incoming call state, a Hold state, a Mute state, and the like, and the external device performs corresponding performance after receiving synchronization of the states. In this way, a better interactive experience is brought to the user.
However, in the above method, a situation that a plurality of pieces of software synchronize states with an external device at the same time is not considered, so that when the plurality of pieces of software are used at the same time, the states may be synchronized and disordered.
Disclosure of Invention
An object of the present application is to provide a state synchronization method, apparatus, device and storage medium, which are used to solve the problem that when a plurality of software are used simultaneously, the states may be synchronized and disordered, because the scenario that the state of the plurality of software is synchronized to an external device at the same time is not considered in the prior art.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
in a first aspect, an embodiment of the present application provides a state synchronization method, which is applied to an electronic device supporting multiple 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, and the method includes:
the SDK of the target application in the plurality of call applications requests the SDK service program for the synchronization permission of the state to be synchronized;
and if the SDK of the target application acquires the request success message of the SDK service program, the SDK of the target application synchronizes the state to be synchronized to the external equipment through the communication interface.
Optionally, before the SDK of the target application synchronizes the to-be-synchronized state 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, the method further includes:
judging whether the synchronization authority of the state to be synchronized is occupied or not by the SDK service program;
and if the synchronization authority in the state to be synchronized is not occupied, returning the request success message to the SDK of the target application by the SDK service program.
Optionally, the method further comprises:
if the synchronization authority in the state to be synchronized is occupied, returning a request failure message to the SDK of the target application by the SDK service program;
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 session applications requests the SDK service program for the synchronization permission of the state to be synchronized, the method further includes:
judging whether the SDK of the target application has the synchronization authority of the state to be synchronized;
the step of requesting, by the SDK of the target application of the plurality of session applications, the SDK service program for a synchronization right of a state to be synchronized includes:
and if the SDK 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 synchronization authority of the state to be synchronized exists, 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 acquires the request success message of the SDK service program, the method further includes:
recording, by the SDK of the target application, that the target application has the synchronization authority of the state to be synchronized;
after the SDK server returns the request success message to the SDK of the target application, the method further includes:
and recording the synchronization authority of the state to be synchronized by the SDK service program to be occupied by the target application.
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 the SDK service program to release the occupation of the target application on the synchronization permission of the state to be synchronized by the SDK of the target application;
and the SDK service program releases the occupation of the target application on the synchronization permission of the state to be synchronized.
Optionally, the method further comprises:
and sending the unoccupied notification of the synchronization authority of the target application in the state to be synchronized to the SDKs of other applications in the plurality of call applications by the SDK service program.
Optionally, the method further comprises:
judging whether the other applications have the states to be synchronized and need to be synchronized by the SDKs of the other applications according to the pre-cached states;
if the state to be synchronized needs to be synchronized, the SDK of the other application requests the SDK service program for the synchronization permission of the state to be synchronized;
and if the SDKs of the other applications acquire the request success message of the received SDK service program, synchronizing the state to be synchronized to the external equipment by the SDKs of the other applications through the communication interface.
Optionally, the method further comprises:
and under the condition that the SDK service program monitors that the connection of the 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 synchronization authority of the target application on the state to be synchronized, and informs the SDK of the target application to clear the record with the synchronization authority of the state to be synchronized.
Optionally, before the SDK of the target application in the plurality of session applications requests the SDK service program for the synchronization permission of the state to be synchronized, the method further includes:
after the SDK service program is started, creating a preset pipeline service at the side of the SDK service program;
and creating a communication pipeline by the SDK of the target application so as to be connected to the SDK service program through the preset pipeline service.
In a second aspect, another embodiment of the present application provides a state synchronization apparatus, which is applied to an electronic device supporting multiple 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, the electronic device is connected to an external device through a communication interface, and the apparatus 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 synchronization 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 the request success message of the SDK service program.
Optionally, the apparatus further comprises: the system comprises a first judgment module and a first return module which are arranged in an SDK service program, wherein:
the first judging module is used for judging whether the synchronization authority of the state to be synchronized is occupied or not;
and the first returning module is used for returning the request success message to the SDK of the target application if the synchronization permission in the state to be synchronized is not occupied.
Optionally, the apparatus further comprises: a cache module disposed within the SDK, wherein:
the first returning module is specifically configured to return a request failure message to the SDK of the target application if the synchronization permission in the to-be-synchronized state is occupied;
and the cache module is used for caching the state to be synchronized.
Optionally, the apparatus further comprises: the second judgment module is arranged in the SDK and used for judging whether the SDK has the synchronization authority of the state to be synchronized;
the request module is specifically configured to request the SDK service program for the synchronization permission in the to-be-synchronized state if the SDK service program does not have the synchronization permission in the to-be-synchronized state.
Optionally, the synchronization module is specifically configured to synchronize the to-be-synchronized state with the external device through the communication interface if the synchronization permission of the to-be-synchronized state exists.
Optionally, the apparatus further comprises: a first recording module disposed in the SDK and a second recording module disposed in the SDK service, wherein:
the first recording module is used for recording the synchronization authority of the target application with the state to be synchronized;
and the second recording module is used for recording that the synchronization authority of the state to be synchronized is occupied by the target application.
Optionally, the apparatus further comprises: the clearing module is arranged in the SDK and the releasing module is arranged in the SDK service program, wherein:
the clearing module is used for clearing the record 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 target application on the synchronization permission of the state to be synchronized;
and the release module is used for releasing the occupation of the target application on the synchronization permission of the state to be synchronized.
Optionally, the apparatus further comprises: and the notification module is arranged in the SDK service program and used for sending the unoccupied notification of the target application to the synchronization permission of 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 whether the other applications have the to-be-synchronized state and need to be synchronized according to a pre-cached state;
the request module is used for requesting the SDK service program for the synchronization permission 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 state to be synchronized with the external device through the communication interface if the SDKs of the other applications acquire the request success message of receiving the SDK service program.
Optionally, the release module is specifically configured to release occupation of the synchronization permission of the target application to the state to be synchronized when the SDK service program monitors that the connection of the data pipeline 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, wherein:
the first creating module is used for creating the preset pipeline service at the side of the SDK service program after the SDK service program is started.
The second creating module is used for creating a communication pipeline so as to be connected to the SDK service program through the preset pipeline service.
In a third aspect, another embodiment of the present application provides an electronic device, including: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, the processor and the storage medium communicate via the bus when the electronic device is running, and the processor executes the machine-readable instructions to perform the steps of the method according to any one of the first aspect.
In a fourth aspect, another embodiment of the present application provides a storage medium having a computer program stored thereon, where the computer program is executed by a processor to perform the steps of the method according to any one of the above first aspects.
The beneficial effect of this application is: by adopting the state synchronization method provided by the application, when a plurality of call applications request the SDK service program for the synchronization right of the state to be synchronized, each call application requests the SDK service program for the state to be synchronized 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 with the external device through the communication interface, and only one target application can acquire the synchronization right at the same time, namely only one target application can be synchronously filled at the same time and cannot be synchronously synchronized at multiple ends, so that the synchronization mode avoids the problem that the plurality of synchronous states received by the external device are mutually conflicted to influence the normal use of a user due to the synchronous states from the plurality of applications.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic structural diagram of a state synchronization system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a state synchronization method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a state synchronization method according to another embodiment of the present application;
fig. 4 is a schematic flowchart of a state synchronization method according to another embodiment of the present application;
fig. 5 is a schematic flowchart of a state synchronization method according to another embodiment of the present application;
fig. 6 is a schematic 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 apparatus 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
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments.
The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
Additionally, the flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
A state synchronization method provided in the embodiments of the present application is explained below with reference to 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, and as shown in fig. 1, the system includes an electronic device and an external device, where:
multiple telephony applications may be supported on the electronic device, which may include, for example: a call application A, a call application B, a call application C and the like; the method comprises the steps that a Software Development Kit (SDK) is integrated in each call application, an SDK service program is further installed on the electronic equipment and used for managing synchronization permission, the electronic equipment is connected with external equipment through a communication interface, 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 synchronization permission in the electronic equipment can be acquired, for example, call voice or call video and the like can be acquired, and only one target application in a plurality of call applications can acquire the synchronization permission at the same time.
Optionally, in an embodiment of the present application, the call application may be a soft phone, for example, Teams, Avaya, swyx, zooper, Ringcentral, or the like, and the type included in the specific call application may be flexibly adjusted according to the user requirement, and is not limited to the foregoing 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 a synchronous state with the external equipment, the current state is an incoming call state, and at the moment, the external equipment flashes and rings incoming call ring tones; if the current state is the Hold state, the external equipment slowly flashes the lamp and beeps; if the state is not the Hold state, the external equipment lamp is always on and does not flicker; the states included in the specific call application and the corresponding reactions of the external device in different states may be flexibly adjusted according to the user's needs, and are not limited to the above embodiments.
Each conversation application has a corresponding SDK, each SDK is integrated in the corresponding conversation application, and each SDK can acquire the current state of the conversation application where the SDK is located, but cannot acquire the current states of other conversation applications.
The SDK in each call application is an SDK for the call application to operate the external device through the preset communication interface, and if the external device is a USB device, the SDK in each call application is an SDK for operating the USB, and the operation may include, for example, controlling the USB device and obtaining information from the USB device.
For example, in some possible embodiments, the external device may be, for example: the external earphone, the external camera, and the like, the external device is connected to the electronic device through a communication interface, the communication interface may be, for example, a Universal Serial Bus (USB), a Type-C interface, a lightning interface, and the like, and the interface Type of the specific connection interface may be flexibly adjusted according to the user's needs, which is not limited to the above embodiment.
Fig. 2 is a schematic flowchart of a state synchronization method according to an embodiment of the present application, applied to an electronic device supporting multiple call applications, as shown in fig. 2, 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 a synchronization state, the state of the call application corresponding to the target application is a to-be-synchronized state, and at this time, a request is sent to an SDK service program (SDK Server) through an SDK corresponding to the target application.
If the SDK of the target application obtains the request success message of the SDK service program, S102 is performed.
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 SDK indicates that the current target application successfully acquires the synchronization permission, and the state to be synchronized can be synchronized to the external device through the communication interface.
By adopting the state synchronization method provided by the application, when a plurality of call applications request the SDK service program for the synchronization right of the state to be synchronized, each call application requests the SDK service program for the state to be synchronized 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 with the external device through the communication interface, and only one target application can acquire the synchronization right at the same time, namely only one target application can be synchronously filled at the same time and cannot be synchronously synchronized at multiple ends, so that the synchronization mode avoids the problem that the plurality of synchronous states received by the external device are mutually conflicted to influence the normal use of a user due to the synchronous states from the plurality of applications.
Optionally, on the basis of the foregoing embodiments, the embodiments of the present application may further provide a state synchronization method, and an implementation process of the foregoing method is described as follows with reference to the accompanying drawings. Fig. 3 is a schematic 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 synchronization authority in the state to be synchronized is occupied by the SDK service program.
If the synchronization authority of the to-be-synchronized state is not occupied, S104a is executed.
S104 a: and returning a request success message to the SDK of the target application by the SDK service program.
If the synchronization authority of the to-be-synchronized state is occupied, S104b is executed.
S104b, returning a request failure message to the SDK of the target application by the SDK service.
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 requesting the synchronization permission failure may send a request of the synchronization state to the SDK service program again at preset time intervals, or after the synchronization permission is not occupied, the SDK service program sends a notification to each target application program whose state to be synchronized is a failure, so as to notify that the current synchronization permission of each target application program is not occupied, each target application program may send a synchronization request again, and the SDK of the specific target application caches the state to be synchronized, and may flexibly adjust according to the user's needs, without being limited to what is given in the above embodiments.
Optionally, on the basis of the foregoing embodiments, the embodiments of the present application may further provide a state synchronization method, and an implementation process in the foregoing method is described as follows with reference to the accompanying drawings. Fig. 4 is a schematic flowchart of a state synchronization method according to another embodiment of the present application, and as shown in fig. 4, the method further includes:
s106: and judging whether the SDK of the target application has the synchronization authority to be synchronized.
Correspondingly, S101 may include:
if there is no synchronization authority with the synchronization status, S107a is executed.
S107 a: and requesting the SDK service program for the synchronization authority of the state to be synchronized by the SDK of the target application.
Then, S103-S105 are executed, and after the SDK service program determines that the synchronization authority of the state to be synchronized is not occupied, S102 is executed again.
If the synchronization authority of the state to be synchronized is available, S102 is directly executed.
Optionally, in an embodiment of the present application, if the SDK of the target application obtains the request success message of the SDK service program, the SDK of the target application further needs to record that the target application has a synchronization permission with a state to be synchronized; and after the SDK service program returns a request success message to the SDK of the target application, the SDK service program records that the synchronization authority of the state to be synchronized is occupied by the target application.
Optionally, on the basis of the foregoing embodiments, the embodiments of the present application may further provide a state synchronization method, and an implementation process of the foregoing method is described as follows with reference to the accompanying drawings. Fig. 5 is a schematic flowchart of a state synchronization method according to another embodiment of the present application, and as shown in fig. 5, the method further includes:
s108: and if the synchronization of the state to be synchronized is finished, clearing the record with the synchronization authority of the state to be synchronized by the SDK of the target application.
If the target application does not have any state to be synchronized, and the target software does not need to occupy the synchronization authority at the moment, the synchronization of the current state to be synchronized is determined to be finished.
S109: and the SDK of the target application requests the SDK service program to release the occupation of the synchronization authority of the target application to the state to be synchronized.
S110: and the SDK service program relieves the occupation of the synchronization authority of the target application to the state to be synchronized.
Optionally, in an embodiment of the present application, an SDK service program may send, to SDKs of other applications in the multiple call applications, a release occupation notification of the target application to the synchronization right in the to-be-synchronized state; in another embodiment of the present application, an inquiry request may also be sent to the SDK service program in real time for the SDKs of other applications, or at every preset time interval, to inquire whether the synchronization right of the SDK service program is currently occupied; the method for specifically determining whether the synchronization permission is occupied may be flexibly adjusted according to the user's needs, and is not limited to the two embodiments described above.
After the SDK service program releases the occupation of the target application on the synchronization permission, the synchronization permission can be occupied by other applications needing the synchronization state.
Optionally, in an embodiment of the present application, it is described that the SDK service program sends, to SDKs of other applications in the multiple session applications, a release occupation notification of a target application to a synchronization right in a state to be synchronized, and after receiving the release occupation notification, SDKs of other applications determine, according to a pre-cached state, whether other applications have a state to be synchronized and need to be synchronized; if the state to be synchronized needs 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 SDKs of other applications acquire the request success message of the received SDK service program, synchronizing the to-be-synchronized state to the external equipment by the SDKs of other applications through the communication interface.
Because the time of the synchronous authority of the request to be synchronized state sent by each conversation application has slight difference, only one conversation application can successfully preempt the synchronous authority even if a plurality of conversation applications send the request in the same moment.
Illustratively, in some possible embodiments, a target application that may have successfully synchronized with an external device fails during use, resulting in abnormal exit or other abnormal situations, causing a problem that the target application cannot be used normally, and since an abnormal exit does not trigger the target application's SDK to send a release request to the SDK service, therefore, the synchronization authority can not be released all the time, and other software can not successfully acquire the synchronization authority all the time when acquiring the synchronization authority, in order to ensure that other software normally acquires the synchronization authority, the SDK service program monitors the connection status between the SDK of the target application and the SDK service program, and if the SDK service program monitors that the connection between the SDK of the target application and the SDK of the target application is disconnected, and the SDK service program relieves the occupation of the synchronization 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 synchronization authority to be synchronized.
Optionally, on the basis of the foregoing embodiments, the embodiments of the present application may further provide a state synchronization method, and an implementation process of the foregoing method is described as follows with reference to the accompanying drawings. Fig. 6 is a schematic flowchart of a state synchronization method according to another embodiment of the present application, and as shown in fig. 6, the method further includes:
s111: and after the SDK service program is started, creating preset pipeline service at the side of the SDK service program.
After the external device is connected with the electronic device, whether the SDK service program is running or not is judged in the initialization process of the external device, if not, the SDK service program is started, and if not, the SDK service program does not need to be started.
The preset pipe service may be, for example, an SDK _ Server, and is used for connecting SDKs 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 an 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 all the time 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 state that needs to control the synchronization conflict may have a corresponding authority, and the user may freely expand according to the own requirement, which is not limited to the above embodiments.
By adopting the state synchronization method provided by the application, the SDK service program running in the electronic equipment is introduced to manage the synchronization authority, when a plurality of call applications request the synchronization authority 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 from the external equipment through the communication interface, and only one target application can acquire the synchronization authority at the same time, namely only one target application can be synchronously filled at the same time and cannot synchronize multiple ends at the same time, the synchronization mode avoids the synchronous state from a plurality of call applications to the external equipment at the same time, the SDK service program provided by the application can be flexibly expanded according to the subsequent requirements of users, and can support the synchronization of complex authority, the scheme has high expansibility.
The following explains a state synchronization apparatus provided in the present application with reference to the drawings, where the state synchronization apparatus can execute any one of the state synchronization methods in fig. 1 to 6, and specific implementation and beneficial effects of the state synchronization apparatus refer to the above description, which is not described again below.
Fig. 7 is a schematic structural diagram of a state synchronization apparatus according to an embodiment of the present application, which is applied to an electronic device supporting multiple 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, as shown in fig. 7, the apparatus includes: a request module 201 and a synchronization module 202 provided within the SDK,
wherein:
the request module 201 is configured to request the SDK service program for a synchronization right in a state to be synchronized.
The synchronization module 202 is configured to synchronize a 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.
Optionally, the apparatus further comprises: the system comprises a first judgment module and a first return module which are arranged in an SDK service program, wherein:
the first judgment module is used for judging whether the synchronization authority in the state to be synchronized is occupied or not;
and the first returning module is used for returning a request success message to the SDK of the target application if the synchronization authority in the state to be synchronized is not occupied.
Optionally, the apparatus further comprises: a cache module disposed within the SDK, wherein:
the first returning module is specifically used for returning a request failure message to the SDK of the target application if the synchronization authority in the state to be synchronized is occupied;
and the cache module is used for caching the state to be synchronized.
Optionally, the apparatus further comprises: the second judgment module is arranged in the SDK and used for judging whether the SDK has the synchronization authority of the state to be synchronized;
and the request module is specifically used for requesting the SDK service program for the synchronization permission in the state to be synchronized if the SDK service program does not have the synchronization permission in the state to be synchronized.
Optionally, the synchronization module is specifically configured to synchronize the to-be-synchronized state with the external device through the communication interface if the synchronization module has the synchronization right of the to-be-synchronized state.
Optionally, the apparatus further comprises: a first recording module disposed in the SDK and a second recording module disposed in the SDK service, wherein:
the first recording module is used for recording the synchronization authority of the target application with the state to be synchronized;
and the second recording module is used for recording that the synchronization authority of the state to be synchronized is occupied by the target application.
Optionally, the apparatus further comprises: the clearing module is arranged in the SDK and the releasing module is arranged in the SDK service program, wherein:
the clearing module is used for clearing the record 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 remove the occupation of the synchronization authority of the target application to the state to be synchronized;
and the release module is used for releasing the occupation of the synchronization 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 synchronization permission of the target application to be in the synchronization state to the SDKs of other applications in the plurality of conversation applications.
Optionally, the second determining module is specifically configured to determine whether another application has a state to be synchronized and needs to be synchronized according to the pre-cached state.
And the request module is used for requesting the SDK service program for the synchronization permission of the state to be synchronized if the state to be synchronized needs to be synchronized.
And the synchronization module is specifically used for synchronizing the to-be-synchronized state to the external device through the communication interface if the SDK of the other application acquires the request success message of the received SDK service program.
Optionally, the release module is specifically configured to release occupation of the synchronization right of the target application to the to-be-synchronized state when the SDK service program monitors that the connection with the data pipe between 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, wherein:
and the first creating module is used for creating the preset pipeline service at the side of the SDK service program after the SDK service program is started.
And the second creating module is used for creating a communication pipeline so as to be connected to the SDK service program through the preset pipeline service.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules 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 (CPU) or other processor capable of calling program code. For another example, these 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 used for storing a program, and the processor 501 calls the program stored in the storage medium 502 to execute the method embodiment corresponding to fig. 1-6. The specific implementation and technical effects are similar, and are not described herein again.
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 executed by a processor, performs embodiments corresponding to the above-described method.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to perform some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

Claims (14)

1. A state synchronization method is applied to electronic equipment supporting a plurality of call applications, a Software Development Kit (SDK) is integrated in each call application, an SDK service program is also installed in the electronic equipment, 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 permission of the state to be synchronized;
and if the SDK of the target application acquires the request success message of the SDK service program, the SDK of the target application synchronizes the state to be synchronized to the external equipment through the communication interface.
2. The method according to claim 1, wherein before the SDK of the target application synchronizes the to-be-synchronized state 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, the method further comprises:
judging whether the synchronization authority of the state to be synchronized is occupied or not by the SDK service program;
and if the synchronization authority in the state to be synchronized is not occupied, returning the request success message to the SDK of the target application by the SDK service program.
3. The method of claim 2, wherein the method further comprises:
if the synchronization authority in the state to be synchronized is occupied, returning a request failure message to the SDK of the target application by the SDK service program;
and caching the state to be synchronized by the SDK of the target application.
4. The method of claim 1, wherein prior to the requesting, by the SDK of the target one of the plurality of telephony applications, the synchronization authority to be synchronized from the SDK service, the method further comprises:
judging whether the SDK of the target application has the synchronization authority of the state to be synchronized;
the step of requesting the SDK service program for the synchronization permission of the state to be synchronized by the SDK of the target application in the plurality of call applications comprises the following steps:
and if the SDK 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.
5. The method of claim 4, wherein the method further comprises:
and if the synchronization authority of the state to be synchronized exists, synchronizing the state to be synchronized to the external equipment through the communication interface by the SDK of the target application.
6. The method of claim 4, wherein if the SDK of the target application obtains the request success message of the SDK service program, the method further comprises:
recording, by the SDK of the target application, that the target application has the synchronization authority of the state to be synchronized;
after the SDK server returns the request success message to the SDK of the target application, the method further includes:
and recording the synchronization permission of the state to be synchronized by the SDK service program and occupying the target application.
7. The method of claim 6, 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 the SDK service program to release the occupation of the target application on the synchronization permission of the state to be synchronized by the SDK of the target application;
and the SDK service program releases the occupation of the target application on the synchronization permission of the state to be synchronized.
8. The method of claim 7, wherein the method further comprises:
and sending the unoccupied notification of the synchronization authority of the target application in the state to be synchronized to the SDKs of other applications in the plurality of call applications by the SDK service program.
9. The method of claim 8, wherein the method further comprises:
judging whether the other applications have the states to be synchronized and need to be synchronized by the SDKs of the other applications according to the pre-cached states;
if the state to be synchronized needs to be synchronized, the SDK of the other application requests the SDK service program for the synchronization permission of the state to be synchronized;
and if the SDKs of the other applications acquire the request success message of the received SDK service program, synchronizing the state to be synchronized to the external equipment by the SDKs of the other applications through the communication interface.
10. The method of claim 6, wherein the method further comprises:
and under the condition that the SDK service program monitors that the connection of the 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 synchronization authority of the target application on the state to be synchronized, and informs the SDK of the target application to clear the record with the synchronization authority of the state to be synchronized.
11. The method of claim 1, wherein prior to the requesting, by the SDK of the target one of the plurality of telephony applications, the synchronization authority to be synchronized from the SDK service, the method further comprises:
after the SDK service program is started, creating a preset pipeline service at the side of the SDK service program;
and creating a communication pipeline by the SDK of the target application so as to be connected to the SDK service program through the preset pipeline service.
12. A state synchronizer is characterized in that the state synchronizer is applied to electronic equipment supporting a plurality of conversation applications, a Software Development Kit (SDK) is integrated in each conversation application, an SDK service program is further installed on the electronic equipment, the electronic equipment is connected with external equipment through a communication interface, and the state synchronizer 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 synchronization authority of the state to be synchronized;
and the synchronization module is used for synchronizing the state to be synchronized to the external equipment through the communication interface if the SDK of the target application acquires the request success message of the SDK service program.
13. An electronic device, characterized in that the device comprises: 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 via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the method of any one of claims 1-11.
14. A storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, performs the method of any of the preceding claims 1-11.
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 true CN112527515A (en) 2021-03-19
CN112527515B 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 (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES493562A0 (en) * 1979-07-26 1981-06-16 Israel Electronics Corp A DIALOGUE INTERPOLATION COMMUNICATION SYSTEM
JP2005236611A (en) * 2004-02-19 2005-09-02 Hitachi Kokusai Electric Inc Radio communications system
WO2008000121A1 (en) * 2006-06-19 2008-01-03 Zte Corporation Method for transmitting the service state of the voice call continuity service
KR20090018316A (en) * 2007-08-17 2009-02-20 삼성전자주식회사 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
JP2014112813A (en) * 2012-10-31 2014-06-19 Ntt Docomo Inc 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
CN106326015A (en) * 2015-06-17 2017-01-11 派斡信息技术(上海)有限公司 Networked cooperative work method and machine applying same
KR101759443B1 (en) * 2016-07-21 2017-07-19 강영진 A private data security apparatus of the communication terminal for remote service
US20180234496A1 (en) * 2013-11-07 2018-08-16 Cole Asher Ratias Systems and methods for synchronizing content and information on multiple computing devices
US20190149601A1 (en) * 2017-11-16 2019-05-16 Baidu Online Network Technology (Beijing) Co., Ltd Device list synchronizing method and apparatus, device, and computer storage medium
CN110971638A (en) * 2018-09-30 2020-04-07 北京奇虎科技有限公司 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
CN111309747A (en) * 2020-02-18 2020-06-19 京东数字科技控股有限公司 Data synchronization method, system and device
WO2020221190A1 (en) * 2019-04-30 2020-11-05 上海连尚网络科技有限公司 Applet state synchronization method, device and computer storage medium
CN111935316A (en) * 2020-09-25 2020-11-13 武汉中科通达高新技术股份有限公司 Method and device for acquiring front-end equipment catalog

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES493562A0 (en) * 1979-07-26 1981-06-16 Israel Electronics Corp A DIALOGUE INTERPOLATION COMMUNICATION SYSTEM
JP2005236611A (en) * 2004-02-19 2005-09-02 Hitachi Kokusai Electric Inc Radio communications system
WO2008000121A1 (en) * 2006-06-19 2008-01-03 Zte Corporation Method for transmitting the service state of the voice call continuity service
KR20090018316A (en) * 2007-08-17 2009-02-20 삼성전자주식회사 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
JP2014112813A (en) * 2012-10-31 2014-06-19 Ntt Docomo Inc 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
US20180234496A1 (en) * 2013-11-07 2018-08-16 Cole Asher Ratias Systems and methods for synchronizing content and information on multiple computing devices
CN106326015A (en) * 2015-06-17 2017-01-11 派斡信息技术(上海)有限公司 Networked cooperative work method and machine applying same
KR101759443B1 (en) * 2016-07-21 2017-07-19 강영진 A private data security apparatus of the communication terminal for remote service
US20190149601A1 (en) * 2017-11-16 2019-05-16 Baidu Online Network Technology (Beijing) Co., Ltd Device list synchronizing method and apparatus, device, and computer storage medium
CN110971638A (en) * 2018-09-30 2020-04-07 北京奇虎科技有限公司 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
WO2020221190A1 (en) * 2019-04-30 2020-11-05 上海连尚网络科技有限公司 Applet state synchronization method, device and computer storage medium
CN111309747A (en) * 2020-02-18 2020-06-19 京东数字科技控股有限公司 Data synchronization method, system and device
CN111935316A (en) * 2020-09-25 2020-11-13 武汉中科通达高新技术股份有限公司 Method and device for acquiring front-end equipment catalog

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
C. -H. LIN, P. -Y. SUN AND F. YU: "Space Connection: A New 3D Tele-immersion Platform for Web-Based Gesture-Collaborative Games and Services", 《2015 IEEE/ACM 4TH INTERNATIONAL WORKSHOP ON GAMES AND SOFTWARE ENGINEERING》 *
P. PANDEY, B. PRATAP AND R. S. PANDEY: "Implementation of FreeRTOS based Precision Time Protocol (PTP) application as per IEEE1588v2 standards for Xilinx Zynq UltraScale Plus MPSoC devices", 《2019 INTERNATIONAL CONFERENCE ON COMMUNICATION AND ELECTRONICS SYSTEMS (ICCES)》 *
崔梦菲: "基于网页实时通讯技术的移动终端视频会议SDK实现", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *
王旭: "移动端跨平台界面组件与界面同步服务的研究与实现", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Also Published As

Publication number Publication date
CN112527515B (en) 2024-08-09

Similar Documents

Publication Publication Date Title
US7796520B2 (en) System and methods for announcing and locating services in a distributed peer-to-peer network
RU2316150C2 (en) Communication device for connecting a client to group call in group communication network
CN102075643B (en) Terminal device and backup system
CN102088402B (en) Novel bandwidth management algorithm
CN107404509B (en) Distributed service configuration system and information management method
CN102137338B (en) Method and system for push-to-talk (PTT) user management and presentation as well as session state management
CN113727464B (en) Method and device for establishing high concurrent call of SIP streaming media server
WO2022116721A1 (en) Service request processing method, system, electronic device and computer storage medium
CN112422634B (en) Internet-based cross-network-segment distributed scheduling method and system
CA3156410A1 (en) Method of and device for networking access of client ends in p2p system
US20090135812A1 (en) Call transfer method and communication system
JP5579224B2 (en) Mobile communication system, call processing node, and communication control method
CN112527515A (en) State synchronization method, device, equipment and storage medium
CN106534758B (en) Conference backup method and device
CA2581199C (en) System and methods for announcing and locating services in a distributed peer-to-peer network
CN107302551B (en) Service data publishing method and device
JP6635525B1 (en) Exchange, communication system, registration method and registration program
CN114301763A (en) Distributed cluster fault processing method and system, electronic device and storage medium
CN110890989A (en) Channel connection method and device
EP1941356B1 (en) Electronic apparatus with server device for managing setting data
EP2475157B1 (en) Method and apparatus for managing telephone services of a user communication device when a server providing those telephone services is unavailable
JP5999763B2 (en) Subscriber accommodation call control device, call restriction method for subscriber accommodation call control device, and program
US11470673B2 (en) Method and system for detecting interruption of communications and for automatically re-establishing the communications
CN116405886A (en) Group call maintaining method, device, system and storage medium
US20210266367A1 (en) Server device used in distributed processing system, distributed processing method, and program

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