A method, device, and storage medium for digital signature and verification of multimedia files
By performing sharding processing and hashing calculation on the multimedia file on the server, combining data size and offset, the problem of time-consuming verification of large files is solved, and efficient verification while playing is achieved.
Patent Information
- Application Number
- CN202211297150.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-10-21
AI Technical Summary
Existing multimedia file verification technology is difficult to efficiently process larger files, resulting in a long verification process and affecting instant playback.
By preset sharding processing of the multimedia file on the server, the hash value is determined based on the data size and offset, signed and sent to the client, and the client performs hash verification during playback.
It improves the verification efficiency of multimedia files, realizes verification while playing, reduces hash calculation time, and optimizes the verification process.
Smart Images

Figure CN115934648B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of multimedia technologies, and in particular, to a method, device, and storage medium for digital signature and verification of multimedia files. Background Art
[0002] Currently, with the development of culture and technology, the public's demand for multimedia is increasing day by day, and multimedia technologies have developed rapidly. With the improvement of multimedia technologies such as picture technology, the volume of multimedia files has become larger and larger. Existing verification technologies are difficult to smoothly handle the verification of large multimedia files, and the verification process takes a long time, affecting instant playback. Summary of the Invention
[0003] The main purpose of the embodiments of this application is to propose a method, device, and storage medium for digital signature and verification of multimedia files, aiming to improve verification efficiency.
[0004] To achieve the above object, a first aspect of the embodiments of this application proposes a method for digital signature of multimedia files, which is applied to a server, and the method includes:
[0005] Obtain a multimedia file;
[0006] Perform a partitioning process on the multimedia file based on a preset shard size to obtain a plurality of preset shard samples;
[0007] Determine a first hash value corresponding to each preset shard sample according to the data size of each preset shard sample and the offset relative to the starting position of the multimedia file;
[0008] Determine the data to be signed corresponding to the multimedia file according to the data size, the offset, and the first hash value of each preset shard sample;
[0009] Perform a signature process on the data to be signed according to a preset signature private key to obtain signature verification information corresponding to the multimedia file;
[0010] Use the signature verification information, the data size, the offset, and the first hash value corresponding to each preset shard sample as the target verification information of the multimedia file, and send the multimedia file, the target verification information, and the signature public key corresponding to the signature private key to the client.
[0011] In some possible embodiments of this application, before performing the partitioning on the multimedia file based on the preset shard size to obtain a plurality of preset shard samples, the method includes:
[0012] Obtain a file unit list of the multimedia file, where the file unit list includes a plurality of data storage units;
[0013] Performing division processing on the multimedia file based on a preset shard size to obtain a plurality of preset shard samples, including:
[0014] When the data size of the data storage unit is greater than the preset shard size, dividing the data storage unit according to the preset shard size to obtain a plurality of preset shard samples;
[0015] Or, when the data size of the data storage unit is less than or equal to the preset shard size, using the data storage unit as a preset shard sample.
[0016] In some possible embodiments of the present application, determining the first hash value corresponding to each preset shard sample according to the data size of each preset shard sample and the offset relative to the starting position of the multimedia file includes:
[0017] Determining the first hash value corresponding to each preset shard sample according to the data size, the offset, and the playback time information of each preset shard sample;
[0018] Determining the data to be signed corresponding to the multimedia file according to the data size, the offset, and the first hash value of each preset shard sample includes:
[0019] Determining the data to be signed corresponding to the multimedia file according to the data size, the offset, the first hash value, and the playback time information of each preset shard sample;
[0020] Regarding the signature verification information and the data size, the offset, and the first hash value corresponding to each preset shard sample as the target verification information of the multimedia file includes:
[0021] Regarding the signature verification information and the data size, the offset, the first hash value, and the playback time information corresponding to each preset shard sample as the target verification information of the multimedia file.
[0022] In some possible embodiments of the present application, sending the multimedia file, the target verification information, and the signature public key corresponding to the signature private key to the client includes:
[0023] Generating a verification file corresponding to the multimedia file according to the target verification information;
[0024] Sending the multimedia file, the verification file, and the signature public key corresponding to the signature private key to the client; or,
[0025] Write the target verification information into the multimedia file;
[0026] Send the multimedia file carrying the target verification information and the signature public key corresponding to the signature private key to the client.
[0027] In some possible embodiments of the present application, the determining the first hash value corresponding to each of the preset shard samples according to the data size of each of the preset shard samples and the offset relative to the starting position of the multimedia file includes:
[0028] Obtain the sample data corresponding to each of the preset shard samples from the multimedia file according to the data size of each of the preset shard samples and the offset relative to the starting position of the multimedia file;
[0029] Perform a hash calculation on the sample data corresponding to each of the preset shard samples to obtain the first hash value corresponding to each of the preset shard samples.
[0030] To achieve the above object, a second aspect of the embodiments of the present application also proposes a multimedia file verification method, which is applied to a client, and the method includes:
[0031] Receive a multimedia file, target verification information, and a signature public key from a server, where the target verification information includes signature verification information, the data size corresponding to each preset shard sample in the multimedia file, the offset relative to the starting position of the multimedia file, and the first hash value;
[0032] In response to a play instruction for the multimedia file, play the multimedia file and perform a signature verification process on the signature verification information based on the signature public key to obtain a signature verification result corresponding to the multimedia file;
[0033] When the signature verification result indicates that the verification is passed, perform a hash verification process on each of the preset shard samples in sequence, where the hash verification process includes:
[0034] Determine the second hash value corresponding to each of the preset shard samples according to the data size of the preset shard sample and the offset relative to the starting position of the multimedia file;
[0035] Compare the second hash value corresponding to the preset shard sample with the first hash value to obtain a hash verification result corresponding to the preset shard sample;
[0036] When the hash verification result corresponding to the preset shard sample indicates that the verification fails, stop playing the multimedia file.
[0037] In some possible embodiments of the present application, the target verification information further includes the playback time information corresponding to each of the preset shard samples;
[0038] Performing the hash verification process on each of the preset shard samples includes:
[0039] Based on the playback time information corresponding to each of the preset shard samples, performing the hash verification process on each of the preset shard samples in sequence according to the playback time order.
[0040] In some possible embodiments of the present application, after comparing the second hash value corresponding to the preset shard sample with the first hash value to obtain the hash verification result, the method further includes:
[0041] Updating a preset verification status record table according to the hash verification result corresponding to the preset shard sample, where the verification status record table is used to record the hash verification status of each of the preset shard samples;
[0042] During the playback of the multimedia file, the method further includes:
[0043] In response to a jump playback instruction of the multimedia file, determining a target shard sample according to the playback time point corresponding to the jump playback instruction and the playback time information corresponding to each of the preset shard samples, where the target shard sample is the preset shard sample corresponding to the playback time point;
[0044] Obtaining the hash verification status of the target shard sample from the verification status record table;
[0045] When the hash verification status of the target shard sample indicates that the verification is passed, playing the multimedia file from the playback time point;
[0046] Or, when the hash verification status of the target shard sample indicates that the verification has not been performed, performing the hash verification process on the target shard sample.
[0047] To achieve the above object, a third aspect of the embodiments of the present application provides an electronic device, where the electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect or the second aspect above is implemented.
[0048] To achieve the above object, a fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect or the second aspect above is implemented.
[0049] A method, device, and storage medium for digital signature and verification of multimedia files proposed in this application divide the obtained multimedia file into preset shard samples on the server side, determine the first hash value according to the data size and offset, determine the data to be signed according to the data size, offset, and first hash value, sign the data to be signed, and send the data size, offset, first hash value, signed data, and decryption public key to the client; on the client side, when receiving the multimedia file and signature public key, in response to the play instruction, use the public key to verify the multimedia file, and then verify the hash value corresponding to the preset shard sample according to the data size and offset. When the hash verification of the preset shard sample passes, play the content corresponding to the sample. By using two types of information, namely data size and offset, to calculate the hash value corresponding to the content of the source file instead of calculating the hash value of the entire source file for each sample, the hash operation speed is improved. On the server side, verification information can be quickly generated, and on the client side, asynchronous processing of verifying while playing can be achieved, avoiding spending too much time calculating the hash value of the entire multimedia file, reducing verification time consumption, optimizing the verification process, and improving verification efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 FIG. is a schematic diagram of the steps of a method for digital signature of multimedia files provided by an embodiment of the present application;
[0051] Figure 2 is Figure 2 FIG. is a schematic diagram of the steps of another embodiment of the method provided in the first aspect of the present application;
[0052] Figure 3 is Figure 1 FIG. is a schematic diagram of the sub-steps of step S103 in FIG.
[0053] Figure 4 is Figure 1 FIG. is a schematic diagram of the sub-steps of step S106 in FIG.
[0054] Figure 5 FIG. is a schematic diagram of the steps of a method for verifying multimedia files provided by an embodiment of the present application;
[0055] Figure 6 is Figure 5 FIG. is a schematic diagram of the steps of the hash verification process of step S503 in FIG.
[0056] Figure 7 FIG. is a schematic diagram of the steps of another embodiment of the method provided in the second aspect of the present application;
[0057] Figure 8 FIG. is a schematic diagram of the structure of an electronic device provided in the third aspect of the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0058] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in the order in the flowchart. Terms such as "first", "second", etc. in the description, claims and the above-mentioned drawings are used to distinguish similar objects and do not have to be used to describe a specific order or sequence.
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0061] First, several nouns involved in the present application are analyzed:
[0062] Hash, generally called hashing, or transliterated as hash, is to transform an input of any length (also called pre-image) into an output of a fixed length through a hash algorithm, and the output value is called a hash value.
[0063] Public Key Infrastructure (PKI), a technology and specification that follows standards and uses public key encryption technology to provide a set of secure basic platforms for the development of e-commerce. It is a system composed of digital certificates, Certificate Authorities (CAs), and other registration authorities that check and verify the legality of all parties involved in electronic transactions, and is used to describe the policies, standards, and software that control or manipulate certificates, public keys, and private keys, and is generally set up on the server side.
[0064] Currently, with the development of culture and technology, the public's demand for multimedia is increasing day by day, and multimedia technology has developed rapidly. However, problems still occur in the process of applying multimedia technology.
[0065] With the improvement of multimedia technologies such as video technology, the volume of multimedia files has become larger and larger. Existing verification technologies are difficult to smoothly handle the verification of multimedia files with larger volumes, and the verification process takes a long time, affecting instant playback.
[0066] Based on this, the embodiments of the present application provide a method, device, and storage medium for digital signature and verification of multimedia files, aiming to improve verification efficiency.
[0067] A method for digital signature of multimedia files provided by an embodiment of the present application relates to the field of multimedia technologies. A method for digital signature of multimedia files provided by an embodiment of the present application can be applied to a server side or can be software running on the server side. In some embodiments, the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or can also be configured as a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application for implementing a method for digital signature of multimedia files, etc., but is not limited to the above forms.
[0068] A method for verifying multimedia files provided by an embodiment of the present application relates to the field of multimedia technologies. A method for verifying multimedia files provided by an embodiment of the present application can be applied to a terminal or can be software running on the terminal. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the software can be an application for implementing a method for verifying multimedia files, etc., but is not limited to the above forms.
[0069] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet-type devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, small computers, large computers, distributed computing environments including any of the above systems or devices, and so on. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0070] A method, device, and storage medium for digital signature and verification of multimedia files provided by an embodiment of the present application will be specifically described through the following embodiments. First, a method for digital signature of multimedia files provided in the first aspect of the embodiments of the present application will be described.
[0071] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the steps of a method for digital signature of multimedia files provided by an embodiment of the present application, Figure 1 and the method in [[ ]] may include but is not limited to steps S101 to S107.
[0072] Step S101: Obtain a multimedia file.
[0073] It should be understood that the multimedia file formats described in step S101 are diverse. Exemplarily, such as AVI format, MOV format, WAV format, MID format, MP4 format, MP3 format, etc. Those skilled in the art can obtain multimedia files in corresponding formats according to actual needs, and this application does not make any limitations in this regard.
[0074] It should be understood that the ways to obtain multimedia files here are diverse. It can be that the server pulls the multimedia file from another server, or it can be that an external terminal uploads it to the server. Those skilled in the art can determine the way to obtain the multimedia file according to the actual situation, and this application does not make any limitations in this regard.
[0075] Step S102: Perform a partitioning process on the multimedia file based on a preset shard size to obtain multiple preset shard samples.
[0076] It should be understood that the partitioning process here is a progressive partitioning. First, perform the first partitioning on the multimedia file to obtain a preset shard sample, and then perform partitioning on the remaining multimedia file, and so on, perform multiple partitions on the multimedia file until the sample is less than or equal to the preset shard size, and then stop partitioning.
[0077] It should be understood that the preset shard samples here refer to some representative data used to characterize the specific data on the multimedia file, rather than the specific data partitioned on the multimedia file. Exemplarily, if 0 to 1023 bytes meet the preset shard size, then the byte positions corresponding to the 1st byte and the 1024th byte can be used as preset shard samples, rather than the specific values of each byte.
[0078] It should be understood that the preset shard samples after partitioning are stored in a total sample list, and this total sample list is used to record the corresponding hash values obtained later.
[0079] Please refer to Figure 2 , Figure 2 which is a schematic diagram of the steps of another embodiment of the method provided in the first aspect of this application.
[0080] In some possible embodiments of this application, between step S101 and step S102, the following steps are included but not limited to.
[0081] Step S201: Obtain a file unit list of the multimedia file.
[0082] It should be understood that the list of file units here is carried by the multimedia file, and when the hash verification status corresponding to the target shard sample indicates that it has not been verified. Under normal playback of the multimedia file, the content to be played at the current time point is obtained according to the list of file units.
[0083] It should be understood that the types of data storage units here are diverse. It can be a data storage unit simply used to store specific data, or it can be a storage unit of a data storage unit. This application does not make any limitations in this regard.
[0084] It should be understood that the storage units storing data storage units are diverse. It can be one or multiple. This application does not make any limitations in this regard.
[0085] Exemplarily, taking a multimedia file in MP4 format as an example, the basic data storage unit of the MP4 file is a box. The box can store data or can be a container (container box) to store other boxes. For example, the moov box in the MP4 root box, and this moov box contains boxes such as trak box for storing specific data.
[0086] In some possible embodiments of this application, step S102 includes but is not limited to the following sub-steps.
[0087] Step S202: When the data size of the data storage unit is greater than the preset shard size, divide the data storage unit according to the preset shard size to obtain a plurality of preset shard samples.
[0088] It should be understood that the data storage unit in step S202 is obtained by traversing the list of file units in step S201.
[0089] It should be understood that the data size and offset here are directly obtained from the multimedia file, and the data size data and offset data are stored in the data storage unit.
[0090] It should be understood that the data size here refers to the size of the data storage unit. Exemplarily, such as 1MB, 2MB.
[0091] It should be understood that the preset shard size here is a specific value, and this value is not necessarily equal to the data size. The specific value of the preset shard size here can be set by those skilled in the art according to the actual situation, and this application does not make any limitations in this regard.
[0092] It should be understood that the information for dividing the preset sample, such as data size, offset, etc., will also be stored in the total sample list.
[0093] Specifically, for the currently traversed data storage unit, obtain the data size of this data storage unit and compare it with the preset sharding size. When the data size of the data storage unit is greater than the preset sharding size, perform cyclic division with the preset size until all the obtained samples are less than or equal to the preset sharding size.
[0094] Exemplarily, taking a multimedia file in MP4 format as an example, for the current data storage unit, that is, the data size of the box is 2MB, and the preset sharding size is 1.5MB. Then, one preset sharding sample of 1.5MB and one preset sharding sample of 0.5MB can be obtained from this data storage unit.
[0095] It should be understood that in step S301, the preset sharding samples obtained by dividing the current data storage unit are not directly stored in the total sample list mentioned in step S102, but are temporarily stored in a sub-sample list. When the division of the preset sharding samples of the data storage unit is completed, the sub-sample list is merged into the total sample list.
[0096] Step S203: When the data size of the data storage unit is less than the preset sharding size, regard the data storage unit as a preset sharding sample.
[0097] It should be understood that the data storage unit in step S203 is obtained by traversing the file unit list in step S201.
[0098] Specifically, for the currently traversed data storage unit, obtain the data size of this data storage unit and compare it with the preset sharding size. When the data size of the data storage unit is less than the preset sharding size, determine the data storage unit as a preset sharding sample.
[0099] It should be understood that in step S203, the preset sharding samples obtained by dividing the current data storage unit are directly stored in the total sample list mentioned in step S102.
[0100] It should be understood that step S202 and step S203 here are parallel steps. If step S202 is implemented, step S203 is not implemented; if step S203 is implemented, step S202 is not implemented.
[0101] In the embodiment of the present application, preset sharding samples are obtained through the preset sharding size, and the unit for which the hash value is to be calculated is reduced to the range of the preset sharding samples, reducing the data volume for hash value calculation on the server side.
[0102] Step S103: Determine the first hash value corresponding to each preset sharding sample according to the data size of each preset sharding sample and the offset relative to the starting position of the multimedia file.
[0103] It should be understood that the offset here is used to determine the original position of the preset shard sample in the multimedia file, and the specific value of the offset is not proportional to the preset shard size, but is related to the data size of the preset shard sample.
[0104] It should be understood that the first hash value here is not directly calculated from the data size and the offset, but the corresponding sample data is obtained from the data size and the offset, and the hash calculation is performed on the sample data.
[0105] It should be understood that the first hash value corresponding to each preset shard sample is stored in the corresponding position of the total sample list.
[0106] In some possible embodiments of the present application, step 103 can also determine the first hash value of the preset shard sample through the playback time information, that is, according to the data size, offset, and playback time information of each preset shard sample, determine the first hash value corresponding to each preset shard sample.
[0107] The embodiment of the present application realizes verification according to the playback time when playing the multimedia file on the client by using the playback time information to extract the corresponding content for hash value calculation and storing it in the order of the playback time information, so as to achieve the effect of verifying while playing, improve the verification efficiency, and improve the user experience.
[0108] The following takes a multimedia file in MP4 format as an example for illustration.
[0109] In MP4, the content that can be played, the audio that can be heard, or the subtitles that can be seen, which are the content that can be directly perceived by humans, are called tracks, that is, the so-called audio tracks, sound tracks, etc. The basic unit of a track is a chunk, and the basic unit of a chunk is a sample. Several samples form a chunk, and several chunks form a track. Tracks, chunks, and samples are all stored in corresponding boxes. Now calculate the hash value for the track. For all chunks, obtain their own offsets, the data sizes of the samples below them, the number of all samples, and the playback time information; divide according to the offset of the chunk itself, the data sizes of the samples below it, and the number of all samples to obtain multiple preset shard samples. For each preset shard sample, according to the data size of the corresponding sample, the number of all samples, and the playback time information, obtain a part of the corresponding chunk or the specific content of the entire chunk as the target, and perform hash calculation on the target to obtain the first hash value.
[0110] Please refer to Figure 3 ,Figure 3 is Figure 1 a schematic diagram of sub - steps of step S103. In some possible embodiments of the present application, step S103 includes but is not limited to the following sub - steps.
[0111] Step S301: Obtain the sample data corresponding to each preset shard sample from the multimedia file according to the data size of each preset shard sample and the offset relative to the starting position of the multimedia file.
[0112] It should be understood that the offset here is used to quickly read the sample data, and the corresponding sample data here refers to the specific data obtained from the multimedia file according to the data size and offset of the preset sample. Exemplarily, taking the example of step S101, if the data size is 1KB and the offset is 1KB, then the sample data corresponding to the preset shard sample is the specific value of each byte from the 1025th byte to the 2048th byte.
[0113] Specifically, traverse the total sample list, and for the preset shard sample traversed, obtain the corresponding sample data in the multimedia file according to the data size and offset of the preset shard sample.
[0114] In some possible embodiments of the present application, step S301 can also obtain the sample data corresponding to the preset shard sample from the multimedia file through the playback time information, that is, obtain the sample data corresponding to each preset shard sample from the multimedia file according to the data size of each preset shard sample, the offset relative to the starting position of the multimedia file, and the playback time information.
[0115] Step S302: Perform a hash calculation on the sample data corresponding to each preset shard sample to obtain the first hash value corresponding to each preset shard sample.
[0116] It should be understood that the hash algorithm used for the obtained first hash value is diverse. It can be the MD5 algorithm, or the SHA - 256 algorithm, or the SHA - 512 algorithm. Those skilled in the art can select a suitable hash algorithm according to actual needs for the calculation of the first hash value. Those skilled in the art can select a suitable hash algorithm according to actual needs to calculate the first calculated hash value, and the present application does not make any limitations in this regard.
[0117] Step S104: Determine the data to be signed corresponding to the multimedia file according to the data size, offset, and the first hash value of each preset shard sample.
[0118] It should be understood that the data to be signed here is generated based on the total sample list. In addition to the data size, offset, and first hash value of each preset shard sample, it may also include other information such as the algorithm identification information for calculating the first hash value and the information on the number of preset shard samples, etc., which can be obtained from the data size, offset, and first hash value of each preset shard sample.
[0119] It should be understood that for the information on the algorithm and the information on the number of preset shard samples here, those skilled in the art can obtain the information on the algorithm and the information on the number of preset shard samples according to the actual situation. Exemplarily, such as obtaining it based on the number of data sizes of the preset shard samples, or it can be determined according to the number of traversal times in step S301; Another example is that the corresponding hash algorithm information can be obtained according to the pre-set algorithm id. This application does not make any limitations in this regard.
[0120] It should be understood that in addition to the information listed above, the data to be signed may also include other information. Exemplarily, such as the position information of the preset shard sample in the total sample list, the time playback information of the preset shard sample, etc. Those skilled in the art can determine the data to be signed according to the actual security verification needs. This application does not make any limitations in this regard.
[0121] In some possible examples of this application, step S104 can also determine the data to be signed corresponding to the multimedia file according to the time information, that is, determine the data to be signed corresponding to the multimedia file according to the data size, offset, first hash value, and playback time information of each preset shard sample.
[0122] The embodiment of this application determines the data to be signed by adding the playback time information, ensuring that the sorting of the sample list in the verification information obtained by the client has the playback time characteristic, and verifying the samples according to the sorting by the playback time, so as to achieve the effect of verifying the multimedia file while playing it according to the playback time, improving the verification efficiency and the user experience.
[0123] Step S105: Sign the data to be signed according to the preset signature private key to obtain the signature verification information corresponding to the multimedia file.
[0124] Specifically, use the signature private key to process, parse the data to be signed, and perform encryption calculation to complete the signature process and obtain the signature verification information.
[0125] It should be understood that the source of the private key here is diverse. It can be the private key signature device set in the server of this application example, or the server of the independently set private key signature device. Those skilled in the art can select a suitable server to sign the data to be signed according to the actual needs. This application does not make any limitations in this regard.
[0126] Step S106: Use the signature verification information, the data sizes, offsets, and first hash values corresponding to each preset shard sample as the target verification information of the multimedia file, and send the multimedia file, the target verification information, and the signature public key corresponding to the signature private key to the client.
[0127] It should be understood that the form of sending the multimedia file, the target verification information, and the signature public key corresponding to the signature private key to the client is diverse. Exemplarily, for example, the target verification information and the signature public key are saved in separate files respectively, and the multimedia file and the other two files are sent to the client; or for another example, the target verification information and the multimedia file are integrated, the target verification information is written into the multimedia file, and the multimedia file and the file carrying the signature public key are sent to the client.
[0128] In some embodiments of the present application, step S106 includes: integrating the multimedia file according to the data sizes, offsets, first hash values, and playback time information of each preset shard sample, and the signature verification information.
[0129] It should be understood that the signature public key is sent in the form of a verification certificate, and the sending of the signature key is realized by relying on the PKI device in the server to send the certificate.
[0130] It should be understood that the sending timings of the multimedia file and the signature public key can be diverse. It can be synchronous sending or asynchronous sending. Those skilled in the art can determine the specific sending method according to actual needs, and the present application does not limit this.
[0131] In some embodiments of the present application, step S106 can also use the playback time information as the target verification information, that is, use the signature verification information, the data sizes, offsets, first hash values, and playback time information corresponding to each preset shard sample as the target verification information of the multimedia file.
[0132] Please refer to Figure 4 , Figure 4 For Figure 1 the schematic diagram of the sub-steps of step S106 in. In some possible embodiments of the present application, step S106 includes but is not limited to the following sub-steps.
[0133] Step S401: Generate a verification file corresponding to the multimedia file according to the target verification information.
[0134] It should be understood that the verification file here is saved independently of the multimedia file; the verification file here contains the data size, offset and first hash value of each preset slice sample, and may also contain information on the algorithm for calculating the first hash value and information on the number of preset slice samples, and other information that can be obtained from the data size, offset and first hash value of each preset slice sample. This application does not limit this.
[0135] Step S402: Send the multimedia file, the verification file, and the signature public key corresponding to the signature private key to the client.
[0136] It should be understood that the sending here refers to the sending of independent files, and its forms are diverse. For example, the verification file and the multimedia file are integrated into a file form that is convenient for sending to the client, such as zip, rar and other compressed package formats; another example is sending three files to the client separately.
[0137] Those skilled in the art can select an appropriate sending method to send the multimedia file, verification file, and the signature public key corresponding to the signature private key to the client according to actual needs, and this application does not limit this.
[0138] The embodiment of the present application improves the security of multimedia files by saving the verification data in an independent generated file to prevent external modification of the multimedia file by changing the data size, offset, hash value and verification information when the signature key is known.
[0139] Step S403: writing the target verification information into the multimedia file.
[0140] It should be understood that the "writing" mentioned here refers to writing to the custom storage area within the multimedia file. In addition to the basic components, multimedia files also include areas for user-edited data, known as custom areas. For example, in an MP4 format multimedia file, in addition to the basic boxes, the MP4 file also includes a UUID box, which is used to store custom data. For example, if you want to store some verification data in a UUID box, you can convert this verification data into a box-based data storage area within the UUID box.
[0141] Step S404: Send the multimedia file carrying the target verification information and the signature public key corresponding to the signature private key to the client.
[0142] It should be understood that the multimedia file here refers to a multimedia file with the same format as the multimedia file in step S101; and "generating" here refers to generating a multimedia file based on the data in the custom storage area and the original data of the multimedia file.
[0143] It should be understood that due to the existence of the written information, the data size of the multimedia file here is larger than the data size of the multimedia file.
[0144] It should be understood that steps S401 to S402 and steps S403 to S404 here are parallel steps. Implementing steps S401 to S402 will not implement steps S403 to S404, and implementing steps S403 to S404 will not implement steps S401 to S402.
[0145] The method provided in the first aspect of the embodiment of the present application divides the obtained multimedia file into preset shard samples on the server side, determines the first hash value according to the data size and offset, determines the data to be signed according to the data size, offset and the first hash value, signs the data to be signed, and integrates the multimedia file according to the data size, offset, the first hash value and the signature data, and sends the multimedia file together with the decryption public key to the client. By using the data size and offset samples to obtain the hash value and establishing multiple sample hash values to complete the verification of the entire file, the verification information is generated quickly, the hash operation efficiency is improved, the hash calculation of the entire multimedia file is avoided from consuming too much time, the verification time is reduced, the subsequent verification process of the client is optimized, and the verification efficiency is improved.
[0146] A multimedia file verification method provided by an embodiment of the present application will be specifically described through the following embodiments.
[0147] Please refer to Figure 5 , Figure 5 which is a schematic diagram of the steps of a multimedia file verification method provided by an embodiment of the present application. Figure 5 The method in
[0148] Step S501: Receive a multimedia file, target verification information and a signature public key from the server.
[0149] It should be understood that the server is connected to the client, and the server includes a PKI device, which sends a verification certificate to the client, and the verification certificate includes the signature public key corresponding to the signature verification information of the multimedia file.
[0150] It should be understood that the target verification information here includes signature verification information, the data size corresponding to each preset shard sample in the multimedia file, the offset relative to the starting position of the multimedia file, and the first hash value.
[0151] It should be understood that in addition to carrying the above-mentioned information, the multimedia file can also carry other information, all of which are stored in the total sample list. Exemplarily, such as the time information corresponding to the preset shard sample, which is not limited in this application.
[0152] In some possible embodiments of this application, the multimedia file also carries algorithm identification information for obtaining the hash algorithm corresponding to the first hash value.
[0153] Step S502: In response to the play instruction of the multimedia file, play the multimedia file and perform signature verification processing on the signature verification information based on the signature public key to obtain the signature verification result corresponding to the multimedia file.
[0154] It should be understood that the play instruction here refers to the instruction to play the multimedia content from the start position of the multimedia file, rather than the instruction to click on the multimedia file or the instruction to jump to play.
[0155] It should be understood that the signature verification processing here includes two verifications. The first verification is to verify the legality of the verification certificate, which is used to check whether the source of the certificate is legal. If it is not legal, the next verification will not be performed. The second verification is the public key verification, which is used to check whether the public key carried by the certificate is the corresponding public key. If it is not the corresponding public key, the verification information encrypted by the private key cannot be decrypted, so the verification of the subsequent verification information will not be performed either.
[0156] Step S503: When the signature verification result indicates that the verification is passed, perform hash verification processing on each preset shard sample in sequence.
[0157] Specifically, when the signature verification result indicates that it has passed, extract the total sample list from the multimedia file, extract the corresponding content according to the target verification information in the total sample list, calculate the hash value and perform hash value comparison to complete the hash verification processing.
[0158] It should be understood that performing hash verification processing in sequence here means using a traversal method to traverse the total sample list and perform hash verification processing on the currently traversed preset shard sample that meets the preset rules.
[0159] It should be understood that the preset rules here refer to judging the order of hash verification according to some information in the preset sample. Exemplarily, such as judging the currently processed preset shard sample for hash verification based on the addition order of the preset shard samples in the total sample list.
[0160] Please refer to Figure 6 , Figure 6 For Figure 5Schematic diagram of the hash verification process in step S503. In some possible embodiments of the present application, the hash verification process includes but is not limited to the following steps.
[0161] Step S601: Determine the second hash value corresponding to each preset shard sample according to the data size of the preset shard sample and the offset relative to the starting position of the multimedia file.
[0162] Specifically, according to the data size of each preset shard sample and the offset relative to the starting position of the multimedia file, obtain the sample data corresponding to each preset shard sample from the multimedia file, and calculate the second hash value for this sample data using a hash algorithm.
[0163] It should be understood that the hash algorithm here can be obtained by carrying the corresponding algorithm identification information in the total sample list, or the server can separately send the algorithm identification information to notify the client of the specific algorithm to be used in this playback. The present application does not limit this.
[0164] It should be understood that the second hash value and the first hash value represent different meanings here. The first hash value is the hash value of the sample data corresponding to the multimedia file in step S101, and the second hash value is the hash value of the sample data corresponding to the multimedia file in step S501; since the same hash algorithm is used for the corresponding preset shard samples, the data magnitudes of the first hash value and the second hash value are the same, and the specific numerical values are not necessarily the same. Exemplarily, if the numerical value of the first hash value is 256 bits, then the numerical value of the second hash value is also 256 bits, but the specific numerical values of the first hash value and the second hash value can be the same or different, depending on the sample data corresponding to the multimedia file received by the client.
[0165] Step S602: Compare the second hash value corresponding to the preset shard sample with the first hash value to obtain the hash verification result corresponding to the preset shard sample.
[0166] Specifically, compare the specific numerical values of the first hash value and the second hash value to determine whether they are the same; if the sample data corresponding to the corresponding preset shard sample is not modified during the transmission of the multimedia file to the client, then the first hash value and the second hash value are the same; if the sample data corresponding to the corresponding preset shard sample is modified during the transmission of the multimedia file to the client, then the first hash value and the second hash value are different.
[0167] In the embodiments of the present application, by calculating the hash value for sub-samples and using multiple sample hash values to implement segmented verification of multimedia files, the verification efficiency of large-volume multimedia files is improved.
[0168] Step S504: When the hash verification result corresponding to the preset sharded sample indicates that the verification fails, stop playing the multimedia file.
[0169] It should be understood that Step S504 is an asynchronous playback, which is executed asynchronously with Step S503. That is, first, the corresponding preset sharded sample is subjected to hash verification. When the hash verification indicates that the verification passes, the multimedia content corresponding to the preset sharded sample is played; when it indicates that the verification fails, the multimedia content corresponding to the preset sharded sample is stopped from being played.
[0170] The following gives an example of Step S504.
[0171] Assume that the sequential hash verification processing order of Sample A is prior to that of Sample B. The content corresponding to the playback of Sample A is the 1st to 30th frames of the multimedia file, and the content corresponding to the playback of Sample B is the 31st to 60th frames of the multimedia file. When the verification of Sample A indicates that it passes, the 1st to 30th frames will be played. During the playback of the 1st to 30th frames, the hash verification of Sample B will be performed and completed before the playback of the 1st to 30th frames is finished. When the verification result of Sample B indicates that it passes, the 31st frame will be played after the 30th frame is played. If the verification result of Sample B indicates that it fails, the multimedia file will be stopped from being played after the 30th frame is played.
[0172] Please refer to Figure 7 , Figure 7 which is a schematic diagram of the steps of another embodiment of the method provided in the second aspect of the present application. In some possible embodiments of the present application, between Step S503 and Step S504, the following steps are further included but not limited to the following.
[0173] Step S701: Update the preset verification status record table according to the hash verification result corresponding to the preset sharded sample.
[0174] It should be understood that the verification status record table here is used to record the hash verification status of each preset sharded sample. The acquisition method of this verification status table is diverse. It can be generated according to the total sample list or designed by itself. Those skilled in the art can design a suitable format of the verification status table according to the actual situation. The present application does not limit this.
[0175] It should be understood that the verification status here includes whether the preset sharded sample is verified and whether the verification passes. In addition, it can also include other information about the verification status. Exemplarily, such as the time when the preset sharded sample performs the verification. The present application does not limit this.
[0176] In some possible embodiments of the present application, the total sample list of the multimedia file in step S501 also carries the playing time information corresponding to each preset shard sample. Based on the playing time information corresponding to each preset shard sample, hash verification processing is performed on the corresponding preset shard samples in the order of playing time. When playing the multimedia file, the preset shard sample corresponding to the next moment of the current moment is verified, and verification is performed while playing according to the time information.
[0177] In the embodiment of the present application, by performing hash verification on the sample data corresponding to the next moment in chronological order, when the hash verification indicates passing, the content of the next moment can be played, achieving the effect of verifying the content of the next moment while playing the current content, improving the verification efficiency and the user's viewing experience.
[0178] The playing process includes but is not limited to the following steps.
[0179] Step S702: In response to the jump play instruction of the multimedia file, according to the play time point corresponding to the jump play instruction and the playing time information corresponding to each preset shard sample, determine the target shard sample.
[0180] It should be understood that the target shard sample here is the preset shard sample corresponding to the play time point; here, determining the target shard sample is to determine the target shard sample according to the play time point falling into the corresponding time range, and this time range is obtained from the playing time information corresponding to the preset shard sample. Exemplarily, if the play time point is the 15th second and the time information of sample A is from the 10th second to the 20th second, then the time range obtained from sample A is from the 10th to the 20th second, and since the play time point falls within this range, sample A is determined as the target shard sample.
[0181] Step S703: Obtain the hash verification status corresponding to the target shard sample from the verification status record table.
[0182] Specifically, query the verification status record table to obtain the hash verification status of the target shard sample from the verification status record table.
[0183] Step S704: When the hash verification status corresponding to the target shard sample indicates that the verification has passed, play the multimedia file from the play time point.
[0184] It should be understood that within the step of playing the multimedia file from the play time point, steps S503 to S504 will be executed until the entire multimedia file is played, or in response to the next jump play instruction.
[0185] Step S705: When the hash verification status corresponding to the target shard sample indicates that the verification has not been performed, perform hash verification processing on the target shard sample.
[0186] It should be understood that the hash verification process for the target shard sample here refers to that when the hash verification status corresponding to the target shard sample indicates that the verification has not been performed, the process jumps to step S503 for hash verification processing.
[0187] It should be understood that step S704 and step S705 here are parallel steps. If step S704 is executed, step S705 will not be executed; if step S705 is executed, step S704 will not be executed.
[0188] It should be understood that the obtained hash verification status will also be recorded in the verification status record table.
[0189] The method provided in the second aspect of the embodiments of the present application is that when the client receives a multimedia file and a signature public key, in response to a play instruction, the public key is used to verify the multimedia file, and then the hash value corresponding to the preset shard sample is verified according to the data size and offset. When the hash verification of the preset shard sample passes, the content corresponding to the sample is played. By using the data size and offset shard samples to obtain the hash value and completing the verification of the entire file with multiple sample hash values, the hash operation speed is improved, the time-consuming hash calculation of the entire multimedia file is avoided, the verification time is reduced, the verification process is optimized, and the verification efficiency is improved.
[0190] The embodiments of the present application also provide a device. The device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the above-mentioned method for digital signature of a multimedia file or the method for verifying a multimedia file. The device can be any intelligent terminal including a tablet computer, an in-vehicle computer, etc.
[0191] Please refer to Figure 8 , Figure 8 which is a schematic structural diagram of the device provided in the third aspect of the embodiments of the present application. The device 900 includes:
[0192] A processor 901, which can be implemented in a general-purpose CPU (Central Processing Unit, central processor), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0193] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 902 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 902 and are called by the processor 901 to execute a multimedia file digital signature method in the first aspect or a multimedia file verification method in the second aspect of the embodiments of this application;
[0194] The input / output interface 903 is used to implement information input and output;
[0195] The communication interface 904 is used to implement communication interaction between this device and other devices. Communication can be achieved through a wired method (such as USB, network cable, etc.) or through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.);
[0196] The bus 905 transmits information between the various components of the device (such as the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0197] Among them, the processor 901, the memory 902, the input / output interface 903, and the communication interface 904 achieve communication connections with each other inside the device through the bus 905.
[0198] The embodiments of this application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements a multimedia file digital signature method in the first aspect or a multimedia file verification method in the second aspect described above.
[0199] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include a high-speed random access memory and can also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory optionally includes a memory remotely set relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0200] A method, device, and storage medium for digital signature and verification of multimedia files proposed in this application. By dividing the obtained multimedia file into preset shard samples on the server side, determining the first hash value according to the data size and offset, determining the data to be signed according to the data size, offset, and the first hash value, signing the data to be signed, and integrating and sending the data size, offset, first hash value, and signature data together with the decryption public key to the client; by receiving the multimedia file and the signature public key on the client side, responding to the play instruction, using the public key to verify the multimedia file, and then verifying the hash value corresponding to the preset shard sample according to the data size and offset. When the hash verification of the preset shard sample passes, play the content corresponding to the sample. By using two types of information, data size and offset, to calculate the hash value corresponding to the content of the source file instead of calculating the hash value for the entire source file, the hash operation speed is improved, fast generation of verification information is achieved on the server side, and asynchronous processing of verifying while playing is achieved on the client side, avoiding spending too much time calculating the hash for the entire multimedia file, reducing the verification time, optimizing the verification process, and improving the verification efficiency.
[0201] The embodiments described in the embodiments of this application are for more clearly explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are equally applicable to similar technical problems.
[0202] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than those shown, or combine some steps, or different steps.
[0203] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, and their appropriate combinations.
[0204] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of this application and the above figures are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0205] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may mean: only A exists, only B exists, and both A and B exist simultaneously. Here, A and B can be singular or plural. The character " / " generally indicates an "or" relationship between the associated objects before and after. "At least one (item) of the following" or its similar expressions refer to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0206] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above devices is only for a division of implementation effects. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.
[0207] The units described above 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 can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0208] In addition, each functional unit in various embodiments of this application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0209] When an integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes: various media that can store programs, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.
[0210] The preferred embodiments of the embodiments of this application have been described above with reference to the accompanying drawings, which does not limit the scope of the rights of the embodiments of this application. Any modifications, equivalent replacements, and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of this application shall be within the scope of the rights of the embodiments of this application.
Claims
1. A digital signature method for multimedia files, applied to a server, characterized in that The method includes: Obtain a multimedia file; Perform a partitioning process on the multimedia file based on a preset shard size to obtain a plurality of preset shard samples; Determine a first hash value corresponding to each of the preset shard samples according to the data size, the offset relative to the starting position of the multimedia file, and the playback time information of each of the preset shard samples; Determine the data to be signed corresponding to the multimedia file according to the data size, the offset, the first hash value, and the playback time information of each of the preset shard samples; Perform a signature process on the data to be signed according to a preset signature private key to obtain signature verification information corresponding to the multimedia file; Use the signature verification information, and the data size, the offset, the first hash value, and the playback time information corresponding to each of the preset shard samples as the target verification information of the multimedia file; Generate a verification file corresponding to the multimedia file according to the target verification information, and send the multimedia file, the verification file, and the signature public key to the client.
2. The digital signature method for multimedia files according to claim 1, characterized in that Before performing the partitioning process on the multimedia file based on the preset shard size to obtain a plurality of preset shard samples, the method includes: Obtain a file unit list of the multimedia file, where the file unit list includes a plurality of data storage units; The performing a partitioning process on the multimedia file based on the preset shard size to obtain a plurality of preset shard samples includes: When the data size of the data storage unit is greater than the preset shard size, partition the data storage unit according to the preset shard size to obtain a plurality of preset shard samples; Or, when the data size of the data storage unit is less than or equal to the preset shard size, use the data storage unit as a preset shard sample.
3. A multimedia file verification method, applied to a client, characterized in that: The method includes: Receive the multimedia file obtained as in claim 1, the verification file corresponding to the multimedia file, and the signature public key, where the verification file includes target verification information, and the target verification information includes signature verification information, the data size, the offset relative to the starting position of the multimedia file, the playback time information, and the first hash value corresponding to each preset shard sample in the multimedia file; In response to a playback instruction of the multimedia file, play the multimedia file and perform a signature verification process on the signature verification information based on the signature public key to obtain a signature verification result corresponding to the multimedia file; When the signature verification result indicates that the verification is passed, perform a hash verification process on each of the preset shard samples in sequence, where the hash verification process includes: Determine a second hash value corresponding to each of the preset shard samples according to the data size, the offset relative to the starting position of the multimedia file, and the playback time information of the preset shard sample; Perform a comparison process on the second hash value corresponding to the preset shard sample and the first hash value to obtain a hash verification result corresponding to the preset shard sample; When the hash verification result corresponding to the preset shard sample indicates that the verification is not passed, stop playing the multimedia file.
4. The multimedia file verification method according to claim 3, wherein, The target verification information further includes playing time information corresponding to each of the preset shard samples; The sequentially performing hash verification processing on each of the preset shard samples includes: Based on the playing time information corresponding to each of the preset shard samples, sequentially performing the hash verification processing on each of the preset shard samples in the order of playing time.
5. The multimedia file verification method according to claim 4, wherein After comparing the second hash value corresponding to the preset shard sample with the first hash value to obtain the hash verification result corresponding to the preset shard sample, the method further includes: Updating a preset verification status record table according to the hash verification result corresponding to the preset shard sample, where the verification status record table is used to record the hash verification status of each of the preset shard samples; During the playing process of the multimedia file, the method further includes: In response to a jump play instruction of the multimedia file, determining a target shard sample according to the playing time point corresponding to the jump play instruction and the playing time information corresponding to each of the preset shard samples, where the target shard sample is the preset shard sample corresponding to the playing time point; Obtaining the hash verification status corresponding to the target shard sample from the verification status record table; When the hash verification status corresponding to the target shard sample indicates verification passed, playing the multimedia file from the playing time point; Or, when the hash verification status corresponding to the target shard sample indicates that verification has not been performed, performing the hash verification processing on the target shard sample.
6. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method and device for protecting network digital multimedia copyright
CN102891754A
Publicly audited data possession proving method in distributed storage system
CN110933044A