CN115134637B - Streaming media playing system, method and device, electronic equipment and storage medium - Google Patents

Streaming media playing system, method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115134637B
CN115134637B CN202210763110.8A CN202210763110A CN115134637B CN 115134637 B CN115134637 B CN 115134637B CN 202210763110 A CN202210763110 A CN 202210763110A CN 115134637 B CN115134637 B CN 115134637B
Authority
CN
China
Prior art keywords
media data
streaming media
decryption
terminal
consumption
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
CN202210763110.8A
Other languages
Chinese (zh)
Other versions
CN115134637A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202210763110.8A priority Critical patent/CN115134637B/en
Publication of CN115134637A publication Critical patent/CN115134637A/en
Application granted granted Critical
Publication of CN115134637B publication Critical patent/CN115134637B/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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2387Stream processing in response to a playback request from an end-user, e.g. for trick-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • 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/437Interfacing the upstream path of the transmission network, e.g. for transmitting client requests to a VOD server

Abstract

The embodiment of the disclosure relates to a streaming media playing system, a method, a device, an electronic device and a storage medium, wherein the system comprises a terminal and a server, the terminal is in communication connection with the server, and the method comprises the following steps: the terminal is configured to: sending a target playing request comprising decryption resource information to the server; the server is configured to: determining stream media data matched with the decryption resource information from a stream media data set predetermined for target stream media, wherein the decryption resource consumption of the stream media data in the stream media data set is different, and the decryption resource consumption represents the resource consumption for decrypting the stream media data; returning the determined streaming media data to the terminal; the terminal is further configured to: and playing the target streaming media based on the determined streaming media data. By the scheme, the occurrence probability of the phenomena of blocking, frame dropping, sound distortion and the like of the streaming media played by the terminal can be reduced.

Description

Streaming media playing system, method and device, electronic equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a streaming media playing system, a streaming media playing method, a streaming media playing device, an electronic device and a storage medium.
Background
Currently, protection means for streaming media are mainly implemented by encrypting the streaming media. Specifically, when stream media is generated, encrypting the stream media; before the streaming media is played, it is decrypted.
However, the decryption process often consumes a certain amount of resources, for example, the decryption operation needs to occupy a certain amount of CPU (central processing unit ), and in addition, some decryption processes of streaming media also need to occupy a certain amount of network resources. In general, the decryption process needs to be performed at the terminal, so when the terminal resources are tense, the original streaming media data may not be decrypted in time, thereby causing problems of playing clamping, frame dropping, sound distortion and the like, and seriously affecting the user experience.
Disclosure of Invention
In view of the above, in order to solve some or all of the above technical problems, embodiments of the present disclosure provide a streaming media playing system, a method, an apparatus, an electronic device, and a storage medium.
In a first aspect, an embodiment of the present disclosure provides a streaming media playing system, where the system includes a terminal and a server, where the terminal is communicatively connected to the server, and the system includes:
The terminal is configured to: sending a target playing request comprising decryption resource information to the server, wherein the decryption resource information characterizes the resource amount available for decryption processing by the terminal, and the target playing request is used for requesting to play target streaming media;
the server is configured to: determining stream media data matched with the decryption resource information from a stream media data set predetermined for the target stream media, wherein the decryption resource consumption of the stream media data in the stream media data set is different, and the decryption resource consumption represents the resource consumption for decrypting the stream media data; returning the determined streaming media data to the terminal;
the terminal is further configured to: and playing the target streaming media based on the determined streaming media data.
Optionally, in the system of any embodiment of the present disclosure, at least some of the streaming media data in the streaming media data set corresponds to an encryption algorithm respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
The server is specifically configured to:
determining a sub-set of stream media data with the consumption of decryption resources being less than or equal to the resources represented by the decryption resource information from the set of stream media data;
and determining the stream media data with the largest consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information.
Optionally, in the system of any embodiment of the disclosure, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large and then form an arithmetic progression.
Optionally, in the system of any embodiment of the disclosure, the server is specifically configured to:
if the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
Optionally, in the system of any embodiment of the present disclosure, the streaming media data corresponding to the target decryption resource consumption is unencrypted streaming media data.
Optionally, in the system of any embodiment of the disclosure, the terminal is further configured to:
obtaining decryption resource information according to a preset frequency; and
the terminal is specifically configured to:
and sending the decryption resource information acquired by the terminal last time to the server.
Optionally, in the system of any embodiment of the disclosure, the terminal is specifically configured to:
starting a thread according to a preset frequency;
and acquiring decryption resource information according to the preset frequency by adopting the thread.
Optionally, in the system of any embodiment of the disclosure, the terminal is specifically configured to:
if the determined streaming media data is the streaming media data subjected to encryption processing, playing the streaming media data obtained by carrying out decryption processing on the determined streaming media data; and/or
And playing the determined streaming media data if the determined streaming media data is streaming media data which is not encrypted.
Optionally, in the system of any embodiment of the disclosure, the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
In a second aspect, an embodiment of the present disclosure provides a streaming media playing method, where the method is applied to a terminal, and the method includes:
obtaining decryption resource information, wherein the decryption resource information characterizes the resource quantity available for decryption processing by the terminal;
obtaining stream media data matched with the decryption resource information from a stream media data set predetermined for target stream media, wherein the decryption resource consumption of the stream media data in the stream media data set is different, and the decryption resource consumption represents the resource consumption for decrypting the stream media data;
and playing the target streaming media based on the acquired streaming media data.
Optionally, in the method of any embodiment of the present disclosure, the obtaining, from the set of streaming media data predetermined for the target streaming media, streaming media data that matches the decryption resource information includes:
the decryption resource information is sent to a server, wherein the server is in communication connection with the terminal, and the server is used for determining stream media data matched with the decryption resource information from a stream media data set predetermined for target stream media;
And acquiring stream media data matched with the decryption resource information from the server.
Optionally, in the method of any embodiment of the present disclosure, at least some of the streaming media data in the streaming media data set corresponds to an encryption algorithm respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
the acquired streaming media data is determined by the following steps:
determining a sub-set of stream media data with the consumption of decryption resources being less than or equal to the resources represented by the decryption resource information from the set of stream media data; determining stream media data with the maximum consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information; or alternatively
If the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
Optionally, in the method of any embodiment of the disclosure, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large and then form an arithmetic progression.
Optionally, in a method of any embodiment of the disclosure, the streaming media data corresponding to the target decryption resource consumption is unencrypted streaming media data.
Optionally, in the method of any embodiment of the disclosure, the obtaining decryption resource information includes:
obtaining decryption resource information according to a preset frequency; and
the obtaining the streaming media data matched with the decryption resource information includes:
and acquiring the streaming media data matched with the decryption resource information acquired last time.
Optionally, in the method of any embodiment of the present disclosure, the obtaining decryption resource information according to a preset frequency includes:
starting a thread according to a preset frequency;
and acquiring decryption resource information according to the preset frequency by adopting the thread.
Optionally, in the method of any embodiment of the present disclosure, playing the target streaming media based on the obtained streaming media data includes:
if the obtained streaming media data is the streaming media data subjected to encryption processing, playing the streaming media data obtained by decrypting the determined streaming media data; or alternatively
And playing the determined streaming media data if the acquired streaming media data is streaming media data which is not encrypted.
Optionally, in a method of any embodiment of the disclosure, the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
In a third aspect, an embodiment of the present disclosure provides a method for playing streaming media, where the method is applied to a server, and the method includes:
obtaining a target playing request comprising decryption resource information from a terminal, wherein the terminal is in communication connection with the server, the decryption resource information characterizes the resource amount available for decryption processing by the terminal, and the target playing request is used for requesting to play target streaming media;
determining stream media data matched with the decryption resource information from a stream media data set predetermined for the target stream media, wherein the decryption resource consumption of the stream media data in the stream media data set is different, and the decryption resource consumption represents the resource consumption for decrypting the stream media data;
And returning the determined streaming media data to the terminal so that the terminal plays the target streaming media based on the determined streaming media data.
Optionally, in the method of any embodiment of the present disclosure, at least some of the streaming media data in the streaming media data set corresponds to an encryption algorithm respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
the determining the streaming media data matched with the decryption resource information includes:
determining a sub-set of stream media data with the consumption of decryption resources being less than or equal to the resources represented by the decryption resource information from the set of stream media data;
and determining the stream media data with the largest consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information.
Optionally, in the method of any embodiment of the disclosure, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large and then form an arithmetic progression.
Optionally, in the method of any embodiment of the present disclosure, the determining the streaming media data that matches the decryption resource information includes:
if the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
Optionally, in a method of any embodiment of the disclosure, the streaming media data corresponding to the target decryption resource consumption is unencrypted streaming media data.
Optionally, in a method of any embodiment of the disclosure, the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
In a fourth aspect, an embodiment of the present disclosure provides a streaming media playing device, where the device is disposed in a terminal, the device includes:
A first obtaining unit configured to obtain decryption resource information, where the decryption resource information characterizes a resource amount available for decryption by the terminal;
a second obtaining unit configured to obtain, from a set of streaming media data predetermined for a target streaming media, streaming media data that matches the decryption resource information, wherein the consumption amount of decryption resources of the streaming media data in the set of streaming media data is different, and the consumption amount of decryption resources represents the amount of resources consumed for performing decryption processing on the streaming media data;
and the playing unit is configured to play the target streaming media based on the acquired streaming media data.
Optionally, in the apparatus of any embodiment of the present disclosure, the obtaining, from the set of streaming media data predetermined for the target streaming media, streaming media data that matches the decryption resource information includes:
the decryption resource information is sent to a server, wherein the server is in communication connection with the terminal, and the server is used for determining stream media data matched with the decryption resource information from a stream media data set predetermined for target stream media;
And acquiring stream media data matched with the decryption resource information from the server.
Optionally, in the apparatus of any embodiment of the present disclosure, at least some of the streaming media data in the streaming media data set corresponds to an encryption algorithm respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
the acquired streaming media data is determined by the following steps:
determining a sub-set of stream media data with the consumption of decryption resources being less than or equal to the resources represented by the decryption resource information from the set of stream media data; determining stream media data with the maximum consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information; or alternatively
If the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
Optionally, in the apparatus of any one embodiment of the disclosure, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large and then form an arithmetic progression.
Optionally, in the apparatus of any embodiment of the present disclosure, the streaming media data corresponding to the target decryption resource consumption is unencrypted streaming media data.
Optionally, in the apparatus of any embodiment of the disclosure, the obtaining decryption resource information includes:
obtaining decryption resource information according to a preset frequency; and
the obtaining the streaming media data matched with the decryption resource information includes:
and acquiring the streaming media data matched with the decryption resource information acquired last time.
Optionally, in the apparatus of any embodiment of the present disclosure, the acquiring decryption resource information according to a preset frequency includes:
starting a thread according to a preset frequency;
and acquiring decryption resource information according to the preset frequency by adopting the thread.
Optionally, in the apparatus of any embodiment of the present disclosure, playing the target streaming media based on the obtained streaming media data includes:
if the obtained streaming media data is the streaming media data subjected to encryption processing, playing the streaming media data obtained by decrypting the determined streaming media data; or alternatively
And playing the determined streaming media data if the acquired streaming media data is streaming media data which is not encrypted.
Optionally, in an apparatus of any embodiment of the disclosure, the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
In a fifth aspect, an embodiment of the present disclosure provides a streaming media playing device, where the device is disposed at a server, and the device includes:
a third obtaining unit configured to obtain a target play request including decryption resource information from a terminal, where the terminal is communicatively connected to the server, the decryption resource information characterizes a resource amount available for decryption by the terminal, and the target play request is used for requesting to play a target streaming media;
a determining unit configured to determine, from a set of streaming media data predetermined for the target streaming media, streaming media data that matches the decryption resource information, wherein the amount of consumption of decryption resources of the streaming media data in the set of streaming media data is different, and the amount of consumption of decryption resources characterizes an amount of resources consumed for performing decryption processing on the streaming media data;
And a return unit configured to return the determined streaming media data to the terminal, so that the terminal plays the target streaming media based on the determined streaming media data.
Optionally, in the apparatus of any embodiment of the present disclosure, at least some of the streaming media data in the streaming media data set corresponds to an encryption algorithm respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
the determining the streaming media data matched with the decryption resource information includes:
determining a sub-set of stream media data with the consumption of decryption resources being less than or equal to the resources represented by the decryption resource information from the set of stream media data;
and determining the stream media data with the largest consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information.
Optionally, in the apparatus of any one embodiment of the disclosure, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large and then form an arithmetic progression.
Optionally, in the apparatus of any embodiment of the present disclosure, the determining the streaming media data that matches the decryption resource information includes:
if the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
Optionally, in the apparatus of any embodiment of the present disclosure, the streaming media data corresponding to the target decryption resource consumption is unencrypted streaming media data.
Optionally, in an apparatus of any embodiment of the disclosure, the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
In a sixth aspect, embodiments of the present disclosure provide an electronic device, including:
A memory for storing a computer program;
and a processor, configured to execute the computer program stored in the memory, where the method of any embodiment of the streaming media playing method of the second aspect or the third aspect of the disclosure is implemented when the computer program is executed.
In a seventh aspect, embodiments of the present disclosure provide a computer readable storage medium, which when executed by a processor, implements a method as in any one of the embodiments of the streaming media playing method of the second or third aspect described above.
In an eighth aspect, embodiments of the present disclosure provide a computer program comprising computer readable code which, when run on a device, causes a processor in the device to execute instructions for carrying out the steps of the method as in any of the embodiments of the streaming media playing method of the second or third aspects described above.
The streaming media playing system provided by the embodiment of the disclosure comprises a terminal and a server, wherein the terminal is in communication connection with the server, and the streaming media playing system comprises: the terminal is configured to: sending a target playing request comprising decryption resource information to the server; the server is configured to: determining stream media data matched with the decryption resource information from a stream media data set predetermined for the target stream media, wherein the decryption resource consumption of the stream media data in the stream media data set is different, and the decryption resource consumption represents the resource consumption for decrypting the stream media data; returning the determined streaming media data to the terminal; the terminal is further configured to: and playing the target streaming media based on the determined streaming media data. According to the scheme, the streaming media data matched with the decryption resource information is determined from the streaming media data set predetermined for the target streaming media, so that the occurrence probability of phenomena such as blocking, frame dropping and sound distortion of the streaming media played by the terminal is reduced.
According to the streaming media playing method applied to the terminal, decryption resource information is obtained, wherein the decryption resource information represents the resource amount of the terminal for decryption processing, then streaming media data matched with the decryption resource information is obtained from a streaming media data set predetermined for target streaming media, wherein the decryption resource consumption of the streaming media data in the streaming media data set is different, the decryption resource consumption represents the resource amount of the streaming media data for decryption processing, and then the target streaming media is played based on the obtained streaming media data. According to the scheme, the streaming media data matched with the decryption resource information is acquired from the streaming media data set predetermined for the target streaming media, so that the occurrence probability of phenomena such as blocking, frame dropping and sound distortion of the streaming media played by the terminal is reduced.
According to the streaming media playing method applied to the server side, a target playing request comprising decryption resource information is obtained from a terminal, wherein the terminal is in communication connection with the server side, the decryption resource information represents the resource amount of the terminal for decryption processing, the target playing request is used for requesting to play target streaming media, then streaming media data matched with the decryption resource information is determined from a streaming media data set predetermined for the target streaming media, wherein the decryption resource consumption of the streaming media data in the streaming media data set is different, the decryption resource consumption represents the resource amount consumed by the decryption processing of the streaming media data, and then the determined streaming media data is returned to the terminal, so that the terminal plays the target streaming media based on the determined streaming media data. According to the scheme, the streaming media data matched with the decryption resource information is determined from the streaming media data set predetermined for the target streaming media, so that the occurrence probability of phenomena such as blocking, frame dropping and sound distortion of the streaming media played by the terminal is reduced.
Drawings
Fig. 1 is an interaction schematic diagram of a streaming media playing system according to an embodiment of the present disclosure;
fig. 2 is an interaction schematic diagram of another streaming media playing system according to an embodiment of the present disclosure;
fig. 3 is a flow chart of a streaming media playing method applied to a terminal according to an embodiment of the present disclosure;
fig. 4 is a flow chart of a streaming media playing method applied to a server according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a streaming media playing device provided in a terminal according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a streaming media playing device provided by an embodiment of the present disclosure and disposed at a server;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless it is specifically stated otherwise.
It will be appreciated by those of skill in the art that the terms "first," "second," etc. in embodiments of the present disclosure are used merely to distinguish between different steps, devices, or modules, and do not represent any particular technical meaning nor logical order between them.
It should also be understood that in this embodiment, "plurality" may refer to two or more, and "at least one" may refer to one, two or more.
It should also be appreciated that any component, data, or structure referred to in the presently disclosed embodiments may be generally understood as one or more without explicit limitation or the contrary in the context.
In addition, the term "and/or" in this disclosure is merely an association relationship describing an association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the front and rear association objects are an or relationship.
It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and that the same or similar features may be referred to each other, and for brevity, will not be described in detail.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. For an understanding of the embodiments of the present disclosure, the present disclosure will be described in detail below with reference to the drawings in conjunction with the embodiments. It will be apparent that the described embodiments are some, but not all, of the embodiments of the present disclosure. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
Fig. 1 is an interaction schematic diagram of a streaming media playing system provided by an embodiment of the present disclosure, where, as shown in fig. 1, the system includes a terminal and a server. The terminal is in communication connection with the server. Wherein:
the terminal is configured to: and sending a target playing request comprising the decryption resource information to the server. Wherein the decryption resource information characterizes the amount of resources available to the terminal for decryption processing. The target playing request is used for requesting to play the target streaming media.
The server is configured to: and determining stream media data matched with the decryption resource information from a stream media data set predetermined for the target stream media. Wherein, the consumption of decryption resources of the streaming media data in the streaming media data set is different. The above-described decryption resource consumption amount characterizes the amount of resources consumed for performing decryption processing on streaming media data. And returning the determined streaming media data to the terminal.
The terminal is further configured to: and playing the target streaming media based on the determined streaming media data.
As shown in fig. 1, in step 101, the terminal sends a target play request including decryption resource information to the server.
In this embodiment, the terminal may send a target play request including decryption resource information to the server.
The decryption resource information may represent the amount of resources available to the terminal for decryption.
In some optional implementations of this embodiment, the decryption resource information may be determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
The preset program may include one or more program statements. As an example, the preset program may be an arbitrary program; alternatively, the preset program may be used to obtain at least one of a usage rate of the cpu of the terminal, a remaining running space of the cpu of the terminal, remaining information of the network bandwidth of the terminal, network delay information of the terminal, and network jitter information of the terminal.
The decryption resource information may include at least one item described above, or the decryption resource information may be a result of a weighted sum of at least two items described above, for example.
It can be appreciated that in the above alternative implementation manner, the decryption resource information of the terminal is determined based on at least one item, so that the decryption capability of the terminal can be measured from a plurality of different angles, which is helpful for further reducing the occurrence probability of the phenomena of blocking, frame dropping, sound distortion and the like of the playing stream media of the terminal through the subsequent steps.
Alternatively, the decryption resource information may be core information (such as the number of cores, a core version, etc.) of the terminal.
The target playing request may be used for requesting to play the target streaming media. The target play request may be used to request to play any streaming media. The target streaming media may be streaming media requested to be played by the target play request.
The streaming media (streaming media) may be a technology and process of transmitting data in segments over the internet after compressing or not compressing a series of media data, and transmitting video and audio on the internet in real time for viewing.
In some optional implementations of this embodiment, before the sending, to the server, the target play request including the decryption resource information, the terminal may further acquire the decryption resource information at a preset frequency (for example, acquire the decryption resource information once every fixed time duration). On this basis, the terminal may perform the step 101 in the following manner, so as to send a target play request including decryption resource information to the server side: and sending the decryption resource information acquired by the terminal last time to the server.
It can be understood that in the above alternative implementation manner, by acquiring the decryption resource information according to the preset frequency, compared with the scheme that the decryption resource information is acquired after the target playing request is received, the speed of playing the target streaming media can be improved, and the decryption resource information acquired by the terminal last time is sent to the server, so that the decryption resource information for decrypting the streaming media can be more accurately acquired.
Optionally, the terminal may acquire the decryption resource information after receiving the target playing request.
In some application scenarios in the above alternative implementation manners, the terminal may acquire the decryption resource information according to a preset frequency in the following manner:
first, the thread is started at a preset frequency.
And then, acquiring decryption resource information according to the preset frequency by adopting the thread.
It can be understood that in the above application scenario, the decryption resource information is obtained by starting a new thread, so that the influence of obtaining the decryption resource information on other operations performed by the current terminal can be reduced.
In step 102, the server determines, from among a set of streaming data predetermined for the target streaming, streaming data that matches the decryption resource information.
In this embodiment, the server may determine, from a set of streaming media data predetermined for the target streaming media, streaming media data that matches the decryption resource information.
Wherein, the consumption of decryption resources of the streaming media data in the streaming media data set is different. The above-described decryption resource consumption amount characterizes the amount of resources consumed for performing decryption processing on streaming media data.
In some optional implementations of this embodiment, the server may perform the step 102 in the following manner, so as to determine streaming media data that matches the decryption resource information:
and if the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information.
Wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
The following correspondence may exist between the decryption resource consumption amount and the streaming media data (including the streaming media data for which the target decryption resource consumption amount corresponds to the target decryption resource consumption amount): the decryption resource consumption represents the amount of resources consumed for decrypting the streaming media data corresponding to the decryption resource consumption.
It can be understood that in the above alternative implementation manner, when the amount of resources represented by the decryption resource information is smaller than the target consumption amount of decryption resources, the streaming media data corresponding to the minimum consumption amount of decryption resources of the streaming media data in the streaming media data set can be determined, so that through the subsequent steps, less amount of resources can be consumed in the decryption process, and the playing of the target streaming media can be realized.
In some application scenarios in the above alternative implementation manner, the streaming media data corresponding to the target decryption resource consumption amount is unencrypted streaming media data. That is, the streaming media data corresponding to the target decryption resource consumption is the original streaming media data of the target streaming media data.
It can be understood that under the application scenario, the terminal can realize the playing of the target streaming media without decrypting the streaming media data.
Optionally, the server may also perform the step 102 in the following manner, so as to determine the streaming media data that matches the decryption resource information:
if the decryption resource information includes at least one of usage rate of a central processor of the terminal, remaining operation space of the central processor of the terminal, network bandwidth remaining information of the terminal, network delay information of the terminal, and network jitter information of the terminal, the usage rate of the central processor of the terminal required for decryption, the operation space of the central processor of the terminal required for decryption, network bandwidth information of the terminal required for decryption, network delay information of the terminal required for decryption, and network jitter information of the terminal, which are required for decryption, may be predetermined or predicted for each of the streaming media data in the streaming media data set accordingly, so that the streaming media data with the highest security degree of supporting decryption (i.e., the maximum consumption of decryption resources) by the terminal is used as the streaming media data matched with the above decryption resource information.
As an example, the streaming data that the terminal supports decryption includes streaming data that meets the following conditions:
the utilization rate of the central processing unit of the terminal is larger than that of the central processing unit of the terminal required by decrypting the streaming media data.
The remaining running space of the central processor of the terminal is larger than the running space of the central processor of the terminal required for decryption.
The network bandwidth remaining information of the terminal is larger than the network bandwidth information of the terminal required for decryption.
In step 103, the server returns the determined streaming media data to the terminal.
In this embodiment, the server may return the determined streaming media data to the terminal.
In step 104, the terminal plays the target streaming media based on the determined streaming media data.
In this embodiment, the terminal may play the target streaming media based on the determined streaming media data.
In some optional implementations of this embodiment, the terminal may perform the step 103 in the following manner, so as to play the target streaming media based on the determined streaming media data:
if the determined streaming media data is the streaming media data subjected to encryption processing, playing the streaming media data obtained by carrying out decryption processing on the determined streaming media data; and playing the determined streaming media data if the determined streaming media data is streaming media data which is not encrypted.
Here, the streaming media data may be decrypted using a decryption algorithm of an encryption algorithm corresponding to the determined streaming media data.
It can be appreciated that in the above alternative implementation manner, decryption or direct playing of the streaming media data may be implemented in a corresponding manner according to whether the streaming media data is encrypted.
The streaming media playing system provided by the embodiment of the disclosure comprises a terminal and a server, wherein the terminal is in communication connection with the server, and the streaming media playing system comprises: the terminal is configured to: sending a target playing request comprising decryption resource information to the server; the server is configured to: determining stream media data matched with the decryption resource information from a stream media data set predetermined for the target stream media, wherein the decryption resource consumption of the stream media data in the stream media data set is different, and the decryption resource consumption represents the resource consumption for decrypting the stream media data; returning the determined streaming media data to the terminal; the terminal is further configured to: and playing the target streaming media based on the determined streaming media data. According to the scheme, the streaming media data matched with the decryption resource information is determined from the streaming media data set predetermined for the target streaming media, so that the occurrence probability of phenomena such as blocking, frame dropping and sound distortion of the streaming media played by the terminal is reduced.
Fig. 2 is an interaction schematic diagram of another streaming media playing system according to an embodiment of the present disclosure, where, as shown in fig. 2, the system includes a terminal and a server. The terminal is in communication connection with the server. Wherein:
the terminal is configured to: and sending a target playing request comprising the decryption resource information to the server. Wherein the decryption resource information characterizes the amount of resources available to the terminal for decryption processing. The target playing request is used for requesting to play the target streaming media.
The server is configured to: and determining a stream media data subset with the consumption of decryption resources being less than or equal to the resource quantity represented by the decryption resource information from the stream media data set which is preset for the target stream media. And then, determining the stream media data with the largest decryption resource consumption in the stream media data subset as the stream media data matched with the decryption resource information. Wherein, the consumption of decryption resources of the streaming media data in the streaming media data set is different. The above-described decryption resource consumption amount characterizes the amount of resources consumed for performing decryption processing on streaming media data. And returning the determined streaming media data to the terminal. At least part of the streaming media data in the streaming media data set corresponds to an encryption algorithm respectively. The single stream media data in the at least part of stream media data is encrypted by adopting an encryption algorithm corresponding to the single stream media data. The consumption of decryption resources of the streaming media data is positively correlated with the security of the encryption algorithm.
The terminal is further configured to: and playing the target streaming media based on the determined streaming media data.
As shown in fig. 2, in step 201, the terminal transmits a target play request including decryption resource information to the server.
In this embodiment, the terminal may send a target play request including decryption resource information to the server. The decryption resource information characterizes the resource amount available for decryption processing by the terminal, and the target playing request is used for requesting to play the target streaming media.
In this embodiment, the implementation manner of step 201 may refer to step 101, which is not described herein.
In step 202, the server determines a subset of streaming media data whose consumption of decryption resources is less than or equal to the amount of resources represented by the decryption resource information from a set of streaming media data predetermined for the target streaming media.
In this embodiment, the server may determine, from a set of streaming media data predetermined for the target streaming media, a subset of streaming media data having a consumption of decryption resources less than or equal to a resource amount represented by the decryption resource information.
Wherein, the consumption of decryption resources of the streaming media data in the streaming media data set is different. The above-described decryption resource consumption amount characterizes the amount of resources consumed for performing decryption processing on streaming media data. At least part of the streaming media data in the streaming media data set corresponds to an encryption algorithm respectively. The single stream media data in the at least part of stream media data is encrypted by adopting an encryption algorithm corresponding to the single stream media data. The consumption of decryption resources of the streaming media data is positively correlated with the security of the encryption algorithm.
In some optional implementations of this embodiment, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large, and then form an arithmetic progression.
Here, each encryption algorithm in the preset encryption algorithm set may be used to encrypt the target streaming media, and then decrypt it, and calculate the consumption of decryption resources used for decrypting with each encryption algorithm. And then, selecting a plurality of decryption resource consumption amounts in an arithmetic series from the obtained decryption resource consumption amounts, and respectively corresponding to the streaming media data of the plurality of decryption resource consumption amounts. Therefore, the decryption resource consumption of the selected streaming media data can be arranged in an equal difference sequence from small to large.
It can be understood that in the above alternative implementation manner, the consumption of decryption resources of the streaming media data in the at least part of streaming media data is more uniformly distributed, so that the decryption requirements of each terminal on the streaming media data in different scenes of decryption resource information of the terminal can be met.
In step 203, the server determines the streaming media data with the largest consumption of decryption resources from the subset of streaming media data as the streaming media data matched with the decryption resource information.
In this embodiment, the server may determine, as the streaming media data that matches the decryption resource information, the streaming media data that has the greatest consumption of decryption resources from the subset of streaming media data.
In step 204, the server returns the determined streaming media data to the terminal.
In this embodiment, the server may return the determined streaming media data to the terminal.
In this embodiment, the implementation manner of step 204 may refer to step 103, which is not described herein.
In step 205, the terminal plays the target streaming media based on the determined streaming media data.
In this embodiment, the terminal may play the target streaming media based on the determined streaming media data.
In this embodiment, the implementation manner of step 205 may refer to step 104 described above, and will not be described herein.
According to the streaming media playing system provided by the embodiment of the disclosure, the streaming media data subset with the decryption resource consumption less than or equal to the resource quantity represented by the decryption resource information is determined from the streaming media data set, and then the streaming media data with the maximum decryption resource consumption in the streaming media data subset is determined to be the streaming media data matched with the decryption resource information, so that the most safe streaming media data which can be used for decryption processing by the terminal is screened from the streaming media data set, and the security and fluency of streaming media playing are considered to a greater extent.
As an application scenario of the present embodiment, the present embodiment is exemplarily described below. It should be noted, however, that the embodiments of the present disclosure may have the features described below, but the following description does not limit the scope of the embodiments of the present disclosure.
In this application scenario, the server may encrypt the original streaming media (e.g., target streaming media) file by using encryption algorithms with different intensities (i.e., different security and different consumption of required decryption resources) respectively, so as to obtain a plurality of encrypted streaming media (i.e., streaming media data set predetermined for the target streaming media) files, and the client tests (e.g., acquires with a preset frequency) the decryption resource information of the device where the client is located in real time. When the decryption resource information is abundant, the server returns stream media data encrypted by a high-strength (i.e. high security and high consumption of the required decryption resource) encryption algorithm to the client; otherwise, the streaming media data encrypted by the encryption algorithm with relatively low intensity (i.e. low security and low consumption of required decryption resources) is returned to the client.
Here, the decryption resource metric may be made up of two parts: the time and network delay for the CPU to run the test program. The time the CPU runs the test program refers to the time the CPU spends running the test program mentioned later, and can be used to measure the speed of running the test program. Network latency refers to the time consumed by streaming media from a server to a client. The smaller the sum of the time the CPU runs the test program and the network delay, the more abundant the decryption resources are characterized; the streaming media data which consumes more CPU time and has higher security can be decrypted; otherwise, the streaming media data consuming less CPU and having lower security is decrypted.
Specifically, the server may be hardware or software, which may be responsible for generating streaming media data. The client may be hardware or software, and may be responsible for requesting streaming media data from the server to control video playing.
Here, the general law of encryption algorithms is: the better the security, the more resources are consumed in decryption (i.e., the amount of decryption resources consumed). Therefore, if the decryption resource information of the client for a certain period of time is short, the server returns the streaming media data with less decryption consumption resources to the client; otherwise, the streaming media data with more decryption consumption resources is returned to the client.
In addition, the server encrypts the original streaming media data (for example, the target streaming media) with different encryption algorithms, and stores the encrypted data in the server. When the encryption algorithm is selected, the decryption resource information consumed in decryption needs to be ensured to be different from each other. For example, the consumption may be evenly distributed from low to high. That is, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large and then are arranged in an arithmetic progression.
The client then starts an auxiliary thread at intervals to test the local decryption resource information. Before playing the streaming media, the streaming media data needs to be requested from the server, and the latest decryption resource information test result is carried when the streaming media data is requested.
Then, the server may select an appropriate encrypted streaming media data to send to the client according to the test result (i.e. the decryption resource information).
As an example, N encryption algorithms may be selected first, and the decryption resource consumption amounts of each algorithm are different from each other, for example, the decryption resource consumption amounts are distributed more uniformly from small to large. For example, three encryption algorithms may be selected: RC4 (Rivest Cipher 4) encryption algorithm, chaCha20 encryption algorithm, AES (Advanced Encryption Standard ) encryption algorithm. The security of the three encryption algorithms is from low to high, and the decryption overhead is also from low to high.
Specifically, firstly, the server encrypts the original streaming MEDIA by using N encryption algorithms to obtain N encryption results, and the N encryption results are assumed to be MEDIA respectively 1 、MEDIA 2 、……、MEDIA n . Then, the server stores n+1 (the above N encryption results and MEDIA 0) pieces of streaming MEDIA data in the server. Wherein MEDIA 0 Refers to the original stream media (i.e., the target stream media) that is not encrypted. Then, the client may start an auxiliary thread, and the thread runs a test program at intervals, where the test program is responsible for measuring the decryption resources of the device where the current client is located, and mainly includes the time and network delay of processing the test program by the CPU, and records the last measurement result (i.e. the above decryption resource information). Then, the client requests the streaming media data from the server, and the request (for example, the above-mentioned sending target playing request) needs to carry the last measurement result. Then, based on the measurement result, the server selects the streaming MEDIA with highest security under the condition of meeting the decryption resource k Sending back to the client, if the decryption resources are very tight and cannot meet the decryption of any encryption algorithm, sending back to the MEDIA 0 . Then, if the received streaming MEDIA is MEDIA k The client decrypts the received MEDIA k And restore it to MEDIA 0 Then MEDIA is added 0 Sending to a player for playing; if the received streaming MEDIA is MEDIA 0 And directly sending to the player for playing.
Therefore, in the application scene, the decryption resource information of the playing device where the client is positioned can be measured in real time to select the encrypted streaming media, so that the time for starting playing the streaming media can be improved, namely the time for selecting to play a certain streaming media is shortened, and the time for actually starting playing the streaming media is shortened; and under the condition of not losing the security, the phenomena of streaming media blocking, frame loss and the like which possibly occur are reduced, and the use experience of a user is improved.
Fig. 3 is a flow chart of a streaming media playing method applied to a terminal according to an embodiment of the present disclosure, as shown in fig. 1, where the method specifically includes:
301. and obtaining decryption resource information.
In this embodiment, the terminal may acquire the decryption resource information. Wherein the decryption resource information characterizes the amount of resources available to the terminal for decryption processing.
302. And acquiring the streaming media data matched with the decryption resource information from the streaming media data set predetermined for the target streaming media.
In this embodiment, the terminal may obtain the streaming media data matched with the decryption resource information from a streaming media data set predetermined for the target streaming media.
Wherein the consumption of decryption resources of the streaming media data in the streaming media data set is different, and the consumption of decryption resources represents the consumption of resources for decrypting the streaming media data. The target streaming media may be streaming media that the terminal requests to play.
303. And playing the target streaming media based on the acquired streaming media data.
In this embodiment, the terminal may play the target streaming media based on the acquired streaming media data.
According to the streaming media playing method applied to the terminal, decryption resource information is obtained, wherein the decryption resource information represents the resource amount of the terminal for decryption processing, then streaming media data matched with the decryption resource information is obtained from a streaming media data set predetermined for target streaming media, wherein the decryption resource consumption of the streaming media data in the streaming media data set is different, the decryption resource consumption represents the resource amount of the streaming media data for decryption processing, and then the target streaming media is played based on the obtained streaming media data. According to the scheme, the streaming media data matched with the decryption resource information is acquired from the streaming media data set predetermined for the target streaming media, so that the occurrence probability of phenomena such as blocking, frame dropping and sound distortion of the streaming media played by the terminal is reduced.
In some optional implementations of this embodiment, the terminal may perform the step 302 in a manner that obtains, from a set of streaming data predetermined for the target streaming media, streaming data that matches the decryption resource information:
firstly, the decryption resource information is sent to the server. The server is in communication connection with the terminal, and is configured to determine, from a set of streaming media data predetermined for a target streaming media, streaming media data that matches the decryption resource information.
And then, obtaining the streaming media data matched with the decryption resource information from the server.
In some optional implementations of this embodiment, at least some of the streaming media data in the streaming media data set corresponds to an encryption algorithm. The single stream media data in the at least part of stream media data is encrypted by adopting an encryption algorithm corresponding to the single stream media data. The consumption of decryption resources of the streaming media data is positively correlated with the security of the encryption algorithm. On this basis, the terminal or an electronic device (for example, the server) communicatively connected to the terminal may determine the acquired streaming data in one of the following manners:
In a first mode, from the streaming media data set, determining a streaming media data subset with decryption resource consumption less than or equal to the resource quantity represented by the decryption resource information; and determining the stream media data with the largest consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information.
If the amount of the resources represented by the decryption resource information is smaller than the target consumption amount of the decryption resource, determining the streaming media data corresponding to the target consumption amount of the decryption resource as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
In some application scenarios in the above alternative implementation manner, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large and then form an arithmetic progression.
In some application scenarios in the above alternative implementation manner, the streaming media data corresponding to the target decryption resource consumption amount is unencrypted streaming media data.
In some optional implementations of this embodiment, the terminal may perform the step 301 to obtain the decryption resource information in the following manner: and obtaining decryption resource information according to the preset frequency.
On this basis, the terminal may perform the step 302 in the following manner, so as to obtain streaming media data matched with the decryption resource information: and acquiring the streaming media data matched with the decryption resource information acquired last time.
In some application scenarios in the above alternative implementation manners, the terminal may acquire the decryption resource information according to the preset frequency in the following manner:
first, the thread is started at a preset frequency.
And then, acquiring decryption resource information according to the preset frequency by adopting the thread.
In some optional implementations of this embodiment, the terminal may perform the step 303 in any manner so as to play the target streaming media based on the acquired streaming media data:
in the first mode, if the acquired streaming media data is streaming media data subjected to encryption processing, the streaming media data obtained by decrypting the determined streaming media data is played.
And secondly, if the acquired streaming media data is streaming media data which is not encrypted, playing the determined streaming media data.
In some optional implementations of this embodiment, the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
It should be noted that, in addition to the above, the present embodiment may further include the technical features described in fig. 1 or fig. 2, and produce the technical effects described in fig. 1 or fig. 2, which are not described herein.
Fig. 4 is a flow chart of a streaming media playing method applied to a server, which is provided in an embodiment of the present disclosure, as shown in fig. 4, where the method specifically includes:
401. a target play request including decryption resource information is acquired from the terminal.
In this embodiment, the server may obtain the target play request including the decryption resource information from the terminal.
The terminal is in communication connection with the server. The decryption resource information characterizes the amount of resources available to the terminal for decryption processing. The target playing request is used for requesting to play the target streaming media.
402. And determining stream media data matched with the decryption resource information from a stream media data set predetermined for the target stream media.
In this embodiment, the server may determine, from a set of streaming media data predetermined for the target streaming media, streaming media data that matches the decryption resource information.
Wherein, the consumption of decryption resources of the streaming media data in the streaming media data set is different. The above-described decryption resource consumption amount characterizes the amount of resources consumed for performing decryption processing on streaming media data.
403. And returning the determined streaming media data to the terminal so that the terminal plays the target streaming media based on the determined streaming media data.
In this embodiment, the server may return the determined streaming media data to the terminal, so that the terminal plays the target streaming media based on the determined streaming media data.
According to the streaming media playing method applied to the server side, a target playing request comprising decryption resource information is obtained from a terminal, wherein the terminal is in communication connection with the server side, the decryption resource information represents the resource amount of the terminal for decryption processing, the target playing request is used for requesting to play target streaming media, then streaming media data matched with the decryption resource information is determined from a streaming media data set predetermined for the target streaming media, wherein the decryption resource consumption of the streaming media data in the streaming media data set is different, the decryption resource consumption represents the resource amount consumed by the decryption processing of the streaming media data, and then the determined streaming media data is returned to the terminal, so that the terminal plays the target streaming media based on the determined streaming media data. According to the scheme, the streaming media data matched with the decryption resource information is determined from the streaming media data set predetermined for the target streaming media, so that the occurrence probability of phenomena such as blocking, frame dropping and sound distortion of the streaming media played by the terminal is reduced.
In some optional implementations of this embodiment, at least some of the streaming media data in the streaming media data set corresponds to an encryption algorithm. The single stream media data in the at least part of stream media data is encrypted by adopting an encryption algorithm corresponding to the single stream media data. The consumption of decryption resources of the streaming media data is positively correlated with the security of the encryption algorithm. On this basis, the server may perform the step 402 in the following manner, so as to determine streaming media data that matches the decryption resource information:
first, a subset of stream media data whose consumption of decryption resources is less than or equal to the amount of resources represented by the decryption resource information is determined from the set of stream media data.
And then, determining the stream media data with the largest decryption resource consumption in the stream media data subset as the stream media data matched with the decryption resource information.
In some application scenarios in the above alternative implementation manner, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large and then form an arithmetic progression.
In some optional implementations of this embodiment, the server may perform the step 402 in the following manner, so as to determine streaming media data that matches the decryption resource information:
and if the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information.
Wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
In some application scenarios in the above alternative implementation manner, the streaming media data corresponding to the target decryption resource consumption amount is unencrypted streaming media data.
In some optional implementations of this embodiment, the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
It should be noted that, in addition to the above, the present embodiment may further include the technical features described in fig. 1 or fig. 2, and produce the technical effects described in fig. 1 or fig. 2, which are not described herein.
Fig. 5 is a schematic structural diagram of a streaming media playing device provided in a terminal according to an embodiment of the present disclosure, which specifically includes:
a first obtaining unit 501 configured to obtain decryption resource information, where the decryption resource information characterizes an amount of resources available to the terminal for decryption processing;
a second obtaining unit 502 configured to obtain, from a set of streaming media data predetermined for a target streaming media, streaming media data that matches the decryption resource information, where the consumption amount of decryption resources of the streaming media data in the set of streaming media data is different, and the consumption amount of decryption resources represents the amount of resources consumed for performing decryption processing on the streaming media data;
a playing unit 503 configured to play the target streaming media based on the acquired streaming media data.
In some optional implementations of this embodiment, the obtaining, from the set of streaming media data predetermined for the target streaming media, streaming media data that matches the decryption resource information includes:
The decryption resource information is sent to a server, wherein the server is in communication connection with the terminal, and the server is used for determining stream media data matched with the decryption resource information from a stream media data set predetermined for target stream media;
and acquiring stream media data matched with the decryption resource information from the server.
In some optional implementations of this embodiment, at least some of the streaming media data in the streaming media data set corresponds to an encryption algorithm, respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
the acquired streaming media data is determined by the following steps:
determining a sub-set of stream media data with the consumption of decryption resources being less than or equal to the resources represented by the decryption resource information from the set of stream media data; determining stream media data with the maximum consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information; or alternatively
If the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
In some optional implementations of this embodiment, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large, and then form an arithmetic progression.
In some optional implementations of this embodiment, the streaming media data corresponding to the target decryption resource consumption is unencrypted streaming media data.
In some optional implementations of this embodiment, the obtaining decryption resource information includes:
obtaining decryption resource information according to a preset frequency; and
the obtaining the streaming media data matched with the decryption resource information includes:
and acquiring the streaming media data matched with the decryption resource information acquired last time.
In some optional implementations of this embodiment, the obtaining decryption resource information according to the preset frequency includes:
Starting a thread according to a preset frequency;
and acquiring decryption resource information according to the preset frequency by adopting the thread.
In some optional implementations of this embodiment, playing the target streaming media based on the obtained streaming media data includes:
if the obtained streaming media data is the streaming media data subjected to encryption processing, playing the streaming media data obtained by decrypting the determined streaming media data; or alternatively
And playing the determined streaming media data if the acquired streaming media data is streaming media data which is not encrypted.
In some optional implementations of this embodiment, the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
The streaming media playing device provided in this embodiment may be a streaming media playing device as shown in fig. 5, and may perform all steps of the streaming media playing method as shown in fig. 3, so as to achieve the technical effects of the streaming media playing method as shown in fig. 3, and the description thereof will be specifically referred to fig. 3, and is omitted herein for brevity.
Fig. 6 is a schematic structural diagram of a streaming media playing device provided at a server according to an embodiment of the present disclosure, which specifically includes:
a third obtaining unit 601, configured to obtain a target play request including decryption resource information from a terminal, where the terminal is communicatively connected to the server, the decryption resource information characterizes a resource amount available for decryption by the terminal, and the target play request is used for requesting to play a target streaming media;
a determining unit 602 configured to determine, from a set of streaming media data predetermined for the target streaming media, streaming media data that matches the decryption resource information, wherein the amounts of consumption of decryption resources of the streaming media data in the set of streaming media data are different, and the amounts of consumption of decryption resources characterize the amounts of resources consumed for decrypting the streaming media data;
and a returning unit 603 configured to return the determined streaming media data to the terminal, so that the terminal plays the target streaming media based on the determined streaming media data.
In some optional implementations of this embodiment, at least some of the streaming media data in the streaming media data set corresponds to an encryption algorithm, respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
The determining the streaming media data matched with the decryption resource information includes:
determining a sub-set of stream media data with the consumption of decryption resources being less than or equal to the resources represented by the decryption resource information from the set of stream media data;
and determining the stream media data with the largest consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information.
In some optional implementations of this embodiment, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large, and then form an arithmetic progression.
In some optional implementations of this embodiment, the determining the streaming media data that matches the decryption resource information includes:
if the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
In some optional implementations of this embodiment, the streaming media data corresponding to the target decryption resource consumption is unencrypted streaming media data.
In some optional implementations of this embodiment, the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
The streaming media playing device provided in this embodiment may be a streaming media playing device as shown in fig. 6, and may perform all steps of the streaming media playing method as shown in fig. 4, so as to achieve the technical effects of the streaming media playing method as shown in fig. 4, and the description thereof will be specifically referred to fig. 4, and is omitted herein for brevity.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, and an electronic device 700 shown in fig. 7 includes: at least one processor 701, memory 702, at least one network interface 704, and other user interfaces 703. The various components in the electronic device 700 are coupled together by a bus system 705. It is appreciated that the bus system 705 is used to enable connected communications between these components. The bus system 705 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration, the various buses are labeled as bus system 705 in fig. 7.
The user interface 703 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, a trackball, a touch pad, or a touch screen, etc.).
It is to be appreciated that the memory 702 in embodiments of the present disclosure may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (Double Data Rate SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct memory bus RAM (DRRAM). The memory 702 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some implementations, the memory 702 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 7021 and application programs 7022.
The operating system 7021 contains various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application programs 7022 include various application programs such as a Media Player (Media Player), a Browser (Browser), and the like for realizing various application services. A program implementing the method of the embodiment of the present disclosure may be contained in the application program 7022.
In this embodiment, the processor 701 is configured to execute the method steps provided in the method embodiments by calling a program or an instruction stored in the memory 702, specifically, a program or an instruction stored in the application program 7022.
As an example, it may include:
obtaining decryption resource information, wherein the decryption resource information characterizes the resource quantity available for decryption processing by the terminal;
obtaining stream media data matched with the decryption resource information from a stream media data set predetermined for target stream media, wherein the decryption resource consumption of the stream media data in the stream media data set is different, and the decryption resource consumption represents the resource consumption for decrypting the stream media data;
And playing the target streaming media based on the acquired streaming media data.
In some optional implementations of this embodiment, the obtaining, from the set of streaming media data predetermined for the target streaming media, streaming media data that matches the decryption resource information includes:
the decryption resource information is sent to a server, wherein the server is in communication connection with the terminal, and the server is used for determining stream media data matched with the decryption resource information from a stream media data set predetermined for target stream media;
and acquiring stream media data matched with the decryption resource information from the server.
In some optional implementations of this embodiment, at least some of the streaming media data in the streaming media data set corresponds to an encryption algorithm, respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
the acquired streaming media data is determined by the following steps:
Determining a sub-set of stream media data with the consumption of decryption resources being less than or equal to the resources represented by the decryption resource information from the set of stream media data; determining stream media data with the maximum consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information; or alternatively
If the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
In some optional implementations of this embodiment, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large, and then form an arithmetic progression.
In some optional implementations of this embodiment, the streaming media data corresponding to the target decryption resource consumption is unencrypted streaming media data.
In some optional implementations of this embodiment, the obtaining decryption resource information includes:
Obtaining decryption resource information according to a preset frequency; and
the obtaining the streaming media data matched with the decryption resource information includes:
and acquiring the streaming media data matched with the decryption resource information acquired last time.
In some optional implementations of this embodiment, the obtaining decryption resource information according to the preset frequency includes:
starting a thread according to a preset frequency;
and acquiring decryption resource information according to the preset frequency by adopting the thread.
In some optional implementations of this embodiment, playing the target streaming media based on the obtained streaming media data includes:
if the obtained streaming media data is the streaming media data subjected to encryption processing, playing the streaming media data obtained by decrypting the determined streaming media data; or alternatively
And playing the determined streaming media data if the acquired streaming media data is streaming media data which is not encrypted.
In some optional implementations of this embodiment, the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
Or, as yet another example, it may also include:
obtaining a target playing request comprising decryption resource information from a terminal, wherein the terminal is in communication connection with the server, the decryption resource information characterizes the resource amount available for decryption processing by the terminal, and the target playing request is used for requesting to play target streaming media;
determining stream media data matched with the decryption resource information from a stream media data set predetermined for the target stream media, wherein the decryption resource consumption of the stream media data in the stream media data set is different, and the decryption resource consumption represents the resource consumption for decrypting the stream media data;
and returning the determined streaming media data to the terminal so that the terminal plays the target streaming media based on the determined streaming media data.
In some optional implementations of this embodiment, at least some of the streaming media data in the streaming media data set corresponds to an encryption algorithm, respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
The determining the streaming media data matched with the decryption resource information includes:
determining a sub-set of stream media data with the consumption of decryption resources being less than or equal to the resources represented by the decryption resource information from the set of stream media data;
and determining the stream media data with the largest consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information.
In some optional implementations of this embodiment, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large, and then form an arithmetic progression.
In some optional implementations of this embodiment, the determining the streaming media data that matches the decryption resource information includes:
if the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
In some optional implementations of this embodiment, the streaming media data corresponding to the target decryption resource consumption is unencrypted streaming media data.
In some optional implementations of this embodiment, the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
The methods disclosed in the embodiments of the present disclosure may be applied to the processor 701 or implemented by the processor 701. The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 701 or by instructions in the form of software. The processor 701 described above may be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps and logic blocks of the disclosure in the embodiments of the disclosure may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present disclosure may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software elements in a decoded processor. The software elements may be located in a random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 702, and the processor 701 reads information in the memory 702 and performs the steps of the method in combination with its hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing units may be implemented within one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (dspev, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above functions of the disclosure, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The electronic device provided in this embodiment may be an electronic device as shown in fig. 7, and may perform all steps of the streaming media playing method shown in fig. 2 and 3, so as to achieve the technical effects of the streaming media playing method shown in fig. 2 and 3, and the detailed description will be omitted herein for brevity.
The disclosed embodiments also provide a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. Wherein the storage medium may comprise volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid state disk; the memory may also comprise a combination of the above types of memories.
When one or more programs in the storage medium are executable by one or more processors, the streaming media playing method executed on the electronic device side is implemented.
The above processor is configured to execute a streaming media playing program stored in the memory, so as to implement the following steps of a streaming media playing method executed on the electronic device side.
As an example, it may include:
obtaining decryption resource information, wherein the decryption resource information characterizes the resource quantity available for decryption processing by the terminal;
obtaining stream media data matched with the decryption resource information from a stream media data set predetermined for target stream media, wherein the decryption resource consumption of the stream media data in the stream media data set is different, and the decryption resource consumption represents the resource consumption for decrypting the stream media data;
And playing the target streaming media based on the acquired streaming media data.
In some optional implementations of this embodiment, the obtaining, from the set of streaming media data predetermined for the target streaming media, streaming media data that matches the decryption resource information includes:
the decryption resource information is sent to a server, wherein the server is in communication connection with the terminal, and the server is used for determining stream media data matched with the decryption resource information from a stream media data set predetermined for target stream media;
and acquiring stream media data matched with the decryption resource information from the server.
In some optional implementations of this embodiment, at least some of the streaming media data in the streaming media data set corresponds to an encryption algorithm, respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
the acquired streaming media data is determined by the following steps:
Determining a sub-set of stream media data with the consumption of decryption resources being less than or equal to the resources represented by the decryption resource information from the set of stream media data; determining stream media data with the maximum consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information; or alternatively
If the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
In some optional implementations of this embodiment, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large, and then form an arithmetic progression.
In some optional implementations of this embodiment, the streaming media data corresponding to the target decryption resource consumption is unencrypted streaming media data.
In some optional implementations of this embodiment, the obtaining decryption resource information includes:
Obtaining decryption resource information according to a preset frequency; and
the obtaining the streaming media data matched with the decryption resource information includes:
and acquiring the streaming media data matched with the decryption resource information acquired last time.
In some optional implementations of this embodiment, the obtaining decryption resource information according to the preset frequency includes:
starting a thread according to a preset frequency;
and acquiring decryption resource information according to the preset frequency by adopting the thread.
In some optional implementations of this embodiment, playing the target streaming media based on the obtained streaming media data includes:
if the obtained streaming media data is the streaming media data subjected to encryption processing, playing the streaming media data obtained by decrypting the determined streaming media data; or alternatively
And playing the determined streaming media data if the acquired streaming media data is streaming media data which is not encrypted.
In some optional implementations of this embodiment, the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
Or, as yet another example, it may also include:
obtaining a target playing request comprising decryption resource information from a terminal, wherein the terminal is in communication connection with the server, the decryption resource information characterizes the resource amount available for decryption processing by the terminal, and the target playing request is used for requesting to play target streaming media;
determining stream media data matched with the decryption resource information from a stream media data set predetermined for the target stream media, wherein the decryption resource consumption of the stream media data in the stream media data set is different, and the decryption resource consumption represents the resource consumption for decrypting the stream media data;
and returning the determined streaming media data to the terminal so that the terminal plays the target streaming media based on the determined streaming media data.
In some optional implementations of this embodiment, at least some of the streaming media data in the streaming media data set corresponds to an encryption algorithm, respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
The determining the streaming media data matched with the decryption resource information includes:
determining a sub-set of stream media data with the consumption of decryption resources being less than or equal to the resources represented by the decryption resource information from the set of stream media data;
and determining the stream media data with the largest consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information.
In some optional implementations of this embodiment, the decryption resource consumption amounts of the streaming media data in the at least part of streaming media data are arranged in order from small to large, and then form an arithmetic progression.
In some optional implementations of this embodiment, the determining the streaming media data that matches the decryption resource information includes:
if the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: the minimum decryption resource consumption of the streaming media data in the streaming media data set.
In some optional implementations of this embodiment, the streaming media data corresponding to the target decryption resource consumption is unencrypted streaming media data.
In some optional implementations of this embodiment, the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of function in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. 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 disclosure.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
While the foregoing embodiments have been described in some detail for purposes of clarity of understanding, it will be understood that the above description is by way of example only and is not intended to limit the scope of the disclosure, and that any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the disclosure are intended to be included within the scope of the disclosure.

Claims (25)

1. The stream media playing system is characterized by comprising a terminal and a server, wherein the terminal is in communication connection with the server, and the stream media playing system comprises:
the terminal is configured to: sending a target playing request comprising decryption resource information to the server, wherein the decryption resource information characterizes the resource amount available for decryption processing by the terminal, and the target playing request is used for requesting to play target streaming media;
The server is configured to: determining stream media data matched with the decryption resource information from a stream media data set predetermined for the target stream media, wherein the decryption resource consumption of the stream media data in the stream media data set is different, and the decryption resource consumption represents the resource consumption for decrypting the stream media data; returning the determined streaming media data to the terminal;
the terminal is further configured to: playing the target streaming media based on the determined streaming media data;
wherein, the consumption of decryption resources of the streaming media data in at least part of the streaming media data is arranged in order from small to large to form an arithmetic array, and the streaming media data with the consumption of decryption resources in the arithmetic array is obtained by adopting the following modes:
encrypting the target streaming media by adopting each encryption algorithm in a preset encryption algorithm set;
decrypting the encrypted target streaming media data, and calculating the consumption of decryption resources used for decrypting by adopting each encryption algorithm;
selecting a plurality of decryption resource consumption amounts in an arithmetic series from the obtained decryption resource consumption amounts;
Determining the selected streaming media data corresponding to the decryption resource consumption as streaming media data with the decryption resource consumption in an arithmetic series;
the metrics of the decryption resources represented by the decryption resource information include: the time of the CPU running the test program and the network delay are the time consumed by the CPU running the test program, and the network delay is the time consumed by streaming media from the server to the terminal.
2. The system of claim 1, wherein at least some of the streaming media data in the set of streaming media data corresponds to an encryption algorithm, respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
the server is specifically configured to:
determining a sub-set of stream media data with decryption resource consumption less than or equal to the resource quantity represented by the decryption resource information from the set of stream media data;
and determining the stream media data with the largest consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information.
3. The system of claim 1, wherein the server is specifically configured to:
if the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: and the minimum decryption resource consumption of the streaming media data in the streaming media data set.
4. The system of claim 3, wherein the streaming media data corresponding to the target decryption resource consumption is unencrypted streaming media data.
5. The system of claim 1, wherein the terminal is further configured to:
obtaining decryption resource information according to a preset frequency; and
the terminal is specifically configured to:
and sending the decryption resource information acquired by the terminal last time to the server.
6. The system according to claim 5, characterized in that the terminal is specifically configured to:
starting a thread according to a preset frequency;
and acquiring decryption resource information according to the preset frequency by adopting the thread.
7. The system according to one of claims 1 to 6, characterized in that the terminal is specifically configured to:
if the determined streaming media data is the streaming media data subjected to encryption processing, playing the streaming media data obtained by carrying out decryption processing on the determined streaming media data; and/or
And playing the determined streaming media data if the determined streaming media data is streaming media data which is not encrypted.
8. The system according to one of claims 1-6, wherein the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
9. A streaming media playing method, wherein the method is applied to a terminal, the method comprising:
obtaining decryption resource information, wherein the decryption resource information characterizes the resource quantity available for decryption processing by the terminal;
obtaining stream media data matched with the decryption resource information from a stream media data set predetermined for target stream media, wherein the consumption of the decryption resource of the stream media data in the stream media data set is different, and the consumption of the decryption resource represents the consumption of the resources for decrypting the stream media data;
Playing the target streaming media based on the acquired streaming media data;
wherein, the consumption of decryption resources of the streaming media data in at least part of the streaming media data is arranged in order from small to large to form an arithmetic array, and the streaming media data with the consumption of decryption resources in the arithmetic array is obtained by adopting the following modes:
encrypting the target streaming media by adopting each encryption algorithm in a preset encryption algorithm set;
decrypting the encrypted target streaming media data, and calculating the consumption of decryption resources used for decrypting by adopting each encryption algorithm;
selecting a plurality of decryption resource consumption amounts in an arithmetic series from the obtained decryption resource consumption amounts;
determining the stream media data corresponding to the selected decryption resource consumption as stream media numbers with the decryption resource consumption in an arithmetic series;
the metrics of the decryption resources represented by the decryption resource information include: the time of the CPU running the test program and the network delay are the time consumed by the CPU running the test program, and the network delay is the time consumed by streaming media from the server to the terminal.
10. The method according to claim 9, wherein the obtaining streaming data matching the decryption resource information from a set of streaming data predetermined for the target streaming comprises:
the decryption resource information is sent to a server, wherein the server is in communication connection with the terminal, and the server is used for determining stream media data matched with the decryption resource information from a stream media data set predetermined for target stream media;
and acquiring stream media data matched with the decryption resource information from the server.
11. The method according to claim 9, wherein at least some of the streaming media data in the set of streaming media data corresponds to an encryption algorithm, respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
the acquired streaming media data is determined by the following steps:
determining a sub-set of stream media data with decryption resource consumption less than or equal to the resource quantity represented by the decryption resource information from the set of stream media data; determining stream media data with the maximum consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information; or alternatively
If the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: and the minimum decryption resource consumption of the streaming media data in the streaming media data set.
12. The method of claim 11, wherein the stream media data corresponding to the target decryption resource consumption is unencrypted stream media data.
13. The method of claim 9, wherein the obtaining decryption resource information comprises:
obtaining decryption resource information according to a preset frequency; and
the obtaining the streaming media data matched with the decryption resource information comprises the following steps:
and acquiring the streaming media data matched with the decryption resource information acquired last time.
14. The method of claim 13, wherein the obtaining decryption resource information at a preset frequency comprises:
starting a thread according to a preset frequency;
and acquiring decryption resource information according to the preset frequency by adopting the thread.
15. The method according to one of claims 9 to 14, wherein playing the target streaming media based on the acquired streaming media data comprises:
if the obtained streaming media data is the streaming media data subjected to encryption processing, playing the streaming media data obtained by decrypting the determined streaming media data; or alternatively
And playing the determined streaming media data if the acquired streaming media data is streaming media data which is not encrypted.
16. The method according to one of claims 9-14, wherein the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
17. A streaming media playing method, wherein the method is applied to a server, the method comprising:
obtaining a target playing request comprising decryption resource information from a terminal, wherein the terminal is in communication connection with the server, the decryption resource information characterizes the resource amount available for decryption processing by the terminal, and the target playing request is used for requesting to play target streaming media;
Determining stream media data matched with the decryption resource information from a stream media data set predetermined for the target stream media, wherein the decryption resource consumption of the stream media data in the stream media data set is different, and the decryption resource consumption represents the resource consumption for decrypting the stream media data;
returning the determined streaming media data to the terminal so that the terminal plays the target streaming media based on the determined streaming media data;
wherein, the consumption of decryption resources of the streaming media data in at least part of the streaming media data is arranged in order from small to large to form an arithmetic array, and the streaming media data with the consumption of decryption resources in the arithmetic array is obtained by adopting the following modes:
encrypting the target streaming media by adopting each encryption algorithm in a preset encryption algorithm set;
decrypting the encrypted target streaming media data, and calculating the consumption of decryption resources used for decrypting by adopting each encryption algorithm;
selecting a plurality of decryption resource consumption amounts in an arithmetic series from the obtained decryption resource consumption amounts;
determining the stream media data corresponding to the selected decryption resource consumption as stream media numbers with the decryption resource consumption in an arithmetic series;
The metrics of the decryption resources represented by the decryption resource information include: the time of the CPU running the test program and the network delay are the time consumed by the CPU running the test program, and the network delay is the time consumed by streaming media from the server to the terminal.
18. The method of claim 17, wherein at least some of the streaming media data in the set of streaming media data corresponds to an encryption algorithm, respectively; the single streaming media data in the at least partial streaming media data is generated by encrypting the single streaming media data by adopting an encryption algorithm corresponding to the single streaming media data; the consumption of decryption resources of the streaming media data is positively correlated with the security of an encryption algorithm; and
the determining streaming media data matched with the decryption resource information comprises the following steps:
determining a sub-set of stream media data with decryption resource consumption less than or equal to the resource quantity represented by the decryption resource information from the set of stream media data;
and determining the stream media data with the largest consumption of decryption resources in the stream media data subset as stream media data matched with the decryption resource information.
19. The method of claim 17, wherein said determining streaming media data that matches said decryption resource information comprises:
if the resource quantity represented by the decryption resource information is smaller than the target decryption resource consumption quantity, determining the streaming media data corresponding to the target decryption resource consumption quantity as the streaming media data matched with the decryption resource information; wherein the target decryption resource consumption is: and the minimum decryption resource consumption of the streaming media data in the streaming media data set.
20. The method of claim 19, wherein the stream media data corresponding to the target decryption resource consumption is unencrypted stream media data.
21. The method according to one of claims 17-20, wherein the decryption resource information is determined based on at least one of:
the method comprises the steps of running a preset program at the terminal, using rate of a central processing unit of the terminal, residual running space of the central processing unit of the terminal, residual information of network bandwidth of the terminal, network delay information of the terminal and network jitter information of the terminal.
22. A streaming media playing device, wherein the device is disposed at a terminal, the device comprising:
a first acquisition unit configured to acquire decryption resource information, wherein the decryption resource information characterizes a resource amount available for decryption processing by the terminal;
a second obtaining unit configured to obtain, from a set of streaming media data predetermined for a target streaming media, streaming media data that matches the decryption resource information, wherein the consumption amount of decryption resources of the streaming media data in the set of streaming media data is different, and the consumption amount of decryption resources represents the amount of resources consumed for performing decryption processing on the streaming media data;
a playing unit configured to play the target streaming media based on the acquired streaming media data;
wherein, the consumption of decryption resources of the streaming media data in at least part of the streaming media data is arranged in order from small to large to form an arithmetic array, and the streaming media data with the consumption of decryption resources in the arithmetic array is obtained by adopting the following modes:
encrypting the target streaming media by adopting each encryption algorithm in a preset encryption algorithm set;
decrypting the encrypted target streaming media data, and calculating the consumption of decryption resources used for decrypting by adopting each encryption algorithm;
Selecting a plurality of decryption resource consumption amounts in an arithmetic series from the obtained decryption resource consumption amounts;
determining the stream media data corresponding to the selected decryption resource consumption as stream media numbers with the decryption resource consumption in an arithmetic series;
the metrics of the decryption resources represented by the decryption resource information include: the time of the CPU running the test program and the network delay are the time consumed by the CPU running the test program, and the network delay is the time consumed by streaming media from the server to the terminal.
23. A streaming media playing device, wherein the device is disposed at a server, the device comprising:
a third obtaining unit, configured to obtain a target play request including decryption resource information from a terminal, where the terminal is in communication connection with the server, the decryption resource information characterizes a resource amount available for decryption processing by the terminal, and the target play request is used for requesting to play a target streaming media;
a determining unit configured to determine, from a set of streaming media data predetermined for the target streaming media, streaming media data that matches the decryption resource information, wherein the amounts of consumption of decryption resources of the streaming media data in the set of streaming media data are different, the amounts of consumption of decryption resources representing amounts of resources consumed for decrypting the streaming media data;
A return unit configured to return the determined streaming media data to the terminal, so that the terminal plays the target streaming media based on the determined streaming media data;
wherein, the consumption of decryption resources of the streaming media data in at least part of the streaming media data is arranged in order from small to large to form an arithmetic array, and the streaming media data with the consumption of decryption resources in the arithmetic array is obtained by adopting the following modes:
encrypting the target streaming media by adopting each encryption algorithm in a preset encryption algorithm set;
decrypting the encrypted target streaming media data, and calculating the consumption of decryption resources used for decrypting by adopting each encryption algorithm;
selecting a plurality of decryption resource consumption amounts in an arithmetic series from the obtained decryption resource consumption amounts;
determining the stream media data corresponding to the selected decryption resource consumption as stream media numbers with the decryption resource consumption in an arithmetic series;
the metrics of the decryption resources represented by the decryption resource information include: the time of the CPU running the test program and the network delay are the time consumed by the CPU running the test program, and the network delay is the time consumed by streaming media from the server to the terminal.
24. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing a computer program stored in said memory, and which, when executed, implements the method of any of the preceding claims 9-21.
25. A computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the method of any of the preceding claims 9-21.
CN202210763110.8A 2022-06-29 2022-06-29 Streaming media playing system, method and device, electronic equipment and storage medium Active CN115134637B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210763110.8A CN115134637B (en) 2022-06-29 2022-06-29 Streaming media playing system, method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210763110.8A CN115134637B (en) 2022-06-29 2022-06-29 Streaming media playing system, method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115134637A CN115134637A (en) 2022-09-30
CN115134637B true CN115134637B (en) 2024-04-12

Family

ID=83382758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210763110.8A Active CN115134637B (en) 2022-06-29 2022-06-29 Streaming media playing system, method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115134637B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1883199A (en) * 2003-10-31 2006-12-20 索尼电子有限公司 Hybrid storage of video on demand content
CN101635919A (en) * 2009-08-20 2010-01-27 中兴通讯股份有限公司 Encryption method and encryption system of IMS conference medium data of IP multimedia system
WO2016108917A1 (en) * 2014-12-31 2016-07-07 Verimatrix, Inc. Systems and methods for using content protection signaling to collect audience measurement data
CN106534895A (en) * 2016-11-01 2017-03-22 青岛海信电器股份有限公司 Method for playing encrypted multimedia file and terminal
CN109068147A (en) * 2018-09-18 2018-12-21 腾讯科技(深圳)有限公司 A kind of multimedia data transmission method, device and relevant device
CN110430218A (en) * 2019-08-23 2019-11-08 深圳和而泰家居在线网络科技有限公司 Data transmission security control method and device, computer equipment and Internet of things system
CN110545176A (en) * 2019-08-23 2019-12-06 深圳和而泰家居在线网络科技有限公司 Encryption and decryption method and device and Internet of things system
WO2020134565A1 (en) * 2018-12-25 2020-07-02 阿里巴巴集团控股有限公司 Multimedia resource charging method, device and system
CN111787025A (en) * 2020-07-23 2020-10-16 迈普通信技术股份有限公司 Encryption and decryption processing method, device and system and data protection gateway
WO2021232558A1 (en) * 2020-05-19 2021-11-25 青岛海信传媒网络技术有限公司 Streaming media file playing method and display device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6449719B1 (en) * 1999-11-09 2002-09-10 Widevine Technologies, Inc. Process and streaming server for encrypting a data stream
US7251328B2 (en) * 2003-01-14 2007-07-31 General Instrument Corporation System for secure decryption of streaming media using selective decryption of header information and decryption of reassembled content

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1883199A (en) * 2003-10-31 2006-12-20 索尼电子有限公司 Hybrid storage of video on demand content
CN101635919A (en) * 2009-08-20 2010-01-27 中兴通讯股份有限公司 Encryption method and encryption system of IMS conference medium data of IP multimedia system
WO2016108917A1 (en) * 2014-12-31 2016-07-07 Verimatrix, Inc. Systems and methods for using content protection signaling to collect audience measurement data
CN106534895A (en) * 2016-11-01 2017-03-22 青岛海信电器股份有限公司 Method for playing encrypted multimedia file and terminal
CN109068147A (en) * 2018-09-18 2018-12-21 腾讯科技(深圳)有限公司 A kind of multimedia data transmission method, device and relevant device
WO2020134565A1 (en) * 2018-12-25 2020-07-02 阿里巴巴集团控股有限公司 Multimedia resource charging method, device and system
CN110430218A (en) * 2019-08-23 2019-11-08 深圳和而泰家居在线网络科技有限公司 Data transmission security control method and device, computer equipment and Internet of things system
CN110545176A (en) * 2019-08-23 2019-12-06 深圳和而泰家居在线网络科技有限公司 Encryption and decryption method and device and Internet of things system
WO2021232558A1 (en) * 2020-05-19 2021-11-25 青岛海信传媒网络技术有限公司 Streaming media file playing method and display device
CN111787025A (en) * 2020-07-23 2020-10-16 迈普通信技术股份有限公司 Encryption and decryption processing method, device and system and data protection gateway

Also Published As

Publication number Publication date
CN115134637A (en) 2022-09-30

Similar Documents

Publication Publication Date Title
EP3657376B1 (en) Hybrid-cloud data storage method and apparatus, related device, and cloud system
US10581599B2 (en) Cloud storage method and system
US8560587B2 (en) Non-linear mixing of pseudo-random number generator output
JP6109441B1 (en) Dynamic encryption key for use with XTS encryption systems that employ round-reduction encryption
US20210297232A1 (en) Method and apparatus for performing operation using encrypted data
CN108184170B (en) Data processing method and device
CN106817358B (en) Encryption and decryption method and device for user resources
US10693631B2 (en) Modifying a content descriptor to facilitate delivery of token-authorized encrypted data
US20210227268A1 (en) Method for encrypting data streams with negotiable and adaptable encryption levels
US9008305B2 (en) Video data delivery protection
CN112187741B (en) Login authentication method and device based on operation and maintenance audit system and electronic device
US10887379B2 (en) Dynamically determining a content delivery network from which to receive content
CN105072488A (en) Streaming media decryption method and device
CN110213671B (en) Hotspot short video determination method and device
US11777708B2 (en) Secure encryption of partial blocks
CN115134637B (en) Streaming media playing system, method and device, electronic equipment and storage medium
CN108256343B (en) Encryption method and device and decryption method and device of Shader file
CN110401689B (en) File management method, device and storage medium
US10462248B2 (en) Digital content sharing cloud service system, digital content sharing cloud service device, and method using the same
CN111988262A (en) Authentication method, authentication device, server and storage medium
CN109040653B (en) Data encryption and decryption overhead determining method and device and electronic equipment
CN113051592A (en) File encryption method and device, electronic equipment and storage medium
US10262310B1 (en) Generating a verifiable download code
CN111698534B (en) Video processing method and device, electronic equipment and storage medium
US11431349B2 (en) Method, electronic device and computer program product for processing data

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