CN115220678A - Playing data synchronization method, device and equipment and readable storage medium - Google Patents

Playing data synchronization method, device and equipment and readable storage medium Download PDF

Info

Publication number
CN115220678A
CN115220678A CN202210841493.6A CN202210841493A CN115220678A CN 115220678 A CN115220678 A CN 115220678A CN 202210841493 A CN202210841493 A CN 202210841493A CN 115220678 A CN115220678 A CN 115220678A
Authority
CN
China
Prior art keywords
playing
page
event
synchronous
slave
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.)
Pending
Application number
CN202210841493.6A
Other languages
Chinese (zh)
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.)
Guangzhou Weride Technology Co Ltd
Original Assignee
Guangzhou Weride 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 Guangzhou Weride Technology Co Ltd filed Critical Guangzhou Weride Technology Co Ltd
Priority to CN202210841493.6A priority Critical patent/CN115220678A/en
Publication of CN115220678A publication Critical patent/CN115220678A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application discloses a method, a device and equipment for synchronizing playing data and a readable storage medium, wherein the method comprises the following steps: setting the same signature for each target playing page used for synchronous playing of the playing terminal; taking a target playing page triggering a synchronous event as a main playing page of the synchronous event, and taking other target playing pages as slave playing pages of the synchronous event; signature information consistent with the main playing page is attached to the synchronous event; acquiring a synchronous event of a main playing page; sending the synchronous event to each slave playing page, and verifying the signature of each slave playing page based on the signature information; and respectively executing synchronous events on the main playing page and the slave playing pages which pass the verification. Obviously, the synchronization of the play data of the low-delay main play page and each target slave play page can be realized based on the synchronization event without depending on a server.

Description

Playing data synchronization method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for synchronizing broadcast data.
Background
In the field of automatic driving, the method is a very common and effective test approach for carrying out a simulation test again on collected data generated by automatic driving. For the data packets or data frames generated after simulation, the staff usually compares the data packets or data frames with the data packets or data frames generated by automatic driving in an actual scene, and a data visualization tool is required to better support the function of multi-playing data synchronization.
However, in the prior art, the data packets or data frames are stored in the server, and the synchronous playing progress of the data packets or data frames at the playing terminal is usually controlled by the server. This approach has the problem of high synchronization latency.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, a device and a readable storage medium for synchronizing playing data, which are used to implement synchronization of playing data and playing configuration of multiple playing pages in a scenario where a playing terminal manages a playing progress.
In order to achieve the above object, the proposed solution is as follows:
in a first aspect, an embodiment of the present application provides a method for synchronizing broadcast data, where the method is applied to a broadcast terminal, and the method includes:
setting the same signature for each target playing page used for synchronous playing by the playing terminal;
taking a target playing page triggering a synchronous event as a main playing page of the synchronous event, and taking other target playing pages as slave playing pages of the synchronous event; signature information consistent with the main playing page is attached to the synchronous event;
acquiring a synchronous event of a main playing page;
sending the synchronous event to each slave playing page, and verifying the signature of each slave playing page based on the signature information;
and respectively executing the synchronous event on the master playing page and each verified slave playing page.
In one embodiment, the synchronous event comprises a start synchronous event, and the start synchronous event is triggered by a start playing instruction acting on any target playing page;
the method for acquiring the synchronous event of the main playing page comprises the following steps:
determining the initial playing time of the main playing page according to the playing starting instruction;
generating a start synchronization event according to the initial playing time;
respectively executing synchronous events on the main playing page and the slave playing pages which pass the verification respectively, wherein the synchronous events comprise:
each verified slave playing page adjusts the self playing time to be the initial playing time according to the starting synchronization event;
and starting to play data from the initial play time on the main play page and the verified slave play pages.
In one embodiment, the synchronization event further comprises a progress synchronization event, and the progress synchronization event is triggered on any target playing page according to a preset period;
the method for acquiring the synchronous event of the main playing page comprises the following steps:
when a preset period comes, determining the current playing time of a main playing page;
generating a progress synchronization event according to the current playing time;
respectively executing synchronous events on the main playing page and the slave playing pages which pass the verification, wherein the synchronous events comprise:
and each verified slave playing page adjusts the self playing time to the current playing time according to the progress synchronization event and then continues playing.
In one embodiment, the synchronous event comprises a jump synchronous event, and the jump synchronous event is triggered by a jump instruction acting on any target playing page;
the method for acquiring the synchronous event of the main playing page comprises the following steps:
determining the jump time of the main playing page according to the jump instruction;
generating a skip synchronous event according to the skip moment;
respectively executing synchronous events on the main playing page and the slave playing pages which pass the verification, wherein the synchronous events comprise:
and the main playing page and each verified slave playing page jump to the jump time according to the jump synchronous event and continue to play the data.
In one embodiment, the synchronization event comprises a stop synchronization event, and the stop synchronization event is triggered by a stop play instruction acting on any target play page;
respectively executing synchronous events on the main playing page and the slave playing pages which pass the verification respectively, wherein the synchronous events comprise:
and stopping playing the data by the main playing page and the slave playing pages which pass the verification respectively.
In one embodiment, the synchronization event comprises a stop synchronization event, and the stop synchronization event is triggered by a stop play instruction acting on any target play page;
the method for acquiring the synchronous event of the main playing page comprises the following steps:
determining a first playing stopping moment of the main playing page according to the playing stopping instruction;
generating a stop synchronization event according to the play stop time;
respectively executing synchronous events on the main playing page and the slave playing pages which pass the verification respectively, wherein the synchronous events comprise:
the main playing page stops playing the data;
and each verified slave playing page stops the self playing time at the first playing stopping time according to the synchronous stopping event.
In one embodiment, the synchronization event comprises a first cache event, and the first cache event is triggered when the loaded data of any target playing page does not reach a set cache amount;
respectively executing synchronous events on the main playing page and the slave playing pages which pass the verification respectively, wherein the synchronous events comprise:
and stopping playing the data by the main playing page and the slave playing pages which pass the verification respectively.
In one embodiment, the synchronization event includes a second cache event, and the second cache event is triggered when the load data of the target playing page triggering the first cache event reaches a set cache amount;
the method for acquiring the synchronous event of the main playing page comprises the following steps:
determining a second playing stopping time of the main playing page;
and generating a second cache event according to the second playing stopping moment.
Respectively executing synchronous events on the main playing page and the slave playing pages which pass the verification, wherein the synchronous events comprise:
the main playing page continues to play the data;
and each verified slave playing page continues playing the data from the second playing stopping moment according to the second cache event.
In one embodiment, the synchronization event comprises a configuration modification synchronization event, and the configuration modification synchronization event is triggered by a configuration modification instruction acting on any target playing page;
the method for acquiring the synchronous event of the main playing page comprises the following steps:
determining a modification item and modification content corresponding to the configuration modification instruction;
generating a configuration modification synchronous event according to the modification item and the modification content;
respectively executing synchronous events on the main playing page and the slave playing pages which pass the verification respectively, wherein the synchronous events comprise:
and the main playing page and each verified slave playing page modify the page configuration according to the configuration modification synchronous event.
In one embodiment, the setting of the same signature for each target play page used by the play terminal for synchronous play includes:
determining each target playing page for synchronous playing from a plurality of playing pages according to the content of the data to be played;
and setting the same signature on each target playing page.
In a second aspect, an embodiment of the present application provides a device for synchronizing playing data, which is applied to a playing terminal, and the device includes:
the signature setting unit is used for setting the same signature for each target playing page used for synchronous playing of the playing terminal;
the playing page determining unit is used for taking a target playing page triggering the synchronous event as a main playing page and taking the other target playing pages as slave playing pages; signature information consistent with the main playing page is attached to the synchronous event;
the synchronous event acquisition unit is used for acquiring a synchronous event of the main playing page;
the synchronous event sending unit is used for sending the synchronous event to each slave playing page and verifying the signature of each slave playing page based on the signature information;
and the synchronous event execution unit is used for executing the synchronous event on the master playing page and the slave playing pages which pass the verification respectively.
In a third aspect, an embodiment of the present application provides a play data synchronization apparatus, including a memory and a processor;
a memory for storing a program;
and a processor, configured to execute a program to implement the steps of the playing data synchronization method in any of the above embodiments.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the playing data synchronization method in any one of the above embodiments.
According to the scheme, the main playing page and the plurality of the slave playing pages can be synchronized to play data based on the synchronous event, the synchronous event is forwarded and executed between the pages, the control of a back-end server is not needed, and the method is low in delay and low in cost. And because each target playing page played synchronously can load the content to be played from the local cache of the playing terminal, the bandwidth is saved compared with the situation that the content to be played is loaded from the server, and the performance of each target playing page cannot be reduced because the number of the target playing pages played synchronously is increased.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for synchronizing broadcast data according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a device for synchronizing playing data according to an embodiment of the present application;
fig. 3 is a block diagram of a hardware structure of a device for synchronizing broadcast data according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic flow chart of a playing data synchronization method provided in an embodiment of the present application, where the method is applied to a playing terminal, and the playing terminal may include multiple playing pages, and the method includes steps S100 to S108.
S100, setting the same signature for each target playing page used for synchronous playing of the playing terminal.
Specifically, any number of play pages may be selected from the multiple play pages of the play terminal for synchronous play, and each play page for synchronous play may be used as a target play page.
Then, the same and unique signature may be set for each target playing page, the signature may be determined by the content played synchronously, and different content played synchronously may correspond to different signatures, so that when each target playing page for playing synchronously is selected, the content played synchronously and its signature may be determined, and the signature is set in each target playing page. In addition, if the synchronous playing of one playing page and other playing pages needs to be cancelled, the signature set by the playing page can be removed, and the playing page without the signature can independently manage the playing progress and does not perform synchronous playing with other playing pages. The following description will be given by taking the communication between playing pages based on the Broadcast application program interface in the browser as an example: in this way, when data is sent between the playing pages, a URL (Uniform Resource Locator) address of the playing page itself is provided, and the same and unique signature corresponding to the playing content is added to the target playing page of i required by different playing contents. When each page receives data, whether the object sending the data is an object needing synchronization can be determined according to whether the received data contains the signature. If the synchronization between the pages needs to be cancelled, only the signature of the page needs to be removed, and after the signature is removed, each target playing page independently controls the playing progress of the target playing page and does not perform synchronization any more.
S102, the target playing page triggering the synchronous event is taken as the main playing page of the current synchronous event, and the other target playing pages are taken as the auxiliary playing pages of the current synchronous event.
The synchronization event is accompanied by signature information consistent with the main playing page. During the playing of the data packet, there may be a variety of different kinds of synchronization event triggers due to various factors. If a user clicks a control (such as a play control, a pause control, a jump control, etc.) on any page displayed on the play terminal, the rest target play pages should make the same reaction. For another example, the schedules of the respective playing terminals may be asynchronous due to different page performances, and a schedule synchronization event may be triggered by any one target playing page, so that the schedules of all the target playing pages are resynchronized.
In order to ensure the synchronization of the playing data, the present embodiment uses the target playing page triggering the synchronization event as the main playing page, and the other target playing pages are synchronized based on the main playing page. Because the target playing page of the trigger event is not fixed, the master playing page and the slave playing page do not have a fixed corresponding relationship, the identities of the master playing page and the slave playing page can change along with the failure of the target playing page of the trigger synchronous event, the master playing page can be changed into the slave playing page, and the slave playing page can also be changed into the master playing page. For example, assuming that three target play pages, i.e., a, B, and C, are available, the play control is clicked on the target play page a first time, so as to trigger a play synchronization event on the target play page a, the target play page a is the master play page, and the target play pages B and C are the slave play pages. In the playing process, the pause control is clicked on the target playing page B, so that the stop synchronization event is triggered on the target playing page B, the target playing page B is a master playing page, and the target playing pages A and C are slave playing pages.
Moreover, after the main playing page or one of the slave playing pages is closed, the synchronization among other target playing pages is not influenced. In this embodiment, the type of the synchronization event is not limited, and the synchronization event is referred to as a synchronization event as long as the event is related to ensure data synchronization between target playing pages.
And S104, acquiring the synchronous event of the main playing page.
The trigger conditions of different synchronous events are different, and the synchronous operation to be executed can be known according to the trigger conditions of the synchronous events. For example, when a play control is clicked on a certain target play page, all target play pages should start to play data at the same time, and the synchronization operation should be that the master play page and the slave play pages start to play data at the same time. Therefore, in order to achieve the synchronization of the playing data between the target playing pages, a synchronization event should be determined based on the main playing page.
And S106, sending the synchronous event to each slave playing page, and verifying the signature of each slave playing page based on the signature information.
Specifically, a synchronization event may be sent to each slave playback page. Because the synchronous event is transmitted among different playing pages in the same playing terminal, the process of transmitting the synchronous event can realize the technical effects of low time delay and low cost. Furthermore, the synchronous event can be transmitted among the playing pages of different playing terminals.
Then, it may be verified whether the signature of each slave playback page is consistent with the signature included in the synchronization event, and the slave playback page whose signature is consistent with the signature information included in the synchronization event is the verified slave playback page.
And S108, respectively executing synchronous events on the main playing page and each verified slave playing page.
And the main playing page and each verified slave playing page execute corresponding actions according to the indication of the synchronous event, so that the synchronization of the playing data can be realized.
According to the scheme, the main playing page and the plurality of the slave playing pages can be synchronized to play data based on the synchronous event, the synchronous event is forwarded and executed between the pages, the control of a back-end server is not needed, and the method is low in delay and low in cost. And because each target playing page played synchronously can load the content to be played from the local cache of the playing terminal, the bandwidth is saved compared with the situation that the content to be played is loaded from the server, and the performance of each target playing page cannot be reduced because the number of the target playing pages played synchronously is increased.
Different kinds of related technical solutions for synchronization events are described below.
In one embodiment, the synchronization event comprises a start synchronization event, and the start synchronization event is triggered by a start playing instruction acting on any target playing page. The start playing instruction is used to instruct the target playing page to start playing data, for example, the user instructs the clicked target playing page to start playing data by clicking a playing control on the playing terminal. In addition, the actions referred to herein are not limited to physical actions, as long as the target playing page can be made to react accordingly. The starting of the synchronization event is to start playing at the same starting point for all the target playing pages at the same time, and to achieve this effect, the obtaining of the synchronization event of the main playing page includes:
s1, determining the initial playing time of a main playing page according to a playing starting instruction.
And S2, generating a start synchronization event according to the initial playing time.
Specifically, after the target playing page acted by the play starting instruction is determined, the target playing page can be determined to be the main playing page, and the identities of other slave playing pages can be determined. The slave playing pages are aligned with the initial playing time of the master playing page as a reference, and all the slave playing pages start playing with the initial playing time of the master playing page as a starting point. Therefore, when the start synchronization event is generated, the initial playing time of the master playing page is added into the start synchronization event, so that the playing time of each slave playing page can be adjusted conveniently. The starting playing time of the main playing page does not only refer to the time when one data packet starts, but also can be a certain time in the middle of the data packet if the main playing page stops at a certain time in the middle of the data packet.
In order to realize synchronous playing, the step of executing the synchronous event respectively on the main playing page and each verified slave playing page comprises the following steps:
s1, each verified slave playing page adjusts the self playing time to be the initial playing time according to the starting synchronization event.
And S2, starting to play data from the initial play time on the main play page and the slave play pages which pass the verification respectively.
It can be understood that the start synchronization event includes the start play time of the master play page, and the verified slave play pages can determine how to align the play time of the master play page according to the received start synchronization event. That is, if the current playing time of the slave playing page passing the verification is different from the initial playing time of the master playing page, the playing time of the slave playing page is adjusted to the initial playing time of the master playing page. If the current playing time of the slave playing page passing the verification is the same as the initial playing time of the master playing page, no adjustment is needed. After the adjustment of each verified slave playing page is completed, the playing time of each page needing to be synchronously played is the initial playing time of the master playing page, and at this time, the pages can start to play data, so that synchronous playing is realized.
In one embodiment, the synchronization event includes a progress synchronization event, and the progress synchronization event is triggered at any target playing page according to a preset period. When a plurality of target playing pages enter a playing state, each target playing page maintains the playing progress of the target playing page. Theoretically, the multiple target playing pages are played at the same starting time and the same playing speed, and when the target playing pages are played simultaneously, the progress is always aligned. However, the playing may be affected by other factors (such as page performance, etc.), and there may be some errors, and when playing a larger data packet, the errors will gradually accumulate over time. If each frame is synchronized, as the playing frame rate of the data packet is very high, usually 1 second renders tens of frames, and the desynchronization time overhead of each frame is very large.
Therefore, according to the present embodiment, according to the preset period, a progress synchronization event is triggered on any target play page, and the play schedules of the slave play pages corresponding to the progress synchronization event are unified as the play schedule of the master play page. Specifically, to achieve this effect, acquiring a synchronization event of the main play page includes:
s1, when a preset period comes, determining the current playing time of a main playing page.
And S2, generating a progress synchronization event according to the current playing time.
Specifically, when a preset period comes, a progress synchronization event is triggered on a target play page, the target play page can be determined as a master play page, and the identities of other slave play pages can be determined accordingly. The slave playing pages are aligned by taking the current playing time of the master playing page as a reference, and the slave playing pages are all based on the playing progress of the master playing page. Therefore, when the progress synchronization event is generated, the current playing time of the master playing page is added into the progress synchronization event, so that the playing time of each slave playing page can be adjusted conveniently.
In addition, the target playing page for triggering the progress synchronization event may be fixed, or may be selected according to the page performance of each target playing page, for example, the performance parameters of each target playing page are obtained according to the preset period, and the progress synchronization event is triggered on the target playing page with the worst performance parameters, so that the page with better performance is adapted to the page with poorer performance, and it is ensured that data is not missed. And a progress synchronization event can be triggered at a target playing page with the best performance parameters, so that a page with poor performance can adapt to a page with better performance, and smooth playing is ensured.
In order to realize synchronous progress, the step of executing the synchronous event respectively on the main playing page and each verified slave playing page comprises the following steps: and each verified slave playing page adjusts the self playing time to the current playing time according to the progress synchronization event and then continues playing. And the current playing time of the main playing page can be obtained by the verified slave playing pages based on the progress synchronization event. If the current playing time of the slave playing page passing the verification is different from the current playing time of the master playing page, the playing time of the slave playing page is adjusted to the current playing time of the master playing page so as to match the playing progress of the master playing page. If the current playing time of the slave playing page passing the verification is the same as the initial playing time of the master playing page, the progress of the slave playing page is consistent with that of the master playing page, and adjustment is not needed.
In one embodiment, the synchronous event comprises a jump synchronous event, and the jump synchronous event is triggered by a jump instruction acting on any target playing page. The start playing instruction is used to instruct the target playing page to start playing data, for example, the user instructs the clicked target playing page to start playing data by clicking a playing control on the playing terminal. The starting of the synchronization event is to start playing at the same starting point for all the target playing pages at the same time, and to achieve this effect, the obtaining of the synchronization event of the main playing page includes:
in one embodiment, the synchronous event comprises a jump synchronous event, and the jump synchronous event is triggered by a jump instruction acting on any target playing page. The jump instruction is used for indicating the target playing page acted by the jump instruction to adjust the playing time to the jump time. The skip synchronous event is to make all target playing pages skip to the skip time at the same time for continuing playing, and in order to achieve the effect, the obtaining of the synchronous event of the main playing page includes:
s1, according to a jump instruction, determining the jump time of a main play page.
And S2, generating a jump synchronous event according to the jump time.
Specifically, after the target playing page acted by the jump instruction is determined, the target playing page can be determined to be the main playing page, and the identities of other slave playing pages can be determined. And the slave playing page carries out progress jumping by taking the jumping time of the master playing page as a reference. Therefore, when the jump synchronous event is generated, the jump time of the main playing page is added into the start synchronous event, so that the jumping of each slave playing page is facilitated.
The jump instruction has various forms, but the main playing page can know the specific jump time. For example, the user clicks a certain position of the progress control on the playing terminal, and the time corresponding to the clicked position of the progress control is taken as the jumping time. For another example, the user drags the current progress indication sub-control in the progress control on the playing terminal, and the moment corresponding to the progress control at the dragging ending position is the jump moment. Also for example, the time input by the user may be a jump time.
In order to realize synchronous jump, the execution of synchronous events respectively on the main playing page and each verified slave playing page comprises the following steps: and the main playing page and each verified slave playing page jump to the jump time according to the jump synchronous event and continue to play the data. It can be understood that the main playing interface can know the jump time in response to the jump instruction, and the verified slave playing page can determine how to jump according to the received jump synchronization event to keep consistent with the main playing page, so as to realize jump synchronization.
In one embodiment, the synchronization event includes a stop synchronization event triggered by a stop play instruction acting on any of the target play pages. The stop playing instruction is used to instruct the target playing page to stop playing data, for example, the user instructs the clicked target playing page to pause playing data by clicking a pause control on the playing terminal. The starting of the synchronization event is to stop the playing of all the target playing pages at the same time, and in order to achieve the effect, the executing of the synchronization event in the master playing page and each verified slave playing page respectively comprises: and stopping playing the data by the main playing page and the slave playing pages which pass the verification respectively. Specifically, after the target playing page acted by the playing stopping instruction is determined, the target playing page can be determined to be the main playing page, and the identities of other slave playing pages can be determined. The main playing page stops playing in response to the playing stopping instruction, and each verified slave playing page also knows that the playing should be stopped when receiving the playing stopping synchronization event, so that synchronous stopping is realized. It should be noted that, because of the start synchronization event, even if each target playing page is not stopped at the same playing time, the start synchronization event will be triggered when the playing is continued after the stop, the playing times of the target playing pages will be synchronized, and the synchronous playing state will be continuously maintained.
For the stop synchronization time, in order to ensure that the target playing pages stop at the same playing time, in one embodiment, the acquiring a synchronization event of the main playing page includes:
s1, determining a first playing stopping moment of a main playing page according to a playing stopping instruction.
And S2, generating a stop synchronization event according to the stop playing time.
Specifically, after the target playing page acted by the playing stopping instruction is determined, the target playing page can be determined to be the main playing page, and the identities of other slave playing pages can be determined. The first playing stop time refers to the playing time of the main playing page after the stop synchronization time is triggered. The slave playing pages are aligned with the stopping time of the master playing page as a reference, namely, the slave playing pages are paused with the first stopping time of the master playing page as a reference. Therefore, when the stop synchronization event is generated, the first stop playing time of the master playing page is added into the start synchronization event, so that the adjustment of each slave playing page is facilitated.
In order to realize that the synchronization stops at the same time, the execution of the synchronization event comprises the following steps that respectively at the main playing page and each verified slave playing page:
s1, stopping playing data by a main playing page;
and S2, stopping the self playing time at the first playing stopping time according to the synchronous stopping event by each verified slave playing page.
I.e. the main playback page stops playing back data in response to the stop playback instruction. The synchronization event includes the first increase to the play time of the master play page, and each verified slave play page can be stopped at which specific time according to the stop synchronization event. That is, if the current playing time of the slave playing page passing the verification is different from the first playing stopping time, the playing time of the slave playing page is adjusted to the first playing stopping time and then is stopped. And if the current playing time of the verified slave playing page is the same as the initial playing time of the master playing page, the current playing time is directly stopped without adjustment.
When playing the target playing page, the target playing page generally dynamically acquires data from the back-end server, and when the cache is complete, the data is played. This means that each target playback page can dynamically start and stop the current playback on its own, rather than relying solely on instructions. However, since the cache schedules of different target playing pages are different, the playing may be disconnected, and in order to solve the problem, in one embodiment, the synchronization event includes a first cache event, and the first cache event is triggered when the loaded data of any target playing page does not reach the set cache amount. That is, if the loaded data of the target playing page does not reach the set buffer amount, the remaining playable data is insufficient, and the target playing page is paused without playable data. The first caching event is that all the target playing pages are stopped before the target playing pages have no data to be played, and the target playing pages with insufficient caching are cached all together. Therefore, after the first buffering time is triggered, executing the synchronization event on the master playing page and each verified slave playing page respectively comprises: and stopping playing the data by the main playing page and the slave playing pages which pass the verification respectively.
In one embodiment, the synchronization event includes a second cache event, and the second cache event is triggered when the load data of the target playing page triggering the first cache event reaches a set cache amount. Namely, the second cache event is enough data re-cached in the target playing page with insufficient cache, so that each target playing page automatically restores playing data. The method for acquiring the synchronous event of the main playing page comprises the following steps:
s1, determining a second playing stopping moment of the main playing page.
And S2, generating a second cache event according to the second playing stopping moment.
Specifically, the second cache event has the same master play page and slave play page as its corresponding first cache event. The slave pages may not stop at the same playing time when stopping, and therefore, the playing start points should be unified again when resuming playing. The second playing stopping time is the time when the main playing page stops when the first cache event is triggered. When the main playing page resumes playing, the main playing page will start from the second stop playing time, so the sub playing page should start playing with the second stop playing time as the starting point. When the second cache event is generated, the second playing stop time is added into the second cache event, so that the playing time of each slave playing page can be adjusted conveniently.
Respectively executing synchronous events on the main playing page and the slave playing pages which pass the verification respectively, wherein the synchronous events comprise:
s1, the main playing page continues to play data.
And S2, each verified slave playing page continues to play the data from the second playing stopping moment according to the second cache event.
It can be understood that the second cache event includes a second stop playing time, and the verified slave playing page can determine how to align the playing time of the master playing page according to the second cache event. That is, if the time when the slave playing page currently stops passing the verification is different from the second playing stopping time of the master playing page, the playing time of the slave playing page is adjusted to the initial playing time of the master playing page. If the current stop time of the slave playing page passing the verification is the same as the initial playing time of the master playing page, no adjustment is needed. After the adjustment of the slave playing pages passing the verification is completed, the pages can start to play data at the moment, and the simultaneous recovery of playing after the completion of the cache is realized.
In one embodiment, the synchronization event comprises a configuration modification synchronization event, and the configuration modification synchronization event is triggered by a configuration modification instruction acting on any target playing page. The configuration modification instruction includes a modification item and modification content for indicating that the content of the corresponding modification item is modified to the modification content. The content played by each target playing page may be different, but the configuration settings related to the playing may partially overlap, for example, the playing frame rate, the playing category, and so on. Taking the adjustment of the playing category as an example, the user needs to close the playing category of the D theme, and sends a corresponding configuration modification instruction to any target playing page by operating the playing terminal, so as to instruct the target playing page to close the playing category of the D theme. And the step of modifying the synchronous event is to modify the content of the modification item corresponding to the configuration modification instruction into the modification content in each target playing page synchronously, and in order to achieve the effect, the step of acquiring the synchronous event of the main playing page comprises the following steps:
s1, determining a modification item and modification content corresponding to the configuration modification instruction.
And S2, generating a configuration modification synchronous event according to the modification item and the modification content.
Specifically, after the target playing page acted by the configuration modification instruction is determined, the target playing page can be determined to be the main playing page, and the identities of other slave playing pages can be determined. In order to synchronously modify the configuration in each slave playing page, when a configuration modification synchronous event is generated, a modification item and modification content corresponding to a configuration modification instruction are added into the start synchronous event, so that the configuration modification of each slave playing page is facilitated.
In order to implement the synchronous configuration modification, the step of executing the synchronous event respectively on the master playing page and each verified slave playing page comprises: and the main playing page and each verified slave playing page modify the page configuration according to the configuration modification synchronous event. The main playing page completes modification in response to the configuration modification instruction, and the playing page can also determine how to modify the configuration according to the configuration modification synchronous event so as to keep consistent with the main playing page.
In one embodiment, the setting of the same signature for each target play page used by the play terminal for synchronous play includes:
s1, determining each target playing page for synchronous playing from a plurality of playing pages according to the content of data to be played.
And S2, setting the same signature on each target playing page.
It can be understood that each data to be played needs to be played synchronously at different playing pages. When the data to be played is acquired, the data to be played can be determined to need synchronous playing of the playing pages according to the content of the data to be played, so that the target playing page corresponding to the data to be played can be determined, and the same signature is set for the target playing page.
The following describes the playing data synchronization device provided in the embodiment of the present application, and the playing data synchronization device described below and the playing data synchronization method described above may be referred to correspondingly. An embodiment of the present application provides a device for synchronizing playing data, which is applied to a playing terminal, please refer to fig. 2, and the device includes:
the signature setting unit 100 is configured to set the same signature for each target playback page used by the playback terminal for synchronous playback.
A playing page determining unit 110, configured to use a target playing page that triggers a synchronization event as a master playing page, and use the remaining target playing pages as slave playing pages; the synchronization event is accompanied by signature information consistent with the main play page.
A synchronous event acquiring unit 120, configured to acquire a synchronous event of the main playing page.
And a synchronous event sending unit 130, configured to send the synchronous event to each slave playback page, and verify a signature of each slave playback page based on the signature information.
And a synchronous event executing unit 140, configured to execute the synchronous event on the master play page and each verified slave play page respectively.
In one embodiment, the synchronization event comprises a start synchronization event, and the start synchronization event is triggered by a start playing instruction acting on any target playing page. The synchronization event acquisition unit 120 includes a start synchronization acquisition subunit. The start synchronization acquisition subunit is used for determining the initial playing time of the main playing page according to the start playing instruction and generating a start synchronization event according to the initial playing time. The synchronous event execution unit 140 includes a start synchronous execution subunit. And the starting synchronous execution subunit is used for enabling the main playing page and each verified slave playing page to start playing data from the initial playing time when the starting synchronous event is triggered.
In one embodiment, the synchronization event includes a progress synchronization event, and the progress synchronization event is triggered at any target playing page according to a preset period. The synchronous event acquiring unit 120 includes a progress synchronization acquiring sub-unit. The progress synchronization acquisition subunit is used for determining the current playing time of the main playing page when a preset period comes; and generating a progress synchronization event according to the current playing time. The synchronous event execution unit 140 includes a progress-synchronization execution subunit. And the starting synchronous execution subunit is used for enabling each verified slave playing page to continue playing after the self playing time is adjusted to the current playing time according to the progress synchronous event when the progress synchronous event is triggered.
In one embodiment, the synchronous event comprises a jump synchronous event, and the jump synchronous event is triggered by a jump instruction acting on any target playing page. The synchronous event acquisition unit 120 includes a jump synchronous acquisition subunit. The skip synchronous acquisition subunit is used for determining the skip moment of the main playing page according to the skip instruction; and generating a jump synchronous event according to the jump time. The synchronous event execution unit 140 includes a jump synchronous execution subunit. And the skip synchronous execution subunit is used for skipping the self playing time to the skip time and continuing playing the data according to the skip synchronous event on the main playing page and each verified slave playing page when the synchronous event is triggered.
In one embodiment, the synchronization event includes a stop synchronization event triggered by a stop play instruction acting on any of the target play pages. The synchronous event execution unit 140 includes a stop synchronous execution subunit. And the stop synchronous execution subunit is used for stopping playing the data by the main playing page and the verified slave playing pages when the stop synchronous event is triggered.
In one embodiment, the synchronization event comprises a stop synchronization event. The synchronous event acquiring unit 120 includes a stop synchronous acquisition sub-unit. The stop synchronization acquisition subunit is used for determining a first stop playing time of the main playing page according to the stop playing instruction; and generating a stop synchronization event according to the stop playing time. The synchronous execution stopping subunit is used for stopping playing the data on the main playing page; and each verified slave playing page stops the self playing time at the first playing stopping time according to the synchronous stopping event.
In one embodiment, the synchronization event includes a first cache event, and the first cache event is triggered when the loaded data of any target playing page does not reach the set cache amount. The synchronous event execution unit 140 includes a first cache event execution subunit. The first cache event execution subunit is used for stopping playing the data of the master playing page and the slave playing pages which pass the verification when the first cache event is triggered.
In one embodiment, the synchronization event includes a second cache event, and the second cache event is triggered when the load data of the target playing page triggering the first cache event reaches a set cache amount. The synchronous event acquiring unit 120 includes a second cache event acquiring subunit. The second cache event obtaining subunit is configured to determine a second playing stop time of the main playing page; and generating a second cache event synchronous event according to the second playing stopping moment. The synchronous execution unit 140 includes a second cache event execution subunit. The second cache event execution subunit is used for continuing playing the data by the main playing page when the second cache event is triggered; and each verified slave playing page continues playing the data from the second playing stopping moment according to the second cache event.
In one embodiment, the synchronization event comprises a configuration modification synchronization event, and the configuration modification synchronization event is triggered by a configuration modification instruction acting on any target playing page. The synchronization event acquisition unit 120 includes a configuration modification synchronization acquisition subunit. The configuration modification synchronous acquisition subunit is used for determining modification items and modification contents corresponding to the configuration modification instruction; and generating a configuration modification synchronous event according to the modification item and the modification content. The synchronous execution unit 140 includes a configuration modification synchronous execution subunit. And the configuration modification synchronous execution subunit is used for enabling the master play page and each verified slave play page to modify the page configuration according to the configuration modification synchronous event when the configuration modification synchronous event is triggered.
In one embodiment, the signature setting unit 100 is configured to determine, according to the content of the data to be played, target playing pages for synchronous playing from a plurality of playing pages; and setting the same signature on each target playing page.
The playing data synchronization device provided by the embodiment of the application can be applied to playing data synchronization equipment. Fig. 3 is a block diagram showing a hardware configuration of the play data synchronization apparatus, and referring to fig. 3, the hardware configuration of the play data synchronization apparatus may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
in the embodiment of the application, the number of the processor 1, the communication interface 2, the memory 3 and the communication bus 4 is at least one, and the processor 1, the communication interface 2 and the memory 3 complete mutual communication through the communication bus 4;
the processor 1 may be a central processing unit CPU, or an Application Specific Integrated Circuit ASIC (Application Specific Integrated Circuit), or one or more Integrated circuits or the like configured to implement an embodiment of the present invention;
the memory 3 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory) or the like, such as at least one disk memory;
wherein, the memory stores programs, and the processor can call the programs stored in the memory to realize the steps of the playing data synchronization method in any of the above embodiments.
The embodiment of the application provides play data synchronization equipment, which comprises a memory and a processor; a memory for storing a program; and the processor is used for executing programs and realizing the steps of the playing data synchronization method in any embodiment. Alternatively, the detailed function and the extended function of the program may be as described above.
The embodiment of the present application provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the playing data synchronization method in any of the above embodiments are implemented. Alternatively, the detailed function and the extended function of the program may be as described above.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (13)

1. A method for synchronizing playing data is applied to a playing terminal, and is characterized in that the method comprises the following steps:
setting the same signature for each target playing page used for synchronous playing of the playing terminal;
the target playing page triggering the synchronous event is taken as a main playing page of the synchronous event, and the rest target playing pages are taken as slave playing pages of the synchronous event; signature information consistent with the main playing page is attached to the synchronous event;
acquiring a synchronous event of the main playing page;
sending the synchronous event to each slave playing page, and verifying the signature of each slave playing page based on the signature information;
and executing the synchronous event on the main playing page and the slave playing pages which pass the verification respectively.
2. The method according to claim 1, wherein the synchronization event comprises a start synchronization event, and the start synchronization event is triggered by a start playing instruction acting on any one of the target playing pages;
the acquiring of the synchronization event of the main playing page comprises:
determining the initial playing time of the main playing page according to the playing starting instruction;
generating the start synchronization event according to the initial playing time;
the executing the synchronization event at the master playing page and the slave playing pages passing the verification respectively comprises:
adjusting the self playing time of each verified slave playing page to the initial playing time according to the starting synchronization event;
and starting to play data from the initial playing time on the main playing page and the slave playing pages which pass the verification respectively.
3. The method according to claim 2, wherein the synchronization event further comprises a progress synchronization event, and the progress synchronization event is triggered on any one of the target playing pages according to a preset period;
the acquiring of the synchronization event of the main playing page comprises:
when the preset period comes, determining the current playing time of the main playing page;
generating the progress synchronization event according to the current playing time;
the executing the synchronization event at the master playing page and the slave playing pages passing the verification respectively comprises:
and each verified slave playing page adjusts the self playing time to the current playing time according to the progress synchronization event and then continues playing.
4. The method of claim 2, wherein the synchronization event comprises a jump synchronization event, the jump synchronization event being triggered by a jump instruction acting on any of the target playback pages;
the acquiring of the synchronization event of the main playing page comprises:
determining the jumping time of the main playing page according to the jumping instruction;
generating the jump synchronous event according to the jump time;
the executing the synchronization event at the master playing page and the slave playing pages passing the verification respectively comprises:
and the main playing page and the slave playing pages which pass the verification respectively skip the own playing time to the skipping time and continue playing the data according to the skipping synchronous event.
5. The method of claim 1, wherein the synchronization event comprises a stop synchronization event triggered by a stop play instruction acting on any of the target play pages;
the executing the synchronization event at the master playing page and the slave playing pages passing the verification respectively comprises:
and the main playing page and the slave playing pages which pass the verification stop playing data.
6. The method of claim 1, wherein the synchronization event comprises a stop synchronization event, and the stop synchronization event is triggered by a stop play instruction acting on any one of the target playing pages;
the acquiring of the synchronization event of the main playing page comprises:
determining a first playing stopping time of the main playing page according to the playing stopping instruction;
generating the stop synchronization event according to the stop playing time;
the executing the synchronization event at the master playing page and the slave playing pages passing the verification respectively comprises:
the main playing page stops playing data;
and each verified slave playing page stops the self playing time at the first playing stopping time according to the synchronous stopping event.
7. The method according to claim 1, wherein the synchronization event comprises a first cache event, and the first cache event is triggered when the loaded data of any one of the target playing pages does not reach a set cache amount;
the executing the synchronization event at the master play page and the slave play pages that pass the verification respectively comprises:
and the main playing page and the slave playing pages which pass the verification stop playing data.
8. The method according to claim 7, wherein the synchronization event comprises a second caching event, and the second caching event is triggered when the load data of the target playing page triggering the first caching event reaches the set caching amount;
the acquiring of the synchronization event of the main playing page comprises:
determining a second playing stop time of the main playing page;
generating the second cache event according to the second playing stopping time;
the executing the synchronization event at the master playing page and the slave playing pages passing the verification respectively comprises:
the main playing page continues to play data;
and each verified slave playing page continues to play data from the second playing stopping moment according to the second cache event.
9. The method of claim 1, wherein the synchronization event comprises a configuration modification synchronization event, and the configuration modification synchronization event is triggered by a configuration modification instruction acting on any of the target playback pages;
the acquiring of the synchronization event of the main playing page comprises:
determining a modification item and modification content corresponding to the configuration modification instruction;
generating the configuration modification synchronous event according to the modification item and the modification content;
the executing the synchronization event at the master play page and the slave play pages that pass the verification respectively comprises:
and the main playing page and each verified slave playing page modify the page configuration according to the configuration modification synchronous event.
10. The method according to any one of claims 1 to 9, wherein the setting of the same signature for each target play page used by the play terminal for synchronous play comprises:
determining each target playing page for synchronous playing from a plurality of playing pages according to the content of the data to be played;
and setting the same signature on each target playing page.
11. A playing data synchronization device, which is applied to a playing terminal, the device comprising:
the signature setting unit is used for setting the same signature for each target playing page used for synchronous playing of the playing terminal;
the playing page determining unit is used for taking the target playing page triggering the synchronous event as a main playing page and taking the rest target playing pages as auxiliary playing pages; signature information consistent with the main playing page is attached to the synchronous event;
a synchronous event acquisition unit, configured to acquire a synchronous event of the main play page;
the synchronous event sending unit is used for sending the synchronous event to each slave playing page and verifying the signature of each slave playing page based on the signature information;
and the synchronous event execution unit is used for executing the synchronous event on the main playing page and the slave playing pages which pass the verification respectively.
12. A play data synchronization apparatus, comprising a memory and a processor;
the memory is used for storing programs;
the processor, configured to execute the program, implements the steps of the method for synchronizing playback data according to any one of claims 1 to 10.
13. A readable storage medium having stored thereon a computer program, characterized in that the computer program, when being executed by a processor, carries out the steps of the method for synchronizing playback data according to any one of claims 1 to 10.
CN202210841493.6A 2022-07-18 2022-07-18 Playing data synchronization method, device and equipment and readable storage medium Pending CN115220678A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210841493.6A CN115220678A (en) 2022-07-18 2022-07-18 Playing data synchronization method, device and equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210841493.6A CN115220678A (en) 2022-07-18 2022-07-18 Playing data synchronization method, device and equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN115220678A true CN115220678A (en) 2022-10-21

Family

ID=83611047

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210841493.6A Pending CN115220678A (en) 2022-07-18 2022-07-18 Playing data synchronization method, device and equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115220678A (en)

Similar Documents

Publication Publication Date Title
US10734032B2 (en) Method, device, and system of synchronously playing media file
CN108079578B (en) Code rate adjusting method and device based on cloud game and storage medium
CN101868793B (en) A kind of peer playback devices and method of operating thereof
CN107241640B (en) A kind of method that mobile device and television equipment are played simultaneously
KR20140066641A (en) Server, multimedia apparatus, and control method of thereof
CN110062284A (en) Video broadcasting method, device and electronic equipment
WO2006007322A2 (en) Providing synchronized information to multiple devices
EP3503501B1 (en) Method and device for background adaptive upgrading of software
JP2010206349A (en) Method of controlling reproduction of moving image content, system for reproducing moving image content, computer terminal, server and program
US9118977B2 (en) Content synchronization system, content-synchronization control device, and content playback device
WO2017101393A1 (en) Method and device for continuously playing video
CN110581973A (en) data playback method and device, terminal equipment and storage medium
EP2903260A1 (en) Multi-speed playing method, device and system
CN104581340B (en) Client, stream medium data method of reseptance and stream medium data transmission system
CN109821235B (en) Game video recording method, device and server
JP6410286B2 (en) Content synchronization system, content synchronization control device, and content reproduction device
CN110113495A (en) Long-range control method, device, electronic equipment and the system of APP
CN115623230A (en) Live video playing method and device, electronic equipment and storage medium
CN115220678A (en) Playing data synchronization method, device and equipment and readable storage medium
KR20220130837A (en) A method for playing content streamed from the network on a player on a client device
CN107948703A (en) Playing progress rate synchronous method and device
CN103248912B (en) Network television time shifting play method as well as network television system and device
US7443806B2 (en) Communication management apparatus and method for an audio data communication management system
JP2015152945A (en) Device server and control method therefor
CN113271487B (en) Audio and video synchronous playing method, device, system, program product and storage medium

Legal Events

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