Playing method, device, client and computer program product
By generating metadata files to indicate the frame positions of OSI files, flexible loading of large OSI files is achieved, solving the problem of insufficient device memory and improving the stability of device operation.
Patent Information
- Application Number
- CN202410601917.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-11-18
AI Technical Summary
Loading large OSI files can cause insufficient device memory, leading to malfunctions.
Generate a metadata file (meta file) that contains the identifiers and frame positions of some frames in the OSI file. The metadata file indicates how to flexibly load parts of the OSI file, reducing device memory usage.
This reduces the possibility of equipment malfunctions and improves equipment safety.
Smart Images

Figure CN120980306A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a playing method and device, a client and a computer program product. BACKGROUND
[0002] Currently, the OSI technical standard of ASAM has been published for many years (for example, its v3.4.0 version was published in November 2021), in which, the osi file defined by ASAM is a file that stores content by frames. It defines the length of a frame with the first 4 bytes, and then follows the data of a frame; then it is the 4 bytes of the length of the next frame, and the cycle continues until the end. The data of each frame is the information of the simulation process, which is serialized into binary data by protobuf, and is not video or picture information. However, if the osi file is particularly large, there will be a relatively long file download and pre-loading process, at this time, the device running the osi file may not function normally due to insufficient memory. Therefore, there is an urgent need for a simulation player for processing osi files of large files. SUMMARY
[0003] The embodiments of the present application provide a playing method, device, client and computer program product, which can flexibly load part of the content in the first file based on the frame position of the frame indicated by the second file corresponding to the first file, without loading all the content of the first file, thereby reducing the possibility of abnormal operation of the device.
[0004] In a first aspect, the embodiments of the present application provide a playing method applied to a client of a simulation player, comprising:
[0005] displaying a playback page corresponding to a first file; the playback page comprising a progress bar; the first file being a file recording a simulation process in a frame manner, the first file corresponding to a second file, the second file being used to describe the frame position of at least part of the frames in the first file, the frame position in the second file corresponding to a key time point on the progress bar; determining a current playing time point on the progress bar based on an operation on the progress bar; reading the content starting from the frame position corresponding to a target key time point in the first file based on the second file, the current playing time point and the key time point, and processing, so that the playback page plays from the target key time point; the target key time point being equal to the current playing time point, or being the key time point that is earlier than and closest to the current playing time point.
[0006] In the present solution, part of the content in the first file can be flexibly loaded based on the frame position of the frame indicated by the second file corresponding to the first file, without loading all the content of the first file, thereby reducing the possibility of abnormal operation of the device.
[0007] In a possible implementation, before displaying the playback page corresponding to the first file, the method further includes: sending a file request to a server of the simulation player, the file request being used to indicate a request for the second file.
[0008] In this solution, the second file is acquired when the playback page is displayed, and subsequent operations are performed.
[0009] In a possible implementation, the first file is located at a server of the simulation player.
[0010] In a possible implementation, the current playback time point is a time point between a start time point and an end time point of the progress bar.
[0011] In a possible implementation, the operation on the progress bar includes clicking or dragging.
[0012] In a possible implementation, based on the second file, the current playback time point and the key time point, the content starting from the frame position corresponding to the target key time point in the first file is read and processed, including:
[0013] Based on the second file, the current playback time point and the key time point, the target key time point is determined, and the content in the first file starting from the frame position corresponding to the target key time point is read and processed.
[0014] In a possible implementation, the data of the first file cached in the memory of the client is the content starting from the frame position corresponding to the target key time point in the first file.
[0015] In this solution, only the content to be played subsequently is cached in the memory, the occupation of the memory is reduced, and the safety of the device is improved.
[0016] In a second aspect, an embodiment of the present application provides a playing device, the playing device comprising a plurality of modules, each module being configured to perform each step of the playing method provided in the first aspect of the present application. The division of the modules is not limited herein. The specific functions performed by each module of the playing device and the beneficial effects achieved are for reference to the functions of each step of the playing method provided in the first aspect of the present application, which will not be described herein again.
[0017] For example, the playing device comprises:
[0018] a display module configured to display a playback page corresponding to a first file, the playback page comprising a progress bar, the first file being a file recording a simulation process in a frame manner, the first file corresponding to a second file, the second file being used to describe frame positions of at least part of frames in the first file, the frame positions in the second file corresponding to key time points on the progress bar.
[0019] The operation module is configured to determine a current playing time point on the progress bar based on an operation on the progress bar.
[0020] The playing module is configured to read and process content in the first file starting from a frame position corresponding to the target key time point based on the second file, the current playing time point and the key time points, so that the playback page starts playing from the target key time point; the target key time point is equal to the current playing time point, or is the key time point that is earlier than and closest to the current playing time point.
[0021] In this solution, part of the content in the first file can be flexibly loaded based on the frame position of the frame indicated by the second file corresponding to the first file, without loading the entire content of the first file, thereby reducing the possibility of abnormal operation of the device.
[0022] In a possible implementation, the apparatus further includes a file obtaining module configured to send a file request to a server of the emulated player, the file request being configured to indicate a request for the second file; and accept the second file sent by the server.
[0023] In this solution, the second file is obtained when the playback page is displayed, and subsequent operations are performed.
[0024] In a possible implementation, the first file is located on a server of the emulated player.
[0025] In a possible implementation, the current playing time point is a time point between a start time point and an end time point of the progress bar.
[0026] In a possible implementation, the operation on the progress bar includes clicking or dragging.
[0027] In a possible implementation, the playing module is configured to determine the target key time point based on the second file, the current playing time point and the key time points, and read and process the content in the first file starting from a frame position corresponding to the target key time point.
[0028] In a possible implementation, the data of the first file cached in the memory of the client is content in the first file starting from a frame position corresponding to the target key time point.
[0029] In this solution, only the content that needs to be played subsequently is cached in the memory, thereby reducing the occupation of the memory and improving the safety of the device.
[0030] In a third aspect, an embodiment of the present application provides a playing apparatus, including: at least one memory configured to store a program; and at least one processor configured to execute the program stored in the memory, and when the program stored in the memory is executed, the processor is configured to execute the method provided in the first aspect.
[0031] In a fourth aspect, an embodiment of the present application provides a playing device, which runs computer program instructions to execute the method provided in the first aspect. Exemplarily, the device can be a chip or a processor.
[0032] In one example, the device can include a processor, which can be coupled with a memory, read instructions in the memory and execute the method provided in the first aspect according to the instructions. The memory can be integrated in the chip or the processor, or can be independent of the chip or the processor.
[0033] In a fifth aspect, an embodiment of the present application provides a client, which includes a processor and a memory;
[0034] The memory is configured to store a program, and the processor is configured to execute the program stored in the memory, so that the client executes the method provided in the first aspect.
[0035] In a sixth aspect, an embodiment of the present application provides a computer storage medium, which stores instructions, when the instructions are run on a computer, the computer executes the method provided in the first aspect.
[0036] In a seventh aspect, an embodiment of the present application provides a computer program product including instructions, when the instructions are run on a computer, the computer executes the method provided in the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0037] Figure 1 FIG. 1 is a system architecture diagram of a playing system provided by an embodiment of the present application;
[0038] Figure 2 FIG. 2 is a schematic diagram of a technical solution provided by an embodiment of the present application;
[0039] Figure 3 FIG. 3 is a structural schematic diagram of a client 120 provided by an embodiment of the present application;
[0040] Figure 4 FIG. 4 is a flow schematic diagram of a playing method provided by an embodiment of the present application; Figure 1
[0041] Figure 5 FIG. 5 is a schematic diagram of an emulating process provided by an embodiment of the present application;
[0042] Figure 6a FIG. 6 is a display schematic diagram of a playback page provided by an embodiment of the present application; Figure 1
[0043] Figure 6b FIG. 7 is a display schematic diagram of a playback page provided by an embodiment of the present application; Figure 2
[0044] Figure 7 is a schematic diagram of a playing process provided by an embodiment of the present application;
[0045] Figure 8 is a schematic diagram of file storage provided by an embodiment of the present application;
[0046] Figure 9 is a flowchart of a playing method provided by an embodiment of the present application Figure 2 ;
[0047] Figure 10a is a schematic diagram of a playing scenario provided by an embodiment of the present application Figure 1 ;
[0048] Figure 10b is a schematic diagram of a playing scenario provided by an embodiment of the present application Figure 2 ;
[0049] Figure 11 is a schematic diagram of a playing device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below with reference to the drawings.
[0051] In the description of the embodiments of the present application, the words such as “exemplary”, “for example”, or “for instance” are used to represent examples, instances or illustrations. Any embodiment or design solution described as “exemplary”, “for example” or “for instance” in the embodiments of the present application should not be interpreted as being more preferred or having more advantages than other embodiments or design solutions. In fact, the words such as “exemplary”, “for example” or “for instance” are intended to present the related concept in a specific manner.
[0052] In the description of the embodiments of the present application, the term “and / or” merely represents an association relationship of the associated objects, and indicates that there can be three relationships, for example, A and / or B, which can represent three cases of existence of A alone, existence of B alone, and existence of A and B simultaneously. In addition, unless otherwise specified, the term “plurality” means two or more. For example, a plurality of systems means two or more systems, and a plurality of terminals means two or more terminals.
[0053] In addition, the terms “first” and “second” are used only for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined with “first” and “second” can explicitly or implicitly include one or more features. The terms “include”, “contain”, “have” and their variants mean “include but are not limited to”, unless otherwise specifically emphasized.
[0054] Hereinafter, some terms in the present embodiment are explained. It should be noted that these explanations are for the convenience of those skilled in the art and do not constitute a limitation on the scope of protection required by the present application.
[0055] OSI file: a simulation file format defined in the ASAM OSI standard, with osi as the file name suffix. See its chapter 2.2.6. OSI trace files for details.
[0056] meta file: a kind of information supplement file created by the present application, with osi.meta as the file name suffix, corresponding to the osi file one by one.
[0057] Protobuf: a data serialization protocol developed and open sourced by Google (similar to XML, JSON, YAML, etc.), which is usually used for language-independent, platform-independent, extensible serialization of structured data formats in data storage, communication protocols, etc.
[0058] At present, the OSI technical standard of ASAM has been published for many years (for example, its v3.4.0 version was released in November 2021), in which the osi file defined by ASAM is a file that stores content by frame. It defines the length of a frame with the first 4 bytes, and then follows the data of a frame; then the length of the next frame is 4 bytes, and the cycle continues until the end. The data of each frame is the information of the simulation process, serialized as binary data by protobuf, and is not video or picture information. However, if the osi file is particularly large, there will be a relatively long file download and pre-loading process, at which time the device running the osi file may not function properly due to insufficient memory. Therefore, there is an urgent need for a simulation player for processing osi files of large files.
[0059] Based on this, the present embodiment proposes a playing method.
[0060] The method additionally generates a corresponding metadata file (for example, a file with a suffix of *.osi.meta, which can be referred to as a meta file for ease of description) when generating a visit-reality recording file (for example, a file with a suffix of *.osi, which can be referred to as an osi file for ease of description); the metadata file, for example, the meta file, is a relatively small file that contains various supplementary information related to the visit-reality recording file, for example, the osi file, such as identification and frame positions of at least part of frames in the simulation recording file, for example, the osi file; it should be noted that the visit-reality recording file, for example, the osi file, does not include the identification of the frames. Subsequently, the metadata file, for example, the meta file, is read before the visit-reality recording file, for example, the osi file, is read, and because the metadata file, for example, the meta file, indicates the frame positions, part of the content in the visit-reality recording file, for example, the osi file, can be flexibly loaded, and the possibility of an abnormality due to insufficient memory during device operation is reduced. Here, only a brief description of the method is given, and detailed contents of the method are described below.
[0061] Next, a playback system to which a playback method provided by an embodiment of the present application can be applied is introduced. Figure 1 An architecture example diagram of a playback system provided by an embodiment of the present application is shown. The playback method provided by an embodiment of the present application can be applied to a system architecture diagram as shown in FIG. 1. Figure 1 As shown in FIG. 1, the playback system includes a simulation player 110, a client 120, and a server 130. Figure 1
[0062] In an embodiment of the present application, the simulation player 110 can include a client 111 and a server 112.
[0063] The client can be understood as an application program used to implement a service. In an embodiment of the present application, the service can be playback of simulation recording content. Specifically, the service can be an interactive component used to demonstrate the whole process of simulation, which can be a 3D component.
[0064] In actual application, the client can run on an electronic device, for example, the client 120, and an embodiment of the present application is described by taking the client 120 as an example; a user runs the client through the client 120, so that the client provides services for the user and meets the service demand. Of course, in some possible cases, the client 120 is installed with a browser, and the user can access the client through the browser.
[0065] The server is used to provide services for the client and implement the service. In an embodiment of the present application, the service can be storage and delivery of a visit-reality recording file, for example, an osi file, and a metadata file corresponding to a simulation recording file, for example, a meta file.
[0066] In the embodiments of the present application, the server can be understood as an application program providing services for the client.
[0067] In actual application, the server can run on an electronic device such as the server 130. The embodiments of the present application take the server 130 as an example for description. The server 130 runs the server to provide services for the client and meet the business requirements.
[0068] The client 120 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices. The exemplary embodiments of the terminal device involved in the present solution include, but are not limited to, electronic devices running iOS, android, Windows, Harmony OS or other operating systems. The embodiments of the present application do not specifically limit the type of electronic device.
[0069] The server 130 can be used to provide cloud services. It can be a device that can establish a communication connection with other devices and provide computing and / or storage functions for other devices, such as a hardware server.
[0070] The client 120 communicates with the server 130 through a network. The network can be a wired network or a wireless network. It can be understood that the network can use any known network communication protocol to realize different communications. The above network communication protocol can be various wired and / or wireless communication protocols.
[0071] In the present solution, as shown in Figure 2 The server 130 runs the server 112, and the client 120 can run the client 111. The client 120 reads the meta file such as the meta file from the server 130 running the server 112, flexibly loads part of the content in the osi file such as the osi file based on the frame position of the frame indicated by the meta file such as the meta file, and reduces the possibility of abnormal operation of the device.
[0072] The client 120 in the present embodiment can be a device with at least a display screen and having the ability of transmitting data, processing data and playing video, such as a mobile phone.
[0073] Figure 3 The structure schematic diagram of the client 120 embodiment provided in the present application is shown in Figure 3 As shown in the figure, the client 120 in the present embodiment includes a processor 121, a memory 122, an antenna 1, an antenna 2, a communication module 123, an audio module 124, a loudspeaker 124A, a receiver 124B, a microphone 124C, a headset interface 124D, a key 125, a display screen 126 and a sensor module 127.
[0074] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the client 120. In other embodiments of the present application, the client 120 can include more or fewer components than shown, or combine some components, or split some components, or different arrangement of components. The components shown can be implemented in hardware, software or a combination of software and hardware.
[0075] The following will be described in combination with Figure 3 Some of the constituent components of the client 120 will be specifically introduced.
[0076] The processor 121 can include one or more processors, for example, the processor 121 can include one or more of an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processors can be independent devices, or can be integrated in one or more processors. For example, the processor 121 can process the content required to be displayed on the display window of the application program on the client 120. For example, the controller can generate operation control signals according to instruction operation codes and timing signals to complete instruction and instruction execution control.
[0077] In one example, a memory can also be provided in the processor 121 for storing instructions and data. In some examples, the memory in the processor 121 is a cache memory. The memory can save instructions or data that the processor 121 has just used or recycled. If the processor 121 needs to use the instruction or data again, it can be directly called from the memory to avoid repeated access, reduce the waiting time of the processor 121, and improve the efficiency of the system.
[0078] In one example, the processor 121 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general purpose I / O port (GPIO), a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0079] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the client 120. In other embodiments of the present application, the client 120 can also use different interface connection modes or a combination of multiple interface connection modes in the above embodiments.
[0080] The memory 122 can include an internal memory for storing computer executable program codes including instructions. The processor 121 executes various functional applications and data processing of the mobile client 120 by running the instructions stored in the internal memory 121. The internal memory can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created during the use of the client 120 (such as audio signals, a phone book, etc.), etc. In addition, the internal memory can include a high-speed random access memory such as the memory 1221, and can also include a non-volatile memory such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0081] In one example, the memory 122 further includes an external storage card such as a Micro SD card connected through an external memory interface to realize the expansion of the storage capacity of the mobile client 120. The external storage card communicates with the processor 121 through the external memory interface to realize the data storage function. For example, music, video, etc. files are saved in the external storage card.
[0082] The wireless communication function of the client 120 can be implemented by the antenna 1, the antenna 2, the communication module 123, the modem, and the baseband processor, etc. The communication module includes a wireless communication module and a wired communication module.
[0083] The antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the client 120 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other examples, the antennas can be used in combination with a tuning switch.
[0084] The mobile communication module can provide a solution including 2G / 3G / 4G / 5G wireless communication applied on the client 120. The mobile communication module can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module can receive electromagnetic waves by at least two antennas including the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem for demodulation. The mobile communication module can also amplify the signals modulated by the modem, and convert the signals into electromagnetic waves radiated by the antenna 1. In some examples, at least part of the functional modules of the mobile communication module can be arranged in the processor 121. In some examples, at least part of the functional modules of the mobile communication module can be arranged in the same device as at least part of the modules of the processor 121.
[0085] The modem can include a modulator and a demodulator. The modulator is used to modulate a low-frequency baseband signal to be transmitted 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. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the loudspeaker 124A, the receiver 124B, etc.), or displays an image or a video through the display screen 126. In some examples, the modem can be an independent device. In some other examples, the modem can be independent of the processor 121, and arranged in the same device as the mobile communication module or other functional modules. In some other examples, the mobile communication module can be a module in the modem.
[0086] The wireless communication module can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied on the client 120. The wireless communication module can be one or more devices integrated with at least one communication processing module. The wireless communication module receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 121. The wireless communication module can also receive signals to be sent from the processor 121, frequency modulate them, amplify them, and convert them into electromagnetic wave radiation via the antenna 2.
[0087] In some examples, antenna 1 and the mobile communication module of client 120 are coupled, and antenna 2 and the wireless communication module are coupled, so that client 120 can communicate with the network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), fifth generation, new radio (NR), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).
[0088] Client 120 can implement audio functions through audio module 124, speaker 124A, receiver 124B, microphone 124C, earphone interface 124D, and application processor, etc. For example, music playing, recording, etc.
[0089] Audio module 124 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. Audio module 124 can also be used to encode and decode audio signals. In some examples, audio module 124 can be disposed in processor 121, or part of the functions of audio module 124 can be disposed in processor 121.
[0090] The speaker 124A, also called a "loudspeaker", is used to convert an audio electrical signal into an acoustic signal. The client 120 can listen to music or listen to a hands-free call through the speaker 124A.
[0091] The receiver 124B, also called a "earpiece", is used to convert an audio electrical signal into an acoustic signal. When the client 120 answers a call or a voice message, the user can listen to the voice by holding the receiver 124B close to the ear.
[0092] The microphone 124C, also called a "microphone", "transducer", is used to convert an acoustic signal into an electrical signal. When making a call or sending a voice message, the user can speak into the microphone 124C by holding the mouth close to the microphone 124C, and the acoustic signal is input into the microphone 124C. The client 120 can be provided with at least one microphone 124C. In other examples, the client 120 can be provided with two microphones 124C, in addition to collecting acoustic signals, it can also achieve noise reduction function. In other embodiments, the client 120 can also be provided with three, four or more microphones 124C, to achieve the functions of collecting acoustic signals, noise reduction, and identifying the source of the sound, and achieving directional recording function, etc.
[0093] The earphone interface 124D is used to connect a wired earphone. The earphone interface 124D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0094] The keys 125 include a power-on key, a volume key, an input keyboard, etc. The keys 125 can be mechanical keys. They can also be touch keys. The client 120 can receive key inputs and generate key signal inputs related to user settings and function control of the client 120.
[0095] The client 120 implements display functions through a GPU, a display screen 126, and an application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 126 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 121 can include one or more GPUs that execute program instructions to generate or change display information.
[0096] The display screen 126 is configured to display images, videos, and the like. The display screen 126 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diode (QLED), or the like. In some examples, the client 120 can include one or more display screens 126. In one example, the display screen 126 can be configured to display an interface of an application, display a display window of an application, and the like.
[0097] The sensor module 127 can include a pressure sensor, a gyro sensor, a barometric 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, a bone conduction sensor, and the like.
[0098] In addition, the client 120 can further include a motor, an indicator, a subscriber identification module (SIM) card interface, a camera, a universal serial bus (USB) interface, a charging management module, a power management module, a battery, and the like. The charging function of the client 120 can be implemented by the charging management module, the power management module, the battery, and the like.
[0099] Next, a playing method provided by an embodiment of the present application will be described in detail in combination with the playing system provided above. The present application will take the client 120 running the client 111, the server 130 running the server, the first file being a recorded file, and the second file being a metadata file as examples to describe the scheme of the present application.
[0100] Figure 4 is a flowchart of the playing method provided by an embodiment of the present application. As shown in Figure 4 the playing method provided by an embodiment of the present application includes at least the following steps:
[0101] In step 401, the client 120 displays a playback page corresponding to a first file; the playback page includes a progress bar; the first file is a file recording a simulation process in a frame manner; the first file corresponds to a second file; the second file is used to describe frame positions of at least part of frames in the first file; and the frame positions in the second file correspond to key time points on the progress bar.
[0102] In a specific implementation, the client 120 acquires the second file in the following manner: sending a file request to the server 130 of the simulation player 110, the file request being used to indicate a request for downloading the second file, and then receiving the second file sent by the server 130 of the simulation player 110. It should be noted that in some possible cases, the client 120 can send the file request to the server 130 of the simulation player 110 when requesting to display the playback page corresponding to the first file, so as to acquire the second file before displaying the playback page and perform subsequent operations. In other possible cases, the client 120 can send the file request to the server 130 of the simulation player 110 after requesting to display the playback page corresponding to the first file. For example, the client 120 can access the client 130 of the simulation player 110, enter a home page of the simulation player 110, click a playback button on the home page, and display the playback page. At the same time, the client 120 generates the file request and sends the file request to the server 130.
[0103] The first file can be a file generated by recording a simulation process. In some possible scenarios, for example, Figure 5 As shown in the figure, after a developer completes code development, the developer connects the written code to a simulator, the simulator runs the code, records a simulation process, and outputs a simulation result, the simulation result including a first file and a second file. Then, the first file and the second file can be stored in the cloud, for example, the server 130. For example, the server 130 is used to store the first file, and the server 130 can also deploy the simulator. In some possible scenarios, the first file can be used to describe a running process of a movable object, where the movable object can be a movable device equipped with an environment perception sensor, for example, a vehicle, a drone, or a robot. The environment perception sensor is used to detect an environment around the movable object, for example, a camera, an active radar, a millimeter wave radar, or the like. For example, the simulation process can be to analyze environment information collected by the environment perception sensor of the movable object, and to make a decision on a movement of the movable object, for example, path planning, straight going, left turning, right turning, or the like. Correspondingly, the first file is used to describe the movement of the movable object and a map (two-dimensional or three-dimensional) constructed by environment information collected by the environment perception sensor of the movable object. In the embodiment of the present application, in the scenario of automatic driving, the first file can include a motion of a vehicle and a surrounding environment perceived by a sensor on the vehicle.
[0104] In the embodiments of the present application, the first file is a file recording the simulation process in the form of frames. The first file is composed of frame contents of a series of continuous frames, which are played together at a certain rate to form the effect of continuous movement. Exemplarily, the first file includes frame contents arranged in sequence, and the frame contents are composed of frame length data and frame data; the frame length data is used to indicate the length of the frame data, and the frame data is located after the frame length data; it should be noted that the first file does not include the identification of the frame, and the identification of the frame is used to distinguish different frames, such as the frame number, which refers to the serial number or index of the frame, and the size of the frame number can reflect the early or late of the play; the frame contents in the first file are arranged in the order of the frame number from small to large. Exemplarily, as shown in Figure 5 , the first file includes frame contents arranged in the order of the frame number from small to large, the frame contents of frame 1 are followed by the frame contents of frame 2, the frame contents of frame 2 are followed by the frame contents of frame 3, and so on.
[0105] The second file is used to record the position (for the sake of description and distinction, it can be called frame position) of at least part of the frames in the first file; exemplarily, the second file can include the identification of at least part of the frames in the first file and the frame position; the frame position indicates the position of the frame contents of the frame in the first file; exemplarily, the frame position can be represented by the frame start byte, which can represent the byte at which the frame contents of the frame start in the first file; exemplarily, the frame position can be represented by the frame start byte and the frame end byte, the frame start byte can represent the byte at which the frame contents of the frame start in the first file, and the frame end byte can represent the byte at which the frame contents of the frame end in the first file. It should be noted that the client 120 can download and play the contents after the frame position of the frame in the first file through the frame position of the frame in the second file, so as to present the continuous and smooth video pictures from different positions in the progress bar.
[0106] Exemplarily, the identification of the frame can be the frame number, and the identification of the frame and the frame position in the second file can be recorded in the following way:
[0107]
[0108] Exemplarily, the second file can record the identification and frame position of each frame in the first file, or the identification and frame position of part of the frames in the first file; at least the first frame, the last frame, and the positions of the part of the frames between the first frame and the last frame are included in the part of the frames, such as recording once every 9 frames, and the part of the frames can be the first frame, the tenth frame, the twentieth frame, the thirtieth frame, the fortieth frame, and so on.
[0109] In some possible scenarios, the client 120 can access the client 111 of the simulation player 110, enter a home page of the simulation player 110, click a playback button on the home page, and enter a playback page.
[0110] In some possible scenarios, the client 120 can access the client 111 of the simulation player 110, enter a home page of the simulation player 110, click a playback button on the home page, and enter a playback page. Figure 6a Figure 6b As shown in FIG. 6, the progress bar 600 can include the following parts:
[0111] 1. A background bar 601, used to display the total playing duration.
[0112] 2. A playing progress bar 602, used to display the current playing progress and updated as the playing progresses.
[0113] 3. A progress control 603, used to display the current playing time point of the current playing, usually in seconds, and updated as the playing progresses. The progress control 603 is configured to control the playing progress by dragging or clicking the background bar. For example, a user clicks a position of the background bar, and the progress control 603 moves to the clicked position, thereby controlling the playing progress. The progress control 603 can be a slider, which can be circular, directional, or irregular in shape. The shape of the slider is not limited in the embodiments of the present application, and can be designed according to actual needs.
[0114] 4. A control button 604, used to control playing and pausing. This button allows the user to pause the video playing at any time or continue the playing.
[0115] The contents of the above four parts are only examples. In some possible implementations, the progress bar 600 can include a sound controller and a buffer progress bar. The sound controller allows the user to adjust the volume, which is usually a sliding bar or a volume icon, allowing the user to control the volume size by adjusting. The buffer progress bar displays the buffered part, which helps the user to understand the video loading situation.
[0116] It should be noted that in the embodiments of the present application, each time point on the progress bar can correspond to the identifier of a frame. Considering that the identifier of the frame is not stored in the first file and the identifier of the frame is stored in the second file, the identifier of the frame in the second file corresponds to the key time point. In order to facilitate description and distinction, the time point corresponding to the identifier of the frame in the second file is referred to as the key time point. Since the identifier of the frame and the frame position are stored in the second file, the client 120 can obtain the frame position corresponding to the key time point based on the identifier of the frame corresponding to the key time point, and then read and process the content starting from the frame position, to realize playing from the key time point corresponding to the frame position.
[0117] Step 402, the client 120 determines the current playing time point on the progress bar based on the operation on the progress bar.
[0118] The operation here can be clicking or dragging. Exemplarily, as shown in FIG. 6, the user clicks the position of the background bar 601 on the progress bar 600, or drags the progress control 603, thereby moving the progress control 603 on the progress bar 600. Figure 6b
[0119] It is to be noted that since the user clicks the position of the background bar 601 on the progress bar 600, or drags the progress control 603, it is generally a rough position, not an absolutely accurate position, therefore, the time point of the progress control 603 on the progress bar 600 and the time points around it can all be the current playing time point, for example, the time point where the progress control 603 on the progress bar 600 is located, several time points before and after it can all be the current playing time point.
[0120] Step 403, the client 120 reads and processes the content starting from the frame position corresponding to the target key time point in the first file based on the second file, the current playing time point and the key time points, so that the playback page starts playing from the target key time point; the target key time point is equal to the current playing time point, or is the key time point that is earlier than and closest to the current playing time point.
[0121] In a specific implementation, the client 120 can determine the target key time point in the following two ways:
[0122] Implementation 1: When the key time point is equal to the current playing time point, the client 120 determines that the target key time point is equal to the current playing time point; when the key time point is not equal to the current playing time point, the client 120 determines that the target key time point is the key time point that is earlier than and closest to the current playing time point. It is to be noted that when there are multiple current playing time points, if the current playing time point includes a key time point, the key time point in the current playing time point can be the target key time point.
[0123] In a possible implementation, the client 120 determines the progress ratio corresponding to the current playing time point based on the current playing time point on the progress bar when the key time point is not equal to the current playing time point, the progress ratio indicating the ratio of the current playing time point to the end time point of the progress bar 600; the client 120 determines the progress ratio (for the convenience of description and distinction, it can be referred to as a reference progress ratio) corresponding to the key time point based on the key time point and the end time point of the progress bar 600 for the key time point earlier than the current playing time point on the progress bar, and determines the difference between the reference progress ratio and the progress ratio corresponding to the current playing time point; the key time point corresponding to the smallest difference is taken as the target key time point.
[0124] In some possible implementations, the first file stores the frames in the manner shown in Figure 4 , for example, the first file is an ios file; at this time, when playing in the playback page, the client 120 can read the frame length data, then read the frame data for deserialization based on the frame length data, and then read the frame length data after the frame data, the frame data, and repeat the cycle until the end. Figure 7
[0125] It is worth noting that each time point on the progress bar 600 corresponds to the identifier of a frame, but the identifier of the frame is not stored in the first file, and only stored in the second file, therefore, the client 120 can obtain the frame position corresponding to each key time point based on the identifier of the frame corresponding to the time point on the progress bar 600 and the second file; and then for each key time point, the key content corresponding to the key time point can be downloaded from the server 130 based on the frame position corresponding to the key time point, the key content corresponding to the key time point, the identifier of the frame corresponding to the key time point, and the frame position corresponding to the key time point; wherein the key content indicates the frame content from the frame position corresponding to the key time point to the frame position corresponding to the next key time point, it is worth noting that the key content can include the frame content of several frames, but does not include the frame content of the frame corresponding to the next key time point of the key time point; for example, when there is no other time point between the key time point and the next key time point on the progress bar 600, the key content can be the frame content of the frame corresponding to the key time point. When there is other time point between the key time and the next key time point on the progress bar, the key content indicates the frame content of each frame between the key time point and the next key time point. In a specific implementation, when downloading the first file from the server 130, the client 120 can record the key time point and the key content corresponding to the key time point based on the second file and the identifier of the frame corresponding to the time point on the progress bar 600; correspondingly, when playing in the playback page, the client 120 reads the key content corresponding to the key time point in turn according to the order from early to late in time, and plays.
[0126] In the embodiments of the present application, in order to reduce the occupation of the memory 1221, the memory 1221 can store the frame content of part of the frames in the first file; in order to reduce the occupation of the storage resources of the memory 1221, the data of the first file stored in the memory 1221 is the content starting from the frame position corresponding to the key time point at the beginning of the cache in the first file. It should be noted that the key time point at the beginning of the cache can be the target key time point after step 402. It should be noted that the time length between the key time point at the beginning of the cache and the current playing time point should not be too large, so as to reduce the consumption of the memory resources.
[0127] In a possible case A1, the memory 1221 stores the key content corresponding to a fixed number of key time points, for example, stores the key content corresponding to N key time points. For example, the number of key time points between the key time point at the beginning of the cache and the current playing time point is determined, and the number of key time points between the current playing time point and the key time point at the end of the cache is determined.
[0128] In another possible case A2, the memory 1221 stores the key content corresponding to each key time point in the current period. Here, the key time point at the beginning of the cache is the key time point at the beginning of the current period, and the key time point at the end of the cache is the key time point at the end of the current period. The start time point of the current period is earlier than or equal to the current playing time point, and the end time point of the current period is later than the current playing time point. The time length of the current period is less than the time length of the progress bar 600. The time difference between the end time point of the current period and the current playing time point is fixed. The start time point of the current period needs to be flexibly set in combination with different scenarios. In one possible scenario, the start time point of the current period can be the current playing time point after step 402. In another possible scenario, in the normal playing process of the progress bar 600 without user operation, the start time point of the current period is earlier than the current time point, and the time difference between the start time point of the current period and the current playing time point is fixed. In the specific implementation, the user can flexibly configure the time difference between the start time point of the current period and the current playing time point, and the time difference between the end time point of the current period and the current playing time point through the Web or standard command interface in the client 120 such as a mobile phone or a computer.
[0129] In some possible cases A3, the size of the first file storage area in the memory 1221 is fixed, and the content after the frame position corresponding to the key time point at the beginning of the first file is stored in the first file storage area in the memory 1221.
[0130] In practical implementation, a dynamic sliding window mechanism can be used to store the frame content of a portion of the first file in memory 1221. Users can flexibly configure the window size and movement scheme through a webpage or standard command interface on client devices 120, such as mobile phones or computers.
[0131] For case A1, the window represents key time points increasing sequentially in time, and the size of the window represents the number of key time points. The window size can be constant. In this embodiment, the window movement scheme can be: when the number of key time points between the current playback time point of the progress bar 600 and the initial key time point in the window is less than a preset threshold, the window moves according to a movement length, which is the number of key time points moved in one movement. The initial key time point in the window can be earlier than or equal to the current playback time point of the progress bar 600. In this embodiment, after step 402, the initial key time point of the window can be the target key time point. The window data indicates the content to be played during the period from the initial key time point to the end key time point in the window, such as... Figure 8 As shown, window data can include key content corresponding to each key time point in the window. It should be noted that the time period between the start and end key time points in the window can be the current time period. For example, the total playback time of progress bar 600 is 2 minutes (120 seconds). The key time points are 0 seconds, 10 seconds, 20 seconds, 30 seconds, ..., 120 seconds. The number of key time points between the start and current playback time points in the window is 2, the movement length is 1 key time point, and the window length is 5 key time points. The key time points of the window are 0 seconds, 10 seconds, 20 seconds, 30 seconds, and 40 seconds. Therefore, when playing from the 20th second to the 30th second, the corresponding key time points of the window become 10 seconds, 20 seconds, 30 seconds, 40 seconds, and 50 seconds. Memory 1221 stores the key content corresponding to 10 seconds, 20 seconds, 30 seconds, 40 seconds, and 50 seconds.
[0132] The manner of determining the window data can be that the client 120 can determine a frame position range corresponding to the starting key time point to the ending key time point in the current time period based on the frame position corresponding to each key time point, and take the content corresponding to the frame position range in the first file as the window data. The frame position range indicates the frame position of the frame between the starting key time point to the ending key time point in the current time period. For example, when the frame position corresponding to the key time point indicates the start byte and the end byte of the frame, the frame position range is the start byte of the frame corresponding to the starting key time point to the end byte of the frame corresponding to the ending key time point in the window. When the frame position corresponding to the key time point indicates the start byte of the frame, the frame position range is the start byte of the frame corresponding to the starting key time point to the start byte of the frame corresponding to the next key time point of the ending key time point in the current time period.
[0133] For case A2, the window represents a description of each key time point in the current time period, the size of the window represents the number of key time points, and the size of the window can vary according to the number of key time points in the current time period. The window data indicates the content to be played in the period from the starting key time point to the ending key time point in the window, as shown in the following table. Figure 8 The starting time point of the current time period can be earlier than or equal to the current playing time point. For example, after step 402, the earliest time point in the current time period can be the current playing time point, and correspondingly, the starting key time point in the window can be the target key time point. For example, in the normal playing process without user operation of the progress bar 600, the starting time point of the current time period can be earlier than the current time point. The ending time point of the current time period can be later than the current playing time point. The window moving scheme is to continuously update the key time points in the window according to the update of the current time period. In specific implementation, the current time period continuously changes with the change of the current playing time point of the progress bar 600, and correspondingly, the window data stored in the memory 1221 is also adaptively updated, thereby reducing the occupation of memory resources. For example, the total playing time of the progress bar is 2 minutes, i.e. 120 seconds, the current playing time point is the 20th second after step 402, the starting time point of the current time period is the current playing time point, and the time difference between the ending time point of the current time period and the current playing time point is 15 seconds. Therefore, the current time period is from the 20th second to the 30th second, and correspondingly, the memory 1221 stores the key content corresponding to each key time point in the 20th second to the 30th second.
[0134] For case A3, the window represents the size of the storage area, the window data is part of the content in the first file, the window data can be divided into multiple data segments according to the number of data segments, each data segment has an identifier such as a number, the number can gradually increase; the window data changes with the change of the current playback time point on the progress bar 600, and the content required for playback after the current playback time point needs to be stored, or the content required for playback from the time point before the current playback time point to the time point after the current playback time point. For example, when playing from the beginning on the playback page, the window data is the content starting from the beginning of the first file; after step 402, the window data is the content starting from the frame position corresponding to the target key time point in the first file. The window moving scheme is to delete the data segment from the starting position in the window according to the moving length such as 1 data segment after the playback page starts playing for a period of time such as a few seconds.
[0135] In the embodiments of the present application, the window data is only a possible naming method, and in some possible implementation manners, the window data can also be referred to as target content.
[0136] It is worth noting that since the memory 1221 only stores the window data of the window, if the content in the first file other than the window data is downloaded, the content can be stored in other storage such as a hard disk outside the memory 1221 or discarded; if needed later, the client 120 can download the key content corresponding to the key time point in the window from the server 130 based on the second file, or obtain the key content corresponding to the key time point in the window from other storage.
[0137] Figure 4 The embodiments shown are only basic embodiments of the method of the present application, and certain optimizations and extensions can be made on the basis thereof, and other preferred embodiments of the method can also be obtained.
[0138] In one embodiment, the present embodiment is based on the foregoing embodiments and more specifically describes the playback process and makes certain optimizations. For example, Figure 9 The method in the present embodiment at least includes the following steps:
[0139] The user performs a first operation on the client 120.
[0140] Step 901, the client 120 determines to request to open the playback page corresponding to the first file based on the information of the first operation.
[0141] It should be noted that the first operation can be clicking the playback button, and the information of the first operation can be the click position of the user on the display screen 126 of the client 120. The client 120 determines that the user clicks the playback button based on the click position and the display content of the display screen 126 of the client 120, and then performs step 902.
[0142] Step 902, the client 120 sends a first request to the server 130, and the first request indicates to download a second file corresponding to a first file.
[0143] Exemplarily, the first request can be a request of an http protocol, and can include the file name of the second file. Exemplarily, the first file can be an osi file, and the second file can be xxx.osi.meta. Correspondingly, the first request can be Get / xxx.osi.meta.
[0144] The content of the first file and the second file is described above in the description of step 401, and will not be repeated here.
[0145] Step 903, the server 130 sends the second file to the client 120.
[0146] Step 904, the client 120 displays a playback page.
[0147] Step 905, the client 120 sends a second request to the server 130, and the second request indicates to download the first file.
[0148] Exemplarily, the second request can be a request of an http protocol, and can include the file name of the first file. Exemplarily, the first file can be an osi file, and the first file can be xxx.osi. Correspondingly, the second request can be Get / xxx.osi.
[0149] When the client 120 displays the playback page, the client 120 sends the second request to the server 130.
[0150] Step 906, the server 130 sends the first file to the client 120.
[0151] In actual applications, the downloading manner of the first file can be segmented downloading, for example, the first file is segmented and sent from the beginning, and the client 120 downloads the segmented file. It should be noted that in the embodiment of the present application, the complete first file does not need to be stored in the memory 1221, for example, the stored content of the first file can be less than or equal to a preset threshold, and for another example, the stored target content can correspond to a current period. For details, see the description of step 403 above.
[0152] Step 907, the client 120 reads the content of the first file from the beginning and processes it, and the playback page plays from the beginning.
[0153] The user performs a second operation on the progress bar of the playback page of the client 120.
[0154] At step 908, the client 120 determines the play position of the progress bar based on the information of the second operation, and obtains the current play time point.
[0155] It should be noted that the second operation can be clicking or dragging the progress control 603 on the progress bar, and the information of the second operation can be the position of the user operation. The client 120 determines the position of the progress control 603 as the play position based on the information of the second operation and the layout of the progress bar in the playback page of the display screen 126 of the client 120, and determines the time point corresponding to the play position as the current play time point.
[0156] At step 909, the client 120 determines the frame position corresponding to the target key time point based on the second file and the current play time point on the progress bar.
[0157] For details, refer to the description of step 403 above, which will not be repeated here.
[0158] At step 910, the client 120 sends a third file, and the third file indicates to download the content starting from the frame position corresponding to the target key time point in the first file.
[0159] For example, the third request can be a request in the http protocol, and can include the file name of the first file and the frame position corresponding to the target key time point. For example, the first file can be an osi file, and the first file can be xxx.osi. The frame position can be
[0160]
[0161] At step 911, the server 130 sends the content starting from the frame position corresponding to the target key time point in the first file.
[0162] It should be noted that the segmented download mode can be used, for example, the content starting from the frame position corresponding to the target key time point in the first file is segmented and sent, and the client 120 downloads the segmented content.
[0163] At step 912, the client 120 reads and processes the content starting from the frame position corresponding to the target key time point in the first file, and the playback page starts playing from the target key time point.
[0164] In a specific implementation, the client 120 determines the key content corresponding to the target key time point and the key time points after the target key time point based on the content starting from the frame position corresponding to the target key time point in the first file, and stores the key content in the memory 1221. The client 120 reads and processes the content starting from the frame position corresponding to the target key time point with the target key time point as the start, and realizes frame-by-frame playing, so that the playback page starts playing from the target key time point. For details, refer to the description of the cases A1 to A3 in step 403 above.
[0165] Based on the above provided playing method, the specific application of the playing method is described.
[0166] As shown in Figure 10a , when the client 120 needs to enter the playback page corresponding to the first file, such as clicking the playback button, the client 120 loads the playback page, and the control button 604 of the progress bar is in the playing state, playing from the beginning. When the playback button is clicked, the client 120 sends a file request to the server 130, and the server 130 sends the first file and the second file to the client 120. The client 120 downloads the second file and the first file, and stores the part of the content starting from the beginning in the second file and the first file in the memory 1221. In the specific playing process, the client 120 reads the content starting from the beginning in the first file in sequence from the memory 1221. Exemplarily, when the first file is an ios file, the client 120 reads the frame length data at the beginning of the first file from the memory 1221 when playing from the beginning, and then reads the frame data after the frame length data based on the frame length data, and performs deserialization. Then, the frame length data after the frame data is read, and the cycle is repeated until the end.
[0167] Subsequently, during the playing of the playback page, as shown in Figure 10bAs shown, when the user clicks a position of the background bar of the progress bar 600, or changes the playing progress by dragging the progress control 603, the playback page of the client 120 starts playing from the position after the operation, that is, from the position of the progress control 603 after the operation. The specific process of starting playing from the position after the operation is as follows: the client 120 determines the current playing time point based on the position of the progress control 603, determines whether there is a key time point matching the current playing time point from the storage such as the memory 1221 or the memory 1221 and the hard disk, for example, whether there is a key time point smaller than the current playing time point and the difference between the current playing time point and the key time point is less than or equal to a preset threshold (which can be set according to actual conditions, for example, 0.5 seconds); if there is, the client 120 directly reads the key content corresponding to the matching key time point from the memory 1221 and continues playing from the matching key time point. If there is not, the client 120 determines the frame position corresponding to the target key time point from the second file based on the identifier of the frame corresponding to the current playing time point, sends a download request to the server 130, and the download request indicates to download the content starting from the frame position corresponding to the target key time point in the first file, wherein the download manner of the first file can be to download from the frame position corresponding to the target key time point as a starting segment; after receiving the content sent by the server 130, the client 120 determines the key content corresponding to the target key time point and the key time points after the target key time point and stores the key content in the memory 1221, for example, Figure 10b As shown, the memory 1221 stores the key content corresponding to the target key time point and the key time points after the target key time point, and the detailed content can be referred to the description of cases A1 to A3 in step 403 above; then, starting from the target key time point, the key content corresponding to the key time points is read from the memory 1221 in the order of time points from early to late and played after processing (such as deserialization).
[0168] The above application is only an example, and in some possible cases, Figure 10a As shown in the scenario, when the client 120 downloads the second file and the first file, the starting key time point in the window is 0 based on the key time points on the progress bar 600 corresponding to the identifiers of the frames in the second file; the key content corresponding to each key time point in the window in the first file is stored in the memory 1221 based on the second file (for detailed content, refer to the description of the key content above).
[0169] The application also provides a playing device, such as Figure 11 As shown, comprising:
[0170] The display module 1101 is configured to display a playback page corresponding to the first file; the playback page comprises a progress bar; the first file is a file recording a simulation process in a frame manner; the first file corresponds to a second file; the second file is used to describe frame positions of at least part of frames in the first file; and the frame positions in the second file correspond to key time points on the progress bar.
[0171] The operation module 1102 is configured to determine a current playing time point on the progress bar based on an operation on the progress bar.
[0172] The playing module 1103 is configured to read content starting from a frame position corresponding to a target key time point in the first file and process the content based on the second file, the current playing time point and the key time points, so that the playback page starts playing from the target key time point; the target key time point is equal to the current playing time point, or is the key time point that is earlier than the current playing time point and closest to the current playing time point.
[0173] The display module 1101, the operation module 1102 and the playing module 1103 can be implemented by software or hardware.
[0174] In a possible implementation, before the playback page corresponding to the first file is displayed, the playing module further comprises: sending a file request to a server of a simulation player, the file request being used to indicate that the second file is requested.
[0175] In this scheme, the second file is obtained when the playback page is displayed, and subsequent operations are performed.
[0176] In a possible implementation, the device further comprises a file obtaining module configured to send a file request to a server of a simulation player, the file request being used to indicate that the second file is requested; and accept the second file sent by the server.
[0177] In a possible implementation, the operation on the progress bar comprises clicking or dragging.
[0178] In a possible implementation, the playing module is configured to determine the target key time point based on the second file, the current playing time point and the key time points; and read content in the first file starting from a frame position corresponding to the target key time point and process the content.
[0179] In a possible implementation, the content in the first file starts from the frame position corresponding to the target key time point.
[0180] In this scheme, only the content to be played subsequently is cached in the memory, the occupation of the memory is reduced, and the safety of the device is improved.
[0181] The embodiment of the present application further provides a computer program product containing instructions. The computer program product can be software or a program product containing instructions, which can run on a computing device or be stored in any available medium. When the computer program product runs on at least one computing device, the at least one computing device is caused to execute the playing method, or the playing method.
[0182] The embodiment of the present application further provides a computer readable storage medium. The computer readable storage medium can be any available medium that the computing device can store or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk), etc. The computer readable storage medium contains instructions, which instruct the computing device to execute the playing method, or instruct the computing device to execute the playing method.
[0183] In the above embodiment, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.
[0184] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0185] The basic principles of the present application are described above in combination with specific embodiments, but it should be pointed out that the advantages, advantages, effects and the like mentioned in the present application are only examples and not limitations, and these advantages, advantages, effects and the like cannot be considered as the necessary possession of each embodiment of the present disclosure. In addition, the specific details of the above disclosure are only for the purpose of example and for the purpose of understanding, and the above details do not limit the present disclosure to the use of the above specific details.
[0186] The block diagrams of the devices, apparatuses, equipment, systems involved in the present disclosure are only illustrative examples and are not intended to require or imply the connection, arrangement, configuration shown in the block diagram. As those skilled in the art will recognize, these devices, apparatuses, equipment, systems can be connected, arranged, configured in any way. Words such as "include", "contain", "have" and the like are open-ended words, which mean "include but not limited to", and can be used interchangeably. The words "or" and "and" used herein mean the word "and / or", and can be used interchangeably unless the context clearly indicates otherwise. The word "such as" used herein means the phrase "such as but not limited to", and can be used interchangeably.
[0187] It is also important to note that the construction and arrangement of the devices, equipment, and methods as shown in the various embodiments is illustrative only. Although only a few embodiments have been described, still other embodiments will become apparent to those skilled in the art, and are within the scope of the present disclosure.
[0188] The foregoing description has been presented for the purposes of illustration and description. Furthermore, the description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although various example aspects and embodiments have been discussed above, those of ordinary skill in the art will
[0189] It can be understood that various numbers involved in the embodiments of the present application are only for the convenience of differentiation in the description, and are not used to limit the scope of the embodiments of the present application.
Claims
1. A playback method, characterized in that, Clients used in emulation media players include: Display the playback page corresponding to the first file; the playback page includes a progress bar; the first file is a file that records the simulation process in frames, the first file corresponds to a second file, the second file is used to describe the frame positions of at least some frames in the first file, and the frame positions in the second file correspond to key time points on the progress bar; Based on the operation on the progress bar, the current playback time point on the progress bar is determined; Based on the second file, the current playback time point, and the key time point, the content starting from the frame position corresponding to the target key time point in the first file is read and processed, so that the playback page starts playing from the target key time point; the target key time point is equal to the current playback time point, or is a key time point earlier than and closest to the current playback time point.
2. The method according to claim 1, characterized in that, Before displaying the playback page corresponding to the first file, the method further includes: A file request is sent to the server of the emulation player, the file request indicating a request for the second file.
3. The method according to claim 1 or 2, characterized in that, The current playback time point is the time point between the start time point and the end time point of the progress bar.
4. The method according to claims 1 to 3, characterized in that, Operations on the progress bar include clicking or dragging.
5. The method according to any one of claims 1 to 4, characterized in that, The step of reading and processing the content starting from the frame position corresponding to the target key time point in the first file based on the second file, the current playback time point, and the key time point includes: Based on the second file, the current playback time, and the key time point, determine the target key time point; The content of the first file is read and processed starting from the frame position corresponding to the target key time point.
6. The method according to any one of claims 1 to 5, characterized in that, The data of the first file cached in the client's memory is the content starting from the frame position corresponding to the target key time point in the first file.
7. A playback device, characterized in that, The device includes: The display module is used to display the playback page corresponding to the first file; the playback page includes a progress bar; the first file is a file that records the simulation process in frames, the first file corresponds to a second file, the second file is used to describe the frame positions of at least some frames in the first file, and the frame positions in the second file correspond to key time points on the progress bar; An operation module is used to determine the current playback time point on the progress bar based on the operation on the progress bar; The playback module is used to read and process the content starting from the frame position corresponding to the target key time point in the first file based on the second file, the current playback time point, and the key time point, so that the playback page starts playing from the target key time point; the target key time point is equal to the current playback time point, or is a key time point that is earlier than and closest to the current playback time point.
8. The method according to claim 7, characterized in that, The device further includes: The file acquisition module is used to send a file request to the server of the simulation player, the file request indicating a request for the second file; and to accept the second file sent by the server.
9. A client machine, characterized in that, Including processor and memory; The memory is used to store programs; The processor is configured to execute a program stored in the memory, such that the client performs the method as described in any one of claims 1 to 6.
10. A computer program product containing instructions, characterized in that, When the instructions are executed by a computer, the computer causes the computer to perform the method as described in any one of claims 1 to 6.
11. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a computer, cause the computer to perform the method as described in any one of claims 1 to 6.