CN107801095B - audio and video decoding method and terminal equipment - Google Patents

audio and video decoding method and terminal equipment Download PDF

Info

Publication number
CN107801095B
CN107801095B CN201710876518.5A CN201710876518A CN107801095B CN 107801095 B CN107801095 B CN 107801095B CN 201710876518 A CN201710876518 A CN 201710876518A CN 107801095 B CN107801095 B CN 107801095B
Authority
CN
China
Prior art keywords
decoder
target
time period
audio
total
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710876518.5A
Other languages
Chinese (zh)
Other versions
CN107801095A (en
Inventor
徐成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201710876518.5A priority Critical patent/CN107801095B/en
Publication of CN107801095A publication Critical patent/CN107801095A/en
Application granted granted Critical
Publication of CN107801095B publication Critical patent/CN107801095B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4334Recording operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • H04N21/4398Processing of audio elementary streams involving reformatting operations of audio signals

Abstract

the invention belongs to the technical field of computers, and particularly relates to an audio and video decoding method and terminal equipment. The method comprises the following steps: receiving an instruction for playing a target audio/video file issued by a current user; acquiring a playing format of the target audio/video file; searching a target decoder corresponding to the playing format of the target audio/video file in a preset decoder resource library; if the target decoder is found in the decoder resource library, decoding the target audio/video file by using the target decoder in the decoder resource library, and playing the decoded target audio/video file; if the target decoder is not found in the decoder resource library, downloading the target decoder from a network end, decoding the target audio/video file by using the target decoder downloaded from the network end, and playing the decoded target audio/video file. The invention saves time and labor, is convenient to use and has better user experience.

Description

Audio and video decoding method and terminal equipment
Technical Field
The invention belongs to the technical field of computers, and particularly relates to an audio and video decoding method and terminal equipment.
Background
currently, with the continuous improvement of software and hardware levels of electronic products, various audio and video playing software is greatly developed. Taking mobile terminals such as mobile phones and the like as an example, different manufacturers have successively provided own audio and video playing software, and brand new audio and video enjoyment is brought to the majority of users. However, in the face of a variety of audio-video encoding formats and file formats, and relatively limited mobile phone hardware resources, different audio-video playing software has strict regulations on audio-video files, only audio-video files in several specific formats are allowed to be played on the system, and audio-video files in other formats are not supported. Users often need to convert the audio/video playing format that is not supported by the playing software into the audio/video playing format that is supported by the playing software through various audio/video conversion tools, which is time-consuming, labor-consuming and inconvenient to use.
Disclosure of Invention
in view of this, embodiments of the present invention provide an audio and video decoding method and a terminal device, so as to solve the problems that in the prior art, a user needs to convert an audio and video playing format that is not supported by playing software into an audio and video playing format that is supported by the playing software through various audio and video conversion tools, which is time-consuming, labor-consuming, and extremely inconvenient to use.
a first aspect of an embodiment of the present invention provides an audio and video decoding method, which may include:
Receiving an instruction for playing a target audio/video file issued by a current user;
Acquiring a playing format of the target audio/video file;
Searching a target decoder corresponding to the playing format of the target audio/video file in a preset decoder resource library;
if the target decoder is found in the decoder resource library, decoding the target audio/video file by using the target decoder in the decoder resource library, and playing the decoded target audio/video file;
if the target decoder is not found in the decoder resource library, downloading the target decoder from a network end, decoding the target audio/video file by using the target decoder downloaded from the network end, and playing the decoded target audio/video file.
a second aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of:
Receiving an instruction for playing a target audio/video file issued by a current user;
acquiring a playing format of the target audio/video file;
searching a target decoder corresponding to the playing format of the target audio/video file in a preset decoder resource library;
if the target decoder is found in the decoder resource library, decoding the target audio/video file by using the target decoder in the decoder resource library, and playing the decoded target audio/video file;
If the target decoder is not found in the decoder resource library, downloading the target decoder from a network end, decoding the target audio/video file by using the target decoder downloaded from the network end, and playing the decoded target audio/video file.
A third aspect of an embodiment of the present invention provides an audio/video decoding terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the following steps when executing the computer program:
receiving an instruction for playing a target audio/video file issued by a current user;
Acquiring a playing format of the target audio/video file;
searching a target decoder corresponding to the playing format of the target audio/video file in a preset decoder resource library;
If the target decoder is found in the decoder resource library, decoding the target audio/video file by using the target decoder in the decoder resource library, and playing the decoded target audio/video file;
if the target decoder is not found in the decoder resource library, downloading the target decoder from a network end, decoding the target audio/video file by using the target decoder downloaded from the network end, and playing the decoded target audio/video file.
compared with the prior art, the embodiment of the invention has the following beneficial effects: the method comprises the steps of receiving a command which is issued by a current user and used for playing a target audio/video file; acquiring a playing format of the target audio/video file; searching a target decoder corresponding to the playing format of the target audio/video file in a preset decoder resource library; if the target decoder is found in the decoder resource library, decoding the target audio/video file by using the target decoder in the decoder resource library, and playing the decoded target audio/video file; if the target decoder is not found in the decoder resource library, downloading the target decoder from a network end, decoding the target audio/video file by using the target decoder downloaded from the network end, and playing the decoded target audio/video file. By the embodiment of the invention, the audio and video playing software is adaptive to various audio and video playing formats, a decoder in a decoder resource library can be used for decoding and playing common audio and video playing formats, and a decoder can be downloaded from a network terminal for decoding and playing uncommon audio and video playing formats.
drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of an embodiment of an audio and video decoding method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating the steps of determining whether to retain a target decoder according to the historical usage of the target decoder in an embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating the deletion of an infrequently used decoder from a decoder resource pool according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating the determination of an initial default decoder in a decoder resource pool according to an embodiment of the present invention;
fig. 5 is a schematic block diagram of an audio/video decoding terminal device according to an embodiment of the present invention;
Fig. 6 is a program module diagram of an audio/video decoding program according to an embodiment of the present invention.
Detailed Description
in order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
referring to fig. 1, an embodiment of an audio and video decoding method according to an embodiment of the present invention may include:
step S101, receiving an instruction sent by a current user to play a target audio/video file.
Generally, a user enjoys various audios and videos through audio and video playing software installed on a terminal such as a mobile phone and a tablet computer, and the user can select a target audio and video file on an application interface provided by the audio and video playing software and issue an instruction for playing the target audio and video file.
and S102, acquiring the playing format of the target audio and video file.
The playing formats of the audio and video files are various, and the common audio formats are CDA, WAV, MP3, WMA, RA, MIDI, OCG, APE, FLAC, AAC, etc., and the common video formats are RM, RMVB, AVI, MP4, 3GP, MKV, MOV, etc.
Step S103, judging whether a target decoder corresponding to the playing format of the target audio/video file is found in a preset decoder resource library.
if the target decoder is found in the decoder repository, step S104 is executed, and if the target decoder is not found in the decoder repository, step S105 and the subsequent steps are executed.
and step S104, decoding the target audio and video file by using the target decoder in the decoder resource library, and playing the decoded target audio and video file.
And step S105, downloading the target decoder from the network terminal.
in this embodiment, a server may be preset, and various decoders that may be used by the user are stored in the server for downloading by the user. And the content in the server is continuously updated, and when a new audio and video playing format appears in the market, the decoder corresponding to the audio and video playing format is updated into the server.
and step S106, decoding the target audio and video file by using the target decoder downloaded from the network terminal, and playing the decoded target audio and video file.
Preferably, after step S106, it may also be determined whether to retain the target decoder according to the historical usage of the target decoder, specifically, see the steps shown in fig. 2:
step S201, obtaining a first history playing record corresponding to the current user.
Step S202, counting the total using times and the total using duration of the target decoder in a preset first time period according to the first historical playing record.
the first time period may be set to be one week, two weeks, one month, and the like, and may be specifically set according to actual situations, which is not specifically limited in this embodiment.
Step S203, determining whether the total number of times of use of the target decoder in the first time period is greater than a first threshold or whether the total duration of use of the target decoder in the first time period is greater than a second threshold.
The first threshold is positively correlated with the total number of times of use of all decoders in the first history record in the first time period, and preferably, the first threshold and the total number of times of use of decoders in the first history record can be set to be in a direct proportion as shown in the following formula:
N’=k1n, where N' is the first threshold, N is the total number of uses of all decoders within the first time period, k1The value of the preset proportionality coefficient is larger than 0 and smaller than 1.
the second threshold is positively correlated with the total usage time of all decoders in the first history record in the first time period, and preferably, the second threshold may be set to be in a direct proportion as shown in the following formula:
T’=k2t, where T' is the second threshold, T is the total duration of use of all decoders in the first time period, k2The value of the preset proportionality coefficient is larger than 0 and smaller than 1.
For example, if the total number of uses of all decoders during the first time period is 1000, the scaling factor k10.2, the first threshold may be determined to be 1000 x 0.2 x 200 times, and if the total duration of use of all decoders in the first time period is 500 minutes, the scaling factor k is10.3, the second threshold may be determined to be 500 x 0.3-150 minutes.
If the total number of times of use of the target decoder in the first time period is greater than a first threshold or the total duration of use of the target decoder in the first time period is greater than a second threshold, then step S204 and the following steps are performed, and if the total number of times of use of the target decoder in the first time period is less than or equal to the first threshold and the total duration of use of the target decoder in the first time period is less than or equal to the second threshold, then step S208 is performed.
and S204, acquiring a first storage space currently available for the audio and video playing terminal and a second storage space occupied by the target decoder.
step S205, calculating a ratio of the first storage space to the second storage space.
And step S206, judging whether the ratio is smaller than a third threshold value.
if the ratio is greater than or equal to the third threshold, step S207 is executed, and if the ratio is less than the third threshold, step S208 is executed.
and step S207, reserving the target decoder and adding the target decoder into the decoder resource library.
and step S208, deleting the target decoder after the target decoder is used for decoding the target audio and video file.
Through the steps shown in fig. 2, for the target decoder downloaded from the network, if it is frequently used and the storage space is sufficient, it is retained, and if it is not frequently used or the storage space is insufficient, it is deleted, thereby reducing the occupation of the storage space of the terminal.
Preferably, the usage of each decoder in the decoder resource library may also be counted according to the first history play record, and a decoder that is not frequently used is deleted from the decoder resource library, where a specific process is as shown in fig. 3:
Step S301, selecting an unselected decoder from the decoder resource pool as a current decoder.
step S302, respectively counting the total using times and the total using duration of the current decoder in the first time period according to the first historical playing record.
Step S303, determining whether the total number of times of use of the current decoder in the first time period is greater than the first threshold or whether the total duration of use of the current decoder in the first time period is greater than the second threshold.
If the total number of times of use of the current decoder in the first time period is greater than the first threshold or the total duration of use of the current decoder in the first time period is greater than the second threshold, step S304 is performed, and if the total number of times of use of the current decoder in the first time period is less than or equal to the first threshold and the total duration of use of the current decoder in the first time period is less than or equal to the second threshold, step S305 is performed.
Step S304, reserving the current decoder in the decoder resource library.
Step S305, deleting the current decoder from the decoder resource pool.
Step S306, judging whether the decoder resource library has unselected decoders.
if there are unselected decoders in the decoder resource pool, the process returns to step S301 and the subsequent steps, and if all the decoders in the decoder resource pool are selected, the process proceeds to step S307.
step S307, ending the updating of the decoder resource library.
it is easy to understand that, through the steps shown in fig. 2, it is realized that the decoders commonly used in the current time period of the user are added into the decoder resource library, and through the steps shown in fig. 3, it is realized that the decoders not commonly used in the current time period of the user are deleted from the decoder resource library, which is a continuous dynamic update process, and it is ensured that the minimum occupied resources meet the requirement of the maximum audio/video playing of the user.
for example, the initial default decoders in the decoder resource library are decoders in three formats, namely MP3, RMVB, and AVI, and if the current user wants to play a file in MP3 format, the current user can directly decode and play the file, and if the user wants to play a file in MKV format, the user needs to download the decoder in MKV format from the network, and after the playing is completed, the downloaded decoder in MKV format is deleted, but the playing record in MKV format is incremented. And continuously repeating the processes, counting the playing records after 100 playing records are accumulated, and if the counting result is that 50 playing records are obtained by MP3, 22 playing records are obtained by RMVB, 25 playing records are obtained by MKV, and one playing record is obtained by AVI, MOV and APE, adding the MKV as a default decoder into the decoder resource library, and deleting the AVI from the decoder resource library.
preferably, the initial default decoder in the decoder resource pool may be determined by the steps shown in fig. 4:
step S401, selecting a preset number of sample users, and respectively obtaining second historical play records corresponding to the sample users.
and S402, respectively counting the total using times and the total using duration of each decoder in a preset second time period according to the second historical playing record.
And S403, selecting a preferred decoder from the decoders.
The preferred decoder is a decoder whose total number of uses in the second time period is greater than a fourth threshold or whose total duration of uses in the second time period is greater than a fifth threshold.
The fourth threshold is positively correlated with the total number of times of use of all decoders in the second history play record in the second time period, and preferably, the fourth threshold and all decoders in the second history play record may be set to be in a direct proportion relationship.
The fifth threshold is positively correlated with the total duration of use of all decoders in the second history play record in the second time period, and preferably, the fifth threshold and the total duration of use of all decoders in the second history play record in the second time period may be set to be in a direct proportion relationship.
And S404, adding the preferred decoder as an initial default decoder into the decoder resource library.
In order to make the selected initial default decoder more representative, the number of sample users should be set large enough, and the second time period should be set long enough, for example, the historical play records of 10000 users in a half year can be counted to ensure that the selected initial default decoder is the most frequently used decoder.
In summary, the embodiment of the present invention receives an instruction for playing a target audio/video file, which is issued by a current user; acquiring a playing format of the target audio/video file; searching a target decoder corresponding to the playing format of the target audio/video file in a preset decoder resource library; if the target decoder is found in the decoder resource library, decoding the target audio/video file by using the target decoder in the decoder resource library, and playing the decoded target audio/video file; if the target decoder is not found in the decoder resource library, downloading the target decoder from a network end, decoding the target audio/video file by using the target decoder downloaded from the network end, and playing the decoded target audio/video file. By the embodiment of the invention, the audio and video playing software is adaptive to various audio and video playing formats, a decoder in a decoder resource library can be used for decoding and playing common audio and video playing formats, and a decoder can be downloaded from a network terminal for decoding and playing uncommon audio and video playing formats.
Corresponding to the audio and video decoding method described in the foregoing embodiment, fig. 5 shows a schematic block diagram of an audio and video decoding terminal device provided in the embodiment of the present invention, and for convenience of description, only a part related to the embodiment of the present invention is shown.
In this embodiment, the audio/video decoding terminal device may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The audio and video decoding terminal equipment can comprise: a processor 50, a memory 51 and a computer program 52 stored in said memory 51 and executable on said processor 50.
the Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
the memory 51 may be an internal storage unit of the audio/video decoding terminal device 5, for example, a hard disk or a memory of the audio/video decoding terminal device 5. The memory 51 may also be an external storage device of the audio/video decoding terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), and the like, which are equipped on the audio/video decoding terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the audio/video decoding terminal device 5. The memory 51 is used to store the computer program and other programs and data required by the audio/video decoding terminal device 5. The memory 51 may also be used to temporarily store data that has been output or is to be output.
please refer to fig. 6, which is a block diagram of a computer program 52 according to an embodiment of the present invention. In this embodiment, the computer program 52 may be divided into one or more program modules, which are stored in the memory 51 and executed by the processor 50 to implement the present invention. For example, in fig. 6, the computer program 52, that is, the audio/video decoding program, may be divided into an instruction receiving module 601, a format obtaining module 602, a target decoder searching module 603, a first decoding module 604, a target decoder downloading module 605, and a second decoding module 606. The following description will specifically describe the functionality of the program modules 601-606.
The instruction receiving module 601 is configured to receive an instruction for playing a target audio/video file, which is issued by a current user;
a format obtaining module 602, configured to obtain a playing format of the target audio/video file;
the target decoder searching module 603 is configured to search a target decoder corresponding to the playing format of the target audio/video file in a preset decoder resource library;
a first decoding module 604, configured to, if the target decoder is found in the decoder resource library, decode the target audio/video file by using the target decoder in the decoder resource library, and play the decoded target audio/video file;
A target decoder downloading module 605, configured to download the target decoder from a network terminal if the target decoder is not found in the decoder resource library;
The second decoding module 606 is configured to decode the target audio/video file by using the target decoder downloaded from the network, and play the decoded target audio/video file.
further, the computer program 52 may further include:
A history playing record obtaining module, configured to obtain a first history playing record corresponding to the current user;
The target decoder counting module is used for counting the total using times and the total using duration of the target decoder in a preset first time period according to the first historical playing record;
A target decoder adding module, configured to reserve the target decoder and add the target decoder into the decoder resource library if the total number of times of use of the target decoder in the first time period is greater than a first threshold or the total duration of use of the target decoder in the first time period is greater than a second threshold;
and the target decoder deleting module is used for deleting the target decoder if the total using times of the target decoder in the first time period is less than or equal to the first threshold value and the total using time length of the target decoder in the first time period is less than or equal to the second threshold value.
further, the computer program 52 may further include:
A current decoder selecting module, configured to select an unselected decoder from the decoder resource library as a current decoder;
The current decoder counting module is used for respectively counting the total using times and the total using duration of the current decoder in the first time period according to the first historical playing record;
A target decoder reserving module, configured to reserve the current decoder in the decoder resource pool if the total number of times of use of the current decoder in the first time period is greater than the first threshold or the total duration of use of the current decoder in the first time period is greater than the second threshold;
and the target decoder deleting module is used for deleting the current decoder from the decoder resource library if the total using times of the current decoder in the first time period is less than or equal to the first threshold value and the total using time length of the current decoder in the first time period is less than or equal to the second threshold value.
Further, the computer program 52 may further include:
The storage space acquisition module is used for acquiring a first storage space currently available for the audio and video playing terminal and a second storage space occupied by the target decoder;
The ratio calculation module is used for calculating the ratio of the first storage space to the second storage space;
And the target decoder processing module is used for not executing the step of reserving the target decoder and adding the target decoder into the decoder resource library if the ratio of the first storage space to the second storage space is smaller than a third threshold, and deleting the target decoder after the target decoder is used for decoding the target audio/video file.
Further, the computer program 52 may further include:
The system comprises a sample user selection module, a storage module and a display module, wherein the sample user selection module is used for selecting a preset number of sample users and respectively acquiring second historical play records corresponding to the sample users;
the decoder counting module is used for respectively counting the total using times and the total using duration of each decoder in a preset second time period according to the second historical playing record;
A preferred decoder selecting module, configured to select a preferred decoder from the decoders, where the preferred decoder is a decoder whose total number of times of use in the second time period is greater than a fourth threshold, or whose total duration of use in the second time period is greater than a fifth threshold;
An initial default decoder adding module for adding the preferred decoder as an initial default decoder into the decoder resource pool.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
in the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art would appreciate that the modules, elements, and/or method steps of the various embodiments described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
in addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (8)

1. An audio-video decoding method, characterized by comprising:
Receiving an instruction which is issued by a current user and used for playing a target audio and video file in audio and video playing software;
Acquiring a playing format of the target audio/video file;
searching a target decoder corresponding to the playing format of the target audio/video file in a preset decoder resource library;
if the target decoder is found in the decoder resource library, decoding the target audio/video file by using the target decoder in the decoder resource library, and playing the decoded target audio/video file;
if the target decoder is not found in the decoder resource library, downloading the target decoder from a network end, decoding the target audio/video file by using the target decoder downloaded from the network end, and playing the decoded target audio/video file;
Acquiring a first historical play record corresponding to the current user;
counting the total use times and the total use duration of the target decoder in a preset first time period according to the first historical play record;
If the total number of times of usage of the target decoder in the first time period is greater than a first threshold or the total duration of usage of the target decoder in the first time period is greater than a second threshold, the target decoder is retained and added to the decoder resource library, the first threshold is positively correlated with the total number of times of usage of all decoders in the first historical play record in the first time period, specifically, N ' ═ k1 × N, where N ' is the first threshold, N is the total number of times of usage of all decoders in the first time period, k1 is a preset scaling factor, k1 is greater than 0 and less than 1, the second threshold is positively correlated with the total duration of usage of all decoders in the first historical play record in the first time period, specifically, T ' ═ k2 × T, where, t' is the second threshold, T is the total duration of use of all decoders in the first time period, k2 is a preset scaling factor, and k2 is greater than 0 and less than 1;
And if the total using times of the target decoder in the first time period is less than or equal to the first threshold value, and the total using time length of the target decoder in the first time period is less than or equal to the second threshold value, deleting the target decoder.
2. The audio-video decoding method of claim 1, further comprising:
selecting an unselected decoder from the decoder resource library as a current decoder;
respectively counting the total use times and the total use duration of the current decoder in the first time period according to the first historical play record;
If the total using times of the current decoder in the first time period is greater than the first threshold or the total using duration of the current decoder in the first time period is greater than the second threshold, keeping the current decoder in the decoder resource library;
if the total using times of the current decoder in the first time period is less than or equal to the first threshold value, and the total using time of the current decoder in the first time period is less than or equal to the second threshold value, deleting the current decoder from the decoder resource library;
judging whether unselected decoders exist in the decoder resource library or not;
If the decoder resource library has unselected decoders, returning to execute the step of selecting one unselected decoder from the decoder resource library as the current decoder and the subsequent steps until all the decoders in the decoder resource library are selected.
3. the audio-video decoding method of claim 1, further comprising, before reserving the target decoder and adding the target decoder into the decoder resource pool:
acquiring a first storage space currently available for an audio and video playing terminal and a second storage space occupied by the target decoder;
calculating the ratio of the first storage space to the second storage space;
if the ratio of the first storage space to the second storage space is smaller than a third threshold, the step of reserving the target decoder and adding the target decoder into the decoder resource library is not executed, and the target decoder is deleted after the target decoder is used for decoding the target audio/video file.
4. The audio/video decoding method according to any one of claims 1 to 3, wherein before searching for a target decoder corresponding to the playing format of the target audio/video file in a preset decoder resource library, the method further comprises:
selecting a preset number of sample users, and respectively obtaining second historical play records corresponding to the sample users;
Respectively counting the total use times and the total use duration of each decoder in a preset second time period according to the second historical play record;
selecting a preferred decoder from the decoders, wherein the preferred decoder is a decoder with the total use times in the second time period being greater than a fourth threshold or the total use time length in the second time period being greater than a fifth threshold;
adding the preferred decoder as an initial default decoder into the decoder resource pool.
5. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the audio-video decoding method as claimed in any one of claims 1 to 4.
6. a terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
receiving an instruction which is issued by a current user and used for playing a target audio and video file in audio and video playing software;
Acquiring a playing format of the target audio/video file;
Searching a target decoder corresponding to the playing format of the target audio/video file in a preset decoder resource library;
If the target decoder is found in the decoder resource library, decoding the target audio/video file by using the target decoder in the decoder resource library, and playing the decoded target audio/video file;
If the target decoder is not found in the decoder resource library, downloading the target decoder from a network end, decoding the target audio/video file by using the target decoder downloaded from the network end, and playing the decoded target audio/video file;
acquiring a first historical play record corresponding to the current user;
Counting the total use times and the total use duration of the target decoder in a preset first time period according to the first historical play record;
if the total number of times of usage of the target decoder in the first time period is greater than a first threshold or the total duration of usage of the target decoder in the first time period is greater than a second threshold, the target decoder is retained and added to the decoder resource library, the first threshold is positively correlated with the total number of times of usage of all decoders in the first historical play record in the first time period, specifically, N ' ═ k1 × N, where N ' is the first threshold, N is the total number of times of usage of all decoders in the first time period, k1 is a preset scaling factor, k1 is greater than 0 and less than 1, the second threshold is positively correlated with the total duration of usage of all decoders in the first historical play record in the first time period, specifically, T ' ═ k2 × T, where, t' is the second threshold, T is the total duration of use of all decoders in the first time period, k2 is a preset scaling factor, and k2 is greater than 0 and less than 1;
And if the total using times of the target decoder in the first time period is less than or equal to the first threshold value, and the total using time length of the target decoder in the first time period is less than or equal to the second threshold value, deleting the target decoder.
7. the terminal device of claim 6, further comprising:
selecting an unselected decoder from the decoder resource library as a current decoder;
Respectively counting the total use times and the total use duration of the current decoder in the first time period according to the first historical play record;
if the total using times of the current decoder in the first time period is greater than the first threshold or the total using duration of the current decoder in the first time period is greater than the second threshold, keeping the current decoder in the decoder resource library;
If the total using times of the current decoder in the first time period is less than or equal to the first threshold value, and the total using time of the current decoder in the first time period is less than or equal to the second threshold value, deleting the current decoder from the decoder resource library;
Judging whether unselected decoders exist in the decoder resource library or not;
if the decoder resource library has unselected decoders, returning to execute the step of selecting one unselected decoder from the decoder resource library as the current decoder and the subsequent steps until all the decoders in the decoder resource library are selected.
8. the terminal device according to any one of claims 6 to 7, wherein before searching a target decoder corresponding to the playing format of the target audio/video file in a preset decoder resource library, the method further includes:
selecting a preset number of sample users, and respectively obtaining second historical play records corresponding to the sample users;
respectively counting the total use times and the total use duration of each decoder in a preset second time period according to the second historical play record;
Selecting a preferred decoder from the decoders, wherein the preferred decoder is a decoder with the total use times in the second time period being greater than a fourth threshold or the total use time length in the second time period being greater than a fifth threshold;
adding the preferred decoder as an initial default decoder into the decoder resource pool.
CN201710876518.5A 2017-09-25 2017-09-25 audio and video decoding method and terminal equipment Active CN107801095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710876518.5A CN107801095B (en) 2017-09-25 2017-09-25 audio and video decoding method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710876518.5A CN107801095B (en) 2017-09-25 2017-09-25 audio and video decoding method and terminal equipment

Publications (2)

Publication Number Publication Date
CN107801095A CN107801095A (en) 2018-03-13
CN107801095B true CN107801095B (en) 2019-12-13

Family

ID=61532121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710876518.5A Active CN107801095B (en) 2017-09-25 2017-09-25 audio and video decoding method and terminal equipment

Country Status (1)

Country Link
CN (1) CN107801095B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110324633A (en) * 2018-03-28 2019-10-11 北京视联动力国际信息技术有限公司 A kind of data processing method and device of view networking
CN109151574B (en) * 2018-10-15 2020-03-24 Oppo广东移动通信有限公司 Video processing method, video processing device, electronic equipment and storage medium
CN112823529B (en) * 2018-11-29 2023-06-13 深圳市欢太科技有限公司 Video decoding method, device, electronic equipment and computer readable storage medium
CN112087633B (en) * 2019-06-12 2022-08-09 腾讯科技(深圳)有限公司 Video decoding method, device and storage medium
CN113225605B (en) * 2020-02-05 2024-03-01 腾讯科技(深圳)有限公司 Video playing processing method and device, electronic equipment and storage medium
WO2021218921A1 (en) * 2020-04-27 2021-11-04 Guangdong Oppo Mobile Telecommunications Corp., Ltd. System and method for extraction of a video thumbnail from a video file
CN115278258A (en) * 2022-07-11 2022-11-01 海南视联通信技术有限公司 Audio and video data processing method and device, terminal and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000134237A (en) * 1998-10-23 2000-05-12 Toshiba Corp Digital av data reproduction method and digital av data reproduction device for home network
CN1510587A (en) * 2002-12-23 2004-07-07 �ʼҷ����ֵ��ӹɷ����޹�˾ Extendable disc player
CN102111674A (en) * 2010-12-22 2011-06-29 深圳市五巨科技有限公司 System and method for playing on-line video by mobile terminal and mobile terminal
CN102761736A (en) * 2011-04-29 2012-10-31 腾讯科技(深圳)有限公司 Video decoding method and device
CN104581171A (en) * 2013-10-15 2015-04-29 腾讯科技(深圳)有限公司 Method and device for playing videos on browser as well as mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000134237A (en) * 1998-10-23 2000-05-12 Toshiba Corp Digital av data reproduction method and digital av data reproduction device for home network
CN1510587A (en) * 2002-12-23 2004-07-07 �ʼҷ����ֵ��ӹɷ����޹�˾ Extendable disc player
CN102111674A (en) * 2010-12-22 2011-06-29 深圳市五巨科技有限公司 System and method for playing on-line video by mobile terminal and mobile terminal
CN102761736A (en) * 2011-04-29 2012-10-31 腾讯科技(深圳)有限公司 Video decoding method and device
CN104581171A (en) * 2013-10-15 2015-04-29 腾讯科技(深圳)有限公司 Method and device for playing videos on browser as well as mobile terminal

Also Published As

Publication number Publication date
CN107801095A (en) 2018-03-13

Similar Documents

Publication Publication Date Title
CN107801095B (en) audio and video decoding method and terminal equipment
CN108733342B (en) Volume adjusting method, mobile terminal and computer readable storage medium
CN110704202B (en) Multimedia recording data sharing method and terminal equipment
US20210120283A1 (en) Media File Pushing Method, Media File Server, and Media File Pushing System
CN104980773B (en) streaming media processing method and device, terminal and server
WO2017185605A1 (en) File management method and electronic equipment
CN111385606A (en) Video preview method and device and intelligent terminal
CN109862100B (en) Method and device for pushing information
CN110675479B (en) Dynamic illumination processing method and device, storage medium and electronic device
US20120315012A1 (en) Weighted Playlist
US20170257658A1 (en) Method for automatically pushing video based on analysis of user behavior and electronic device
CN111104178A (en) Dynamic library loading method, terminal device and storage medium
CN109462777B (en) Video heat updating method, device, terminal and storage medium
CN108777810B (en) Video data storage method, device, equipment and storage medium
CN105005444A (en) Display method and terminal of video playing time axis
CN111443945B (en) Component code modification method and device
CN111324576A (en) Recording data storage method and device, storage medium and terminal equipment
US20170280309A1 (en) Method and terminal for calling application
CN108335706B (en) Seamless playing method of multimedia file, terminal equipment and storage medium
CN110187987B (en) Method and apparatus for processing requests
CN110489412B (en) Data processing method, device, medium and electronic equipment
WO2013173686A1 (en) System and method for enabling execution of video files by readers of electronic publications
CN104866233B (en) Information processing method and electronic equipment
CN111246214B (en) Video decoding method and device
CN110825478A (en) Main interface content adding method, device, medium and electronic equipment

Legal Events

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