Synchronous playback method and device

By calculating the mapping value between multiple devices to determine the image frame, synchronous playback is realized, which solves the problems of high cost and complex communication in the prior art, and is suitable for synchronous playback requirements of multiple scenarios.

CN117714760BActive Publication Date: 2025-01-14HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310749266.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-21
Publication Date
2025-01-14
Estimated Expiration
2043-06-21

AI Technical Summary

Technical Problem

The existing synchronous playback method requires one of the server or multiple devices as the control end, resulting in high costs and complex communication.

Method used

In the case where servers or multiple devices are not required as control terminals, the mapping value is calculated to determine image frames, and synchronous playback between multiple devices is achieved.

Benefits of technology

It saves the cost of interaction between multiple devices and realizes synchronous playback between devices. It is suitable for scenes such as stores, homes and venues, ensuring real-time sharing and synchronous playback of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117714760B_ABST
    Figure CN117714760B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a synchronous playback method and apparatus, the method comprising: at a first moment, a first device obtains a value of the first moment and a duration of a first resource; the first device uses the value of the first moment and the duration of the first resource to obtain a first mapping value and determine a first image frame; the first device starts playing the first resource from the first image frame; at a second moment, a second device obtains a value of the second moment and the duration of the first resource; the second device uses the value of the second moment and the duration of the first resource to obtain a second mapping value and determine a second image frame; the second device starts playing the first resource from the second image frame, and without requiring a server or one of the multiple devices as a control end, the first device or the second device can determine which frame of the first resource to start playing through the value of the current moment and the duration of the first video, so as to save the cost of synchronous playback of multiple devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the popularization and development of terminal technology, people's functional requirements for terminal devices are becoming more and more diverse. For example, in stores or exhibition counters, there are often some promotional activities. In order to let users feel a neat picture experience, multiple devices are often required to display the same video interface at the same time.

[0003] Usually, a server needs to be added as a control terminal, and the server sends playback instructions uniformly to control multiple devices to play synchronously. Alternatively, one of the multiple devices that need to play synchronously can be used as the master device, and the master device sends play (or pause) and other instructions to control, so that other multiple devices can achieve synchronous playback through communication with the master device.

[0004] However, the above synchronous playback method has a high cost. Summary of the invention

[0005] The embodiments of the present application provide a synchronous playback method and apparatus, which realize device synchronization among multiple devices without requiring a server or one of the multiple devices as a control end, so as to save the cost of interaction between multiple devices.

[0006] In a first aspect, an embodiment of the present application provides a synchronous playback method, which is applied to a synchronous playback system. The synchronous playback system includes a first device and a second device, both of which are pre-installed with a first resource, and a mapping relationship between a mapping value and an image frame in the first resource. The method includes: at a first moment, the first device obtains a value of the first moment and a duration of the first resource, the value of the first moment includes a value obtained by converting the first moment into a duration; the first device uses the value of the first moment and the duration of the first resource to obtain a first mapping value; the first device determines a first image frame corresponding to the first mapping value in the first resource; the first device starts playing the first resource from the first image frame; at a second moment, the second device obtains a value of the second moment and a duration of the first resource, the second moment is different from the first moment, the value of the second moment includes a value obtained by converting the second moment into a duration; the second device uses the value of the second moment and the duration of the first resource to obtain a second mapping value; the second device determines a second image frame corresponding to the second mapping value in the first resource; the second device starts playing the first resource from the second image frame. It is understandable that, without the need for a server or one of the multiple devices as a control end, the first device or the second device can determine the first resource that needs to be played currently through the value at the current moment and the length of the first video, so as to save the cost of interaction between multiple devices.

[0007] Among them, the first moment can be the system time described in the embodiment of the present application, the duration of the first resource can be the video duration described in the embodiment of the present application, and the first mapping value can be the playback start position described in the embodiment of the present application.

[0008] In a possible implementation, the method further includes: at the second moment, the first device obtains the value of the second moment and the duration of the first resource; the first device obtains the second mapping value using the value of the second moment and the duration of the first resource; the second device determines the second image frame corresponding to the second mapping value in the first resource; the first device starts playing the first resource from the second image frame. Since the first device and the second device can both calculate the second mapping value at the same second moment, the first device and the second device can achieve screen synchronization.

[0009] In a possible implementation, the first mapping value is obtained by taking the modulus of the value of the first moment and the duration of the first resource. In this way, the first device can map any moment with each frame in the first resource based on the duration of the video, ensuring that the first device can display the image frames in the first video regardless of the current time.

[0010] In a possible implementation, at a first moment, the first device obtains the value of the first moment and the duration of the first resource, including: at the first moment, the first device receives a first operation of the user to play the first resource; in response to the first operation, the first device obtains the value of the first moment and the duration of the first resource. It is understandable that in a home scenario or a venue scenario, the first device can execute the synchronous playback method described in the embodiment of the present application through the user's triggering of the resource, thereby improving the flexibility of the method call.

[0011] In a possible implementation, before the first moment, the method further includes: the first device turns off the screen and generates a first play instruction; in response to the first play instruction, the first device displays the third image frame in the first resource, and the third image frame is the first image frame in the first resource. In this way, in the store scene, the first device can execute the synchronous play method described in the embodiment of the present application when it is detected that the device turns off the screen and displays the third image frame, thereby improving the flexibility of the method call.

[0012] In a possible implementation, the first device includes a system time acquisition module, a video duration acquisition module, and a synchronous playback calculation module, and the first device acquires the value of the first moment and the duration of the first resource, including: the system time acquisition module calls the system time acquisition interface to acquire the value of the first moment, and the video duration acquisition module calls the video duration acquisition interface to acquire the duration of the first resource. In this way, each module in the first device can achieve the acquisition of the value of the first moment and the duration of the first resource through module interaction.

[0013] In a possible implementation, the first device also includes a playback instruction sending module: the first device uses the value of the first moment and the duration of the first resource to obtain the first mapping value, including: the synchronous playback calculation module uses the value of the first moment and the duration of the first resource to obtain the first mapping value; the first device determines the first image frame corresponding to the first mapping value in the first resource, including: the playback instruction sending module calls the first video index interface to determine the first image frame corresponding to the first mapping value in the first resource. In this way, each module in the first device can achieve the acquisition of the first mapping value and the first image frame corresponding to the first mapping value through module interaction.

[0014] In a possible implementation, the system time acquisition interface includes: System.currentTimeMillis, the video duration acquisition interface includes: MediaMetadataRetriever, and the first video index interface includes: MediaPlayer.seekTo(position).

[0015] In the second aspect, the embodiment of the present application provides a synchronous playback method, which is applied to a first device, in which a first resource and a mapping relationship between a mapping value and an image frame in the first resource are pre-set, and the method includes: at a first moment, the first device obtains a value of the first moment and a duration of the first resource, and the value of the first moment includes a value obtained by converting the first moment into a duration; the first device obtains a first mapping value using the value of the first moment and the duration of the first resource; the first device determines a first image frame corresponding to the first mapping value in the first resource; and the first device starts playing the first resource from the first image frame. The first device can play the resource without requiring a server or one of the multiple devices as a control terminal.

[0016] In a possible implementation, at a first moment, the first device obtains the value of the first moment and the duration of the first resource, including: at the first moment, the first device receives a first operation of the user to play the first resource; in response to the first operation, the first device obtains the value of the first moment and the duration of the first resource. It is understandable that in a home scenario or a venue scenario, the first device can execute the synchronous playback method described in the embodiment of the present application through the user's triggering of the resource, thereby improving the flexibility of the method call.

[0017] In a possible implementation, before the first moment, the method further includes: the first device turns off the screen and generates a first play instruction; in response to the first play instruction, the first device displays the third image frame in the first resource, and the third image frame is the first image frame in the first resource. In this way, in the store scene, the first device can execute the synchronous play method described in the embodiment of the present application when it is detected that the device turns off the screen and displays the third image frame, thereby improving the flexibility of the method call.

[0018] In a possible implementation, the first device includes a system time acquisition module, a video duration acquisition module, and a synchronous playback calculation module, and the first device acquires the value of the first moment and the duration of the first resource, including: the system time acquisition module calls the system time acquisition interface to acquire the value of the first moment, and the video duration acquisition module calls the video duration acquisition interface to acquire the duration of the first resource. In this way, each module in the first device can achieve the acquisition of the value of the first moment and the duration of the first resource through module interaction.

[0019] In a possible implementation, the first device also includes a playback instruction sending module: the first device uses the value of the first moment and the duration of the first resource to obtain the first mapping value, including: the synchronous playback calculation module uses the value of the first moment and the duration of the first resource to obtain the first mapping value; the first device determines the first image frame corresponding to the first mapping value in the first resource, including: the playback instruction sending module calls the first video index interface to determine the first image frame corresponding to the first mapping value in the first resource. In this way, each module in the first device can achieve the acquisition of the first mapping value and the first image frame corresponding to the first mapping value through module interaction.

[0020] In a possible implementation, the system time acquisition interface includes: System.currentTimeMillis, the video duration acquisition interface includes: MediaMetadataRetriever, and the first video index interface includes: MediaPlayer.seekTo(position).

[0021] In a third aspect, an embodiment of the present application provides a synchronous playback method, which is applied to a second device, wherein the second device is pre-set with a first resource, and a mapping relationship between a mapping value and an image frame in the first resource, wherein the method comprises: at a second moment, the second device obtains a value of the second moment and a duration of the first resource, the second moment is different from the first moment, and the value of the second moment includes a value obtained by converting the second moment into a duration; the second device obtains a second mapping value using the value of the second moment and the duration of the first resource; the second device determines a second image frame corresponding to the second mapping value in the first resource; and the second device starts playing the first resource from the second image frame. The first device can play the resource without requiring a server or one of the multiple devices as a control terminal.

[0022] In a fourth aspect, an embodiment of the present application provides a synchronous playback device, in which a first resource and a mapping relationship between a mapping value and an image frame in the first resource are pre-installed in a first device. At a first moment, an acquisition module of the first device is used to obtain a value of the first moment and a duration of the first resource, wherein the value of the first moment includes a value obtained by converting the first moment into a duration; the acquisition module of the first device is further used to obtain a first mapping value using the value of the first moment and the duration of the first resource; the acquisition module of the first device is further used to determine a first image frame corresponding to the first mapping value in the first resource; and the processing module of the first device is used to play the first resource starting from the first image frame.

[0023] In the fifth aspect, an embodiment of the present application provides a synchronous playback device, in which a first resource and a mapping relationship between a mapping value and an image frame in the first resource are pre-installed in a second device. At a second moment, an acquisition module of the second device is further used to obtain a value of the second moment and a duration of the first resource, wherein the second moment is different from the first moment, and the value of the second moment includes a value obtained by converting the second moment into a duration; the acquisition module of the second device is further used to obtain a second mapping value using the value of the second moment and the duration of the first resource; the acquisition module of the second device is further used to determine a second image frame corresponding to the second mapping value in the first resource; and the processing module of the second device is used to play the first resource starting from the second image frame.

[0024] In a sixth aspect, an embodiment of the present application provides a terminal device, comprising a processor and a memory, the memory being used to store code instructions; the processor being used to run the code instructions so that the terminal device executes the method described in the second aspect or any one of the implementations of the second aspect, or executes the method described in the third aspect or any one of the implementations of the third aspect.

[0025] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed, the computer executes the method described in the second aspect or any one of the implementations of the second aspect, or executes the method described in the third aspect or any one of the implementations of the third aspect.

[0026] In an eighth aspect, a computer program product comprises a computer program, which, when executed, enables a computer to execute a method as described in the second aspect or any one of the implementations of the second aspect, or to execute a method as described in the third aspect or any one of the implementations of the third aspect.

[0027] It should be understood that the fourth to eighth aspects of the present application correspond to the technical solutions of the first to third aspects of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A schematic diagram of a scenario provided for an embodiment of the present application;

[0029] Figure 2 A schematic diagram of the principle of a synchronous playback method;

[0030] Figure 3 A schematic diagram of the principle of a synchronous playback method;

[0031] Figure 4 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application;

[0032] Figure 5 A schematic diagram of the software structure of a terminal device provided in an embodiment of the present application;

[0033] Figure 6 A flowchart of a synchronous playback method provided in an embodiment of the present application;

[0034] Figure 7 A schematic diagram of an interface for automatically setting time provided in an embodiment of the present application;

[0035] Figure 8 A schematic diagram of an interface for triggering synchronous playback of resources is provided for an embodiment of the present application;

[0036] Fig. 9 Another interface schematic diagram for triggering synchronous playback of resources is provided for the embodiment of the present application;

[0037] Fig.10 A flowchart of another synchronous playback method is provided for an embodiment of the present application;

[0038] Fig.11 A schematic diagram of the structure of a communication device provided in an embodiment of the present application;

[0039] Fig.12 A schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first value and the second value are only used to distinguish different values, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0041] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0042] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.

[0043] For example, Figure 1 A schematic diagram of a scenario provided in an embodiment of the present application, such as Figure 1 As shown, the scenario may include at least two terminal devices, such as terminal device 101, terminal device 102, terminal device 103 and terminal device 104. Figure 1 The terminal device may be a smart TV as an example for illustration, but this example does not constitute a limitation on the embodiments of the present application.

[0044] In a store or exhibition counter display, in order to allow users to experience a neat picture experience, multiple devices are often required to display the same video interface at the same time. For example, terminal device 101, terminal device 102, terminal device 103 and terminal device 104 all display the same picture content. Therefore, a synchronous playback method is required to enable multiple devices to display synchronously. The synchronous playback method can be referred to in Figure 2 as well as Figure 3 The corresponding embodiments.

[0045] In one implementation, Figure 2 FIG. 1 is a schematic diagram showing the principle of a synchronous playback method. Figure 2 As shown, the server side acts as a control side to control the playback of n devices, such as device 1, device 2, and device 3. For example, the server can manage the playback progress of each device and send different play or pause instructions to each device according to the playback progress of each device, so that each device can synchronize resources. Figure 2 The synchronous playback method described in the corresponding embodiment requires adding a server as a control end, which increases hardware and software costs.

[0046] In another implementation, Figure 3 FIG. 1 is a schematic diagram showing the principle of another synchronous playback method. Figure 3As shown, in the master-slave mode communication, one of the master devices can be used as a control terminal to control the playback and pause of n auxiliary devices such as auxiliary device 1, auxiliary device 2, and auxiliary device 3. For example, the master device can broadcast the local system clock of the master device to each auxiliary device in the same local area network, and then the master device and the auxiliary device respectively determine the display of each decoded video frame pair according to the local system clock of the master device. However, Figure 3 The synchronous playback method described in the corresponding embodiment requires that one of the multiple devices be used as a master device. The interaction process of the master device with the slave device is complicated and the communication cost is high.

[0047] In view of this, an embodiment of the present application provides a synchronous playback method, which realizes synchronous playback of resources between a first device and a second device without the need for a server or any device among multiple devices as a control end.

[0048] It can be understood that the synchronous playback method described in the embodiment of the present application can be applied not only to store scenarios, but also to scenarios such as home scenarios or conference scenarios where multiple devices are playing synchronously.

[0049] In a family scenario, there are situations where multiple family members watch the same video in different rooms. The embodiment of the present application can play the same video resource among multiple devices corresponding to multiple rooms, so as to achieve the effect of real-time resource sharing and synchronous playback process not being affected by space factors.

[0050] In a conference scenario, participants can be distributed in different rooms and play the same video resource across multiple devices, achieving real-time sharing without being affected by spatial factors.

[0051] It is understandable that no matter what scenario the synchronous playback method described in the embodiment of the present application is applied to, it is necessary to ensure that multiple devices that play resources are in the same time zone so that the system times corresponding to the multiple devices remain consistent.

[0052] The first device or the second device described above may also be referred to as: electronic device, terminal device, terminal (terminal), user equipment (UE), mobile station (MS), mobile terminal (MT), etc. For example, the terminal device may be: mobile phone, smart TV, wearable device, tablet computer (Pad), computer with wireless transceiver function, virtual reality (VR) device, augmented reality (AR) device, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal device.

[0053] In order to better understand the embodiment of the present application, the structure of the terminal device of the embodiment of the present application is introduced below. Figure 4 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application. Figure 4 The terminal device described in may be the first device or the second device described in the embodiments of the present application, and this is not limited in the embodiments of the present application.

[0054] like Figure 4 As shown, the terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, an indicator 192, a camera 193, and a display screen 194, etc.

[0055] The sensor module 180 may include one or more of the following, for example: a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, or a bone conduction sensor.

[0056] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0057] The processor 110 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors. The processor 110 may also be provided with a memory for storing instructions and data.

[0058] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device, and can also be used to transfer data between the terminal device and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other devices, such as AR devices, etc.

[0059] The charging management module 140 is used to receive charging input from a charger, which may be a wireless charger or a wired charger. The power management module 141 is used to connect the charging management module 140 to the processor 110 .

[0060] The wireless communication function of the terminal device can be realized through the antenna 2, the mobile communication module 150, the wireless communication module 160 and the baseband processor.

[0061] Antenna 2 is used to transmit and receive electromagnetic wave signals. The antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization rate of the antenna.

[0062] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G etc. applied to the terminal device. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA) etc.

[0063] The wireless communication module 160 can provide wireless communication solutions applied to terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.

[0064] The modem may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker, a receiver, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem may be an independent device. In other embodiments, the modem may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0065] The terminal device realizes the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.

[0066] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the terminal device may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0067] The terminal device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0068] The camera 193 is used to capture static images or videos. In some embodiments, the terminal device may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0069] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0070] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area.

[0071] The terminal device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.

[0072] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Speaker 170A, also known as "speaker", is used to convert audio electrical signals into sound signals. The terminal device can listen to music or listen to hands-free calls through speaker 170A. Receiver 170B, also known as "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device answers a call or voice message, the voice can be answered by placing receiver 170B close to the human ear. Headphone interface 170D is used to connect wired headphones. Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. In an embodiment of the present application, the terminal device may have a microphone 170C.

[0073] The button 190 includes a power button, a volume button, etc. The button 190 may be a mechanical button. It may also be a touch button. The terminal device may receive the button input and generate a key signal input related to the user settings and function control of the terminal device. The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, message, missed call, notification, etc.

[0074] In addition, on top of the above components, the device also runs an operating system, such as an iOS operating system, an Android operating system, or a Windows operating system, etc. Applications can be installed and run on the operating system.

[0075] The software system of the terminal device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, etc., which will not be elaborated here.

[0076] For example, Figure 5 A schematic diagram of the software structure of a terminal device provided in an embodiment of the present application.

[0077] like Figure 5 As shown, the layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into multiple layers, from top to bottom, including the application (APP) layer, the application framework layer, the kernel layer, and the hardware module.

[0078] The application layer may include a series of application packages. The application package may include a video playback application, which may be a preset application that allows video resource synchronization, that is, all videos stored in the video playback application may support the synchronous playback method provided in the embodiment of the present application. For example, in a store scenario, the video playback application may be an experience APP, which may usually be set in a smart TV that needs to achieve synchronous playback. In the embodiment of the present application, the video playback application that achieves synchronous playback is not specifically limited.

[0079] The video playback application may include: a system time acquisition module, a video duration acquisition module, a synchronous playback calculation module, a playback instruction delivery module, etc., and a database. The database may include a first corresponding relationship, which may be a corresponding relationship between a playback start position and an image frame in a first resource corresponding to the playback start position.

[0080] The system time acquisition module is used to obtain the system time through the System.currentTimeMillis instruction.

[0081] The video duration acquisition module is used to obtain the video duration through the retriever.extractMetadata instruction.

[0082] The synchronous playback calculation module is used to calculate the playback start position corresponding to the current system time according to the system time and the video duration. The playback start position can be a value indicating which image frame in the video needs to be displayed from the current system time.

[0083] The play instruction issuing module is used to obtain the image frame corresponding to the play start position calculated in the synchronous play instruction according to the first corresponding relationship stored in the database, and then call the startServiceAsUser instruction to obtain the image frame corresponding to the current system time. For example, when the play start position is identified as 1, it is necessary to obtain the image frame corresponding to the identifier 1 in the video from the database.

[0084] In some embodiments, the application layer may also include: calendar, phone, map, Bluetooth and other applications, which are not limited in the embodiments of the present application.

[0085] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined system components, which are used to implement the basic capabilities of the system, such as the relevant interfaces that can be used by video playback applications in the application framework layer.

[0086] The application framework layer may include: system time acquisition interface System.currentTimeMillis, video duration acquisition interface MediaMetadataRetriever, and video index interface, such as the video index interface used to play the video from the beginning: AutoVideoView.start, and the interface used to play the video from the index position: MediaPlayer.seekTo(position), where position can be understood as the starting position of playback in the embodiment of the present application.

[0087] For example, the system time acquisition module can obtain the system time by calling System.currentTimeMillis, the video duration acquisition module can obtain the video duration from the version component by calling MediaMetadataRetriever, and the video index interface can obtain image frames from the version component based on the image frames corresponding to the start position of playback carried in the playback instruction issuance module, and then transmit the playback instruction to hardware modules such as the display through the kernel layer and the hardware layer.

[0088] It is understandable that the version component can be independent of the software architecture of the terminal device, and the version component is used to store some device resources in the productization process of the terminal device. For example, the version component can store a preset first resource.

[0089] The first resource may include one or more of the following, such as video resources, audio resources, or picture resources, etc., which is not limited in the embodiments of the present application.

[0090] In some embodiments, the version component may also be set in a software structure such as an application layer or an application framework layer. The location of the version component is not specifically limited in the embodiments of the present application.

[0091] In some embodiments, the application framework layer may include a window manager, a content provider, a resource manager, a view system, a notification manager, etc. ( Figure 5 not shown).

[0092] Among them, the window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, capture the screen, etc. The content provider is used to store and obtain data and make the data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon can include a view for displaying text and a view for displaying pictures. The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.

[0093] The kernel layer is a layer between hardware and software. The kernel layer is used to drive the hardware to make the hardware work. The kernel layer may include one or more of the following, such as display driver, camera driver, Bluetooth driver, and sensor driver, etc., which are not limited in the embodiments of the present application.

[0094] The terminal device may also include a hardware module, which may include a display screen, an audio device, and the like.

[0095] It can be understood that the software architecture provided in the embodiment of the present application is only an example, and the terminal device may also include other layers and / or modules, which are not limited in the embodiment of the present application.

[0096] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0097] The embodiment of the present application provides a synchronous playback method, which is applied to a synchronous playback system, and the synchronous playback system involves at least two terminal devices, such as a first device and a second device. Since the steps performed by the first device and the second device in the synchronous playback method are the same, the specific process of the first device performing the synchronous playback method is illustrated below by taking the first device as an example.

[0098] For example, Figure 6 A flowchart of a synchronous playback method provided in an embodiment of the present application.

[0099] Before the first device executes the synchronous playback method, the first device may pre-store the first resource, and the first device may obtain the latest time of the current longitude and latitude when connected to the Internet.

[0100] The first resource may be stored in a path corresponding to the video playback application. For example, the first resource may be stored in a version component and may be called by the video playback application at any time.

[0101] Among them, the first device can turn on the automatic setting control in the date and time in the settings, so that the first device can obtain the latest time through the network. For example, the first device can automatically set the date, time and time zone through the network.

[0102] For example, Figure 7 A schematic diagram of an interface for automatically setting time provided in an embodiment of the present application. Figure 7 In the corresponding embodiment, an example is given in which the first device is a mobile phone.

[0103] After the first device receives the user's opening of the system and update control in the settings, and receives the user's opening of the date and time control in the interface corresponding to the system and update control, the first device can display the following Figure 7 The interface shown.

[0104] like Figure 7 As shown, the interface may be an interface for automatically setting the time, which may include: a control for setting a 24-hour system, an automatic setting control 701, a time zone description, a dual clock control, and a resident city control.

[0105] When the automatic setting control 701 is turned on, the first device can automatically set the date, time and time zone through the network. It is understandable that the second device can also use the automatic time setting interface to automatically obtain the set date, time and time zone through the network, and when the first device and the second device are in the same time zone, the time automatically obtained by the first device is the same as the time automatically obtained by the second device, so as to achieve time synchronization between the devices.

[0106] In some embodiments, the first device may also obtain the latest time based on a user manually modifying the device time. The method for obtaining the time is not specifically limited in the embodiments of the present application.

[0107] It is understandable that when the first device is a device other than a mobile phone, the interface for the first device to obtain the latest time through networking can be the same as Figure 7 Different, this is not limited in the embodiments of the present application.

[0108] exist Figure 6 In the corresponding embodiment, the synchronously played resource is a video resource as an example for illustration, and the first device and the second device described in the embodiment of the present application can both pre-install video playback applications, so that the first device and the second device can both be devices that support synchronous playback capabilities by default.

[0109] like Figure 6 As shown, the synchronous playback method may include the following steps:

[0110] S601. The first device obtains system time and video duration.

[0111] The system time may be the current time of the first device. The system time may be converted into a duration to obtain key1. The unit of key1 may be milliseconds or seconds, etc. This is not limited in the embodiments of the present application.

[0112] In a possible implementation, the first device may calculate key, key=key1 or key=key1+offset factor. The offset factor key2 is used to implement algorithm encryption, for example, the value of key2 may be nkey1 (n may be a positive number), or key2 may be a value unrelated to key1, etc., which is not limited in the embodiments of the present application.

[0113] For example, when the first device determines that the system time is 8 o'clock based on the enabled automatic setting control, the value of key can be 28800000 milliseconds; or, when the first device determines that the system time is 8 o'clock based on the enabled automatic setting control and the offset factor is 2key1, the value of key can be 86400000 milliseconds. The meaning of the automatic setting control can be found in Figure 7 The corresponding embodiments will not be described in detail here.

[0114] The value of the video duration value can also be converted into units such as milliseconds or seconds. For example, the video duration value can be 100 milliseconds.

[0115] In the store scenario, the first device can display the first image frame in the video resource after the screen is off, and perform steps S601-S603 while displaying the first image frame, thereby playing the video. The screen off can be a step performed when the first device detects a user operation or can be a step performed when the first device does not detect any user operation for a certain time threshold.

[0116] For example, Figure 8 A schematic diagram of an interface for triggering synchronous playback of resources is provided for an embodiment of the present application. After the video playback application in the first device monitors the screen-off broadcast, it can initiate a first playback instruction to make the first device display the first image frame in the video resource, such as the first device displays Figure 8 The interface shown in a.

[0117] Further, when the first device determines based on the steps shown in S601-S603 that the first device needs to start playing the video resource from a target image frame in the video resource, such as the fifth frame, the first device can start playing from the playback target image frame in the video resource after a period of time (such as 1 second) from the start of displaying the first image frame, and display the video as shown in FIG. Figure 8 The interface shown in b.

[0118] The target image frame can be any frame in the video resource, so the first image frame and the target image frame can be the same, that is, Figure 8 The interface shown in a is the same as Figure 8 The contents displayed in the interface shown in b can be the same as ( Figure 8 (not shown in the corresponding embodiment). Alternatively, the first image frame and the target image frame may be different, that is, Figure 8 The interface shown in a is the same as Figure 8 The content displayed in the interface shown in b may be different. For example, the target image frame may be the second image frame in the video resource, so that the first device still presents a smooth picture, or the target image frame may be the Mth image frame (M is greater than 2) in the video resource, so that the first device may present a suddenly jumped picture, etc.

[0119] In a conference scene or a home scene, when the first device detects that the user has opened the video playback application, it can execute the steps S601-S603 to start playing at least one video resource in the video playback application. The operation of opening the video playback application can be an operation when the user triggers the icon corresponding to the video playback application.

[0120] In this scenario, the user can view videos in the video playback application, add videos to the video playback application, or delete videos through the resource list.

[0121] In some embodiments, when the first device detects that the user selects to play at least one video in the video playback application and detects that the user triggers the play control (or synchronized play control), the first device may perform the steps shown in S601-S603 to play the at least one video selected by the user. Alternatively, when the first device detects that the user selects to play at least one video in the video playback application and detects that the user triggers the normal play control, the first device may play normally from the starting position of the video resource.

[0122] For example, Fig. 9 Another interface diagram for triggering synchronous playback of resources is provided for the embodiment of the present application. When the first device detects that the user opens the video playback application, the first device can display the following Fig. 9The interface shown in a in FIG. 1 may include video resource 901 and video resource 902.

[0123] When the first device receives the operation of the user selecting the video resource 901, the first device displays the following Fig. 9 The interface shown in b in FIG. 1 may include at least one function button at the bottom of the interface, such as a share button, a synchronous play button 903, a normal play button, or a move button.

[0124] Further, when the first device detects that the user triggers the synchronous play button 903, the first device may execute the steps shown in S601-S603 to determine the target image frame to be displayed, and then display the image frame as shown in FIG. Fig. 9 In the interface shown in c in FIG. 9 , the video resource 901 is played starting from the target image frame. Alternatively, when the video resource 901 is selected, when the first device detects that the user triggers the synchronous normal play button 903 , the first device can play the first image frame in the video resource 901 .

[0125] It can be understood that the operation of triggering the synchronous play button or the operation of opening the video play application can be referred to as the first operation.

[0126] Combination Fig. 9 In the corresponding embodiment, the process of the user playing multiple video resources through the synchronous play button 903 is similar to the above, which will not be repeated here.

[0127] S602: The first device obtains a start position of video playback using system time and video duration.

[0128] The formula for calculating the video playback start position startPlayPos can be: startPlayPos = key%value, which can be understood as key modulo value. For example, when key is 28800000 milliseconds and value is 100 milliseconds, the value of startPlayPos can be 28800000%100=0, and the video playback start position (or mapping value) can be determined to be 0.

[0129] It is understandable that the first device can map the system time to each image frame in the video resource by taking the modulo operation based on the length of the video, so that a frame in the video resource can be displayed regardless of the current time point of the first device.

[0130] S603: The first device obtains a target image frame corresponding to a start position of video playback, and starts playing the video resource from the target image frame.

[0131] The first corresponding relationship may be stored in the database of the first device. The first corresponding relationship may be a corresponding relationship between a playback start position and an image frame in a video resource corresponding to the playback start position.

[0132] It is understandable that, since the playback start position is obtained by taking the modulus of the system time and the video duration, if the video resource is pre-set to correspond to one frame of image per millisecond (or second), the playback start position obtained by taking the modulus can correspond to a certain frame in the video resource. For example, when the value of the playback start position is 0, the image frame corresponding to 0 can be obtained, such as the first frame in the video resource, or when the value of the playback start position is 1, the image frame corresponding to 1 can be obtained, such as the second frame in the video resource.

[0133] After S603, when the video resource is played once, the first device can re-execute the steps shown in S601-S603 during loop playback to calculate the playback start position.

[0134] In some embodiments, Figure 6 The first device described in the corresponding embodiment may be a device that supports the synchronous playback capability by default. When the first device does not yet support the synchronous playback capability, the first device may determine whether the device supports the synchronous playback capability based on an instruction issued by the cloud.

[0135] Exemplarily, the cloud may pre-send a first instruction to the first device, and the first instruction may include device information of the first device and a synchronous playback field. When the first device receives the first instruction, the first instruction may be parsed. When the first device determines that the device information in the first instruction is the device information of the first device, the first device may determine that the first device supports synchronous playback capabilities based on the synchronous playback field. Furthermore, the first device executes the steps shown in S601-S603 based on user operations or displaying the first image frame in the video resource after the screen is turned off. Among them, the device information may be a device serial number (SN).

[0136] It is understandable that the time point when the second device executes the synchronous playback method may be different from the time point when the first device executes the synchronous playback method, but the specific process of the second device executing the synchronous playback method is similar to that of the first device.

[0137] Similarly, the second device can also be based on Figure 6The corresponding embodiments perform video playback. For example, at the second moment, the second device obtains the value of the second moment and the duration of the video resource, the second moment is different from the first moment, and the value of the second moment includes a value obtained by converting the second moment into the duration; the second device uses the value of the second moment and the duration of the video resource to obtain a second mapping value; the second device determines a second image frame corresponding to the second mapping value in the video resource; and the second device starts playing the video resource from the second image frame.

[0138] It is understandable that when the first device and the second device play the same video resource and the system time of the first device and the second device are synchronized, the first device and the second device can start playing the video resource from the same image frame, thereby achieving synchronous playback of the video resource.

[0139] It is understandable that the synchronous playback method provided in the embodiment of the present application does not require the addition of a control device, and can achieve the purpose of cost saving while playing synchronously on multiple devices.

[0140] The embodiment of the present application also provides two ways to obtain evidence. For example, by adjusting the device time of the first device and the second device respectively, and comparing the videos played synchronously by the two devices, it can be confirmed whether there is synchronous playback at the same time point, and then the synchronous playback result can be obtained. For example, the first device or the second device can also determine whether the same video frame is played at the same time point through the log file corresponding to the synchronous video playback process. The log file can include the playback duration and the corresponding relationship between the image frames displayed under the playback duration, so that the user can clearly check the resource synchronization status between multiple devices.

[0141] exist Figure 6 Based on the corresponding embodiments, in a possible implementation method, when there are N resources played synchronously (N is an integer greater than 1), the first device can distinguish the N resources according to characteristics such as the type of resources or the number of resources, for example, adding a flag mark to any of the N resources.

[0142] And the steps shown in S601 to S603 are performed for any resource among the N resources. For example, for S601, the first device can calculate the system time and the video duration corresponding to each video.

[0143] The system time corresponding to resource 1 can be (flag-1, key-1), flag-1 can be understood as the identifier of resource 1, and key-1 can be the current system time of resource 1; the system time corresponding to resource 2 can be (flag-2, key-2), flag-2 can be understood as the identifier of resource 2, key-2 can be the current system time of resource 2, ..., the system time corresponding to resource N can be (flag-N, key-N), flag-N can be understood as the identifier of resource N, and key-N can be the current system time of resource N.

[0144] The video length of resource 1 (flag-1, value-1), value-1 can be the video length of resource 1, the first device can also calculate the video length of resource 2 (flag-2, value-2), value-2 can be the video length of resource 2,..., the first device can also calculate the video length of resource N (flag-N, value-N), flag-N can be understood as the identifier of resource N, and value-N can be the video length of resource N.

[0145] For S602, the first device may calculate the play start positions corresponding to the N resources respectively, for example, the play start position may be calculated by the formula: startPlayPos-N=key-N%value-N. Then, the first device may index the corresponding image frame according to startPlayPos-N.

[0146] It is understandable that the first device can synchronously play the first resource, the second resource, ..., and the Nth resource among the N resources in sequence, and any resource among the N resources can be synchronized among multiple devices including the first device.

[0147] Similarly, the process of the second device playing N resources may be similar to the process of the first device playing N resources, which will not be repeated here.

[0148] In some embodiments, the first device may also treat N resources as one resource and execute steps S601-603 on the first resource. The method for synchronously playing N resources in the embodiment of the present application is not specifically limited.

[0149] exist Figure 6 Based on the corresponding embodiments, in possible implementations, Fig.10 A flowchart of another synchronous playback method is provided for the embodiment of the present application. Fig.10 As shown, the first device (or the second device) may include: a system time acquisition module, a video duration acquisition module, a synchronous playback calculation module, a playback instruction delivery module, and other modules. The functions of each module can be found in Figure 5 The description in the corresponding embodiments will not be repeated here.

[0150] like Fig.10 As shown, the synchronous playback method may include the following steps:

[0151] S1001. When the playback instruction issuing module in the video playback application receives the screen-off broadcast, the playback instruction issuing module can obtain the first image frame in the video resource from the version component through the AutoVideoView.start interface.

[0152] S1002: The play instruction issuing module issues a first play instruction.

[0153] The first play instruction is used to instruct to start playing from the first image frame in the video resource, so that the first device plays the first image frame. For example, the play instruction sending module can send the first play instruction to the bottom layer through MediaPlayer.startActivityAsUser in the application framework layer.

[0154] S1003. The system time acquisition module calls the system time acquisition interface System.currentTimeMillis to acquire the system time.

[0155] S1004: The system time acquisition module sends the system time to the synchronous playback calculation module.

[0156] S1005. The video duration acquisition module calls the video duration acquisition interface MediaMetadataRetriever to obtain the video duration.

[0157] The video duration acquisition module calls the MediaMetadataRetriever interface to obtain the video duration corresponding to the resource from the version component.

[0158] S1006. The video duration acquisition module sends the video duration to the synchronous playback calculation module.

[0159] S1007: The synchronous playback calculation module obtains the playback start position of the video using the system time and the video duration.

[0160] The specific calculation method of the synchronous playback calculation module using the system time and the video duration to obtain the playback start position of the video can be found in the description of S602 and will not be repeated here.

[0161] S1008. The synchronous playback calculation module sends the playback start position to the playback instruction issuing module.

[0162] S1009: The playback instruction issuing module determines the target image frame corresponding to the playback start position by using the first corresponding relationship.

[0163] S1010: The playback instruction issuing module calls MediaPlayer.SeekTo(position) to obtain a target image frame from the version component, wherein position may indicate the target image frame corresponding to the playback start position.

[0164] S1011. The play instruction issuing module issues a second play instruction.

[0165] The second play instruction is used to instruct to start playing the video resource from the target image frame in the video resource, and the second play instruction includes the target image frame. For example, the play instruction sending module can send the second play instruction to the display in the hardware layer through MediaPlayer.startActivityAsUser in the application framework layer and the kernel layer, so that the display can display the video resource starting from the target image frame.

[0166] It is understandable that the process of each module in the second device implementing the synchronous playback method can be the same as Fig.10 The description in the corresponding embodiments is similar and will not be repeated here.

[0167] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0168] Combined with the above Figure 6-Figure 10 , the method provided in the embodiment of the present application is described, and the device for executing the above method provided in the embodiment of the present application is described below. Fig.11 As shown, Fig.11 A structural schematic diagram of a synchronous playback device provided in an embodiment of the present application. The synchronous playback device can be the first device or the second device in the embodiment of the present application, or it can be a chip or chip system in the first device or a chip or chip system in the second device.

[0169] like Fig.11As shown, the synchronous playback device 1100 can be used in a communication device, a circuit, a hardware component or a chip, and the synchronous playback device 1100 includes: an acquisition unit 1101 and a processing unit 1102. The acquisition unit 1101 is used to support the information acquisition step performed by the synchronous playback method; the processing unit 1102 is used to support the synchronous playback device 1100 to perform the information processing step.

[0170] In a possible implementation, the synchronous playback device 1100 may further include a communication unit 1103, and the communication unit 1103 is used to support the synchronous playback device 1100 to perform steps such as receiving or sending a message.

[0171] The synchronous playback device of the first device (or the second device) described in the embodiments of the present application may include: Fig.11 The units described in the corresponding embodiments.

[0172] Specifically, the processing unit 1102 and the acquiring unit 1101 may be integrated together, and the processing unit 1102 and the acquiring unit 1101 may communicate with each other.

[0173] In a possible implementation, the synchronous playback device 1100 may further include: a storage unit 1104. The storage unit 1104 may include one or more memories, and the memory may be a device in one or more devices or circuits for storing programs or data.

[0174] The storage unit 1104 may exist independently and be connected to the processing unit 1102 via a communication bus. The storage unit 1104 may also be integrated with the processing unit 1102.

[0175] Taking the synchronous playback device 1100 as an example, which can be a chip or chip system of a terminal device in an embodiment of the present application, the storage unit 1104 can store computer execution instructions of the method of the terminal device, so that the processing unit 1102 executes the method of the terminal device in the above embodiment. The storage unit 1104 can be a register, a cache, or a random access memory (RAM), etc. The storage unit 1104 can be integrated with the processing unit 1102. The storage unit 1104 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the storage unit 1104 can be independent of the processing unit 1102.

[0176] In a possible implementation, the synchronous playback device 1100 may further include: a communication unit 1103. The communication unit 1103 is used to support the synchronous playback device 1100 to interact with other devices. Exemplarily, when the synchronous playback device 1100 is a terminal device, the communication unit 1103 may be a communication interface or an interface circuit. When the synchronous playback device 1100 is a chip or a chip system in a terminal device, the communication unit 1103 may be a communication interface. For example, the communication interface may be an input / output interface, a pin or a circuit, etc.

[0177] The device of this embodiment can be used to execute the steps executed in the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.

[0178] Fig.12 A schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, the terminal device may be the first device or the second device described in the embodiments of the present application.

[0179] The terminal device includes a processor 1201, a communication line 1204 and at least one communication interface ( Fig.12 The communication interface 1203 is used as an example for explanation).

[0180] The processor 1201 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0181] Communications link 1204 may include circuitry to transmit information between the above-described components.

[0182] The communication interface 1203 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), etc.

[0183] Possibly, the terminal device may further include a memory 1202 .

[0184] The memory 1202 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line 1204. The memory may also be integrated with the processor.

[0185] The memory 1202 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 1201. The processor 1201 is used to execute the computer-executable instructions stored in the memory 1202, thereby implementing the method provided by the embodiment of the present application.

[0186] Possibly, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, and the embodiments of the present application do not specifically limit this.

[0187] In a specific implementation, as an embodiment, the processor 1201 may include one or more CPUs, such as Fig.12 CPU0 and CPU1 in.

[0188] In a specific implementation, as an embodiment, the terminal device may include multiple processors, such as Fig.12 1 and 1205. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0189] In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.

[0190] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium can include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (digital versatile disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.

[0191] The embodiments of the present application also provide a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.

[0192] As a possible design, the computer readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection line may also be appropriately referred to as a computer readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while optical discs reproduce data optically using lasers.

[0193] The above combinations should also be included in the scope of computer-readable media. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A synchronous playback method, characterized in that: Applied to a synchronous playback system, the synchronous playback system includes a first device and a second device, the first device and the second device are in the same time zone, the first device and the second device are both pre-installed with a first resource, and a mapping relationship between a mapping value and an image frame in the first resource, the method includes: At a first moment, the first device obtains a value of the first moment and a duration of a first resource, where the value of the first moment includes a value obtained by converting the first moment into a duration; The first device obtains a first mapping value by using the value at the first moment and the duration of the first resource; The first device determines, in the first resource, a first image frame corresponding to the first mapping value; The first device starts playing the first resource from the first image frame; At a second moment, the second device obtains a value of the second moment and a duration of the first resource, the second moment is different from the first moment, and the value of the second moment includes a value obtained by converting the second moment into a duration; The second device obtains a second mapping value by using the value at the second moment and the duration of the first resource; The second device determines, in the first resource, a second image frame corresponding to the second mapping value; The second device starts playing the first resource from the second image frame; and the method further includes: At a second moment, the first device obtains a value of the second moment and a duration of the first resource; The first device obtains a second mapping value by using the value at the second moment and the duration of the first resource; The second device determines, in the first resource, a second image frame corresponding to the second mapping value; The first device starts playing the first resource from the second image frame.

2. The method according to claim 1, characterized in that The first mapping value is obtained by taking the modulus of the value at the first moment and the duration of the first resource.

3. The method according to claim 1 or 2, characterized in that: At the first moment, the first device obtains a value of the first moment and a duration of the first resource, including: At a first moment, the first device receives a first operation of a user to play the first resource; in response to the first operation, the first device obtains a value of the first moment and a duration of the first resource.

4. The method according to claim 1 or 2, characterized in that: Before the first moment, the method further includes: The first device turns off the screen and generates a first play instruction; In response to the first play instruction, the first device displays a third image frame in the first resource, where the third image frame is the first image frame in the first resource.

5. The method according to claim 1 or 2, characterized in that: The first device includes a system time acquisition module, a video duration acquisition module, and a synchronous playback calculation module. The first device obtains the value of the first moment and the duration of the first resource, including: the system time acquisition module calls the system time acquisition interface to obtain the value of the first moment, and the video duration acquisition module calls the video duration acquisition interface to obtain the duration of the first resource.

6. The method according to claim 5, characterized in that The first device also includes a playback instruction issuing module: The first device obtains a first mapping value by using the value of the first moment and the duration of the first resource, including: the synchronous playback calculation module obtains the first mapping value by using the value of the first moment and the duration of the first resource; The first device determines the first image frame corresponding to the first mapping value in the first resource, including: the playback instruction issuing module calls the first video index interface to determine the first image frame corresponding to the first mapping value in the first resource.

7. The method according to claim 6, characterized in that The system time acquisition interface includes: System.currentTimeMillis, the video duration acquisition interface includes: MediaMetadataRetriever, and the first video index interface includes: MediaPlayer.seekTo(position).

8. A synchronous playback method, characterized in that: Applied to a first device, the first device is a device in the synchronous playback system as claimed in claim 1, the first device is pre-installed with a first resource, and a mapping relationship between a mapping value and an image frame in the first resource, the method comprising: At a first moment, the first device obtains a value of the first moment and a duration of a first resource, where the value of the first moment includes a value obtained by converting the first moment into a duration; The first device obtains a first mapping value by using the value at the first moment and the duration of the first resource; The first device determines, in the first resource, a first image frame corresponding to the first mapping value; The first device starts playing the first resource from the first image frame.

9. A synchronous playback method, characterized in that: Applied to a second device, the second device is a device in the synchronous playback system as claimed in claim 1, the second device is pre-installed with a first resource, and a mapping relationship between a mapping value and an image frame in the first resource, the method comprising: At a second moment, the second device obtains a value of the second moment and a duration of the first resource, where the value of the second moment includes a value obtained by converting the second moment into a duration; The second device obtains a second mapping value by using the value at the second moment and the duration of the first resource; The second device determines, in the first resource, a second image frame corresponding to the second mapping value; The second device starts playing the first resource from the second image frame.

10. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the terminal device executes the method according to any one of claims 1 to 9.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the computer is caused to perform the method according to any one of claims 1 to 9.

12. A computer program product, comprising a computer program, characterized in that: When the computer program is executed, the computer is caused to execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Synchronous display method, device and system, terminal and storage medium

    CN114630169A