CN113852843B - Content synchronization method, device, electronic equipment and storage medium - Google Patents
Content synchronization method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113852843B CN113852843B CN202110990660.9A CN202110990660A CN113852843B CN 113852843 B CN113852843 B CN 113852843B CN 202110990660 A CN202110990660 A CN 202110990660A CN 113852843 B CN113852843 B CN 113852843B
- Authority
- CN
- China
- Prior art keywords
- content
- applet
- client
- server
- type
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/235—Processing of additional data, e.g. scrambling of additional data or processing content descriptors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/242—Synchronization processes, e.g. processing of PCR [Program Clock References]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/478—Supplemental services, e.g. displaying phone caller identification, shopping application
- H04N21/4781—Games
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The disclosure provides a content synchronization method, a device, an electronic device and a storage medium, wherein the method comprises the following steps: receiving a synchronization message sent by a client, wherein the synchronization message comprises: the small program identification, wherein the small program to which the small program identification belongs runs on the client; determining target operation content corresponding to the applet identification; and sending the target running content to the client. By the method and the device, the running contents of the applets of the server and each client can be synchronously processed, and the synchronous effect of the running contents of the applets is effectively improved.
Description
Technical Field
The disclosure relates to the technical field of electronic equipment, and in particular relates to a content synchronization method, a content synchronization device, electronic equipment and a storage medium.
Background
With the development of computer technology, live broadcasting has become a current trend. In the live broadcasting process of a user by using a live broadcasting application program, a client side of a main broadcasting user side of a live broadcasting room uploads collected live broadcasting video to a live broadcasting server in real time, and a client side of a audience user side of the live broadcasting room acquires the live broadcasting video from the live broadcasting server and plays the live broadcasting video on a live broadcasting interface of the client side of the audience user side.
In some live applications, some preset applets may be loaded in the live class application, which may be, for example, game class applets (e.g., in particular, online roulette), or other applets of any other functionality to assist in the interaction of the anchor user and the audience user, which may be used to enrich the interaction experience of the anchor user and the audience user when running the applets at the respective clients.
In the related art, in a live broadcast service scenario, both live broadcast users and audience users can join a live broadcast room, and the live broadcast room loads an online roulette game, while live broadcast users or audience users may often access other live broadcast rooms or switch other application programs (such as WeChat reply messages) when using live broadcast application programs, so that the operation content of the applet cannot be synchronized in time each time when the applet operated in the live broadcast application program is returned again, thereby affecting the synchronization effect of the operation content of the applet.
Disclosure of Invention
The present disclosure aims to solve, at least to some extent, one of the technical problems in the related art.
Therefore, an object of the present disclosure is to provide a method, an apparatus, an electronic device, a storage medium, and a computer program product for synchronizing the running content of an applet on a server and each client, so as to effectively improve the synchronization effect of the running content of the applet.
According to a first aspect of the present disclosure, there is provided a content synchronization method, applied to a server, including: receiving a synchronization message sent by a client, wherein the synchronization message comprises: the small program identification, wherein the small program to which the small program identification belongs runs on the client; determining target operation content corresponding to the applet identification; and sending the target running content to the client.
According to a second aspect of the present disclosure, there is provided a content synchronization method, applied to a client, including: sending a synchronization message to a server, wherein the synchronization message comprises: the small program identification, wherein the small program to which the small program identification belongs runs on the client; receiving target operation content which is sent by a server and corresponds to the applet identification; and running the target running content in the applet run by the client.
According to a third aspect of the present disclosure, there is provided a content synchronization device, applied to a server, including: the first receiving module is configured to receive a synchronization message sent by a client, where the synchronization message includes: the small program identification, wherein the small program to which the small program identification belongs runs on the client; the determining module is used for determining target operation content corresponding to the applet identification; and the first sending module is used for sending the target operation content to the client.
According to a fourth aspect of the present disclosure, there is provided a content synchronization apparatus, applied to a client, including: the second sending module is configured to send a synchronization message to the server, where the synchronization message includes: the small program identification, wherein the small program to which the small program identification belongs runs on the client; the second receiving module is used for receiving target operation content which is sent by the server and corresponds to the applet identification; and the operation module is used for operating the target operation content in the small program operated by the client.
According to a fifth aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the content synchronization method of embodiments of the first aspect of the present disclosure or to perform the content synchronization method of embodiments of the second aspect of the present disclosure.
According to a sixth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the content synchronization method of the embodiments of the first aspect of the present disclosure or to perform the content synchronization method of the embodiments of the second aspect of the present disclosure.
According to a seventh aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a content synchronization method of an embodiment of the first aspect of the present disclosure, or implements a content synchronization method of an embodiment of the second aspect of the present disclosure.
The content synchronization method, apparatus, electronic device, storage medium and computer program product of the present disclosure have at least the following advantages:
the method comprises the steps of receiving the synchronous message sent by the client, determining the target operation content corresponding to the applet identification in the synchronous message, wherein the applet identification belongs to the applet which operates on the client, and sending the target operation content to each client.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The foregoing and/or additional aspects and advantages of the present disclosure will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart of a content synchronization method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a setup interface for an applet for a client on the user side of a host in one embodiment of the disclosure;
FIG. 3 is a flow chart of a content synchronization method according to another embodiment of the present disclosure;
FIG. 4 is a flow chart of a content synchronization method according to another embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a spectator user-side client game settings interface in another embodiment of the present disclosure;
FIG. 6 is a flow chart of a content synchronization method according to another embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a content synchronization device according to an embodiment of the present disclosure;
fig. 8 is a schematic structural view of a content synchronization device according to another embodiment of the present disclosure;
fig. 9 is a schematic structural view of a content synchronization device according to another embodiment of the present disclosure;
fig. 10 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for explaining the present disclosure and are not to be construed as limiting the present disclosure. On the contrary, the embodiments of the disclosure include all alternatives, modifications, and equivalents as may be included within the spirit and scope of the appended claims.
Aiming at the technical problems that in the related technology, under the live broadcast service scene, live broadcast users and audience users can both join a live broadcast room, and the live broadcast room loads an online roulette game, and when the live broadcast users or audience users use live broadcast application programs, the live broadcast users or audience users may often access other live broadcast rooms or switch other application programs (such as WeChat reply messages), so that the operation contents of the applets can not be synchronized in time when the applets operated in the live broadcast application programs are returned each time, and the synchronization effect of the operation contents of the applets is influenced.
The method is described below with reference to specific examples.
Fig. 1 is a flow chart of a content synchronization method according to an embodiment of the disclosure.
It should be noted that, the execution body of the content synchronization method in this embodiment is a content synchronization device, which may be implemented in software and/or hardware, and the device may be configured in an electronic apparatus. The electronic device may be a hardware device with various operating systems and imaging devices, such as a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and the like.
The execution body of the embodiment of the present disclosure may be, for example, a central processing unit (Central Processing Unit, CPU) in the electronic device in hardware, or may be, for example, a related background service in the electronic device in software, which is not limited thereto.
The application scenario in the embodiment of the present disclosure may be, for example, a scenario in which a user uses a live broadcast application program to perform live video broadcast, that is, in the application scenario, a host user sends a live video stream to a client (sometimes referred to as a user client) on a viewer user side by using a host client (the host client is a client on the host user side), and the user client correspondingly displays the live video stream.
When a host user adopts a client to send a live video stream to the client, the host client firstly pushes the live video stream (pushing, which can represent the process that the client uploads the live video stream to the server or the process that the server pushes the live video stream to the client) to the background server, the server correspondingly transcodes the live video stream, and the server can respond to the instruction of pulling (pulling, which means the process that the client obtains the live video stream from the server) of the client, so as to push the live video stream to the client.
The execution body of the embodiments of the present disclosure may be specifically a server in the above described scenario, and the description for the anchor client or the user client may refer to the subsequent embodiments.
It should be noted that, the client in the subsequent embodiments may be a hosting client or a user client, which is not limited.
As shown in fig. 1, the content synchronization method includes:
s101: receiving a synchronization message sent by a client, wherein the synchronization message comprises: and the applet identification, wherein the applet to which the applet identification belongs runs on the client.
In the live application scenario, some preset applets are loaded in the live application program, and the applets can be, for example, game applets (specifically, for example, online roulette), or applets with any other functions, so as to assist the interaction between the host user and the audience user, and the server can monitor whether a synchronization message sent by the client is received in real time, wherein the synchronization message can be used for performing synchronization processing on the running content of the game applets.
For example, a message monitoring interface may be configured at the server, and by calling the message monitoring interface to monitor in real time whether a synchronization message sent by the client is received, when the synchronization message sent by the client is monitored to be received, the synchronization message is parsed to obtain an applet identification, where the applet identification can be used to uniquely identify an applet currently running in a live class application of the client.
The client may be a client on the anchor user side or a client on the viewer user side, for example, the client on the anchor user side may start an applet in a live broadcast application program, and send a request for joining the applet to the client on the viewer user side, and when the client on the viewer user side confirms joining, the applet may be started in the live broadcast application program on the client on the home side in the same manner, so as to trigger live broadcast interaction based on the applet in a live broadcast room.
Based on the above-mentioned scene description, in the embodiment of the present disclosure, synchronization of the target running content of the client on the anchor user side to the corresponding applet in the client on the audience user side is supported, and similarly, in the embodiment of the present disclosure, synchronization of the target running content of the client on the user side to the corresponding applet in the client on the anchor user side is also supported.
When a user of any side client executes corresponding operation action on the applet, the side client can capture the operation action information of the user on the applet and generate corresponding synchronous information according to the applet identification, and the synchronous information is sent to the server, so that the server can synchronize the operation content corresponding to the operation action information into other side clients based on the synchronous information, thereby maintaining the synchronization effect of the operation content of the applet in different side clients.
The anchor client may start an applet in the live class application and send a request to the viewer client to join the applet, as follows:
the online roulette game method comprises the steps that an online roulette game is taken as an example, a host user can set the number of participants in an applet running in a client live room on the host user side to reach a certain number, or trigger to start the online roulette game when the duration reaches a set time, so that when the triggering condition is met, a request for joining the applet is sent to a client on the audience user side, or the host user can start a control for starting the game in the applet running in the client live room on the host user side, and the game is started at any time, so that when the control for starting the game is triggered, a request for joining the applet is sent to the client on the audience user side, and the method is not limited.
For example, fig. 2 is a schematic diagram of a setting interface of a client on a host user side for an applet in an embodiment of the present disclosure, and as shown in fig. 2, with the applet being an online roulette game, the host user may click on an icon of the applet of the online roulette game to trigger entering the online roulette game, set online roulette game participation conditions, such as bonus information of the online roulette game, and set participation conditions and maximum number of participants for the online roulette game, which is not limited.
Based on the description of the above scenario, when the server receives the synchronization message sent by the client, the client on the anchor user side is instructed, or the client on the viewer user side has a requirement of acquiring real-time running content of the applet from the server, where the real-time running content may be called as target running content, so that the analysis of the synchronization message may be triggered to obtain the applet identifier.
S102: and determining target running content corresponding to the applet identification.
Based on the description of the above scenario, the server side will generally provide the background service of the application program (such as the live broadcast application program and the applet hosted in the live broadcast application program) to the client side, and receive, manage, save and push the running content related to the application program, so that in the embodiment of the present disclosure, the running content of the application program (such as the live broadcast application program and the applet hosted in the live broadcast application program) is supported to be uniformly managed by the server side.
In some embodiments, after receiving the synchronization message sent by the receiving client, the server may parse the applet identifier to determine the applet that needs to synchronize its running content, and then determine the target running content corresponding to the applet identifier, where the target running content refers to the real-time running content in the applet that needs to be synchronized, where the target running content may be generated in real time when the running content of the applet in any client (the client on the anchor user side or the client on the audience user side) changes, so as to ensure real-time performance of running content synchronization and ensure the synchronization effect.
In some embodiments, the server may determine, based on the background service, the target running content generated in real time when the running content of the corresponding applet (the corresponding applet is the same as the applet to which the applet identification belongs) in any client (the client on the anchor user side or the client on the viewer user side) changes, or may determine, from the cloud, the target running content corresponding to the applet identification, without limitation.
Optionally, in some embodiments, the synchronization message further includes: the step of determining the target running content corresponding to the applet id in S102, as shown in fig. 3, may further include:
s301: the archive run content of the applet to which the applet identification belongs is obtained.
That is, in this embodiment, not only the client is supported to obtain the real-time running content of the applet according to the synchronization message, but also the client is supported to synchronize the operation action information of the local user for the applet to other clients, so as to achieve multi-directional synchronization of the running content of the applet between multiple clients, and ensure the overall synchronization effect.
The running content update information, that is, the operation action information for describing the small program of the user on the client side, specifically, for example, instruction information for updating the small game display content in the client side of the anchor user, or instruction information for updating the small game display content in the client side of the audience user, which is not limited to this.
The archiving operation content may refer to the operation content of the applet that is managed and stored by the server before the server receives the current operation content update information, and the archiving operation content may be regarded as the operation content of the applet at the previous time point.
S302: and updating the archived operation content according to the operation content updating information, and taking the operation content obtained by the updating process as the target operation content.
After the server obtains the archived operation content of the applet to which the applet identification belongs and analyzes the operation content update information from the synchronization message, the method can update the archived operation content according to the operation content update information and take the operation content obtained by the update process as the target operation content so as to realize the synchronization of the target operation content to any client, which is not limited.
S103: and sending the target running content to the client.
The server receives the synchronization message sent by the client, analyzes the synchronization message to obtain the applet identification, and sends the target running content to the client after determining the target running content corresponding to the applet identification.
Optionally, in some embodiments, the sending the target running content to the client may be sending the target running content to the client by a broadcast sending manner, so that a content synchronization effect and consistency of content synchronization can be effectively ensured.
Of course, any other possible communication manner may be used to send the target running content to the client, so that the client runs the target running content in the applet on the client side, which is not limited.
In this embodiment, by receiving the synchronization message sent by the client and determining the target running content corresponding to the applet identifier in the synchronization message, where the applet identifier belongs to the applet running on the client and sending the target running content to each client, the server uniformly sends the target running content of the applet to each client, so that the running content of the applet on the server and each client is synchronously processed, and the synchronization effect of the running content of the applet is effectively improved.
Fig. 4 is a flow chart illustrating a content synchronization method according to another embodiment of the present disclosure.
S401: receiving a type configuration instruction, wherein the type configuration instruction comprises: applet identification, and preset content types.
In some embodiments, the instruction for configuring the applet id and the preset content type at the server may be referred to as a type configuration instruction, where the type configuration instruction may be triggered by a user, for example, the type configuration interface is preconfigured at the server, and the preset content type entered by the user and the applet id specified by the user are received through the type configuration interface, and then the server may associate the applet id and the preset content type and trigger the subsequent content, which is not limited herein.
The preset content type can be one or more of a joining message, an ending message, an eliminating message, a state query interface, an eliminating interface, a starting interface, an ending interface and the like which are preset in the server, and in the running process of the applet, the user can be supported to specify the content type to which the content to be synchronized belongs, that is, the user can be supported to synchronize the content of the preset content type specified by the user in real time, and the user can not specify the content of the non-preset content type, and the synchronization process can not be performed, so that the resource consumption required by the content synchronization can be effectively reduced, and the flexibility is increased, and the content synchronization can meet the personalized requirement.
S402: the configuration preset content type corresponds to the applet identification.
In some embodiments, the server may perform association configuration on the corresponding applet identifier and the preset content type through the type configuration instruction, so that after the client sends the applet identifier, the server may quickly confirm the preset content type corresponding to the applet identifier.
It will be appreciated that one applet identification may correspond to one or more preset content types and one preset content type may correspond to one or more applet identifications, without limitation.
S403: receiving a synchronization message sent by a client, wherein the synchronization message comprises: and the applet identification and the running content updating information, wherein the applet to which the applet identification belongs runs on the client.
The specific description of S403 may be referred to the above embodiments, and will not be described herein.
S404: the archive run content of the applet to which the applet identification belongs is obtained.
The operation of the client includes, but is not limited to, automatic feedback of a content initiator client (the content initiator client refers to a client triggering the update of the operation content, and may be a client on the anchor user side or a client on the audience user side, which is not limited thereto), and an operation of a content receiver client (the content receiver client refers to a client needing to synchronize the operation content of the applet in other clients, which may be a client on the anchor user side or a client on the audience user side, which is not limited thereto), and the operation content generated by automatic processing in the applet after the operation of the client is performed, which is not limited thereto.
The server receives the applet identification operated by the client, and further obtains the archive operation content to which the applet identification belongs in the background or the cloud.
S405: and acquiring a preset content type corresponding to the applet identification.
The configuration and the corresponding preset content type of the applet identification, the server receives the applet identification sent by the client, and obtains the corresponding preset content type of the applet identification of the client in the background or the cloud.
In some embodiments, the preset content type corresponding to the applet id may be obtained in real time, or may be triggered to be obtained after a configured time point or a predetermined time period, which is not limited.
S406: and determining the type of the content to be matched corresponding to the operation content obtained by the updating process.
The server side can be used for updating the archived running content according to the running content updating information to obtain a content type which can be called as a content type to be matched, then the content type to be matched can be compared with a preset content type, whether the running content obtained by the updating process is synchronized to other clients or not is determined according to the comparison condition, if the running content obtained by the updating process is determined to be synchronized to other clients, the running content obtained by the updating process can be used as a target running content, otherwise, the content type to be matched can be continuously monitored and obtained.
For example, as shown in fig. 5, fig. 5 is a schematic diagram of a spectator user-side client game setting interface in another embodiment of the present disclosure. In the roulette game, after the client on the main broadcasting side selects to start the game, the client on the audience side can quickly join the game by clicking a 'join' button, the server side can judge whether the users joining the game meet the game setting conditions through preset game participation conditions, the judgment basis can be that after each user accesses the server for the first time, a Session control identity number (Session Identity Document, session ID) is automatically obtained, and whether the game identity of the user exists or not is judged through the Session ID and meets the conditions.
S407: and if the type of the content to be matched is the preset content type, taking the running content obtained by the updating process as the target running content.
In some embodiments, after determining the type of the to-be-matched content corresponding to the running content obtained by the update processing, the server may compare the type of the to-be-matched content with a preset content type corresponding to the applet identifier, and if the type of the to-be-matched content meets the preset content type, take the running content obtained by the update processing as the target running content.
S408: if the content type to be matched is not the preset content type, continuously monitoring whether the synchronous message sent by the client is received or not.
When the server determines that the type of the content to be matched is not consistent with the type of the preset content, the server indicates that the running content obtained by updating is not the target running content (the type of the content to be matched corresponding to the target running content is characterized and does not belong to the type of the preset content which is designated in advance by a user and needs to be synchronized), and can monitor the synchronous message sent by the client continuously until the type of the content to be matched consistent with the type of the preset content is obtained.
S409: and sending the target running content to the client.
The specific description of S409 may be referred to the above embodiments, and will not be described herein.
In this embodiment, the server side uniformly sends the target running content of the applet to each client side, so that the running content of the applet of the server side and each client side can be synchronously processed, and the synchronization effect of the running content of the applet is effectively improved. Receiving a type configuration instruction, wherein the type configuration instruction comprises: the applet identification and the preset content type are configured, and then the preset content type corresponds to the applet identification, so that the timeliness of the content synchronization is effectively improved. The method comprises the steps of receiving a synchronization message sent by a client, acquiring archive operation content of an applet to which an applet identifier belongs, acquiring a preset content type corresponding to the applet identifier, determining a content type to be matched corresponding to operation content obtained through updating, taking the operation content obtained through updating as target operation content if the content type to be matched is the preset content type, continuously monitoring whether the synchronization message sent by the client is received or not if the content type to be matched is not the preset content type, and sending the target operation content to the client.
Fig. 6 is a flowchart of a content synchronization method according to another embodiment of the present disclosure.
The execution body of the present disclosure may specifically be, for example, a client of a live broadcast application program running on an electronic device, where the client corresponds to a server, and provides a local service for a user, and the client may specifically be, for example, a client on a host user side in the above scenario, or may also be a client on a viewer user side, which is not limited thereto.
As shown in fig. 6, the content synchronization method includes:
s601: and responding to the operation instruction of the user for the applet, and analyzing the operation instruction to obtain the operation content updating information.
In some embodiments, the client, in response to a user's operation instructions for the applet, such as click, slide, and specific key positions, parses run content update information from the operation instructions (the run content update information being executable by the applet to trigger an update to the applet's archived run content).
S602: and generating a synchronous message according to the applet identification and the running content updating information.
In some embodiments, the client may identify the applet id and the running content update information obtained by parsing the operation instruction, and then trigger to generate a client synchronization message in real time, where the synchronization message can be used to synchronize the running content of corresponding applets of other clients.
For example, in a roulette scenario, a spectator user may select to join a game by clicking a game joining button in a screen at a client terminal, and the screen pops up a game joining interface for the spectator user, or a host user may select to start a game at a certain time point after a game preparation stage, and the screen automatically displays the selected spectator user, etc., and the foregoing operation action information for the applet may generate corresponding running content update information.
S603: sending a synchronization message to a server, wherein the synchronization message comprises: and the applet identification, wherein the applet to which the applet identification belongs runs on the client.
After the operation content updating information is obtained by analyzing the operation instruction in response to the operation instruction of the user for the applet, and the synchronous message is generated according to the applet identification and the operation content updating information, the synchronous message can be sent to the server.
S604: and receiving target operation content which is sent by the server and corresponds to the applet identification.
After the synchronization message is sent to the server, the server receives the synchronization message, and obtains the target running content, and then the server sends the target running content to each client in a broadcast manner, so that the client can receive the target running content corresponding to the applet identifier sent by the server, that is, the client on the anchor user side and the client on the audience user side can both execute the step of receiving the target running content corresponding to the applet identifier sent by the server, thereby triggering the subsequent real-time synchronous update of the running content in the applet running on the client.
S605: and running the target running content in the applet run by the client.
After the client receives the target running content corresponding to the applet identification sent by the server, the updated target running content can be run in the applet of the client, so that the running content in the applet running on the client can be synchronously updated in real time.
In this embodiment, the operation content update information is obtained by analyzing the operation instruction of the user for the applet, the synchronization message is generated according to the applet identification and the operation content update information, the synchronization message is sent to the server, the target operation content corresponding to the applet identification sent by the server is received, and the target operation content is operated in the applet operated by the client, so that the synchronization processing of the operation content of the applet of the server and each client can be realized, and the synchronization effect of the operation content of the applet is effectively improved.
Fig. 7 is a schematic structural diagram of a content synchronization device according to an embodiment of the present disclosure.
As shown in fig. 7, the content synchronization device 70, applied to a server, includes:
a first receiving module 701, configured to receive a synchronization message sent by a client, where the synchronization message includes: the small program identification, wherein the small program to which the small program identification belongs runs on the client;
A determining module 702, configured to determine a target running content corresponding to the applet id; and
a first sending module 703, configured to send the target running content to the client.
In some embodiments of the present disclosure, as shown in fig. 8, fig. 8 is a schematic structural diagram of a content synchronization device according to another embodiment of the present disclosure. The determining module 702 includes:
an acquisition submodule 7021, configured to acquire archived running content of an applet to which the applet identifier belongs;
the processing sub-module 7022 is configured to update the archived operation content according to the operation content update information, and take the operation content obtained by the update processing as the target operation content.
In some embodiments of the present disclosure, as shown in fig. 8, the processing sub-module 7022 is specifically configured to:
acquiring a preset content type corresponding to the applet identification;
determining the type of the content to be matched corresponding to the operation content obtained by updating;
if the content type to be matched is the preset content type, taking the running content obtained by updating processing as target running content;
if the content type to be matched is not the preset content type, continuously monitoring whether the synchronous message sent by the client is received or not.
In some embodiments of the present disclosure, as shown in fig. 8, the first receiving module 701 is specifically configured to:
receiving a type configuration instruction, wherein the type configuration instruction comprises: the method comprises the steps of (1) identifying an applet and presetting a content type;
the configuration preset content type corresponds to the applet identification.
In some embodiments of the present disclosure, as shown in fig. 8, the first sending module 703 is specifically configured to:
and transmitting the target operation content to the client by adopting a broadcast transmission mode.
In this embodiment, by receiving the synchronization message sent by the client and determining the target running content corresponding to the applet identifier in the synchronization message, where the applet identifier belongs to the applet running on the client and sending the target running content to each client, the server uniformly sends the target running content of the applet to each client, so that the running content of the applet on the server and each client is synchronously processed, and the synchronization effect of the running content of the applet is effectively improved.
As shown in fig. 9, fig. 9 is a schematic structural diagram of a content synchronization device according to another embodiment of the present disclosure, and the content synchronization device 90 is applied to a client, and includes:
A second sending module 901, configured to send a synchronization message to a server, where the synchronization message includes: the small program identification, wherein the small program to which the small program identification belongs runs on the client;
the second receiving module 902 is configured to receive target running content corresponding to the applet identifier sent by the server;
the running module 903 is configured to run the target running content in the applet that is run by the client.
In some embodiments of the present disclosure, as shown in fig. 9, the content synchronization device 90 further includes:
the parsing module 904 is configured to parse the operation instruction to obtain operation content update information from the operation instruction in response to an operation instruction of the user for the applet;
a generating module 905, configured to generate a synchronization message according to the applet identification and the running content update information.
Corresponding to the content synchronization method provided by the embodiments of fig. 1 to 6, the present disclosure also provides a content synchronization device, and since the content synchronization device provided by the embodiments of the present disclosure corresponds to the content synchronization method provided by the embodiments of fig. 1 to 6, the implementation of the content synchronization method is also applicable to the content synchronization device provided by the embodiments of the present disclosure, and will not be described in detail in the embodiments of the present disclosure.
In this embodiment, the operation content update information is obtained by analyzing the operation instruction of the user for the applet, the synchronization message is generated according to the applet identification and the operation content update information, the synchronization message is sent to the server, the target operation content corresponding to the applet identification sent by the server is received, and the target operation content is operated in the applet operated by the client, so that the synchronization processing of the operation content of the applet of the server and each client can be realized, and the synchronization effect of the operation content of the applet is effectively improved.
In order to achieve the above embodiments, the present disclosure further proposes an electronic device including: the system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the content synchronization method according to the previous embodiment of the disclosure when executing the program.
In order to implement the above-described embodiments, the present disclosure also proposes a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a content synchronization method as proposed in the foregoing embodiments of the present disclosure.
To achieve the above embodiments, the present disclosure also proposes a computer program product which, when executed by an instruction processor in the computer program product, performs a content synchronization method as proposed by the foregoing embodiments of the present disclosure.
Fig. 10 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure. The electronic device 12 shown in fig. 10 is merely an example and should not be construed to limit the functionality and scope of use of embodiments of the present disclosure in any way.
As shown in fig. 10, the electronic device 12 is in the form of a general purpose computing device. Components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16. Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include industry Standard architecture (Industry Standard Architecture; hereinafter ISA) bus, micro channel architecture (Micro Channel Architecture; hereinafter MAC) bus, enhanced ISA bus, video electronics standards Association (Video Electronics Standards Association; hereinafter VESA) local bus, and peripheral component interconnect (Peripheral Component Interconnection; hereinafter PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 10, commonly referred to as a "hard disk drive").
Although not shown in fig. 10, a magnetic disk drive for reading from and writing to a removable nonvolatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable nonvolatile optical disk (e.g., a compact disk read only memory (Compact Disc Read Only Memory; hereinafter CD-ROM), digital versatile read only optical disk (Digital Video Disc Read Only Memory; hereinafter DVD-ROM), or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the various embodiments of the disclosure.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods in the embodiments described in this disclosure.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks, such as a local area network (Local Area Network; hereinafter: LAN), a wide area network (Wide Area Net work; hereinafter: WAN) and/or a public network, such as the Internet, via the network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 over the bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing the content synchronization method mentioned in the foregoing embodiment.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
It should be noted that in the description of the present disclosure, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present disclosure, unless otherwise indicated, the meaning of "a plurality" is two or more.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present disclosure in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present disclosure.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
Furthermore, each functional unit in the embodiments of the present disclosure may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present disclosure have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the present disclosure, and that variations, modifications, alternatives, and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the present disclosure.
Claims (10)
1. The content synchronization method is characterized by being applied to a server and comprising the following steps:
receiving a synchronization message sent by any client, wherein the synchronization message comprises: the method comprises the steps of identifying an applet and running content updating information, wherein the applet to which the applet identification belongs runs on a client side, the client side comprises a client side of a host user side and a client side of a spectator user side, and the running content updating information comprises instruction information for updating the applet display content in the client side of the host user side and/or instruction information for updating the applet display content in the client side of the spectator user side;
acquiring the archiving operation content of the applet to which the applet identification belongs from a cloud, acquiring a preset content type corresponding to the applet identification from the cloud after a preset time period, updating the archiving operation content according to the operation content updating information to obtain a content type to be matched corresponding to the operation content, comparing the content type to be matched with the preset content type, determining the operation content obtained by updating to be a target operation content corresponding to the applet identification when the content type to be matched is the preset content type, and continuously monitoring whether a synchronous message sent by the client is received or not through a message monitoring interface when the content type to be matched is not the preset content type until a content type to be matched consistent with the preset content type is obtained, wherein the preset content type comprises a joining message, an ending message, a state query interface, an eliminating interface, a starting interface and/or an ending interface, and the message monitoring interface is configured at the server; and
And transmitting the target operation content to other clients by adopting a broadcast transmission mode.
2. The method of claim 1, further comprising, prior to receiving the synchronization message sent by the client:
receiving a type configuration instruction, wherein the type configuration instruction comprises: the applet identification, and the preset content type;
and configuring the preset content type to correspond to the applet identification.
3. A method for synchronizing content, applied to a client, comprising:
sending a synchronization message to a server, wherein the synchronization message comprises: the applet identification, wherein the applet to which the applet identification belongs runs on the client;
receiving target operation content which is sent by the server and corresponds to the applet identification;
in the applet operated by the client, the target operating content according to claim 1 or 2 is operated.
4. The method of claim 3, further comprising, prior to said sending the synchronization message to the server:
responding to an operation instruction of a user aiming at the small program, and analyzing the operation instruction to obtain operation content update information;
And generating the synchronous message according to the applet identification and the running content updating information.
5. A content synchronization device, applied to a server, comprising:
the first receiving module is configured to receive a synchronization message sent by any client, where the synchronization message includes: the method comprises the steps of identifying an applet and running content updating information, wherein the applet to which the applet identification belongs runs on a client side, the client side comprises a client side of a host user side and a client side of a spectator user side, and the running content updating information comprises instruction information for updating the applet display content in the client side of the host user side and/or instruction information for updating the applet display content in the client side of the spectator user side;
the determining module is used for acquiring the archiving operation content of the applet to which the applet identifier belongs from the cloud, acquiring a preset content type corresponding to the applet identifier from the cloud after a preset time period, updating the archiving operation content according to the operation content updating information to obtain a content type to be matched corresponding to the operation content, comparing the content type to be matched with the preset content type, determining the operation content obtained by updating to be the target operation content corresponding to the applet identifier when the content type to be matched is the preset content type, and continuously monitoring whether a synchronous message sent by the client is received or not through a message monitoring interface when the content type to be matched is not the preset content type until a content type to be matched consistent with the preset content type is obtained, wherein the preset content type comprises a joining message, an ending message, an elimination message, a state query interface, an elimination interface, a starting interface and/or an ending interface, and the message interface is configured at the server; and
And the first sending module is used for sending the target operation content to other clients by adopting a broadcast sending mode.
6. The apparatus of claim 5, wherein the first receiving module is specifically configured to:
before receiving the synchronization message sent by the client, receiving a type configuration instruction, wherein the type configuration instruction comprises: the applet identification, and the preset content type;
and configuring the preset content type to correspond to the applet identification.
7. A content synchronization device, for application to a client, comprising:
the second sending module is configured to send a synchronization message to the server, where the synchronization message includes: the applet identification, wherein the applet to which the applet identification belongs runs on the client;
the second receiving module is used for receiving the target operation content which is sent by the server and corresponds to the applet identification;
an operation module, configured to operate the target operation content according to claim 1 or 2 in the applet operated by the client.
8. The apparatus as recited in claim 7, further comprising:
the analysis module is used for responding to an operation instruction of a user for the small program and analyzing the operation instruction to obtain operation content update information;
And the generation module is used for generating the synchronous message according to the applet identification and the running content updating information.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110990660.9A CN113852843B (en) | 2021-08-26 | 2021-08-26 | Content synchronization method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110990660.9A CN113852843B (en) | 2021-08-26 | 2021-08-26 | Content synchronization method, device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113852843A CN113852843A (en) | 2021-12-28 |
CN113852843B true CN113852843B (en) | 2024-03-22 |
Family
ID=78976261
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110990660.9A Active CN113852843B (en) | 2021-08-26 | 2021-08-26 | Content synchronization method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113852843B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116647528A (en) * | 2022-02-16 | 2023-08-25 | 北京字跳网络技术有限公司 | Object operation method and device, electronic equipment and storage medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103501340A (en) * | 2013-10-08 | 2014-01-08 | 北京金山网络科技有限公司 | Message push method, message push device and client |
CN104471532A (en) * | 2012-03-29 | 2015-03-25 | 亚马逊技术股份有限公司 | Media widgets that interface with multiple underlying applications |
US9002725B1 (en) * | 2005-04-20 | 2015-04-07 | Google Inc. | System and method for targeting information based on message content |
CN109756504A (en) * | 2019-01-16 | 2019-05-14 | 武汉斗鱼鱼乐网络科技有限公司 | A kind of communication method and related device based on live broadcast platform |
WO2019144949A1 (en) * | 2018-01-29 | 2019-08-01 | 广州虎牙信息科技有限公司 | Internet-based live interaction |
CN110113407A (en) * | 2019-04-30 | 2019-08-09 | 上海连尚网络科技有限公司 | Small routine state synchronization method, equipment and computer storage medium |
CN110139118A (en) * | 2019-05-20 | 2019-08-16 | 北京字节跳动网络技术有限公司 | Application program function operating method, device, electronic device, and storage medium |
CN111385663A (en) * | 2018-12-28 | 2020-07-07 | 广州市百果园信息技术有限公司 | Live broadcast interaction method, device, equipment and storage medium |
CN111901341A (en) * | 2020-07-28 | 2020-11-06 | 北京字节跳动网络技术有限公司 | State synchronization method and device |
CN111935498A (en) * | 2020-10-16 | 2020-11-13 | 北京达佳互联信息技术有限公司 | Live broadcast interaction method and device and electronic equipment |
CN112616053A (en) * | 2020-11-30 | 2021-04-06 | 北京达佳互联信息技术有限公司 | Transcoding method and device of live video and electronic equipment |
-
2021
- 2021-08-26 CN CN202110990660.9A patent/CN113852843B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9002725B1 (en) * | 2005-04-20 | 2015-04-07 | Google Inc. | System and method for targeting information based on message content |
CN104471532A (en) * | 2012-03-29 | 2015-03-25 | 亚马逊技术股份有限公司 | Media widgets that interface with multiple underlying applications |
CN103501340A (en) * | 2013-10-08 | 2014-01-08 | 北京金山网络科技有限公司 | Message push method, message push device and client |
WO2019144949A1 (en) * | 2018-01-29 | 2019-08-01 | 广州虎牙信息科技有限公司 | Internet-based live interaction |
CN111385663A (en) * | 2018-12-28 | 2020-07-07 | 广州市百果园信息技术有限公司 | Live broadcast interaction method, device, equipment and storage medium |
CN109756504A (en) * | 2019-01-16 | 2019-05-14 | 武汉斗鱼鱼乐网络科技有限公司 | A kind of communication method and related device based on live broadcast platform |
CN110113407A (en) * | 2019-04-30 | 2019-08-09 | 上海连尚网络科技有限公司 | Small routine state synchronization method, equipment and computer storage medium |
CN110139118A (en) * | 2019-05-20 | 2019-08-16 | 北京字节跳动网络技术有限公司 | Application program function operating method, device, electronic device, and storage medium |
CN111901341A (en) * | 2020-07-28 | 2020-11-06 | 北京字节跳动网络技术有限公司 | State synchronization method and device |
CN111935498A (en) * | 2020-10-16 | 2020-11-13 | 北京达佳互联信息技术有限公司 | Live broadcast interaction method and device and electronic equipment |
CN112616053A (en) * | 2020-11-30 | 2021-04-06 | 北京达佳互联信息技术有限公司 | Transcoding method and device of live video and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN113852843A (en) | 2021-12-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101994563B1 (en) | Method and device for live video broadcast | |
CN112672094B (en) | Cloud desktop conference sharing method and device, electronic equipment and storage medium | |
CN105933375B (en) | Method and device for monitoring microphone connection session and server | |
CN109561320B (en) | Server switching method, device, equipment and medium | |
EP4094430A1 (en) | Synchronizing local room and remote sharing | |
CN109803151B (en) | Multimedia data stream switching method and device, storage medium and electronic device | |
CN112584187B (en) | Session creation method, device, server and storage medium | |
CN113852843B (en) | Content synchronization method, device, electronic equipment and storage medium | |
CN111343477A (en) | Data transmission method and device, electronic equipment and storage medium | |
CN112616053B (en) | Transcoding method and device for live video and electronic equipment | |
CN114500945A (en) | Video source management method and video source management system | |
CN107205173B (en) | Live webcast interaction method and device | |
CN106789913B (en) | User account management method and device | |
HK1204404A1 (en) | A method, device, server and terminal for a video session | |
US11656834B2 (en) | Information processing device, non-transitory recording medium, and information processing system | |
CN105898596B (en) | Direct broadcasting room display control method and device | |
CN108769565B (en) | Automatic switching method of picture layout, server and local recording and broadcasting system | |
US9485458B2 (en) | Data processing method and device | |
US12216958B2 (en) | Information processing method and electronic device | |
CN114727154B (en) | Cloud application service data processing method, system, storage medium and processor | |
CN114489889A (en) | Method and device for processing sharing request of terminal equipment and terminal equipment | |
CN110691256B (en) | Video associated information processing method and device, server and storage medium | |
CN113596521A (en) | Video playing control method and device, electronic equipment and storage medium | |
CN111953896A (en) | Image display method, device and system | |
CN119071343B (en) | A cloud desktop system, method, device, and electronic device |
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 |