[go: up one dir, main page]

CN114168762A - Multimedia resource playing method, device, equipment and storage medium - Google Patents

Multimedia resource playing method, device, equipment and storage medium Download PDF

Info

Publication number
CN114168762A
CN114168762A CN202111314852.4A CN202111314852A CN114168762A CN 114168762 A CN114168762 A CN 114168762A CN 202111314852 A CN202111314852 A CN 202111314852A CN 114168762 A CN114168762 A CN 114168762A
Authority
CN
China
Prior art keywords
multimedia
multimedia resource
playing
target
resources
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.)
Pending
Application number
CN202111314852.4A
Other languages
Chinese (zh)
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202111314852.4A priority Critical patent/CN114168762A/en
Publication of CN114168762A publication Critical patent/CN114168762A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying
    • G06F16/438Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The disclosure relates to a method, a device, equipment and a storage medium for playing multimedia resources, and relates to the technical field of computers. The embodiment of the disclosure at least solves the problem that the short video application program cannot be normally used in an offline state in the related art. The method comprises the following steps: in an off-line state, responding to a request playing operation for requesting to play the multimedia resources, determining target multimedia resources to be played from a plurality of prestored multimedia resources according to the request playing operation, and playing the target multimedia resources; the multimedia resources are obtained by decompressing prestored multimedia resource compression packets.

Description

Multimedia resource playing method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for playing a multimedia resource.
Background
Currently, when the short video application is in an online state, the user account may request switching, i.e., playing, of the short video by performing a sliding operation up and down or other similar operations in a playing page of the short video application. Correspondingly, the terminal responds to the operation of the user account, and obtains the short video file to be played from the electronic equipment so as to realize the switching and playing of the short video in the application program.
However, in the above playing scenario, when the application program is in an offline state with no network or a poor network environment, the terminal cannot acquire the short video file from the electronic device, so that the short video application program cannot be used in the offline state.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a device and a storage medium for playing multimedia resources, so as to at least solve the problem in the related art that a short video application cannot be normally used in an offline state. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for playing a multimedia resource, including: in an off-line state, responding to a request playing operation for requesting to play the multimedia resources, and determining target multimedia resources to be played from a plurality of prestored multimedia resources according to the request playing operation; the plurality of multimedia resources are obtained by decompressing prestored multimedia resource compression packets; and playing the target multimedia resource.
Optionally, the method further includes: in an off-line state, responding to a request playing operation, under the condition that the number of the plurality of multimedia resources is smaller than a first threshold value, determining a target multimedia resource compression packet to be decompressed from the uncompressed multimedia resource compression packets, decompressing the target multimedia resource compression packet to acquire multimedia resources in the target multimedia resource compression packet, and storing the multimedia resources in the target multimedia resource compression packet.
Optionally, the method further includes: in an off-line state, responding to a request for playing operation, determining a target played multimedia resource from the played multimedia resources, and deleting the target played multimedia resource; the difference value between the playing sequence of the played target multimedia resource and the playing sequence of the target multimedia resource is a preset numerical value.
Optionally, the method further includes: in an off-line state, responding to a first request playing operation, and determining a target multimedia resource compression packet to be decompressed from prestored multimedia resource compression packets; and decompressing the target multimedia resource compression packet to acquire the multimedia resources in the target multimedia resource compression packet and store the multimedia resources in the target multimedia resource compression packet.
Optionally, the method further includes: and deleting the target multimedia resource compression packet after decompressing the target multimedia resource compression packet.
Optionally, the method further includes: acquiring a plurality of preset multimedia resources in an online state; compressing a plurality of preset multimedia resources into a plurality of multimedia resource compression packets, and storing the plurality of multimedia resource compression packets; each multimedia resource compression packet comprises a preset number of continuous preset multimedia resources; the total playing time of the preset multimedia resources is smaller than a second threshold value.
According to a second aspect of the embodiments of the present disclosure, there is provided a playing apparatus of a multimedia resource, including a determining unit and a playing unit; the device comprises a determining unit, a playing unit and a playing unit, wherein the determining unit is used for responding to the request playing operation of requesting to play the multimedia resources in an off-line state and determining target multimedia resources to be played from a plurality of prestored multimedia resources according to the request playing operation; the plurality of multimedia resources are obtained by decompressing prestored multimedia resource compression packets; and the playing unit is used for playing the target multimedia resource determined by the determining unit.
Optionally, the playing apparatus further includes a storage unit; the determining unit is further used for responding to the request playing operation in an offline state, determining a target multimedia resource compression packet to be decompressed from the uncompressed multimedia resource compression packets under the condition that the number of the plurality of multimedia resources is smaller than a first threshold, and decompressing the target multimedia resource compression packet to acquire the multimedia resources in the target multimedia resource compression packet; and the storage unit is used for storing the multimedia resources in the target multimedia resource compression packet.
Optionally, the playing apparatus further includes a deleting unit; the determining unit is also used for responding to the request for playing operation in an off-line state and determining a target played multimedia resource from the played multimedia resources; a deleting unit, configured to delete a target played multimedia resource; the difference value between the playing sequence of the played target multimedia resource and the playing sequence of the target multimedia resource is a preset numerical value.
Optionally, the playing apparatus further includes a decompression unit and a storage unit; the determining unit is also used for responding to the first request playing operation in an off-line state and determining a target multimedia resource compression packet to be decompressed from the prestored multimedia resource compression packets; the decompression unit is used for decompressing the target multimedia resource compression packet to acquire the multimedia resource in the target multimedia resource compression packet; and the storage unit is used for storing the multimedia resources in the target multimedia resource compression packet.
Optionally, the playing apparatus further includes a decompression unit and a deletion unit; and the deleting unit is used for deleting the target multimedia resource compression packet after the decompressing unit decompresses the target multimedia resource compression packet.
Optionally, the playing apparatus further includes an obtaining unit, a compressing unit, and a storing unit; the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a plurality of preset multimedia resources in an online state; the total playing time of the preset multimedia resources is smaller than a second threshold value; the compressing unit is used for compressing a plurality of preset multimedia resources into a plurality of multimedia resource compression packets; each multimedia resource compression packet comprises a preset number of continuous preset multimedia resources; and the storage unit is used for storing a plurality of multimedia resource compression packets.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor, a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method for playing back a multimedia asset as provided in the first aspect and any one of its possible designs.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions of the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform a method for playing a multimedia resource as provided in the first aspect and any one of its possible design manners.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, which includes computer instructions, when the computer instructions are run on an electronic device, cause the electronic device to execute the method for playing back a multimedia resource as provided in the first aspect and any one of its possible design manners.
The technical scheme provided by the disclosure at least brings the following beneficial effects: the electronic equipment stores the multimedia resource compression packet in advance, and decompresses the multimedia resource compression packet in advance to obtain a plurality of multimedia resources and stores the multimedia resources in the electronic equipment. Therefore, after receiving the request playing operation of requesting to play the multimedia resource, the electronic equipment can directly determine the target multimedia resource from the stored multimedia resources and play the multimedia resource, and can realize the switching of the short video application program and the playing of the video in an off-line state.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram illustrating a multimedia asset playback system according to an exemplary embodiment;
FIG. 2 is one of the flow diagrams illustrating a method for playing a multimedia asset according to an exemplary embodiment;
FIG. 3 is a second flowchart illustrating a method for playing a multimedia asset according to an exemplary embodiment;
FIG. 4 is a third flowchart illustrating a method for playing a multimedia asset according to an exemplary embodiment;
FIG. 5 is a fourth flowchart illustrating a method for playing a multimedia asset according to an exemplary embodiment;
FIG. 6 is a fifth flowchart illustrating a method for playing a multimedia asset according to an exemplary embodiment;
FIG. 7 is a block diagram illustrating an apparatus for playing a multimedia asset according to an exemplary embodiment;
fig. 8 is a schematic structural diagram of an electronic device according to an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In addition, in the description of the embodiments of the present disclosure, "/" indicates an OR meaning, for example, A/B may indicate A or B, unless otherwise specified. "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present disclosure, "a plurality" means two or more than two.
It should be noted that, the user account information (including but not limited to user account device information, user account personal information, etc.) referred to in the present disclosure is information authorized by the user account or sufficiently authorized by each party.
The playing method of the multimedia resource provided by the embodiment of the disclosure can be applied to a playing system of the multimedia resource. Fig. 1 is a schematic diagram showing a structure of a playing system of the multimedia asset in fig. 1. As shown in fig. 1, a multimedia resource playing system 10 is used to solve the technical problem in the related art that a short video application cannot be used in an offline state. The multimedia asset playing system 10 includes a multimedia asset playing apparatus 11 and an electronic device 12. The playing device 11 of the multimedia resource is connected with the electronic equipment 12. The playing device 11 of the multimedia resource may be connected to the electronic device 12 in a wired manner, or may be connected to the electronic device in a wireless manner, which is not limited in this disclosure.
The electronic device 12 is configured to display a play page of the multimedia resource, and implement switching and playing of the multimedia resource in response to a sliding operation of the user account in the play page or other similar operations.
It should be noted that the multimedia resources related to the embodiment of the present disclosure may specifically include resources such as video, audio, and graphics, and the embodiment of the present disclosure is not specifically limited herein.
In the following description, for convenience of description, the embodiments of the present disclosure are described by taking a multimedia resource as an example.
The playing device 11 of the multimedia resource may be configured to perform data interaction with the electronic device 12, for example, the playing device 11 of the multimedia resource may obtain the multimedia resource from the electronic device 12, and compress the obtained multimedia resource to obtain a multimedia resource compression package. Alternatively, the playing apparatus of the multimedia resource may also decompress the multimedia resource compressed packet to obtain the multimedia resource, and send the multimedia resource to the electronic device 12.
The playing device 11 of the multimedia resource may also execute the playing method of the multimedia resource in the embodiment of the present disclosure, for example, determine a target multimedia resource to be played from a plurality of multimedia resources stored in advance, and send the target multimedia resource to the electronic device 12.
It should be noted that the playing apparatus 11 of the multimedia resource and the electronic device 12 may be independent devices, or may be integrated into the same device, and the present invention is not limited to this.
When the playing device 11 of the multimedia resource and the electronic device 12 are integrated in the same device, the communication mode between the playing device 11 of the multimedia resource and the electronic device 12 is the communication between the internal modules of the device. In this case, the communication flow between the two is the same as the "communication flow between the playback apparatus 11 and the electronic device 12 of the multimedia resource when they are independent of each other".
In the following embodiments provided by the present invention, the present invention is described by taking the example that the playing device 11 of multimedia resources is integrated in the electronic device 12.
In practical applications, the playing method for multimedia resources provided by the embodiment of the present invention can be applied to a playing apparatus for multimedia resources, and can also be applied to an electronic device.
As shown in fig. 2, the playing method of a multimedia resource provided by the embodiment of the present disclosure includes the following steps S201 to S202.
S201, in an off-line state, the electronic equipment responds to a request playing operation for requesting to play the multimedia resources, and determines target multimedia resources to be played from a plurality of prestored multimedia resources according to the request playing operation.
The multimedia resources are obtained by decompressing prestored multimedia resource compression packets.
As a possible implementation manner, in an offline state, the electronic device obtains a plurality of multimedia resources stored in a memory of the electronic device in response to a request play operation of a user account in a play page, and determines a target multimedia resource from the plurality of multimedia resources according to the request play operation.
It should be noted that the request to play operation includes a first operation and a second operation. The first operation is used for requesting to play the previous multimedia resource, and the second operation is used for requesting to play the next multimedia resource. The electronic device may have stored in a memory a plurality of compressed packets of multimedia assets and a plurality of multimedia assets.
The multimedia asset compression packets include uncompressed multimedia asset compression packets and decompressed multimedia asset compression packets. An uncompressing multimedia asset compression packet is a multimedia asset compression packet that is not uncompressed in the electronic device. The decompressed multimedia resource compression packet is a multimedia resource compression packet that has been decompressed in the electronic device. Each multimedia resource compression packet is obtained based on a plurality of continuous preset multimedia resource compression
For example, the first operation may be a slide-up operation and the second operation may be a slide-down operation. The number of the plurality of multimedia resources pre-stored in the electronic device may be 20, the number of the multimedia resource compression packets pre-stored in the electronic device may be 5, and the number of the multimedia resources compressed in each multimedia resource compression packet may be 10.
In the case that the play request operation is the first operation, the target multimedia resource is the last multimedia resource that has been played.
In this case, after acquiring the plurality of multimedia assets, the electronic device determines a last multimedia asset that has been played from the plurality of multimedia assets, and determines the last multimedia asset as the target multimedia asset.
And under the condition that the playing request operation is the second operation, the target multimedia resource is the next multimedia resource which is not played.
In this case, the electronic device determines a next multimedia asset, which has not been played, from among the plurality of multimedia assets after acquiring the plurality of multimedia assets, and determines the next multimedia asset as the target multimedia asset.
In some embodiments, the multimedia assets include video data, comment information, and description information.
The video data is data used for live broadcasting, the comment information includes comments of the multimedia resources from a plurality of user accounts, and the description information includes description information of the multimedia resources, such as author information and video description.
In the practical application process, the process of acquiring the multimedia resource by the electronic device may include: the electronic equipment acquires the video data, the comment information and the description information of each multimedia resource, and combines the acquired video data, the comment information and the plane description information of each multimedia resource to obtain the multimedia resource.
S202, the electronic equipment plays the target multimedia resource.
The technical scheme provided by the embodiment at least has the following beneficial effects: the electronic equipment stores the multimedia resource compression packet in advance, and decompresses the multimedia resource compression packet in advance to obtain a plurality of multimedia resources and stores the multimedia resources in the electronic equipment. Therefore, after receiving a play request operation of a user account requesting to play a multimedia resource, the electronic device can directly determine a target multimedia resource from the stored multimedia resources and play the multimedia resource, and can realize the switching of the short video application program and the playing of the video in an off-line state.
In one design, in order to ensure that the multimedia resource stored in the electronic device can meet the playing requirement of the user account, as shown in fig. 3, the method for playing the multimedia resource provided by the embodiment of the present disclosure further includes the following steps S301 to S305:
s301, in an off-line state, the electronic equipment responds to the request playing operation and determines the number of the plurality of multimedia resources.
As a possible implementation manner, after the electronic device receives a play request operation of a user account in an offline state, the electronic device determines the number of the plurality of multimedia resources stored in the electronic device.
In an actual application process, the sequence of S201 and S301 is not limited in the embodiment of the present disclosure.
S302, the electronic device judges whether the number of the plurality of multimedia resources is smaller than a first threshold value.
It should be noted that the first threshold may be preset in the electronic device by the operation and maintenance personnel in advance.
Illustratively, the first threshold may be 10.
S303, under the condition that the number of the plurality of multimedia resources is smaller than a first threshold value, the electronic equipment determines a target multimedia resource compression packet to be decompressed from the uncompressed multimedia resource compression packets.
As a possible implementation manner, in a case that the number of the plurality of multimedia resources is smaller than the first threshold, the electronic device determines an uncompressing multimedia resource compression packet from the multimedia resource compression packets stored in the electronic device, and determines a target multimedia resource compression packet from the determined uncompressing multimedia resource compression packet.
It should be noted that the target multimedia resource compression packet may be any one of the uncompressed multimedia resource compression packets, or may be a next multimedia resource compression packet of the currently uncompressed multimedia resource compression packet.
Illustratively, 5 compressed multimedia resource packets are stored in the electronic device, wherein the first 2 compressed multimedia resource packets are decompressed compressed multimedia resource packets, and the last 3 compressed multimedia resource packets are uncompressed multimedia resource packets. In this case, the electronic device may convert the 3 rd multimedia asset compression packet into the target multimedia asset compression packet.
It should be noted that, in the above example, the sequence of the multimedia resource compressed packets is the same as the sequence of the plurality of multimedia resources. For example, the 1 st pack of multimedia resources comprises the 1 st to 10 th multimedia resources, the 2 nd pack of multimedia resources comprises the 11 th to 20 th multimedia resources, and the 3 rd pack of multimedia resources comprises the 21 st to 30 th multimedia resources.
In some embodiments, in the case that the number of the plurality of multimedia resources is greater than or equal to the first threshold, the electronic device performs S201 described above.
S304, the electronic equipment decompresses the target multimedia resource compression packet to obtain the multimedia resources in the target multimedia resource compression packet.
As a possible implementation manner, the electronic device decompresses the target multimedia resource compression packet to obtain the multimedia resource in the target multimedia resource compression packet.
Taking the above example as an example, the electronic device decompresses the 3 rd multimedia resource compression packet to obtain the 21 st to 30 th multimedia resources included in the 3 rd multimedia resource compression packet.
S305, the electronic equipment stores the multimedia resources in the target multimedia resource compression package.
The technical scheme provided by the embodiment at least has the following beneficial effects: when the multimedia resource currently cached by the electronic equipment is smaller than the first threshold value, the electronic equipment determines the target multimedia resource compression packet, decompresses the target multimedia resource compression packet to obtain the multimedia resource in the target multimedia resource compression packet, stores the multimedia resource, and can ensure that the video is played after the subsequent switching of the user account.
In one design, as multimedia resources stored in the electronic device are more and more, in order to relieve the cache pressure of the electronic device, as shown in fig. 4, the method for playing the multimedia resources provided in the embodiment of the present disclosure further includes the following steps S401 to S402:
s401, in an off-line state, the electronic equipment responds to the request for playing operation and determines a target played multimedia resource from the played multimedia resources.
The difference value between the playing sequence of the played target multimedia resource and the playing sequence of the target multimedia resource is a preset value.
As a possible implementation manner, after receiving the request play operation of the user account and determining the target multimedia resource, the electronic device determines the played multimedia resource stored in the electronic device, and determines the target played multimedia resource from the determined played multimedia resources based on the play order of the played multimedia resource and the play order of the target multimedia resource.
It should be noted that the preset value may be preset in the electronic device by the operation and maintenance staff.
For example, the preset value may be 9. With reference to the above example, the electronic device currently stores 20 multimedia resources, and after the user account performs the play request operation, the electronic device determines that 10 played multimedia resources are included in the currently stored 20 multimedia resources, and the playing order of the target multimedia resource is 10 th. In this case, the electronic device determines that the 1 st played multimedia asset of the 10 played multimedia assets is the target played multimedia asset.
As yet another example, the electronic device determines the played multimedia asset played first (played first) as the target played multimedia asset after determining that the multimedia asset has been played.
S402, the electronic equipment deletes the target played multimedia resource.
Taking the above example as an example, after the electronic device deletes the target played multimedia asset, the user account may look back up a maximum of 9 played multimedia assets through the first operation.
The technical scheme provided by the embodiment at least has the following beneficial effects: after the user account requests to play the video, the target played multimedia resource is determined from the played multimedia resources and the target played multimedia resource is deleted, so that sufficient storage space can be guaranteed to be kept in the electronic equipment. Meanwhile, the difference value between the playing sequence of the played target multimedia resource and the playing sequence of the target multimedia resource is a preset value, so that the situation that a certain amount of played multimedia resources are still stored in the electronic equipment can be ensured, and the requirement of a user account for reviewing short videos can be met.
In one design, in order to satisfy an offline request of a user account when the user account logs in a short video application program for the first time and requests to play a first video in an offline state, as shown in fig. 5, the method for playing a multimedia resource provided in the embodiment of the present disclosure further includes the following steps S501 to S503.
S501, in an off-line state, the electronic device responds to the first request playing operation and determines a target multimedia resource compression packet to be decompressed from the prestored multimedia resource compression packets.
As a possible implementation manner, after receiving a first play request operation of a user account, the electronic device determines, based on a decompression order of the compressed multimedia resource packets, a target compressed multimedia resource packet to be decompressed from the compressed multimedia resource packets.
It should be noted that, when the user account performs the first request play operation in the electronic device, the electronic device stores a plurality of multimedia resource compressed packets, but does not store any multimedia resource. The decompression sequence is the sequence of the decompression of the multimedia resource compressed packet. The decompression sequence is associated with a play sequence of the multimedia asset.
In some embodiments, the target compressed multimedia resource packet may be any one or more compressed multimedia resource packets, may also be a first compressed multimedia resource packet stored in the electronic device, and may also be the first n compressed multimedia resource packets stored in the electronic device. n is a positive integer less than the number of compressed packets of the multimedia resource.
Illustratively, 5 compressed packets of multimedia resources are stored in the electronic device. The 1 st media resource compression packet with the decompression sequence 1 comprises 1 st to 10 th multimedia resources, the 2 nd media resource compression packet with the decompression sequence 2 comprises 11 th to 20 th multimedia resources, the 3 rd media resource compression packet with the decompression sequence 3 comprises 21 rd to 30 th multimedia resources, and so on. In this case, the electronic device may use the 1 st and 2 nd multimedia resource compression packets as the target multimedia compression packet.
S502, the electronic equipment decompresses the target multimedia resource compression packet to obtain the multimedia resources in the target multimedia resource compression packet.
Taking the above example as an example, in the case that the electronic device takes the 1 st and 2 nd compressed packets of the multimedia resource as the compressed packets of the target multimedia resource, the electronic device obtains the 1 st to 10 th multimedia resources and the 11 th to 20 th multimedia resources after decompressing the compressed packets of the target multimedia resource.
S503, the electronic equipment stores the multimedia resources in the target multimedia resource compression package.
The technical scheme provided by the embodiment at least has the following beneficial effects: when a user account logs in a short video application program for the first time in an offline state, the pre-stored target multimedia resource compression packet is decompressed, and multimedia resources in the target multimedia resource compression packet are stored, so that a first playing request of the user account in the offline state is met.
In one design, in order to further ensure that a sufficient storage space is reserved in the electronic device, the method for playing the multimedia resource provided by the embodiment of the present disclosure further includes the following step S601.
S601, after decompressing the target multimedia resource compression packet, the electronic device deletes the target multimedia resource compression packet.
As one possible implementation, the electronic device deletes the target compressed multimedia asset packet from the memory of the electronic device after determining that the target compressed multimedia asset packet has been decompressed.
In some embodiments, this step may be performed after S304 or S502 described above, respectively.
Illustratively, after the electronic device decompresses the 1 st and 2 nd compressed multimedia resource packets, the 1 st and 2 nd compressed multimedia resource packets are deleted.
The technical scheme provided by the embodiment at least has the following beneficial effects: after the target multimedia compression packet is decompressed, the target multimedia resource compression packet is deleted in time, so that sufficient storage space can be further ensured to be reserved in the electronic equipment.
In one design, in order to enable the electronic device to store the compressed multimedia resource package in advance, as shown in fig. 6, the method for playing the multimedia resource provided in the embodiment of the present disclosure further includes the following steps S701 to S703:
s701, in an online state, the electronic equipment acquires a plurality of preset multimedia resources.
And the total playing time of the preset multimedia resources is less than a second threshold value.
As a possible implementation manner, the electronic device may obtain a plurality of preset multimedia resources from the server in an online state.
It should be noted that the second threshold may be set in the electronic device by the operation and maintenance personnel in advance.
In some embodiments, the predetermined multimedia resources may also be a certain number of multimedia resources.
S702, the electronic device compresses a plurality of preset multimedia resources into a plurality of multimedia resource compression packets.
Wherein, each multimedia resource compression packet comprises a preset number of continuous preset multimedia resources.
As a possible implementation manner, the electronic device may compress a plurality of preset multimedia resources into a plurality of multimedia resource compression packets in segments according to the playing order and the preset number.
For example, the electronic device may sequence a plurality of preset multimedia resources according to the playing sequence, compress the 1 st to 10 th multimedia resources into the 1 st multimedia resource compression packet, compress the 11 th to 20 th multimedia resources into the 2 nd multimedia resource compression packet, and so on, until a plurality of multimedia resource compression packets are obtained.
S703, the electronic equipment stores a plurality of multimedia resource compression packets.
The technical scheme provided by the embodiment at least has the following beneficial effects: the acquired preset multimedia resources are compressed into a plurality of multimedia resource compression packets in a segmented manner, so that flexible storage of the multimedia resources and pre-decompression in subsequent sliding switching can be realized.
Fig. 7 is a schematic structural diagram illustrating a playing apparatus of a multimedia asset according to an exemplary embodiment. Referring to fig. 7, the playing apparatus 80 for multimedia resources provided by the embodiment of the present disclosure includes a determining unit 801 and a playing unit 802.
A determining unit 801, configured to determine, in an offline state, a target multimedia resource to be played from a plurality of pre-stored multimedia resources in response to a request to play a multimedia resource. The plurality of multimedia resources are obtained by decompressing pre-stored multimedia resource compression packets.
A playing unit 802, configured to play the target multimedia resource determined by the determining unit 801.
Optionally, as shown in fig. 7, the playing apparatus provided in the embodiment of the present disclosure further includes a storage unit 803.
The determining unit 801 is further configured to, in an offline state, in response to a request for playing operation, determine, in a case that the number of the multiple multimedia resources is smaller than a first threshold, a target multimedia resource compression packet to be decompressed from the uncompressed multimedia resource compression packets, and decompress the target multimedia resource compression packet to obtain the multimedia resources in the target multimedia resource compression packet.
A storage unit 803, configured to store the multimedia resource in the target multimedia resource compression packet.
Optionally, as shown in fig. 7, the playing apparatus provided in the embodiment of the present disclosure further includes a deleting unit 806.
The determining unit 801 is further configured to determine, in an offline state, a target played multimedia resource from the played multimedia resources in response to a request for a playing operation.
A deleting unit 806, configured to delete the target played multimedia asset. The difference value between the playing sequence of the played target multimedia resource and the playing sequence of the target multimedia resource is a preset numerical value.
Optionally, as shown in fig. 7, the playing apparatus provided in the embodiment of the present disclosure further includes a decompression unit 805 and a storage unit 803.
The determining unit 801 is further configured to determine, in an offline state, a target multimedia resource compressed packet to be decompressed from the pre-stored multimedia resource compressed packets in response to a first request for playing.
The decompressing unit 805 is configured to decompress the target multimedia resource compressed packet to obtain the multimedia resource in the target multimedia resource compressed packet.
A storage unit 803, configured to store the multimedia resource in the target multimedia resource compression packet.
Optionally, as shown in fig. 7, the playing apparatus provided in the embodiment of the present disclosure further includes a decompression unit 805 and a deletion unit 806.
A deleting unit 806, configured to delete the target multimedia resource compression packet after the decompressing unit 805 decompresses the target multimedia resource compression packet.
Optionally, as shown in fig. 7, the playing apparatus provided in the embodiment of the present disclosure further includes an obtaining unit 804, a compressing unit 807, and a storing unit 803.
The obtaining unit 804 is configured to obtain a plurality of preset multimedia resources in an online state. The total playing time of the preset multimedia resources is smaller than a second threshold value.
The compressing unit 807 is configured to compress the predetermined multimedia resources into a plurality of compressed multimedia resource packets. Each multimedia resource compression packet includes a preset number of consecutive preset multimedia resources.
A storage unit 803, configured to store a plurality of multimedia resource compression packets.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 8 is a schematic structural diagram of an electronic device provided by the present disclosure. As shown in fig. 8, the electronic device 90 may include at least one processor 901 and a memory 903 for storing processor-executable instructions. Wherein the processor 901 is configured to execute the instructions in the memory 903 to implement the playing method of the multimedia resource in the above embodiments.
Additionally, electronic device 90 may also include a communication bus 902 and at least one communication interface 904.
The processor 901 may be a processor (CPU), a micro-processing unit, an ASIC, or one or more integrated circuits for controlling the execution of programs according to the present disclosure.
Communication bus 902 may include a path that transfers information between the aforementioned components.
Communication interface 904 may be implemented using any device, such as a transceiver, for communicating with other devices or communication networks, such as an ethernet, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), etc.
The memory 903 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these. The memory may be self-contained and connected to the processing unit by a bus. The memory may also be integrated with the processing unit.
The memory 903 is used for storing instructions for executing the disclosed solution, and is controlled by the processor 901 to execute. The processor 901 is configured to execute instructions stored in the memory 903, thereby implementing functions in the disclosed methods.
As an example, in conjunction with fig. 7, the functions implemented by the determination unit 801, the playing unit 802, the storage unit 803, the acquisition unit 804, the decompression unit 805, the deletion unit 806, and the compression unit 807 in the playing apparatus 80 of a multimedia asset are the same as those of the processor 901 in fig. 8.
In particular implementations, processor 901 may include one or more CPUs such as CPU0 and CPU1 in fig. 8 as an example.
In particular implementations, electronic device 90 may include multiple processors, such as processor 901 and processor 907 of FIG. 8, for example, as an example. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In particular implementations, electronic device 90 may also include an output device 905 and an input device 906, as one embodiment. An output device 905, which is in communication with the processor 901, may display information in a variety of ways. For example, the output device 905 may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, a projector (projector), or the like. The input device 906, in communication with the processor 901, may accept input from a user account in a variety of ways. For example, the input device 906 may be a mouse, keyboard, touch screen device, or sensing device, among others.
Those skilled in the art will appreciate that the configuration shown in fig. 8 does not constitute a limitation of the electronic device 90, and may include more or fewer components than those shown, or combine certain components, or employ a different arrangement of components.
In addition, the present disclosure also provides a computer-readable storage medium, wherein when the instructions in the computer-readable storage medium are executed by a processor of the electronic device, the electronic device is enabled to execute the playing method of the multimedia resource provided by the above embodiment.
In addition, the present disclosure also provides a computer program product, which includes computer instructions, when the computer instructions are run on an electronic device, the electronic device is caused to execute the playing method of the multimedia resource provided in the above embodiment.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1.一种多媒体资源的播放方法,其特征在于,包括:1. a method for playing multimedia resources, comprising: 在离线状态下,响应于请求播放多媒体资源的请求播放操作,根据所述请求播放操作,从预先存储的多个多媒体资源中确定待播放的目标多媒体资源;所述多个多媒体资源为通过解压预先存储的多媒体资源压缩包得到的;In the offline state, in response to a request to play a multimedia resource, according to the request to play, the target multimedia resource to be played is determined from a plurality of pre-stored multimedia resources; Obtained from the compressed package of stored multimedia resources; 播放所述目标多媒体资源。Play the target multimedia resource. 2.根据权利要求1所述的多媒体资源的播放方法,其特征在于,所述方法还包括:2. The method for playing multimedia resources according to claim 1, wherein the method further comprises: 在所述离线状态下,响应于所述请求播放操作,在所述多个多媒体资源的数量小于第一阈值的情况下,从未解压的所述多媒体资源压缩包中确定待解压的目标多媒体资源压缩包,并解压所述目标多媒体资源压缩包,以获取所述目标多媒体资源压缩包中的多媒体资源,并存储所述目标多媒体资源压缩包中的多媒体资源。In the offline state, in response to the request to play the operation, if the number of the multiple multimedia resources is less than the first threshold, determine the target multimedia resource to be decompressed from the uncompressed multimedia resource compressed package compressing the package, and decompressing the target multimedia resource compressing package to obtain the multimedia resources in the target multimedia resource compressing package, and storing the multimedia resources in the target multimedia resource compressing package. 3.根据权利要求1所述多媒体资源的播放方法,其特征在于,所述方法还包括:3. The method for playing multimedia resources according to claim 1, wherein the method further comprises: 在所述离线状态下,响应于所述请求播放操作,从已播放多媒体资源中确定目标已播放多媒体资源,并删除所述目标已播放多媒体资源;所述已播放目标多媒体资源的播放序次与所述目标多媒体资源的播放序次的差值为预设数值。In the offline state, in response to the requested playback operation, determine the target played multimedia resources from the played multimedia resources, and delete the target played multimedia resources; the playback order of the played target multimedia resources is the same as that of the played multimedia resources. The difference between the playing sequences of the target multimedia resources is a preset value. 4.根据权利要求1所述的多媒体资源的播放方法,其特征在于,所述方法还包括:4. The method for playing multimedia resources according to claim 1, wherein the method further comprises: 在所述离线状态下,响应于首个请求播放操作,从预先存储的多媒体资源压缩包中确定待解压的目标多媒体资源压缩包;In the offline state, in response to the first request to play the operation, determine the target multimedia resource compressed package to be decompressed from the pre-stored multimedia resource compressed package; 解压所述目标多媒体资源压缩包,以获取所述目标多媒体资源压缩包中的多媒体资源,并存储所述目标多媒体资源压缩包中的多媒体资源。Decompress the target multimedia resource compression package to obtain the multimedia resources in the target multimedia resource compression package, and store the multimedia resources in the target multimedia resource compression package. 5.根据权利要求1-4中任一项所述的多媒体资源的播放方法,其特征在于,所述方法还包括:5. The method for playing multimedia resources according to any one of claims 1-4, wherein the method further comprises: 在解压所述目标多媒体资源压缩包之后,删除所述目标多媒体资源压缩包。After decompressing the target multimedia resource compressed package, delete the target multimedia resource compressed package. 6.根据权利要求1-4中任一项所述的多媒体资源的播放方法,其特征在于,所述方法还包括:6. The method for playing multimedia resources according to any one of claims 1-4, wherein the method further comprises: 在在线状态下,获取多个预设的多媒体资源;In the online state, obtain multiple preset multimedia resources; 将所述多个预设的多媒体资源,压缩为多个所述多媒体资源压缩包,并存储多个所述多媒体资源压缩包;每个所述多媒体资源压缩包包括预设数量个连续的所述预设的多媒体资源;所述多个预设的多媒体资源的总播放时长小于第二阈值。compressing the plurality of preset multimedia resources into a plurality of the multimedia resource compression packages, and storing a plurality of the multimedia resource compression packages; each of the multimedia resource compression packages includes a preset number of consecutive Preset multimedia resources; the total playback duration of the plurality of preset multimedia resources is less than the second threshold. 7.一种多媒体资源的播放装置,其特征在于,包括确定单元以及播放单元;7. A device for playing multimedia resources, comprising a determining unit and a playing unit; 所述确定单元,用于在离线状态下,响应于请求播放多媒体资源的请求播放操作,根据所述请求播放操作,从预先存储的多个多媒体资源中确定待播放的目标多媒体资源;所述多个多媒体资源为通过解压预先存储的多媒体资源压缩包得到的;The determining unit is configured to, in an offline state, in response to a play request operation requesting to play a multimedia resource, determine a target multimedia resource to be played from a plurality of pre-stored multimedia resources according to the play request operation; Each multimedia resource is obtained by decompressing a pre-stored multimedia resource compressed package; 所述播放单元,用于播放所述确定单元确定到的所述目标多媒体资源。The playing unit is configured to play the target multimedia resource determined by the determining unit. 8.一种电子设备,其特征在于,包括:处理器、用于存储所述处理器可执行的指令的存储器;其中,所述处理器被配置为执行指令,以实现所述权利要求1-6中任一项所述的多媒体资源的播放方法。8. An electronic device, comprising: a processor and a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement the claims 1- The method for playing multimedia resources according to any one of 6. 9.一种计算机可读存储介质,其特征在于,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如权利要求1-6中任一项所述的多媒体资源的播放方法。9. A computer-readable storage medium, characterized in that, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of claims 1-6 The playback method of the multimedia resource described in the item. 10.一种计算机程序产品,包括指令,其特征在于,所述计算机程序产品包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-6中任意一项所述的多媒体资源的播放方法。10. A computer program product comprising instructions, characterized in that the computer program product comprises computer instructions that, when the computer instructions are executed on an electronic device, cause the electronic device to perform any one of claims 1-6. A method for playing the multimedia resource.
CN202111314852.4A 2021-11-08 2021-11-08 Multimedia resource playing method, device, equipment and storage medium Pending CN114168762A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111314852.4A CN114168762A (en) 2021-11-08 2021-11-08 Multimedia resource playing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111314852.4A CN114168762A (en) 2021-11-08 2021-11-08 Multimedia resource playing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114168762A true CN114168762A (en) 2022-03-11

Family

ID=80478166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111314852.4A Pending CN114168762A (en) 2021-11-08 2021-11-08 Multimedia resource playing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114168762A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110087603A1 (en) * 2009-10-13 2011-04-14 Google Inc. Cloud based media player and offline media access
US20130238418A1 (en) * 2012-03-12 2013-09-12 Yeshayahu Shai MALCA Method for playing media content on a media player
CN105744341A (en) * 2016-03-16 2016-07-06 青岛海信电器股份有限公司 Offline information releasing method and device
CN112954445A (en) * 2021-03-16 2021-06-11 深圳市迅雷网络技术有限公司 Streaming media file playing method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110087603A1 (en) * 2009-10-13 2011-04-14 Google Inc. Cloud based media player and offline media access
US20130238418A1 (en) * 2012-03-12 2013-09-12 Yeshayahu Shai MALCA Method for playing media content on a media player
CN105744341A (en) * 2016-03-16 2016-07-06 青岛海信电器股份有限公司 Offline information releasing method and device
CN112954445A (en) * 2021-03-16 2021-06-11 深圳市迅雷网络技术有限公司 Streaming media file playing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109068153B (en) Video playing method and device and computer readable storage medium
US12206929B2 (en) Video playing method and apparatus
CN111586164B (en) Sharing, succession and information processing method of remote cloud desktop and electronic equipment
US20230215076A1 (en) Image frame display method, apparatus, device, storage medium, and program product
US9621665B2 (en) Multimedia redirection method, multimedia server, and computer system
US10838691B2 (en) Method and apparatus of audio/video switching
BR112021009629A2 (en) method of processing user interface content, system, and non-transient computer readable media
JP2012195629A (en) Information processor, image transmission program, image transmission method, and image display method
US20130067080A1 (en) Storage and Communication De-Duplication
US20220276993A1 (en) Watermark-based techniques for change-data-capture
CN111093094A (en) Video transcoding method, device and system, electronic equipment and readable storage medium
CN111756847B (en) Method and device for supporting https protocol by website
CN106170968A (en) A kind of data compression storage method, device, and distributed file system
US20140188975A1 (en) Transmission apparatus, transmission method, and program
CN112804312B (en) File uploading method, equipment and computer readable medium
US20160301736A1 (en) Systems and methods for providing remote access to an application
CN114168762A (en) Multimedia resource playing method, device, equipment and storage medium
US20230063599A1 (en) Edge computing network, data transmission method and apparatus, device and storage medium
KR20180102605A (en) Image drawing methods, associated devices and systems
CN110740138A (en) Data transmission method and device
AU2020226900B2 (en) Adaptive retrieval of objects from remote storage
CN113849255B (en) Data processing method, device and storage medium
KR20160056236A (en) Method for providing on-line video platform service and System there-of
KR102467294B1 (en) Apparatus and method for detecting duplicate sound source using parallel computing
CN116320616A (en) Multimedia file processing method and device, electronic equipment and storage medium

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