Synchronous playing method and device and electronic equipment

By receiving synchronization commands and adjusting the video playback speed, the problem of out-of-synchronization of multiple display screen videos in the urban rail transit passenger information system is solved, and the smooth transition and synchronous playback of videos are realized, which improves the passenger experience and meets high reliability. Synchronize requirements.

CN119011920APending Publication Date: 2024-11-22QINGDAO HISENSE TRANS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410902856.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In the urban rail transit passenger information system, multiple display screens are prone to abnormal synchronization when playing videos, resulting in the 'echo' phenomenon. The existing technology avoids this problem by setting all display screens to mute, but reduces the passenger experience.

Method used

By receiving synchronization instructions, the time interval between the theoretically played video frame and the actual played video frame is obtained, and the video playback speed is adjusted until the two are consistent, so as to achieve smooth transition and synchronous playback of the video.

Benefits of technology

The video synchronization of multiple display screens is realized, which improves the passenger experience, ensures smooth transition and real-time synchronization of video playback. The synchronization deviation is less than 40ms, meeting the synchronization needs for 24 consecutive hours.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011920A_ABST
    Figure CN119011920A_ABST
Patent Text Reader

Abstract

The invention provides a synchronous playing method, a synchronous playing device and electronic equipment, which are used for solving the problem that videos cannot be synchronized in the prior art. In the embodiment of the invention, the electronic equipment obtains a time interval between a first video frame which is theoretically played currently and a second video frame which is actually played currently, and adjusts the playing speed of the video until the video frame which is theoretically played at a certain moment is consistent with the video frame which is actually played at the moment; smooth transition of video playing can be realized by adjusting the playing speed, and videos played by a plurality of display screens can be synchronized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of multi-screen display technology, and in particular to a synchronous playback method, device and electronic device. Background Art

[0002] The urban rail transit passenger information system relies on multimedia network technology and takes the computer system as the core. Due to its high security, it is widely used in station halls, platforms, entrances and exits, and train display screens, enabling passengers to understand train operation information and public media information in a timely and accurate manner.

[0003] Among them, when the urban rail transit passenger information system is displaying information, there are usually multiple playback terminals in the station hall and platform to provide real-time multimedia information such as riding instructions, service hours, train schedules, media news, and advertisements. Since there are usually more than one display screens in the station hall and platform, and the display screens may be affected by freezes and other factors when playing videos, the videos displayed on multiple display screens may be out of sync. If the videos displayed on multiple display screens are not synchronized, there may be an "echo" phenomenon caused by different contents played on multiple display screens. In order to improve the passenger experience, the related technology sets the videos played on all display screens to mute to avoid the "echo" phenomenon caused by different contents played on different display screens. However, this method still reduces the passenger experience. Summary of the invention

[0004] The present application provides a synchronous playback method, device and electronic device to solve the problem of video synchronization failure in the prior art.

[0005] In a first aspect, an embodiment of the present application provides a synchronous playback method, the method comprising:

[0006] Receive synchronization instructions;

[0007] Get the time interval between the first video frame currently being played theoretically and the second video frame currently being played;

[0008] According to the time interval between the first video frame and the second video frame, the playing speed of the currently playing video is adjusted until the video frame theoretically played at a certain moment is consistent with the video frame actually played at that moment.

[0009] In a second aspect, an embodiment of the present application further provides a synchronous playback device, the device comprising:

[0010] A receiving module, used for receiving a synchronization instruction;

[0011] A processing module, used for obtaining the time interval between the first video frame currently being played theoretically and the second video frame currently being played;

[0012] The adjustment module is used to adjust the playback speed of the currently played video according to the time interval between the first video frame and the second video frame until the video frame theoretically played at a certain moment is consistent with the video frame actually played at that moment.

[0013] In a third aspect, an embodiment of the present application further provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of the synchronous playback method as described in any one of the above items when executing a computer program stored in the memory.

[0014] In an embodiment of the present application, the electronic device obtains the time interval between the first video frame currently being played theoretically and the second video frame currently being played actually, and adjusts the playback speed of the video until the video frame currently being played theoretically is consistent with the video frame currently being played at that moment. By adjusting the playback speed, a smooth transition of video playback can be achieved, and videos played on multiple display screens can be synchronized. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 A schematic diagram of a synchronous playback process provided in an embodiment of the present application;

[0017] Figure 2 A schematic diagram of a synchronous playback architecture provided in an embodiment of the present application;

[0018] Figure 3 A schematic diagram of a video synchronization architecture in the related art;

[0019] Figure 4 A detailed schematic diagram of the architecture of a passenger system provided in an embodiment of the present application;

[0020] Figure 5 A schematic diagram of a video synchronization process provided by an embodiment of the present application;

[0021] Figure 6 A schematic diagram of a synchronization process of a live video provided in an embodiment of the present application;

[0022] Figure 7 A schematic diagram of a display screen displaying text to be displayed provided in an embodiment of the present application;

[0023] Figure 8 A schematic diagram of a process for displaying text to be displayed provided in an embodiment of the present application;

[0024] Fig. 9 A schematic diagram of a screen displayed on a display screen provided in an embodiment of the present application;

[0025] Fig.10 A schematic diagram of the structure of a synchronous playback device provided in an embodiment of the present application;

[0026] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of this application.

[0028] In order to accurately and effectively perform video synchronization, the embodiments of the present application provide a synchronous playback method, device and electronic device.

[0029] The synchronous playback method includes: an electronic device receiving a synchronization instruction; obtaining the time interval between a first video frame currently being played theoretically and a second video frame currently being played actually, and adjusting the playback speed of the video until the video frame currently being played theoretically is consistent with the video frame currently being played at a certain moment.

[0030] Figure 1 A schematic diagram of a synchronous playback process provided in an embodiment of the present application, the process includes the following steps:

[0031] S101: receiving a synchronization instruction.

[0032] The video synchronization method provided in the embodiment of the present application is applied to an electronic device, which may be a broadcast controller, a display terminal or other smart device.

[0033] In order to accurately synchronize the video, the electronic device may first receive a synchronization instruction, which may be sent by the server to the electronic device. Each electronic device controls a display screen. When the server sends the synchronization instruction, the video and the start playback time of the uniformly set video are carried in the synchronization instruction and sent to the electronic device.

[0034] Figure 2 A schematic diagram of a synchronous playback architecture provided in an embodiment of the present application.

[0035] Depend on Figure 2It can be seen that in the station scenario, the station switch can be set up in the communication equipment room, and multiple display screens are set up on the platform and hall levels. Electronic equipment can be integrated on the display side through the OPS international standard slot, and only one optical fiber is needed from the station switch to each display screen.

[0036] Figure 2 The structure shown adopts the ARM architecture, from the station switch to the display screen, which solves the problem of multiple audio and video transmission nodes and poor reliability in related technologies.

[0037] Figure 3 Schematic diagram of video synchronization architecture in related technology.

[0038] Depend on Figure 3 It can be seen that the station switch controls the display screen through the station's uplink broadcast controller, uplink 8-channel audio and video transmitter, and receiving device. In other words, the electronic equipment performs photoelectric conversion to the data link architecture of the display screen through the audio and video optical terminal, and each broadcast controller corresponds to 8 display screens.

[0039] Figure 3 In the structure shown, the inputs of the display screens in each area are the same, and the displays in each area are synchronized. However, this method has many audio and video transmission nodes and poor reliability.

[0040] Therefore, in the embodiment of the present application, specifically, Figure 2 The architecture shown in the figure realizes video synchronization. The correspondence between electronic devices and display screens changes from 1 to many to 1 to 1, that is, Figure 3 The method shown is that one electronic device outputs images to 8 display screens, and the images are all synchronized. Now each display screen corresponds to one electronic device. If the images are not synchronized, the content played on each display screen will not be synchronized, affecting the passengers' audio-visual experience.

[0041] S102: Obtain the time interval between the first video frame currently being played theoretically and the second video frame currently being played.

[0042] In order to accurately synchronize the video, the electronic device can obtain the first video frame that is currently being played in theory, wherein the first video frame is the video frame that should be played on each synchronized display screen. Specifically, when the central server sends the video, it can send the start time of the video, and the electronic device can determine the time interval between the current time and the start time of the received video, and determine that the theoretical playback duration of the currently playing video is the video frame at the time interval obtained. It can also be that when the server sends a synchronization instruction, the information of the moment at which each video frame in the video is displayed is sent to the electronic device, and the electronic device can determine that the video frame corresponding to the current moment is the first video frame currently being played in theory. In addition, the electronic device can obtain the second video frame that is currently being played.

[0043] It should be noted that if the display screen of the electronic device is just started, the electronic device can control the display screen to directly jump to the first video frame. In other words, if the playback program is just started, it directly jumps to the desired position.

[0044] S103: adjusting the playing speed of the currently playing video according to the time interval until the video frame theoretically played at a certain moment is consistent with the video frame actually played at that moment.

[0045] After obtaining the time interval between the first video frame and the second video frame, the electronic device can adjust the playback speed of the currently playing video according to the time interval. In a possible implementation, if the time of the first video frame in the currently playing video is earlier than the time of the second video frame in the currently playing video, the playback speed of the video frame can be adjusted to a preset first playback speed, which is greater than the initial playback speed of the video; if the time of the first video frame in the currently playing video is later than the time of the second video frame in the currently playing video, the playback speed of the video frame can be adjusted to a preset second playback speed, which is less than the initial playback speed of the video.

[0046] If the first video frame and the second video frame are the same video frame, the playback speed of the video is not adjusted. Otherwise, the playback speed of the video is adjusted to achieve playback synchronization.

[0047] After adjusting the video playback speed, the electronic device can determine in real time whether the theoretically played video frames are consistent with the actually played video frames. When the theoretically played video frames are consistent with the actually played video frames, the video playback speed is adjusted to a preset initial speed, which can be 1x speed.

[0048] Figure 4 A detailed schematic diagram of the architecture of a passenger system provided in an embodiment of the present application.

[0049] Depend on Figure 4 It can be seen that the control center includes a central server, that is, a primary master clock, that is, a video encoder; the control center is connected to multiple stations through a transmission system, each station includes a station server, that is, a secondary master clock, and each display screen has a corresponding broadcast controller, that is, the electronic device described in the embodiment of the present application.

[0050] Clock synchronization is a prerequisite for synchronized playback of images. In the embodiment of the present application, the central server serves as the primary master clock, and the station server serves as the secondary master clock. The electronic equipment is calibrated with the secondary master clock, and the secondary master clock is calibrated with the primary master clock. If the station server of this station fails and cannot respond to the synchronization request of the electronic equipment, the electronic equipment can automatically switch to synchronize with the primary master clock central server to ensure that the clocks of all electronic equipment in the system are synchronized.

[0051] The embodiments of the present application can be applied to urban rail transit passenger information systems, which is equivalent to providing a method for synchronizing screens of multiple display screens of a passenger information system, and providing a method for synchronizing screens of multiple electronic devices without direct communication.

[0052] The embodiment of the present application provides a local video synchronization method with real-time synchronization and small synchronization deviation. The electronic device that controls multiple display screens across the board can achieve screen synchronization of multiple display screens without direct communication. Moreover, the audio and video synchronization process of multiple display screens is smooth and synchronized in real time. By using the audio and video synchronization technology introduced in the embodiment of the present application, the screen synchronization problem is solved, and there is no phenomenon of the screen screen being out of sync. After testing, it can meet 24 hours of continuous playback, and the maximum synchronization deviation does not exceed 40ms.

[0053] In a possible implementation, the electronic device may control a preset video area of ​​the display screen to display a video, and other areas to display preset content, for example, information about subway lines, time information, etc.

[0054] In an embodiment of the present application, the electronic device determines the first video frame currently being played theoretically based on the currently playing video, the start time of the previously received video, and the current time, obtains the second video frame currently being played actually, and adjusts the video playback speed based on the time interval between the first video frame and the second video frame until the video frame theoretically played at a certain moment is consistent with the video frame actually played at that moment. By adjusting the playback speed, a smooth transition of video playback can be achieved, and videos played on multiple display screens can be synchronized.

[0055] In order to achieve video synchronization, based on the above embodiment, in the embodiment of the present application, adjusting the playback speed of the currently played video according to the time interval includes:

[0056] If the time of the first video frame is earlier than the time of the second video frame, increasing the playback speed of the currently played video;

[0057] If the time of the first video frame is later than the time of the second video frame, the playing speed of the currently playing video is reduced.

[0058] In an embodiment of the present application, if the time of the first video frame currently being played theoretically is earlier than the time of the second video frame actually being played, it can be determined that the progress of the display screen currently controlled by the electronic device is later than that of other display screens. At this time, the playback speed of the video on the display screen can be increased.

[0059] If the theoretical playing time of the first video frame is later than the actual playing time of the second video frame, it can be determined that the progress of the display screen currently controlled by the electronic device is earlier than that of other display screens. In this case, the playing speed of the video on the display screen can be reduced.

[0060] Factors that affect local video synchronization mainly include clocks, terminal real-time performance, etc. The idea of ​​implementing video synchronization in the embodiment of the present application is: determine the current theoretically played video frame, and when the video playback program starts, directly jump to the theoretically played video frame; during the video playback process, regularly calculate the time interval between the actually played video frame and the theoretically played video frame. If the time interval is 0, it means that the playback is normal. If it is not 0, adjust the playback speed and perform a smooth transition until the time interval between the theoretically played video frame and the actually played video frame is 0 at a certain moment. Each electronic device accurately calculates the theoretically played video frame of the video based on the start time of the video and the current time, and performs real-time smooth speed adjustment to achieve synchronous display on multiple display screens.

[0061] In an embodiment of the present application, the video synchronization step can be performed at preset time intervals to maintain video synchronization in real time.

[0062] Figure 5 A schematic diagram of a video synchronization process provided in an embodiment of the present application.

[0063] Depend on Figure 5 It can be seen that the central server can first send the video, and the electronic device calculates the current expected playback position according to the start playback time and the current time, that is, the theoretically played video frame, to determine whether the playback controller has just been started. If so, jump to the expected playback position and determine in real time whether there is an interval of T time. If so, recalculate the current expected playback time according to the start playback time and the current time.

[0064] If the playback controller is not just started, determine whether the expected position is equal to the actual position. If the playback position is not equal to the actual position, the video playback speed is smoothly adjusted until the expected position is equal to the actual position at a certain moment, and determine in real time whether there is an interval of T time. If so, recalculate the current expected playback time based on the start playback time and the current time.

[0065] If the expected position is equal to the actual position, it is determined in real time whether there is an interval of T time. If so, the current expected playback time is recalculated based on the start playback time and the current time.

[0066] In order to achieve video synchronization, based on the above embodiments, in the embodiment of the present application, increasing the playback speed of the currently played video includes:

[0067] Determine a time interval between the first video frame and the second video frame, determine an adjustment speed according to a product of the time interval and a preset value; and obtain a pre-saved standard speed;

[0068] Determine a target speed according to the sum of the standard speed and the adjusted speed;

[0069] The playback speed of the currently playing video is adjusted to the target speed.

[0070] In order to achieve video synchronization, when increasing the video playback speed, the electronic device can determine the time interval between the first video frame and the second video frame, and determine the adjustment speed according to the product of the time interval and a preset value. The preset value can also be called a compensation factor, for example, it can be 0.2. The electronic device can determine the adjustment speed by the following formula:

[0071] Speed=f*|t expert -t local |

[0072] Where Speed ​​is the adjustment speed, f is the preset value, i.e., the compensation factor, t expert is the time of the first video frame in the currently playing video, t local is the time of the second video frame in the currently playing video, |t expert -t local | is the time interval between the first video frame and the second video frame.

[0073] The electronic device may also obtain a pre-saved standard speed, which may be 1x speed. The electronic device may determine a target speed based on the sum of the standard speed and the adjusted speed, and adjust the video playback speed to the target speed.

[0074] In order to achieve video synchronization, based on the above embodiments, in the embodiment of the present application, reducing the playback speed of the currently played video includes:

[0075] Determine a time interval between the first video frame and the second video frame, determine an adjustment speed according to a product of the time interval and a preset value; and obtain a pre-saved standard speed;

[0076] Determining a target speed according to a difference between the standard speed and the adjusted speed;

[0077] The playback speed of the currently playing video is adjusted to the target speed.

[0078] In order to achieve video synchronization, when reducing the video playback speed, the electronic device can determine the time interval between the first video frame and the second video frame, and determine the adjustment speed according to the product of the time interval and a preset value. The preset value can also be called a compensation factor, for example, it can be 0.2. The electronic device can determine the adjustment speed by the following formula:

[0079] Speed=f*|t expert -t local |

[0080] Where Speed ​​is the adjustment speed, f is the preset value, i.e., the compensation factor, t expert is the time of the first video frame in the currently playing video, t local is the time of the second video frame in the currently playing video, |t expert -t local | is the time interval between the first video frame and the second video frame.

[0081] The electronic device may also obtain a pre-saved standard speed, which may be 1x speed. The electronic device may determine a target speed based on the difference between the standard speed and the adjusted speed, and adjust the video playback speed to the target speed.

[0082] In order to achieve video synchronization, based on the above embodiments, in the embodiment of the present application, after determining the adjustment speed according to the product of the time interval and the preset value, and before determining the target speed, the method further includes:

[0083] If the adjustment speed is greater than the pre-stored maximum adjustment speed, the maximum adjustment speed is used to update the adjustment speed.

[0084] In actual scenarios, the time interval between the first video frame and the second video frame may be relatively large. In this case, if the adjustment speed is determined directly based on the time interval, the determined adjustment speed may be relatively large. Adjusting the video playback speed based on the adjustment speed will reduce the user's viewing experience. Therefore, in an embodiment of the present application, the electronic device pre-stores a maximum adjustment speed locally. After determining the adjustment speed, it can be determined whether the adjustment speed is greater than the pre-stored maximum adjustment speed. If it is greater than the maximum adjustment speed, the maximum adjustment speed is used to update the determined adjustment speed.

[0085] Because in the embodiment of the present application, when the determined adjustment speed is greater than the maximum adjustment speed, the playback speed of the video is adjusted based on the maximum adjustment speed, thereby achieving a smooth transition of the played video.

[0086] In order to achieve video synchronization, based on the above embodiments, in an embodiment of the present application, if the video being played is a local video, the step of obtaining the time interval between the first video frame currently being theoretically played and the second video frame actually being played includes:

[0087] Determine the first video frame currently being played theoretically according to the currently playing video, the start time of the video received in advance, and the current time;

[0088] Obtain a time interval between the first video frame and the second video frame.

[0089] In order to accurately synchronize the video, if the video is a local video, where the local video refers to a non-real-time video, the electronic device can determine the first video frame currently being played in theory based on the currently playing video, the pre-received start time of the video and the current time, where the first video frame is the video frame that should be played on each synchronized display screen. Specifically, the electronic device can determine the time interval between the current time and the start time, and determine that the theoretical playing duration of the currently playing video is the video frame at the time interval obtained, and the video frame is the first video frame currently being played in theory. In addition, the electronic device can obtain the second video frame currently being played.

[0090] After acquiring the first video frame and the second video frame, the electronic device may acquire a time interval between the first video frame and the second video frame.

[0091] In order to achieve video synchronization, based on the above embodiments, in an embodiment of the present application, if the played video is a cached live video, the time interval between the first video frame currently being played theoretically and the second video frame actually being played includes:

[0092] Determine the duration of the cached live video; and determine the time interval between the first video frame and the second video frame based on the deviation between the duration and a pre-stored standard duration for video caching.

[0093] In the urban rail transit passenger information system, the video area of ​​the display screen usually plays two types of videos, one is the video sent by the central server, that is, the local video, and the other is the live video stream of the broadcasting and television. In the embodiment of the present application, the played video can also be a cached live video. If the played video is a cached live video, when the video is initially played, the electronic device can cache the video stream after receiving the live video stream transmitted in real time, and when the duration of the cached live video is the standard duration, the display screen is controlled to start playing.

[0094] In an embodiment of the present application, if the played video is a cached live video, when determining the time interval between the first video frame and the second video frame, the duration of the currently cached live video can be determined.

[0095] In order to determine the duration of the currently cached live video, the electronic device can periodically obtain the duration of the cached live video as t according to a preset detection period T, and save it, and obtain a set {t1, t2, ..., t n}, for example, the preset number of times can be 10, taking the median t of the set remaining , the median is determined as the duration of the cached live video. This is mainly because the remaining cache changes dynamically during live broadcast. Taking the median can reflect the central trend of the data and reduce the impact of extreme values.

[0096] After obtaining the duration of the cached live video, the electronic device can determine the deviation between the duration of the cached live video and the standard duration of the pre-saved video cache, and determine the time interval between the first video frame and the second video frame according to the deviation. In a possible implementation, the deviation can be determined as the time interval between the first video frame and the second video frame.

[0097] When playing live broadcast, the live broadcast source is the central encoder, and all electronic devices receive the same video stream for live broadcast. The factors affecting the synchronization of live video mainly include network fluctuations, player cache, terminal real-time performance, etc. The embodiment of the present application provides a live video synchronization method with real-time synchronization and small synchronization deviation. In order to reduce the impact of network fluctuations, when the electronic device controls the display screen to play the live video, all electronic devices set the cache video of the same length. However, during playback, affected by factors such as network fluctuations and terminal real-time performance, the remaining cache size is often not fixed, but dynamically changes, which will cause different playback progress on different display screens. Therefore, the standard duration of the cached video is set. During the video playback process, the duration of the remaining cached video is detected in real time. When the duration of the remaining cached video is equal to the standard duration, it means that the playback is normal. Otherwise, the speed is adjusted until the cache duration is equal to the standard duration. Because all electronic devices receive the same live broadcast source, and the cache duration of the playback is equal, the remaining cache duration of the playback is kept consistent through real-time adjustment, so the playback progress is consistent.

[0098] Figure 6 A schematic diagram of a live video synchronization process provided in an embodiment of the present application.

[0099] Depend on Figure 6It can be seen that the live broadcast source is sent down by the central encoder, and each broadcast controller, that is, an electronic device, sets the same standard duration of the cached video, obtains the remaining duration of the cached video to be played, that is, the duration of the cached live video described in the embodiment of the present application, and determines whether the remaining duration is equal to the preset threshold, wherein the preset threshold is the standard duration of the cached video described in the embodiment of the present application. If it is not equal, the video playback is smoothly adjusted, and after an interval T, the remaining duration of the playback cache is re-obtained. If it is equal, then after an interval T, the remaining duration of the playback cache is re-obtained.

[0100] In order to accurately perform synchronization, based on the above embodiments, in the embodiment of the present application, after receiving the synchronization instruction, the method further includes:

[0101] If the synchronization instruction carries the text to be displayed, then determining each character in the text to be displayed in each refresh cycle according to the pre-stored number of characters displayed on each line of the display screen and the number of characters moved out of the display screen in each refresh cycle;

[0102] Determine the current target refresh cycle according to the start display time of the text to be displayed, the current time and the time of a refresh cycle saved in advance; and display each target text corresponding to the target refresh cycle.

[0103] In actual scenarios, there may be a need to display text. In this case, in order to synchronize the text displayed on each display screen, if the synchronization instruction received by the electronic device carries the text to be displayed, each text to be displayed in each refresh cycle can be determined based on the limited number of characters displayed on each line of the display screen and the number of characters moved out of the display screen in each refresh cycle. The text to be displayed can also be called scrolling text.

[0104] The text to be displayed can be Figure 4 It is sent by the central server shown, and the start display time of the text to be displayed is uniformly set when sending it.

[0105] And according to the start display time of the text to be displayed, the current time and the time of a refresh cycle saved in advance, the current target refresh cycle is determined. After the current target refresh cycle is determined, each target text corresponding to the target refresh cycle can be displayed. The preset position of the control display screen is displayed. Among them, the smaller the refresh cycle, the smoother the scrolling of the text to be displayed visually, but the relative performance occupancy will also be higher. The refresh cycle needs to be reasonably set according to the moving step size (that is, the number of characters moved out of the display screen in each refresh cycle described in the embodiment of the present application) and the terminal performance.

[0106] Figure 7A schematic diagram of a display screen displaying text to be displayed provided in an embodiment of the present application.

[0107] Depend on Figure 7 It can be seen that the lower left corner of the display screen (the up, down, left, and right described here are the up, down, left, and right of the display screen) is the coordinate origin (0,0), and the playback area is [(x, y), w, h], where (x, y) represents the starting coordinates of the text box displaying the text to be displayed on the display screen, w represents the width of the text box, and h represents the height of the text box. The text to be displayed is usually displayed from right to left (the left and right described here are the left and right of the display screen), where d is the length occupied by the text to be displayed.

[0108] When determining a certain refresh cycle, for each character of the text to be displayed, the electronic device can calculate the current position d_start of the text to be displayed based on the current time, the start display time of the text to be displayed, the refresh cycle and the moving step length. Because the text to be displayed is played in a loop, the text to be displayed is spread out in a loop between d_start and (x+w), where the text after x is what needs to be displayed. At each refresh cycle, the current position of the text needs to be calculated and the text needs to be refreshed and displayed. In this way, each electronic device can accurately calculate the expected display position based on the start playback time of the text to be displayed and the current time, and display it, thus realizing the synchronous display of the text to be displayed on multiple terminals.

[0109] When determining each character displayed in each refresh cycle, the electronic device may also adopt the following method:

[0110] According to the size of the playback area and the size of the text to be displayed, calculate the maximum number of characters N that can be displayed in the playback area max , for each character, calculate the starting position of the character at the start of display time. At this time, the electronic device can determine the number of characters between the character and the first character, determine the distance occupied by each character on the display screen when displayed, determine the distance between the character and the first character based on the product of the number of characters and the distance, and determine the initial display position of the character based on the initial display position of the first character and the distance. Calculate the actual distance moved by the text to be displayed between the refresh cycle and the start of display time Among them, t current is the current time, t startis the start display time, T is a refresh cycle, and S is the distance moved out of the display screen in a refresh cycle. According to the initial display position of each character and the actual moving distance, the position of the character in the refresh cycle is calculated. If the position of the character is between the display areas of the display screen, it is determined that the character is displayed in the refresh cycle. Based on this method, each character displayed in the refresh cycle can be determined. When the refresh cycle is reached, each character in the refresh cycle is immediately drawn to the playback area. At this time, the playback area is in the computer memory.

[0111] Figure 8 A schematic diagram of a process for displaying text to be displayed provided in an embodiment of the present application.

[0112] Depend on Figure 8 It can be seen that the central server can first send the scrolling text, and the electronic device calculates the actual display length of the scrolling text, calculates the current actual position according to the start playback time of the text to be displayed (i.e., the start display time described in the embodiment of the present application), the current time, the refresh cycle, and the step size, and determines whether the text is in the screen area of ​​the display screen. If so, the text in the screen area is drawn on the display screen, and the current position of the text to be displayed is recalculated at intervals of one-tenth of the refresh cycle. If the text to be displayed is no longer in the screen area of ​​the display screen, the current position of the text to be displayed is recalculated at intervals of one-tenth of the refresh cycle.

[0113] The embodiment of the present application provides a method for playing and synchronizing text to be displayed smoothly and with low resource occupation. The method synchronizes the text to be displayed on multiple display screens and is smooth and fluent, with low CPU occupation and small synchronization error.

[0114] It should be noted that the text to be displayed is sent down by the central server, and the start time of the text to be displayed is uniformly set when sending it down, requiring all electronic devices that receive the same text to play the text to be displayed synchronously. However, due to the difference in clock accuracy of different electronic devices, and the startup time of different electronic devices is usually inconsistent, when an electronic device is started, it does not know the current position of the text to be displayed on other electronic devices. Since there is no direct communication between different electronic devices in this system, the method of the embodiment of the present application is proposed.

[0115] In a possible implementation, the electronic device may control a preset video area of ​​the display screen to display video, a preset text area to display text, and other areas to display preset content, for example, information about subway lines, time information, etc.

[0116] Fig. 9 A schematic diagram of a screen displayed on a display screen provided in an embodiment of the present application.

[0117] Depend on Fig. 9It can be seen that in the broadcast screen of the display screen, the area that changes in real time is usually the video area and the text area to be displayed, such as Fig. 9 This is the playback screen of the Qingdao Metro Line 8 platform broadcast controller, with the preset video area and preset text area marked.

[0118] Based on the above embodiments, Fig.10 A schematic diagram of the structure of a synchronous playback device provided in an embodiment of the present application, the device comprising:

[0119] The receiving module 1001 is used to receive a synchronization instruction;

[0120] Processing module 1002, used to obtain the time interval between the first video frame currently being played theoretically and the second video frame currently being played;

[0121] The adjustment module 1003 is used to adjust the playback speed of the currently played video according to the time interval between the first video frame and the second video frame until the video frame theoretically played at a certain moment is consistent with the video frame actually played at that moment.

[0122] In a possible implementation, the adjustment module 1003 is specifically used to increase the playback speed of the currently playing video if the time of the first video frame is earlier than the time of the second video frame; if the time of the first video frame is later than the time of the second video frame, reduce the playback speed of the currently playing video.

[0123] In a possible implementation, the adjustment module 1003 is specifically used to determine the time interval between the first video frame and the second video frame, determine the adjustment speed according to the product of the time interval and a preset value; and obtain a pre-saved standard speed; determine the target speed according to the sum of the standard speed and the adjustment speed; and adjust the playback speed of the currently playing video to the target speed.

[0124] In a possible implementation, the adjustment module 1003 is specifically used to determine the time interval between the first video frame and the second video frame, determine the adjustment speed according to the product of the time interval and a preset value; and obtain a pre-saved standard speed; determine the target speed according to the difference between the standard speed and the adjustment speed; and adjust the playback speed of the currently playing video to the target speed.

[0125] In a possible implementation manner, the adjustment module 1003 is further configured to update the adjustment speed by using the maximum adjustment speed if the adjustment speed is greater than a pre-stored maximum adjustment speed.

[0126] In a possible implementation, the processing module 1002 is specifically used to determine the first video frame currently being theoretically played based on the currently playing video, the start time of the video received in advance, and the current time if the video being played is a local video; and obtain the time interval between the first video frame and the second video frame.

[0127] In a possible implementation, the processing module 1002 is specifically used to determine the duration of the cached live video if the played video is a cached live video; and determine the time interval between the first video frame and the second video frame based on the deviation between the duration and a pre-saved standard duration for video caching.

[0128] In a possible implementation, the processing module 1002 is further configured to determine, if the synchronization instruction carries text to be displayed, each character in the text to be displayed to be displayed in each refresh cycle according to the number of characters displayed on each line of the display screen and the number of characters moved out of the display screen in each refresh cycle that are stored in advance;

[0129] Determine the current target refresh cycle according to the start display time of the text to be displayed, the current time and the time of a refresh cycle saved in advance; and display each target text corresponding to the target refresh cycle.

[0130] Based on the above embodiments, the present application also provides an electronic device, Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Fig.11 As shown, it includes: a processor 1101, a communication interface 1102, a memory 1103 and a communication bus 1104, wherein the processor 1101, the communication interface 1102, and the memory 1103 communicate with each other through the communication bus 1104;

[0131] The memory 1103 stores a computer program. When the program is executed by the processor 1101, the processor 1101 executes the steps of the interface generation method provided in the above embodiments.

[0132] Since the principle of solving the problem by the above electronic device is similar to that of the synchronous playback method, the implementation of the above electronic device can refer to the embodiment of the method, and the repeated parts will not be repeated.

[0133] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0134] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0135] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0137] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A synchronous playback method, characterized in that: The method comprises: Receive synchronization instructions; Get the time interval between the first video frame currently being played theoretically and the second video frame currently being played; According to the time interval, the playing speed of the currently playing video is adjusted until the video frame theoretically played at a certain moment is consistent with the video frame actually played at that moment.

2. The method according to claim 1, characterized in that The adjusting the playing speed of the currently playing video according to the time interval includes: If the time of the first video frame is earlier than the time of the second video frame, increasing the playback speed of the currently played video; If the time of the first video frame is later than the time of the second video frame, the playing speed of the currently playing video is reduced.

3. The method according to claim 2, characterized in that Increasing the playback speed of the currently playing video includes: Determine a time interval between the first video frame and the second video frame, determine an adjustment speed according to a product of the time interval and a preset value; and obtain a pre-saved standard speed; Determine a target speed according to the sum of the standard speed and the adjusted speed; The playback speed of the currently playing video is adjusted to the target speed.

4. The method according to claim 2, characterized in that: The reducing the playing speed of the currently playing video includes: Determine a time interval between the first video frame and the second video frame, determine an adjustment speed according to a product of the time interval and a preset value; and obtain a pre-saved standard speed; Determining a target speed according to a difference between the standard speed and the adjusted speed; The playback speed of the currently playing video is adjusted to the target speed.

5. The method according to claim 3 or 4, characterized in that: After determining the adjustment speed based on the product of the time interval and the preset value and before determining the target speed, the method further includes: If the adjustment speed is greater than the pre-stored maximum adjustment speed, the maximum adjustment speed is used to update the adjustment speed.

6. The method according to claim 1, characterized in that If the video being played is a local video, the step of obtaining the time interval between the first video frame currently being theoretically played and the second video frame currently being played includes: Determine the first video frame currently being played theoretically according to the currently playing video, the start time of the video received in advance, and the current time; Obtain a time interval between the first video frame and the second video frame.

7. The method according to claim 1, characterized in that If the video being played is a cached live video, the step of obtaining the time interval between the first video frame currently being played theoretically and the second video frame currently being played includes: Determine the duration of the cached live video; and determine the time interval between the first video frame and the second video frame based on the deviation between the duration and a pre-stored standard duration for video caching.

8. The method according to claim 1, characterized in that After receiving the synchronization instruction, the method further includes: If the synchronization instruction carries the text to be displayed, then determining each character in the text to be displayed in each refresh cycle according to the pre-stored number of characters displayed on each line of the display screen and the number of characters moved out of the display screen in each refresh cycle; Determine the current target refresh cycle according to the start display time of the text to be displayed, the current time and the time of a refresh cycle saved in advance; and display each target text corresponding to the target refresh cycle.

9. A synchronous playback device, characterized in that: The device comprises: A receiving module, used for receiving a synchronization instruction; A processing module, used for obtaining the time interval between the first video frame currently being played theoretically and the second video frame currently being played; The adjustment module is used to adjust the playback speed of the currently played video according to the time interval between the first video frame and the second video frame until the video frame theoretically played at a certain moment is consistent with the video frame actually played at that moment.

10. An electronic device, characterized in that: The electronic device comprises at least a processor and a memory, and the processor is used to implement the steps of the synchronous playback method as described in any one of claims 1 to 8 when executing the computer program stored in the memory.