Media resource processing method and system, storage medium and electronic device
By performing signature verification and encrypted identification legality judgment on media asset playback requests, it is ensured that the client only provides the resource address when the request identifier exists in the media asset channel list, which solves the problem of media asset merchants being unable to identify the legitimacy of the request and improves Ensure the security of media resources.
Patent Information
- Application Number
- CN202210527754.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2042-05-16
AI Technical Summary
When media asset merchants provide media assets to third-party companies, they lack security verification, making it difficult to identify whether the request is legitimate and causing malicious requests for media assets, which reduces the security of media assets.
By obtaining the media asset playback request generated by the client, perform signature verification, determine the legality of the media asset encryption identifier, and search for the request identifier in the client's media asset channel list. If it exists, feed back the resource address to ensure that the client can only pass Obtain media resources through legal channels.
It effectively avoids malicious requests for media resources, improves the security of the application environment of media resources, and ensures the legal acquisition of resources.
Smart Images

Figure CN114979786B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of media resource processing, and in particular to a media resource processing method and system, a storage medium and an electronic device. Background Art
[0002] With the development of mobile Internet, in order to ensure the growth of traffic, media resource providers usually cooperate with third-party companies and output media resources to third-party companies, so as to provide media resources to the users of third-party companies, expand the audience of media resources, and increase the usage traffic of media resources.
[0003] Currently, when media vendors provide media resources to third-party companies, they usually provide corresponding media resources to the third-party companies based on requests sent by users of the third-party companies. The process of media vendors providing media resources to third parties does not perform security checks, making it difficult to identify whether the requests are legal, resulting in malicious requests for media resources. Summary of the invention
[0004] In view of this, embodiments of the present invention provide a media resource processing method and system, a storage medium and an electronic device to ensure the legitimacy of media resource requests, improve the security of the application environment of media resources, and avoid malicious requests for media resources.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] The first aspect of the present invention discloses a method for processing media resources, comprising:
[0007] Get the media resource playback request generated by the client;
[0008] Performing signature verification on the media resource playback request;
[0009] When the media resource playing request passes the signature verification, determining whether the media resource encryption identifier in the media resource playing request is legal;
[0010] When it is determined that the media resource encryption identifier is legal, determining a media resource request identifier;
[0011] Determine whether the media resource request identifier exists in the media resource list of the media resource channel of the client;
[0012] If so, the resource address corresponding to the media resource request identifier is fed back to the client, so that the client displays the media resource corresponding to the resource address.
[0013] In the above method, optionally, the step of performing signature verification on the media asset playback request includes:
[0014] Parsing the media resource playback request, obtaining various signature verification parameters, a first signature value, and determining a signature method applied by the client;
[0015] Using the signing method, processing each of the signature verification parameters to obtain a second signature value;
[0016] When the first signature value and the second signature value are the same, it is determined that the media asset playback request passes the signature verification.
[0017] In the above method, optionally, determining whether the media asset encryption identifier in the media asset playback request is legal includes:
[0018] Parsing the media asset encryption identifier to obtain a first encrypted string and a second encrypted string;
[0019] Decrypting the first encrypted string to obtain each legal verification factor;
[0020] Encrypting each of the legal verification factors and the channel encryption factor of the media resource channel of the client to obtain a third encrypted string;
[0021] When the third encrypted string is consistent with the second encrypted string, it is determined that the media asset encryption identifier in the media asset playback request is legal.
[0022] In the above method, optionally, the determining whether the media resource request identifier exists in the media resource list of the media resource channel of the client includes:
[0023] Traverse the media resource request identifier through each preset media resource identifier in the media resource list;
[0024] When there is a preset media asset identifier that is consistent with the media asset request identifier among the preset media asset identifiers, it is determined that the media asset request identifier exists in the media asset list of the media asset channel of the client.
[0025] In the above method, optionally, the process of the client generating a media resource playback request includes:
[0026] Acquire media information of each media resource of the media channel of the client;
[0027] Based on each of the media asset information, generate a media asset display page;
[0028] Displaying the media resource display page to the user;
[0029] The media resource selection instruction input by the user is obtained, and a media resource playing request is generated based on the media resource selection instruction.
[0030] A second aspect of the present invention discloses a media resource processing system, characterized in that it comprises:
[0031] Playback server and operation management background;
[0032] The playback server is used to obtain the media resource playback request generated by the client, and perform signature verification on the media resource playback request; when the media resource playback request passes the signature verification, the media resource playback request is sent to the operation management background;
[0033] The operation management background is used to receive the media resource playback request sent by the playback server, and determine whether the media resource encryption identifier in the media resource playback request is legal; when it is determined that the media resource encryption identifier is legal, determine the media resource request identifier; determine whether the media resource request identifier exists in the media resource list of the media resource channel of the client; if so, feed back the media resource request identifier to the playback server, so that the playback server determines the resource address corresponding to the media resource request identifier and sends the resource address to the client.
[0034] In the above system, optionally, when the playback server performs signature verification on the media asset playback request, the playback server is specifically configured to:
[0035] Parsing the media resource playback request to obtain various signature verification parameters, the signature value generated by the client, and the signature algorithm applied by the client;
[0036] Using the signature algorithm, processing each of the signature verification parameters to obtain a signature verification value;
[0037] When the signature verification value and the signature value are the same, it is determined that the media asset playback request passes the signature verification.
[0038] In the above system, optionally, when the operation management background determines whether the media asset encryption identifier in the media asset playback request is legal, it is specifically used to:
[0039] Parsing the media asset encryption identifier to obtain a first encrypted string and a second encrypted string;
[0040] Decrypting the first encrypted string to obtain each legal verification factor;
[0041] Encrypting each of the legal verification factors and the channel encryption factor of the media resource channel of the client to obtain a third encrypted string;
[0042] When the third encrypted string is consistent with the second encrypted string, it is determined that the media asset encryption identifier in the media asset playback request is legal.
[0043] In the above system, optionally, when the operation management backend determines whether the media resource request identifier exists in the media resource list of the media resource channel of the client, it is specifically used to:
[0044] Traverse the media resource request identifier through each preset media resource identifier in the media resource list;
[0045] When there is a preset media asset identifier that is consistent with the media asset request identifier among the preset media asset identifiers, it is determined that the media asset request identifier exists in the media asset list of the media asset channel of the client.
[0046] In the above system, optionally, the process of the client generating a media resource playback request includes:
[0047] Acquire media information of each media resource of the media channel of the client;
[0048] Based on each of the media asset information, generate a media asset display page;
[0049] Displaying the media resource display page to the user;
[0050] The media resource selection instruction input by the user is obtained, and a media resource playing request is generated based on the media resource selection instruction.
[0051] A third aspect of the present invention discloses a storage medium, which includes stored instructions, wherein when the instructions are executed, a device where the storage medium is located is controlled to execute the media resource processing method as described above.
[0052] A fourth aspect of the present invention discloses an electronic device, comprising a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the media resource processing method as described above.
[0053] Compared with the prior art, the present invention has the following advantages:
[0054] The present invention provides a media resource processing method and system, storage medium and electronic device, the method comprising: obtaining a media resource playback request generated by a client, performing signature verification on the media resource playback request, and when the media resource playback request passes the signature verification, determining whether the media resource encryption identifier in the media resource playback request is legal; when the media resource encryption identifier is legal, determining the media resource request identifier; determining whether the media resource request identifier exists in the media resource list of the client's media channel, and if so, feeding back the resource address corresponding to the media resource request identifier to the client, so that the client displays the media resource corresponding to the resource address. After obtaining the media resource playback request generated by the client, the resource address is fed back to the client only when the media resource playback request passes the signature verification, the media resource encryption identifier in the media resource playback request is legal, and the media resource request identifier exists in the client's media channel list, and the client can obtain the corresponding media resource through the resource address. The whole process is verified through a series of verifications, which can effectively avoid malicious requests for media resources and improve the security of output media resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0056] Figure 1 A method flow chart of a media resource processing method provided by an embodiment of the present invention;
[0057] Figure 2 A flow chart of a method for performing signature verification on a media asset playback request provided by an embodiment of the present invention;
[0058] Figure 3 A flow chart of a method for determining whether a media asset encryption identifier in a media asset playback request is legal, provided by an embodiment of the present invention;
[0059] Figure 4 A structural diagram of a media resource processing system provided by an embodiment of the present invention;
[0060] Figure 5 An example of an application scenario of a media resource processing system provided by an embodiment of the present invention;
[0061] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0064] As can be seen from the background technology, currently when media resource merchants provide resources to users or cooperative merchants, there is no process for verifying the request, and media resource merchants provide media resource indiscriminately, which easily leads to malicious requests for media resource. The media resource processing method provided by the present invention can effectively solve the above problems.
[0065] The present invention can be used in many general or special computing device environments or configurations. For example, personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or devices, etc. The execution subject of the present invention can be a resource processing system or a processor to which the method is applied.
[0066] Reference Figure 1 , is a method flow chart of a media resource processing method provided by an embodiment of the present invention, and is specifically described as follows:
[0067] S101: Obtain a media resource playback request generated by a client.
[0068] The media resource processing system receives the media resource playing request sent by the client, and the media resource playing request is sent by the client; further, the playing server in the media resource processing system may receive the media resource playing request generated by the client.
[0069] The process of generating a media resource playback request by the client is described below:
[0070] Obtain the media information of each media resource of the client's media channel;
[0071] Generate a media resource display page based on the information of each media resource;
[0072] Display the media display page to the user;
[0073] The media resource selection instruction input by the user is obtained, and a media resource playing request is generated based on the media resource selection instruction.
[0074] It should be noted that the client sends a media display request to the media processing system, and the media processing system determines the media channel of the client and determines the media list corresponding to the media channel, wherein the media list contains media information of multiple media resources authorized to the media channel, and the media information contains the media encryption identifier, media name and basic information of the media resources; the media processing system feeds back the media information of each media resource to the client, and the client generates a media display page based on each media information, and the media display page contains information of each media resource; the user enters a media selection instruction by clicking on the media display page, and the media selection instruction contains the media encryption identifier, selection time and other contents of the media resource selected by the user; when generating a media playback request, the client uses a preset signature encryption method to process the channel identifier, the media encryption identifier, the generated random number and the timestamp to obtain a first signature value, and generates a media playback request including but not limited to the first signature value, the channel identifier, the media encryption identifier, the generated random number and the timestamp, wherein the timestamp can be the time when the user selects the media resource.
[0075] S102: Perform signature verification on the media asset playback request and determine whether the media asset playback request passes the signature verification; when the media asset playback request passes the signature verification, execute S103; when the media asset playback request fails the signature verification, execute S107.
[0076] Reference Figure 2 , is a flow chart of a method for performing signature verification on a media asset playback request provided by an embodiment of the present invention, and is specifically described as follows:
[0077] S201: Parse the media resource playback request, obtain various signature verification parameters, a first signature value, and determine the signature method used by the client.
[0078] In the method provided in the embodiment of the present invention, various signature verification parameters include but are not limited to parameters such as channel identifier, media encryption identifier, random number and timestamp. Further, the random number is a random number generated by the client, and the random numbers generated by different clients, different devices and different times are different. The timestamp is the timestamp of the client; the signature method applied by the client can be signing using md5 or sha256. Further, the signature method in the present invention is not limited to signing using md5 or sha256, and other signature methods can also be used for signing, which are not illustrated one by one here.
[0079] Furthermore, the channel identifier is pre-assigned to the client by the media asset processing system, and the channel identifier is the unique identifier of the client's media asset channel, and different clients have different media asset channels. The media asset encryption identifier is obtained by encrypting the media asset identifier of the authorized media asset when the media asset processing system authorizes the media asset for the client's media asset channel.
[0080] The media asset identifier is a unique plain text identifier of the media asset resource, and the media asset encryption identifier is a unique encrypted identifier of the media asset resource.
[0081] S202: Using the signature method, each signature verification parameter is processed to obtain a second signature value.
[0082] It should be noted that when the media resource processing system uses the signature method to process each signature verification parameter, each signature verification parameter includes but is not limited to the channel identifier, media encryption identifier, random number, timestamp and channel factor; further, the channel factor can be obtained from the media playback request, and the media resource processing system can also obtain the channel factor corresponding to the channel identifier in the database.
[0083] S203: Determine whether the first signature value and the second signature value are the same; when the first signature value and the second signature value are the same, execute S204; when the first signature value and the second signature value are not the same, execute S205.
[0084] The first signature value is compared with the second signature value to determine whether the first signature value and the second signature value are the same.
[0085] S204: Determine whether the media resource playback request passes the signature verification.
[0086] S205: Determine that the media asset playback request fails the signature verification.
[0087] In the method provided by the embodiment of the present invention, by performing signature verification on the media playback request, it can be determined whether the client sending the media playback request is a legitimate client. The media resource processing system can screen the received media playback requests and not feedback the resource address of the media resource to the media playback request that fails the signature verification. This can avoid malicious requests for media resources and improve the security of media resource output.
[0088] S103: Determine whether the media asset encryption identifier in the media asset playback request is legal; when it is determined that the media asset encryption identifier is legal, execute S104; when it is determined that the media asset encryption identifier is illegal, execute S107.
[0089] Reference Figure 3 , is a flow chart of a method for determining whether a media asset encryption identifier in a media asset playback request is legal, provided by an embodiment of the present invention, and is specifically described as follows:
[0090] S301: Parse the media asset encryption identifier to obtain a first encrypted string and a second encrypted string.
[0091] S302: Decrypt the first encrypted string to obtain various legal verification factors.
[0092] When decrypting the first encrypted string, the media resource processing system uses a preset decryption method to decrypt the first encrypted string, thereby obtaining various legal verification factors, where each legal verification factor is a channel identifier and a media resource identifier.
[0093] Furthermore, the first encrypted string is a string obtained by encrypting the channel identifier, channel encryption factor, and media asset identifier using a symmetric encryption algorithm. Therefore, when decrypting the first encrypted string, the decryption operation can be achieved by using the inverse algorithm of the symmetric encryption algorithm to process the first encrypted string; preferably, the symmetric encryption algorithm includes but is not limited to the DES algorithm, 3DES algorithm, TDEA algorithm, Blowfish algorithm, RC5 algorithm, and IDEA algorithm.
[0094] S303: encrypting each legal verification factor and the channel encryption factor of the media resource channel of the client to obtain a third encrypted string.
[0095] The client has a unique corresponding media channel, and the channel information of the media channel is pre-stored in the media resource processing system. The channel information includes but is not limited to the channel identifier, channel description, channel name, channel factor and channel encryption factor of the media channel; further, the channel identifier and channel factor of the media channel are stored in the client.
[0096] The media resource processing system uses a preset data processing algorithm to encrypt each legal verification factor and channel encryption factor to obtain a third encrypted string, wherein the data processing algorithm may be a Hash algorithm or other asymmetric encryption algorithms.
[0097] S304: Determine whether the third encrypted string is consistent with the second encrypted string. If the third encrypted string is consistent with the second encrypted string, execute S305; if the third encrypted string is consistent with the second encrypted string, execute S306.
[0098] The third encrypted string is compared with the second encrypted string to determine whether the third encrypted string is consistent with the second encrypted string.
[0099] S305: Determine whether the media asset encryption identifier in the media asset playback request is legal.
[0100] S306: Determine that the media asset encryption identifier in the media asset playback request is illegal.
[0101] In the method provided in the embodiment of the present invention, whether the media encryption identifier in the media playback request is legal is determined, and the legality of the media playback request sent by the client can be further verified, thereby ensuring the security of the process of providing media resources to the client and effectively avoiding malicious requests for media resources.
[0102] S104: Determine a media resource request identifier.
[0103] In the method provided by the embodiment of the present invention, after determining that the media asset encryption identifier is legal, the media asset identifier obtained in the process of determining the media asset encryption identifier can be determined as the media asset request identifier. In other words, the media asset request identifier is a plain text media asset identifier.
[0104] S105: Determine whether there is a media resource request identifier in the media resource list of the client's media resource channel; if there is a media resource request identifier in the media resource list of the client's media resource channel, execute S106; if there is no media resource request identifier in the media resource list of the client's media resource channel, execute S107.
[0105] The media asset request identifier is traversed through each preset media asset identifier in the media asset list, and then it is determined whether there is a preset media asset identifier that is consistent with the media asset request identifier among each preset media asset identifier; when there is a preset media asset identifier that is consistent with the media request identifier among each preset media asset identifier, it is determined that the media request identifier exists in the media asset list of the client's media asset channel; when there is no preset media asset identifier that is consistent with the media request identifier among each preset media asset identifier, it is determined that the media request identifier does not exist in the media asset list of the client's media asset channel.
[0106] Determining whether there is a media resource request identifier in the media resource list of the client's media resource channel is essentially determining whether the client has the authority to obtain the media resource corresponding to the media resource request identifier. Furthermore, when the media resource request identifier does not exist in the media resource list, it can be determined that the client does not have the authority to obtain the media resource corresponding to the media resource request identifier. When the media resource request identifier exists in the media resource list, it can be determined that the client has the authority to obtain the media resource corresponding to the media request identifier.
[0107] Each media resource channel has a corresponding media resource list, in which a plurality of preset media resource identifiers are stored. The preset media resource identifier is an identifier of a media resource authorized to the media resource channel by a media resource processing system, and the preset media resource identifier is a plain text identifier.
[0108] The media resource list is stored in the media resource processing system. By judging whether there is a media resource request identifier in the media resource list, it can be further determined whether the client has the authority to obtain the media resource corresponding to the media resource request identifier, and then determine whether to feedback the corresponding media resource to the client. The media resource processing system manages media resources by authorizing media resources to media channels and then providing authorized media resources to clients, effectively preventing confidential media resources from being obtained by clients.
[0109] S106: Feedback the resource address corresponding to the media resource request identifier to the client, so that the client displays the media resource corresponding to the resource address.
[0110] The media resource processing system determines the resource address corresponding to the media request identifier and feeds the resource address back to the client, so that the client obtains the corresponding media resource through the resource address and displays the obtained media resource. Different media resources correspond to different resource addresses, and media resources can be multimedia content such as videos, pictures or articles.
[0111] S107: Sending preset request failure information to the client.
[0112] The request failure information includes information that the request is illegal, and the request failure information is used to prompt the user of the client that he does not have the authority to obtain the corresponding media resource.
[0113] In the method provided by the embodiment of the present invention, a media playback request generated by a client is obtained, and a signature verification is performed on the media playback request. When the media playback request passes the signature verification, it is determined whether the media encryption identifier in the media playback request is legal; when the media encryption identifier is legal, the media request identifier is determined; it is determined whether the media request identifier exists in the media list of the client's media channel. If so, the resource address corresponding to the media request identifier is fed back to the client, so that the client displays the media resource corresponding to the resource address. After obtaining the media playback request generated by the client, the resource address is fed back to the client only when the media playback request passes the signature verification, the media encryption identifier in the media playback request is legal, and the media request identifier exists in the client's media channel list. The client can then obtain the corresponding media resource through the resource address. The entire process is verified through a series of verifications, which can effectively avoid malicious requests for media resources and improve the security of output media resources.
[0114] To support Figure 1 The method shown in the figure is implemented in real life. The embodiment of the present invention provides a media resource processing system, referring to Figure 4 , is a schematic diagram of the structure of the system, and the specific description is as follows:
[0115] The system consists of a playback server 401 and an operation management backend 402.
[0116] The playback server 401 is used to obtain the media playback request generated by the client, and perform signature verification on the media playback request; when the media playback request passes the signature verification, the media playback request is sent to the operation management background;
[0117] The operation management backend 402 is used to receive the media resource playback request sent by the playback server, and determine whether the media resource encryption identifier in the media resource playback request is legal; when it is determined that the media resource encryption identifier is legal, determine the media resource request identifier; determine whether the media resource request identifier exists in the media resource list of the media resource channel of the client; if so, feed back the media resource request identifier to the playback server, so that the playback server determines the resource address corresponding to the media resource request identifier and sends the resource address to the client.
[0118] In the system provided by the embodiment of the present invention, the playback server obtains the media playback request generated by the client, and sends the media playback request to the operation management background, and performs signature verification on the media playback request. When the media playback request passes the signature verification, the media playback request is sent to the operation management background; the operation management background determines whether the media encryption identifier in the media playback request is legal; when the media encryption identifier is legal, the media request identifier is determined; it is determined whether the media request identifier exists in the media list of the media channel of the client, and if so, the resource address corresponding to the media request identifier is fed back to the playback server, so that the playback server sends the resource address to the client. In the system provided by the present invention, the operation management background performs a series of verifications on the media playback request sent by the playback server. Only when the media playback request passes the signature verification, the media encryption identifier in the media playback request is legal, and the media request identifier exists in the media list of the media channel of the client, the resource address is sent to the playback server, and then the media resource is provided to the client. Through the whole process, malicious requests can be effectively filtered through signature verification and other processing, and the output security of media resources can be improved.
[0119] The present invention also provides a specific application scenario example of a media resource processing system, referring to Figure 5 The specific contents are as follows:
[0120] The figure includes a client 501 and a media resource processing system 502, wherein the media resource processing system 502 includes a channel server 601, an operation management background 602 and a playback server 603; further, the client 501 includes a channel client and a channel SDK; the channel client and the channel server are one-to-one corresponding.
[0121] The channel client is used to obtain the media information output by the channel server in the media resource processing system, generate a corresponding media display page based on the media information, and display the media display page to the user; it should be noted that when the user inputs the media selection information through the media display page, the media selection information is sent to the channel SDK; further, the media information output by the channel server includes the information of each media resource authorized by the media resource processing system for the client's media channel, such as the media encryption identifier, media name, media information, etc. of the media resource;
[0122] Channel SDK, used to generate a media asset playback request based on the media asset selection information, and send the media asset playback request to the playback server in the media asset resource processing system; it should be noted that the channel SDK contains the channel information of the media asset channel created by the media asset resource processing system for the client, such as the channel identifier, channel description, channel name, and channel factor; further, the information set by the media asset resource processing system when creating the media asset channel for the client includes but is not limited to the channel identifier, channel description, channel name, channel factor, and channel encryption factor;
[0123] The playback server is used to perform signature verification on the media resource playback request after receiving the media resource playback request; when the media resource playback request passes the signature verification, the media resource playback request is sent to the operation management background;
[0124] The operation and management background includes a media asset encryption and decryption module and an authentication module. When the operation and management background receives a media asset playback request sent by the playback server, it calls the media asset encryption and decryption module to decrypt the media asset encryption identifier in the media asset playback request to determine whether the media asset encryption identifier is legal; after determining that the media asset encryption identifier is legal, it determines the media asset request identifier, and uses the authentication module to determine whether the media asset request identifier exists in the media asset list of the client's media channel, and then authenticates the media asset request identifier. When it is determined that the media asset request identifier exists in the media asset list, it feeds back the authentication success information and the media asset request identifier to the playback server, so that the playback server determines the resource address corresponding to the media asset request identifier, and feeds back the resource address to the client. The client obtains the media asset resource through the resource address and displays the media asset resource.
[0125] For example, the media channel created by the operator of the media resource merchant for the client A through the media resource processing system is channel A, and the channel information stored in channel A in the media resource processing system is as shown in Table 1:
[0126] Channel parameter name Parameter details Channel ID XX Channel Description XX on-demand channel Channel Name XX channel Channel Factor hwg97gjh*+ Channel Encryption Factor XX-vod
[0127] Table 1
[0128] Furthermore, the media resource processing has pre-written the channel identifier and channel factor in Table 1 into the channel SDK in client A.
[0129] After channel A is created for client A, media resources are authorized for channel A. When media resources are authorized for channel A, the media resource processing system uses the media encryption and decryption module in the operation management background to perform encryption processing to obtain a media encryption identifier; the specific process is as follows: use a preset symmetric encryption algorithm to encrypt the channel identifier and the media identifier to obtain a first encrypted string, represented by aaa here; use a Hash algorithm to process the channel identifier, the media identifier and the channel encryption factor to obtain a second encrypted string, represented by xxxxxx here; media encryption identifier = aaa.Xxxxxx; it should be noted that "." is used as a separator between the first encrypted string and the second encrypted string. Furthermore, the separator can also be " / ", which is not limited here.
[0130] After authorizing media resources for channel A, the authorized media resource information is sent to client A through the media list interface of the channel server, so that client A can display the relevant media resource information to the user. It should be noted that the authorized media resource information sent includes the media encryption identifier of the media resource, but does not include the plain text media identifier of the media resource.
[0131] After client A displays the information of media resources to the user, the user selects the media resources. At this time, client A needs to generate a media playback request, which can also be called a playback string request. The channel SDK requests the playback server's http request. Specifically, the media playback request includes a channel identifier, a media encryption identifier, a random number, a client timestamp, a signature method, and a first signature value. Furthermore, when the client generates the first signature value, the channel identifier, the media encryption identifier, the random number, the client timestamp, and the channel factor are processed using the signature method to obtain the first signature value. Preferably, the signature method is sha256.
[0132] After receiving the media asset playback request, the playback request end performs signature verification on the media asset playback request, specifically: parse the media asset playback request to obtain the channel ID, media asset encryption ID, random number, client timestamp, signature method and first signature value in the media asset playback request; obtain the channel factor based on the channel ID, and use the signature method to process the channel ID, media asset encryption ID, random number, client timestamp and channel factor to obtain the second signature value. The signature method here is the same as the signature method used by client A. When the first signature value and the second signature value are the same, it is determined that the media asset playback request passes the signature verification, and the channel ID and media asset encryption ID are sent to the operation management backend.
[0133] The operation management background uses the media asset encryption and decryption module to decrypt the media asset encryption identifier, specifically: use the inverse algorithm of the preset symmetric encryption algorithm to decrypt the first encrypted string in the media asset encryption identifier to obtain the channel identifier and the media asset identifier; determine the corresponding channel encryption factor based on the obtained channel identifier, use the Hash algorithm to process the obtained channel identifier, media asset identifier and channel encryption factor to obtain a third encrypted string, and when the third encrypted string is the same as the second encrypted string in the media asset encryption identifier, determine the obtained media asset identifier as the media asset request identifier, and use the authentication module to authenticate the media asset request identifier. The specific process is: determine whether the media asset request identifier exists in the media asset list of the media asset channel of client A, and when it is determined that the media asset request identifier exists in the media asset list, send the media asset request identifier to the playback server; when it is determined that the media request does not exist in the media asset list, send a request failure identifier to the playback server.
[0134] After receiving the media resource request identifier fed back by the operation management background, the playback server determines the resource address corresponding to the media resource request identifier and sends the resource address to client A, so that client A obtains the media resource through the resource address and displays the obtained media resource; when the playback server receives the request failure identifier, it feeds back the preset request failure information to client A, so that client A displays the request failure information to the user.
[0135] The present invention develops a media channel for a client. When a user requests a media resource, malicious requests are effectively filtered by performing signature verification on the media playback request, thereby improving the use environment of the media resource. After passing the legality verification, the security of the output media resource is further improved. Finally, authentication verification is performed to manage various media resources, and the media resources are output to the user in a controlled manner. In addition, the media channel of the client can be reused, thereby improving the work efficiency of the management of the media resource and improving the work efficiency of the development.
[0136] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned media resource processing method.
[0137] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 6 As shown, it specifically includes a memory 701 and one or more instructions 702, wherein the one or more instructions 702 are stored in the memory 701 and are configured to be executed by one or more processors 703 to execute the one or more instructions 702 to perform the above-mentioned media resource processing method.
[0138] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of the present invention.
[0139] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0140] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0141] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for processing media resources, characterized in that: include: Get the media resource playback request generated by the client; Parsing the media asset playback request, obtaining various signature verification parameters, a first signature value, and determining a signature method applied by the client, wherein the various signature verification parameters include a channel identifier, a media asset encryption identifier, a random number, and a timestamp; Using the signing method, processing each of the signature verification parameters to obtain a second signature value; When the first signature value and the second signature value are the same, determining that the media asset playback request passes the signature verification; When the media resource playing request passes the signature verification, determining whether the media resource encryption identifier in the media resource playing request is legal; When it is determined that the media resource encryption identifier is legal, determining a media resource request identifier; Determine whether the media resource request identifier exists in the media resource list of the media resource channel of the client, wherein the media resource list stores a plurality of preset media resource identifiers, and the preset media resource identifier is an identifier of a media resource authorized to the media resource channel by a media resource processing system; If so, the resource address corresponding to the media resource request identifier is fed back to the client, so that the client displays the media resource corresponding to the resource address.
2. The method according to claim 1, characterized in that The determining whether the media asset encryption identifier in the media asset playback request is legal includes: Parsing the media asset encryption identifier to obtain a first encrypted string and a second encrypted string; Decrypting the first encrypted string to obtain various legal verification factors; Encrypting each of the legal verification factors and the channel encryption factor of the media resource channel of the client to obtain a third encrypted string; When the third encrypted string is consistent with the second encrypted string, it is determined that the media asset encryption identifier in the media asset playback request is legal.
3. The method according to claim 1, characterized in that The determining whether the media resource request identifier exists in the media resource list of the media resource channel of the client includes: Traverse the media resource request identifier through each preset media resource identifier in the media resource list; When there is a preset media asset identifier that is consistent with the media asset request identifier among the preset media asset identifiers, it is determined that the media asset request identifier exists in the media asset list of the media asset channel of the client.
4. The method according to claim 1, characterized in that: The process of a media resource playback request generated by the client includes: Acquire media information of each media resource of the media channel of the client; Based on each of the media asset information, generate a media asset display page; Displaying the media resource display page to the user; The media resource selection instruction input by the user is obtained, and a media resource playing request is generated based on the media resource selection instruction.
5. A media resource processing system, characterized in that: include: Playback server and operation management background; The playback server is used to obtain the media resource playback request generated by the client and perform signature verification on the media resource playback request; When the media resource playing request passes the signature verification, the media resource playing request is sent to the operation management backend; The operation management backend is used to receive the media resource playback request sent by the playback server, and determine whether the media resource encryption identifier in the media resource playback request is legal; when it is determined that the media resource encryption identifier is legal, determine the media resource request identifier; Determine whether the media resource request identifier exists in the media resource list of the media resource channel of the client, wherein the media resource list stores a plurality of preset media resource identifiers, and the preset media resource identifier is an identifier of a media resource authorized to the media resource channel by a media resource processing system; If so, feeding back the media resource request identifier to the playback server, so that the playback server determines the resource address corresponding to the media resource request identifier and sends the resource address to the client; When the playback server performs signature verification on the media resource playback request, it is specifically used to: Parsing the media asset playback request to obtain various signature verification parameters, the signature value generated by the client, and the signature algorithm applied by the client, wherein the various signature verification parameters include a channel identifier, a media asset encryption identifier, a random number, and a timestamp; Using the signature algorithm, processing each of the signature verification parameters to obtain a signature verification value; When the signature verification value and the signature value are the same, it is determined that the media asset playback request passes the signature verification.
6. The system according to claim 5, characterized in that When the operation management backend determines whether the media asset encryption identifier in the media asset playback request is legal, it is specifically used to: Parsing the media asset encryption identifier to obtain a first encrypted string and a second encrypted string; Decrypting the first encrypted string to obtain each legal verification factor; Encrypting each of the legal verification factors and the channel encryption factor of the media resource channel of the client to obtain a third encrypted string; When the third encrypted string is consistent with the second encrypted string, it is determined that the media asset encryption identifier in the media asset playback request is legal.
7. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the media resource processing method according to any one of claims 1 to 4.
8. An electronic device, characterized in that: The device comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to execute the media resource processing method as claimed in any one of claims 1 to 4.
