File playing method, related device and computer program product
By responding to user playback requests and determining the corresponding operation modules, personalized playback of users is realized and data is separated from operations, which solves the problem of insufficient scalability and maintenance of existing players, and improves the scalability and maintenance of players.
Patent Information
- Application Number
- CN202411649799.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-18
AI Technical Summary
Under the conditions of multi-platform, multi-device, and multi-scenario, the scalability and maintenance of existing players are poor, making it difficult to meet users' personalized playback needs.
By responding to the user's playback request, the corresponding operation information is determined, and the target operation module is determined from the predefined set of operation modules, and the target operation module is used to play the target file, thereby realizing personalized playback of the user and separating the data from the operation.
It realizes personalized user playback, improves the scalability and maintenance of the player, so that the data structure and operation logic can be independently expanded and modified without affecting each other.
Smart Images

Figure CN119649861A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device, computer-readable medium, and computer program product for playing a file. Background Art
[0002] A player is a software system that can play video or audio files stored in the form of digital signals. Commonly used players are generally music players and video players. Player systems generally need to handle multiple tasks, such as media decoding, rendering, user interface interaction, and network stream processing. Decoding refers to decoding compressed audio or video data into playable raw data; rendering refers to drawing the decoded video frames onto the screen, or sending the decoded audio data to the audio output device.
[0003] However, under the conditions of multiple platforms, multiple devices, and multiple scenarios, how to improve the scalability and maintainability of the player is worthy of attention and an urgent need. Summary of the invention
[0004] Multiple aspects of the present application provide a method, device, electronic device, computer-readable storage medium and computer program product for playing files, which can use functional modules corresponding to user playback requests to realize the playback of target files, thereby realizing user personalized playback and separating data from operations, so that data structures and operation logic can be independently expanded and modified without affecting each other, thereby improving the scalability of the player.
[0005] In one aspect of the present application, a method for playing a file is provided, comprising: in response to receiving a playback request for a target file, determining operation information corresponding to the playback request, wherein the operation information includes a playback operation, a synchronization operation and / or a decoding operation on the target file; determining a target operation module corresponding to the operation information from a predefined set of operation modules, wherein the target operation module includes: a playback module, a synchronization module and / or a decoding module; and using the target operation module to play the target file.
[0006] Another aspect of the present application provides a device for playing files, comprising: an information determination unit, configured to determine, in response to receiving a playback request for a target file, operation information corresponding to the playback request, wherein the operation information includes a playback operation, a synchronization operation and / or a decoding operation on the target file; a module determination unit, configured to determine a target operation module corresponding to the operation information from a predefined set of operation modules, wherein the target operation module includes: a playback module, a synchronization module and / or a decoding module; and a playback unit, configured to use the target operation module to play the target file.
[0007] Another aspect of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for playing files provided above.
[0008] In another aspect of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the method for playing files provided above.
[0009] In another aspect of the present application, a computer program product includes a computer program having computer program instructions stored thereon, and the computer program can implement the method for playing files provided above when executed by a processor.
[0010] In the solution provided by the embodiment of the present application, in response to receiving a playback request for a target file, the operation information corresponding to the playback request is determined, wherein the operation information includes a playback operation, a synchronization operation and / or a decoding operation for the target file; the target operation module corresponding to the operation information is determined from a predefined set of operation modules, wherein the target operation module includes: a playback module, a synchronization module and / or a decoding module, and the target operation module is used to play the target file. Thus, the function module corresponding to the user's playback request is used to realize the playback of the target file, thereby realizing user personalized playback, and separating data from operations, so that the data structure and operation logic can be independently expanded and modified without affecting each other, thereby improving the scalability of the player. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0012] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0013] Figure 1 A schematic diagram of a process of playing a file provided in an embodiment of the present application;
[0014] Figure 2 A schematic diagram of a process of playing a file provided by another embodiment of the present application;
[0015] Figure 3A schematic diagram of a process of playing a file in an application scenario provided by an embodiment of the present application;
[0016] Figure 4 A schematic diagram of the structure of a device for playing files provided in one embodiment of the present application;
[0017] Figure 5 The present invention is a schematic diagram of the structure of an electronic device suitable for implementing the solution in the embodiment of the present application.
[0018] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0020] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.
[0021] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0022] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0023] In actual scenarios, the execution subject of the method can be an object device, or a device formed by integrating an object device and a network device through a network, or an application running on the above device. The object device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0024] As discussed above, how to improve the scalability and maintainability of the player under the conditions of multiple platforms, multiple devices, and multiple scenarios is worthy of attention and an urgent need.
[0025] In some solutions, the functions of the player are generally organized and written in a process-oriented or object-oriented manner. After going deep into the media processing process, it is found that its essence is that the data state is bound to each function. Or some players are componentized, but they only componentize some core functions.
[0026] In this way, the data state is bound to each function, and when a data structure or a function needs to be modified, the modification cost will be very high. The dynamic expansion capability of componentized players will be relatively weak, that is, the cost of replacing a method in a component or replacing the component is very high.
[0027] In this regard, an embodiment of the present application provides a method for playing files. When receiving a play request for a target file, the method first determines the operation information corresponding to the play request, then determines the target operation module corresponding to the operation information from a predefined set of operation modules, and uses the target operation module to play the target file. Thus, the function module corresponding to the user's play request is used to play the target file, thereby realizing user personalized playback, and separating data from operations, so that the data structure and operation logic can be independently expanded and modified without affecting each other, thereby improving the scalability of the player.
[0028] When the execution subject is software, it can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here.
[0029] It should be understood that in the technical solutions involved in this application, the acquisition, storage, use, processing, transportation, provision and disclosure of the personal information of the subjects involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0030] Figure 1 A process 100 for playing a file provided by an embodiment of the present application is shown. The process 100 includes at least the following processing steps:
[0031] (Step) S101, in response to receiving a play request for a target file, determining operation information corresponding to the play request.
[0032] In the embodiments of the present application, illustratively, in the case where the execution subject is, for example, a server used by a service provider of a platform, a user requesting to play a file can communicate with the execution subject through the terminal device used by the user to play the file (for example, play music, play video, etc.). It should be understood that the selection of the above execution subject is only for exemplary needs. In some scenarios, the execution subject may also be a terminal device used by the user, so that the user can play the file locally.
[0033] Here, the terminal device generally displays multiple files, and the user can select the file that he wants to operate or play from the multiple files, that is, the target file. And the user can select the target file by double-clicking, and at the same time generate a play request for the target file, and send the play request to the execution subject. It should be noted that each file is stored independently.
[0034] After receiving the play request for the target file, the execution subject will determine the operation information corresponding to the play request, wherein the operation information includes the play operation, synchronization operation and / or decoding operation of the target file. Since the target file here can be a music file, a video file, or other operable files, the operation information here refers to the operation required to achieve the playback of the file. As an example, when the target file is a music file, the operation corresponding to the play request is the music playback operation. When the target file is a video file, the operation corresponding to the play request is the video playback operation and the audio and video synchronization operation. When the target file is other files, the operation corresponding to the play request can also include preloading operations and the like. In addition, the operation corresponding to the play request can also be a decoding operation of the target file, and further, when the target file is a music file, it can be a decoding operation of the music file. When the target file is a video file, it can be a decoding operation of the audio of the video file, or a decoding operation of the video of the video file.
[0035] In some embodiments, the operation information includes: a preloading operation, a playing operation and / or a media reading operation. The preloading operation is used to implement the preloading function of the target file. The playing operation is used to implement the playing of the target file, such as the playing of a music file or the playing of a video file. The media reading operation is used to read a media file. When playing different types of target files, the operations to be performed are different, and the execution subject will determine the operation information corresponding to the playing function according to the type of the target file.
[0036] S102: Determine a target operation module corresponding to the operation information from a predefined operation module set.
[0037] In the embodiment of the present application, the execution subject predefines an operation module set, that is, modularizes each operation function. That is, the operation module set includes multiple operation modules, and each operation module corresponds to an operation function.
[0038] For example, the music playing module has the function of playing music, the video playing module has the function of playing videos, and so on.
[0039] After determining the operation information corresponding to the play request based on the above step S101, the execution subject will determine the operation module corresponding to the operation information from the operation module set, that is, the target operation module, which can be one or more, corresponding to the operation information. That is, the target operation module can be a play module, a synchronization module, a decoding module, a preprocessing module, etc.
[0040] In some embodiments, the target file is a music file, and accordingly, the operation information is a music playing operation, that is, in response to receiving a music playing request for a music file, the execution subject determines that the operation information corresponding to the music playing request is a music playing operation. Then, the execution subject determines the music playing module corresponding to the music playing operation from a set of predefined operation modules. Since the operation information corresponds to the operation module, after determining the operation information, the operation module corresponding to the operation information can be determined. Thus, the music operation module for playing music is determined from the predefined operation modules.
[0041] In some embodiments, the target file is a video file, and accordingly, the operation information is a video playback operation. Since the video file includes audio data and video data (i.e., picture data), in the process of playing the video file, an audio-video synchronization operation is also involved, and the audio-video synchronization operation is used to synchronize the audio data with the corresponding video data. That is, in response to receiving a video playback request for a video file, the execution subject determines that the operation information corresponding to the video playback request is a video playback operation and an audio-video synchronization operation. Then, the execution subject determines the video playback module corresponding to the video playback operation and the audio-video synchronization module corresponding to the audio-video synchronization operation from a predefined set of operation modules. Since the operation information corresponds to the operation module, after determining the operation information, the operation module corresponding to the operation information can be determined. Thus, the operation module for playing the video is determined from the predefined operation modules.
[0042] Furthermore, when the target file is a video file, the operation information may be a video decoding operation, specifically, decoding the audio of the video file or decoding the video of the video file.
[0043] S103: Use the target operation module to play the target file.
[0044] In an embodiment of the present application, after the execution subject determines the target operation module based on the above S102, the target operation module is used to play the target file. That is, the target file is input into the target operation module, and the target operation module can play it. For example, a music file is input into the music playing module, and the music playing module can play the music.
[0045] It should be noted that the file content in this embodiment is stored in an independent area, but there is no operation in this area. All operations are in different modules. Different modules take different operations according to different functions. For example, the preloader is the preloading operation, and the player is the playback operation. Different components only need to perform the established operations according to the current state and data to play the file, so as to meet the needs of different scenarios and improve scalability. And because the data is stored in an independent area, each module is also independent, so the corresponding data structure or functional module can be modified according to actual needs without affecting each other, thereby increasing flexibility and reducing maintenance costs.
[0046] In some embodiments, the execution subject will use the video playback module to play the audio and video of the video file. Since the pre-defined functional module integrates a multi-layer structure that can realize the function, the encapsulated module can fully realize its corresponding function. The video file is input into the video playback module, and the video playback module can realize the playback of the video, specifically the audio and video of the video. Then the video file is input into the audio and video synchronization module, and the audio and video synchronization module can ensure that the audio and video are played synchronously. Thus, the video file is played using the functional module corresponding to the operation information.
[0047] In some embodiments, the play request includes the file format information of the target file, and accordingly, the operation information corresponding to the play request includes a decoding operation for the target file, and the target operation module corresponding to the operation information includes a decoding module that matches the file format information. The file format (or file type) refers to a special encoding method for information used to store information. Here, the execution subject obtains the file format of the target file in the play request and determines a decoding module that matches the file format, thereby accurately and quickly decoding the target file.
[0048] Correspondingly, the execution subject will also use the decoding module to decode the target file. When the target file is a music file, the music decoding module can be used to decode the music file; when the target file is a video file, the video decoding module can be used to decode the video file. This facilitates the subsequent playback of the target file.
[0049] In some embodiments, when the target file is a video file, the decoding module includes: an audio decoding module and a video decoding module. When decoding, the audio of the video file can be decoded by the audio decoding module; and the video of the video file can be decoded by the video decoding module. Since the video file includes both audio data and video data (i.e., picture data), before playing the video file, the audio and video of the video file need to be decoded by the audio decoding module and the video decoding module. This facilitates the subsequent playback of the video file.
[0050] The method for playing files provided in the present application can use a functional module corresponding to the user's playback request to realize the playback of the target file, thereby realizing user personalized playback and separating data from operations, so that the data structure and operation logic can be independently expanded and modified according to actual scenario requirements without affecting each other, thereby improving the scalability and maintainability of the file playback method.
[0051] Figure 2 A process 200 for playing a file provided by another embodiment of the present application is shown. The process 200 at least includes the following processing steps:
[0052] S201, in response to receiving a play request for a target file, determining target performance information corresponding to the play request.
[0053] Specifically, in this embodiment, the terminal device generally displays multiple files, and the user can select the file that he wants to operate or play from the multiple files, that is, the target file. And the user can select the target file by double-clicking, and at the same time generate a play request for the target file, and send the play request to the execution subject. When the execution subject receives the play request for the target file, it will first determine the target performance information corresponding to the play request.
[0054] Since the present embodiment has separated data from operations, different operations are combined into an externally available presentation layer to achieve the corresponding functions. The above target presentation information refers to the presentation layer information corresponding to the function of the play request. For example, the target presentation information corresponding to the music play request is music play; the target presentation form corresponding to the video play request is video play.
[0055] S202: Determine target operation information corresponding to the target performance information based on a predefined relationship comparison table.
[0056] It should be understood that in this step, the execution subject can determine the target operation information corresponding to the target performance information based on a predefined relationship comparison table. Here, after encapsulating multiple functional modules, the correspondence between the performance information and the operation information of each functional module will be defined, thereby obtaining a relationship comparison table. After determining the target performance information corresponding to the play request, the operation information corresponding to the target performance information, that is, the target operation information, will be determined according to the relationship comparison table. For example, the target operation information corresponding to music playback is the music playback operation; the target operation information corresponding to video playback is the video playback operation and the audio and video synchronization operation. Thereby, the operation information corresponding to the play request is accurately determined.
[0057] S203: Determine a target operation module corresponding to the operation information from a predefined operation module set.
[0058] In an embodiment of the present application, the execution subject will predefine an operation module set, that is, modularize each operation function. That is, the operation module set includes multiple operation modules, and each operation module corresponds to an operation function. For example, the music playback module has the function of playing music, the video playback module has the function of playing videos, and so on. After determining the operation information corresponding to the playback request based on the above step S202, the execution subject will determine the operation module corresponding to the operation information from the operation module set, that is, the target operation module. The target operation module can be one or more, which corresponds to the operation information. For example, the music playback operation corresponds to the music playback module, the video playback operation corresponds to the video playback module, and the audio and video synchronization operation corresponds to the audio and video synchronization module.
[0059] S204: Use the target operation module to play the target file.
[0060] In an embodiment of the present application, after the execution subject determines the target operation module based on the above S203, the target operation module will be used to play the target file. That is, the target file is input into the target operation module, and the target operation module can play it. For example, a music file is input into the music playing module, and the music playing module can play the music.
[0061] S205: Perform control operations on the file being played.
[0062] In the embodiment of the present application, the execution subject will perform control operations on the file being played, wherein the control operations include: pausing, stopping, fast forwarding or rewinding. That is, the playing of the file being played can be controlled. Specifically, the terminal device can provide corresponding control buttons, and the user can click the buttons to pause the playing of the file being played, stop the playing of the file being played, fast forward or rewind the playing of the file being played. Thus, the playing control management of the file being played is realized.
[0063] The method for playing files provided in this embodiment, when receiving a play request for a target file and determining the target performance information corresponding to the play request, first determines the target performance information corresponding to the play request, and then determines the target operation information corresponding to the target performance information based on a predefined relationship comparison table; then determines the target operation module corresponding to the operation information from a predefined set of operation modules, and uses the target operation module to play the target file, and can also control the file being played. Thus, by separating data from operations, the data structure and the operation logic can be independently expanded and modified, which improves the scalability and flexibility of the file playing method and reduces the maintenance cost of the file playing method.
[0064] To deepen understanding, this application also provides a specific implementation solution in combination with a specific application scenario. Figure 3 , Figure 3 A schematic diagram of a process 300 of playing a file in an application scenario provided by an embodiment of the present application. In the process 300, for example, a server 310 may play the file.
[0065] Specifically, for example, the user 320 communicates with the server 310 and executes S301 to request the server 310 to play a video file. Accordingly, the server 310 can respond to this, obtain the video file to be played, that is, the target file, and generate a play request for the target file, and execute S302 to determine the operation information corresponding to the video play request, where the operation information includes a video play operation and an audio and video synchronization operation.
[0066] Then, the server 310 executes S303 to determine a video playback module corresponding to the video playback operation and an audio and video synchronization module corresponding to the audio and video synchronization operation from a predefined set of operation modules.
[0067] Then, the server 310 executes S304, plays the audio and video of the video file using the video playback module, and synchronizes the audio and video using the audio and video synchronization module.
[0068] In this application scenario, the file content is stored in an independent area, but there is no operation in this area. All operations are in different modules. Different modules take different operations according to different functions, that is, the video playback module is the video playback operation. Therefore, the file can be played according to the function modules corresponding to all the operations of the playback request.
[0069] The present application also provides a device for playing files. The structure of the device is as follows: Figure 4 The device 400 shown. The device 400 includes: an information determination unit 410, configured to determine, in response to receiving a play request for a target file, operation information corresponding to the play request, wherein the operation information includes a play operation, a synchronization operation and / or a decoding operation for the target file; a module determination unit 420, configured to determine a target operation module corresponding to the operation information from a predefined set of operation modules, wherein the target operation module includes: a play module, a synchronization module and / or a decoding module; a play unit 430, configured to play the target file using the target operation module.
[0070] In some embodiments, the information determination unit includes: a performance information determination subunit, configured to determine the target performance information corresponding to the playback request in response to receiving a playback request for the target file; and an operation information determination subunit, configured to determine the target operation information corresponding to the target performance information based on a predefined relationship comparison table.
[0071] In some embodiments, the target file includes a music file, the operation information includes a music playback operation; and the module determination unit includes: a music module determination subunit configured to determine a music playback module corresponding to the music playback operation from a set of operation modules.
[0072] In some embodiments, the target file includes a video file, the operation information includes a video playback operation and an audio and video synchronization operation; and the module determination unit includes: a video module determination subunit, configured to determine the video playback module corresponding to the video playback operation from a set of operation modules; a synchronization module determination subunit, configured to determine the audio and video synchronization module corresponding to the audio and video synchronization operation from a set of operation modules.
[0073] In some embodiments, the synchronization module determines that the subunit is further configured to play the audio and video of the video file using the video playback module; and synchronize the audio and video using the audio and video synchronization module.
[0074] In some embodiments, the playback request includes file format information of the target file, the decoding module is a module matching the file format information; and the playback unit includes: a decoding submodule configured to use the decoding module to perform a decoding operation on the target file.
[0075] In some embodiments, the target file includes a video file, and the decoding module includes: an audio decoding module and a video decoding module; and the decoding submodule is further configured to use the audio decoding module to decode the audio of the video file; and use the video decoding module to decode the video of the video file.
[0076] Based on the same inventive concept, an electronic device, a readable storage medium and a computer program product are also provided in the embodiments of the present application. The method corresponding to the electronic device can be the method for playing files in the aforementioned embodiments, and its principle of solving the problem is similar to that of the method. The electronic device provided in the embodiments of the present application includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.
[0077] The electronic device may be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0078] Figure 5 The structure of an electronic device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown, and the electronic device 500 includes a central processing unit (CPU, Central Processing Unit) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 502 or the program loaded from the storage part 508 to the random access memory (RAM, Random Access Memory) 503. In RAM 503, various programs and data required for system operation are also stored. CPU 501, ROM 502 and RAM 503 are connected to each other through bus 504. Input / output (I / O, Input / Output) interface 505 is also connected to bus 504.
[0079] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker, etc.; a storage section 508 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet.
[0080] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 501, the above functions defined in the method of the present application are executed.
[0081] Another embodiment of the present application further provides a computer-readable storage medium and a computer program product, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application.
[0082] Specifically, the present embodiment can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, systems, devices or devices including but not limited to electricity, magnetism, light, electromagnetic, infrared, or semiconductors, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0083] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0084] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0085] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0086] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0087] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0088] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules and units is only a logical function division. There may be other division methods in actual implementation. For example, with units as an example, multiple units or page components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0089] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0090] In addition, each functional module or unit in each embodiment of the present application may be integrated into one processing module or unit, or each module or unit may exist physically separately, or two or more units may be integrated into one module or unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules or units.
[0091] The above-mentioned integrated modules and units implemented in the form of software function modules and units can be stored in a computer-readable storage medium. The above-mentioned software function modules and units are stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform some steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
[0093] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A method for playing a file, characterized in that: include: In response to receiving a playback request for a target file, determining operation information corresponding to the playback request, wherein the operation information includes a playback operation, a synchronization operation and / or a decoding operation for the target file; Determine a target operation module corresponding to the operation information from a predefined set of operation modules, wherein the target operation module includes: a playback module, a synchronization module and / or a decoding module; The target file is played using the target operation module.
2. The method according to claim 1, characterized in that The step of determining, in response to receiving a playback request for a target file, operation information corresponding to the playback request includes: In response to receiving a playback request for the target file, determining target performance information corresponding to the playback request; The target operation information corresponding to the target performance information is determined based on a predefined relationship comparison table.
3. The method according to claim 1, characterized in that The target file includes a music file, and the operation information includes a music playing operation; as well as The determining a target operation module corresponding to the operation information from a predefined set of operation modules includes: A music playing module corresponding to the music playing operation is determined from the operation module set.
4. The method according to claim 1, characterized in that: The target file includes a video file, and the operation information includes a video playback operation and an audio and video synchronization operation; as well as The determining a target operation module corresponding to the operation information from a predefined set of operation modules includes: Determine a video playback module corresponding to the video playback operation from the operation module set; An audio and video synchronization module corresponding to the audio and video synchronization operation is determined from the operation module set.
5. The method according to claim 4, characterized in that The using the target operation module to play the target file includes: Using the video playback module to play the audio and video of the video file; The audio and video synchronization module is used to synchronize the audio and video.
6. The method according to claim 1, characterized in that The play request includes file format information of the target file, and the decoding module is a module matching the file format information; as well as The using the target operation module to play the target file includes: The decoding module is used to perform a decoding operation on the target file.
7. The method according to claim 6, characterized in that The target file includes a video file, and the decoding module includes: an audio decoding module and a video decoding module; and The step of using the decoding module to decode the target file includes: Decoding the audio of the video file using the audio decoding module; The video file is decoded using the video decoding module.
8. A device for playing files, characterized in that: include: an information determining unit, configured to, in response to receiving a playback request for a target file, determine operation information corresponding to the playback request, wherein the operation information includes a playback operation, a synchronization operation and / or a decoding operation for the target file; A module determination unit is configured to determine a target operation module corresponding to the operation information from a predefined set of operation modules, wherein the target operation module includes: a playback module, a synchronization module and / or a decoding module; The playing unit is configured to play the target file using the target operation module.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A computer-readable medium, characterized in that Computer program instructions are stored thereon, and the computer program instructions can be executed by a processor to implement the method as claimed in any one of claims 1 to 7.
11. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.