Content distribution network file verification method, device, equipment, medium and product

By generating summary files and protection files of the target file on the source site and verifying them in the content distribution network, the problem of files being tampered with during the content distribution network is solved, and the accuracy of file transfer is improved.

CN119276432BActive Publication Date: 2025-03-11BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411794080.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-11
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The content distribution network may cause files to be tampered with during the transmission process, resulting in file transfer errors.

Method used

The digest operation of the target file is performed on the source site, the first digest file is generated, and the first protection file of the first digest file is constructed. Then, the target file, the first summary file and the first protection file are sent to the content distribution network, and the content distribution network performs accuracy verification based on these files.

Benefits of technology

Through the verification of the first summary file and the first protection file, the accuracy of the target file during the transmission process is ensured, misjudgment caused by the tampering of the file, and the accuracy of file transmission of the content distribution network is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276432B_ABST
    Figure CN119276432B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of computer technology, and discloses a file verification method, device, equipment, medium and product for a content distribution network. The method includes: a source station performs a digest operation on a target file to obtain a first digest file, and constructs a first protection file for the first digest file. The file name of the first protection file is obtained by encrypting the file name of the first digest file based on a first encryption key corresponding to the target file, and the first protection file is used to verify the accuracy of the first digest file. The source station sends the target file, the first digest file and the first protection file to the content distribution network in response to an access request for the target file. The content distribution network verifies the accuracy of the received target file based on the first digest file and the first protection file. The present disclosure can solve the problem of file transmission errors caused by tampering with files transmitted by a content distribution network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a file verification method, device, equipment, medium and product for a content distribution network. Background Art

[0002] In the process of accelerating content distribution, the Content Delivery Network (CDN) service downloads the original file from the server storing the original file (referred to as the source site) to the CDN cache node, and the client downloads a copy of the original file from the CDN cache node that is closer. In order to ensure that the data transmitted on each segment of the network is not hijacked and tampered with, CDN manufacturers usually force the Hypertext Transfer Protocol Secure (HTTPS) to be enabled in each transmission link to use the Transport Layer Security (TLS) to encrypt the transmitted file copy. If the TLS certificate of the source site is leaked, the first file copy obtained by the CDN may be tampered with, resulting in CDN file transmission errors. Summary of the invention

[0003] In view of this, the present disclosure provides a method, apparatus, device, medium and product for verifying files in a content distribution network to solve the problem of file transmission errors caused by tampering of files transmitted in the content distribution network.

[0004] In a first aspect, the present disclosure provides a file verification method for a content distribution network, which is applied to a source station, and the method includes:

[0005] Get the target file;

[0006] Performing a digest operation on the target file to obtain a first digest file, wherein the first digest file is used to verify the accuracy of the target file;

[0007] constructing a first protection file for the first digest file, wherein the file name of the first protection file is obtained by encrypting the file name of the first digest file based on a first encryption key corresponding to the target file, and the first protection file is used to verify the accuracy of the first digest file;

[0008] In response to an access request for the target file, the target file, the first summary file and the first protection file are sent to a content distribution network, and the content distribution network is used to perform accuracy verification on the received target file based on the first summary file and the first protection file.

[0009] In a second aspect, the present disclosure provides a file verification method for a content distribution network, which is applied to a network node of the content distribution network, and the method includes:

[0010] In response to an access request for a target file, the target file, a first digest file, and a first protection file are acquired, wherein the first digest file is obtained by a source station performing a digest operation on the target file, the first protection file is constructed by the source station based on the first digest file, and the file name of the first protection file is obtained by the source station encrypting the file name of the first digest file based on a first encryption key corresponding to the target file;

[0011] Constructing a second protection file of the first summary file;

[0012] Obtaining a verification result of the first summary file based on a comparison result between the first protection file and the second protection file;

[0013] If the first summary file is successfully verified, performing a summary operation on the target file to obtain a second summary file;

[0014] Based on the comparison result of the first summary file and the second summary file, a verification result of the target file is obtained.

[0015] In a third aspect, the present disclosure provides a file verification device for a content distribution network, applied to a source station, the device comprising:

[0016] A target file acquisition module is used to acquire the target file;

[0017] A summary file generating module, used for performing a summary operation on the target file to obtain a first summary file, wherein the first summary file is used for verifying the accuracy of the target file;

[0018] a protection file generating module, configured to construct a first protection file of the first summary file, wherein the file name of the first protection file is obtained by encrypting the file name of the first summary file based on a first encryption key corresponding to the target file, and the first protection file is used to verify the accuracy of the first summary file;

[0019] A distribution data sending module is used to send the target file, the first summary file and the first protection file to a content distribution network in response to an access request for the target file, and the content distribution network is used to perform accuracy verification on the received target file based on the first summary file and the first protection file.

[0020] In a fourth aspect, the present disclosure provides a file verification device for a content distribution network, which is applied to a network node of the content distribution network, and the device includes:

[0021] a distribution data receiving module, configured to obtain, in response to an access request for a target file, the target file, a first digest file, and a first protection file, wherein the first digest file is obtained by a source station performing a digest operation on the target file, the first protection file is constructed by the source station based on the first digest file, and the file name of the first protection file is obtained by the source station encrypting the file name of the first digest file based on a first encryption key corresponding to the target file;

[0022] A protection file construction module, used for constructing a second protection file of the first summary file;

[0023] a summary file verification module, configured to obtain a verification result of the first summary file based on a comparison result between the first protection file and the second protection file;

[0024] A summary file construction module, configured to perform a summary operation on the target file to obtain a second summary file if the first summary file verification succeeds;

[0025] The target file verification module is used to obtain a verification result of the target file based on a comparison result of the first summary file and the second summary file.

[0026] In a fifth aspect, the present disclosure provides an electronic device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the file verification method of the content distribution network of the first aspect or the second aspect by executing the computer instructions.

[0027] In a sixth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the file verification method for a content distribution network of the first aspect or the second aspect.

[0028] In a seventh aspect, the present disclosure provides a computer program product, including computer instructions, where the computer instructions are used to enable a computer to execute the file verification method for a content distribution network of the first aspect or the second aspect.

[0029] In the file verification method of the content distribution network provided by the embodiment of the present disclosure, the source station obtains the first summary file by performing a summary operation on the target file, so that the content distribution network verifies the accuracy of the received target file through the first summary file. At the same time, the source station constructs a first protection file for the first summary file, so that the content distribution network verifies the accuracy of the first summary file by obtaining the first protection file, so as to avoid the content distribution network from mistakenly judging that the received target file is consistent with the target file of the source station due to the target file and the first summary file being tampered with at the same time. Moreover, since the file name of the first protection file is obtained by encrypting the file name of the first summary file based on the first encryption key, if the construction method of the first protection file and the first encryption key are not leaked at the same time, a third party cannot guess the file name of the first protection file, and thus cannot tamper with the file content of the first protection file. Therefore, the accuracy of the first summary file verification can be further guaranteed to effectively improve the accuracy of the content distribution network during file transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0031] Figure 1 is a flowchart of a first method for verifying a file in a content distribution network according to an embodiment of the present disclosure;

[0032] Figure 2 is a schematic diagram of a distribution process of a content distribution network according to an embodiment of the present disclosure;

[0033] Figure 3 is a flow chart of a second method for verifying a file in a content distribution network according to an embodiment of the present disclosure;

[0034] Figure 4 is a schematic diagram of a process of processing a target file by a source station according to an embodiment of the present disclosure;

[0035] Figure 5 is a flowchart of a third method for verifying a file in a content distribution network according to an embodiment of the present disclosure;

[0036] Figure 6 It is a schematic diagram of a process of verifying a target file by a network node according to an embodiment of the present disclosure;

[0037] Figure 7is a flowchart of a fourth method for verifying a file in a content distribution network according to an embodiment of the present disclosure;

[0038] Figure 8 is a schematic diagram of an error handling process according to an embodiment of the present disclosure;

[0039] Fig. 9 It is a schematic diagram of the overall processing flow of a file verification method for a content distribution network according to an embodiment of the present disclosure;

[0040] Fig.10 is a structural block diagram of a file verification device for a content distribution network according to an embodiment of the present disclosure;

[0041] Fig.11 is a structural block diagram of another file verification device for a content distribution network according to an embodiment of the present disclosure;

[0042] Fig.12 is a structural block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0044] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0045] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0046] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0047] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0048] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0049] Content Delivery Network (CDN) service is a network service that accelerates content distribution and optimizes user access experience by deploying services in multiple geographical locations. In the process of accelerating content distribution, CDN service downloads the original file from the server storing the original file (hereinafter referred to as the source station) to the CDN cache node, and the client downloads the file copy of the original file from the CDN cache node that is closer. Among them, since the network bandwidth of the CDN cache node is more sufficient and closer to the user, the client can download the file copy from the CDN cache node at a faster download speed. In the process of transmitting the original file through CDN, it will pass through many networks and servers. For example, the source station transmits the file to the CDN back-to-source node via the public network, the CDN back-to-source node transmits the file to the CDN edge node via the internal network, and the CDN edge node transmits the file to the client's computer disk via the public network. A copy of the original file is stored in each node.

[0050] In related technologies, CDN vendors usually force Hypertext Transfer Protocol Secure (HTTPS) to be enabled in each transmission link to encrypt the transmitted file copy using Transport Layer Security (TLS) in order to ensure that the data transmitted on each segment of the network is not hijacked or tampered with. If the TLS certificate of the source station is leaked, the first file copy obtained by the CDN may be tampered with, making it impossible to guarantee the accuracy of the CDN acceleration software itself writing to the disk, let alone the accuracy of the file copy downloaded by the client.

[0051] To address this issue, other related technologies propose to calculate a summary file for the original file at the source site in advance, and the client downloads the original file and the corresponding summary file at the same time. Then, the summary file of the downloaded original file is calculated, and the calculated summary file is compared with the downloaded summary file to determine the accuracy of the downloaded file. However, this solution can only allow users to clearly know whether the obtained original file is consistent with the summary file. If the original file and the summary file are tampered with at the same time, the client will mistakenly determine that the received original file is correct. Not only that, even if the original file is judged to be wrong, it is impossible to determine which nodes on the CDN network store the correct file copies, and it is impossible to know which link in the transmission link caused the original file download error, and the distribution service of the original file cannot be quickly restored.

[0052] In view of this, according to an embodiment of the present disclosure, an embodiment of a file verification method for a content distribution network is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0053] In this embodiment, a first method for verifying files in a content distribution network is provided, which can be used in a source station. Figure 1 FIG. 1 is a flow chart of a first method for verifying a file in a content distribution network according to an embodiment of the present disclosure. Figure 1 As shown, the process includes the following steps:

[0054] Step S101, obtaining a target file.

[0055] Specifically, the target file is a file in the source station that needs to be transmitted through the content distribution network.

[0056] Step S102: performing a digest operation on the target file to obtain a first digest file, wherein the first digest file is used to verify the accuracy of the target file.

[0057] Specifically, a digest operation may be performed on the target file using a digest algorithm such as a secure hash algorithm (SHA) or a message digest algorithm (MD5) to obtain a first digest file.

[0058] Optionally, a digest operation is performed on the target file using a secure hash algorithm to obtain a first digest file, such as Secure Hash Algorithm 1 (SHA-1 for short).

[0059] Step S103, constructing a first protection file of the first summary file. The file name of the first protection file is obtained by encrypting the file name of the first summary file based on the first encryption key corresponding to the target file. The first protection file is used to verify the accuracy of the first summary file.

[0060] Specifically, an algorithm for verifying the accuracy of a file, such as a secure hash algorithm, a message digest algorithm, or a cyclic redundancy check algorithm, may be used to process the first digest file to obtain the first protected file.

[0061] It can be understood that after generating the first summary file, further constructing a first protection file of the first summary file can facilitate the content distribution network to further verify whether the first summary file is tampered with together with the target file during transmission through the first protection file.

[0062] Step S104, in response to an access request for the target file, sending the target file, the first summary file and the first protection file to the content distribution network, the content distribution network is used to perform accuracy verification on the received target file based on the first summary file and the first protection file.

[0063] Specifically, Figure 2 As shown, the client sends an access request for the target file, and the access request is transmitted to the edge node of the content distribution network via the public network. The edge node transmits the access request to the back-to-source node of the content distribution network, and the back-to-source node transmits the access request to the source station via the internal network. In response to the access request, the source station transmits the relevant files to the back-to-source node, the edge node and the client in sequence. Among them, when the back-to-source node and the edge node of the content distribution network transmit the target file to the next node, they will request the first summary file and the first protection file of the target file to verify the accuracy of the target file. If the verification is successful, the target file will be transmitted to the next node. After receiving the target file and the first summary file, the client performs a summary operation on the target file and compares the file content of the first summary file with the summary operation result. If the file content of the first summary file is consistent with the summary operation result, it indicates that the received target file is correct.

[0064] In the file verification method of the content distribution network provided by this embodiment, the source station obtains the first summary file by performing a digest operation on the target file, so that the content distribution network verifies the accuracy of the received target file through the first summary file. At the same time, the source station constructs a first protection file for the first summary file, so that the content distribution network verifies the accuracy of the first summary file by obtaining the first protection file, so as to avoid the content distribution network from mistakenly judging that the received target file is consistent with the target file of the source station due to the target file and the first summary file being tampered with at the same time. Moreover, since the file name of the first protection file is obtained by encrypting the file name of the first summary file based on the first encryption key, if the construction method of the first protection file and the first encryption key are not leaked at the same time, a third party cannot guess the file name of the first protection file, and thus cannot tamper with the file content of the first protection file. Therefore, the accuracy of the first summary file verification can be further guaranteed, so as to effectively improve the accuracy of the content distribution network in the file transmission process.

[0065] In this embodiment, a second method for verifying files in a content distribution network is provided, which can be used in a source station. Figure 3 FIG. 1 is a flow chart of a second method for verifying a file in a content distribution network according to an embodiment of the present disclosure. Figure 3 As shown, the process includes the following steps:

[0066] Step S301, obtaining a target file, see the above step S101 for details, which will not be described in detail here.

[0067] Step S302: performing a digest operation on the target file to obtain a first digest file, wherein the first digest file is used to verify the accuracy of the target file.

[0068] Specifically, the above step S302 includes:

[0069] Step S3021, performing a digest operation on the target file to obtain the file content of the first digest file.

[0070] Specifically, a digest operation is performed on the target file using a first digest algorithm to obtain the file content of the first digest file.

[0071] Optionally, the first digest algorithm is a secure hash algorithm, such as secure hash algorithm 1. In addition, the first digest algorithm may also be adjusted according to actual needs, which is not limited here.

[0072] Step S3022: adding a preset summary file identifier to the file name of the target file to generate a file name of the first summary file.

[0073] Specifically, the preset digest file identifier may be added to the first preset position in the file name of the target file, for example, the preset digest file identifier may be added as a suffix to the end of the file name of the target file.

[0074] Furthermore, the preset digest file identifier is related to the digest algorithm (ie, the first digest algorithm) used when performing a digest operation on the target file.

[0075] For example, secure hash algorithm 1 is used as the first digest algorithm, and the preset digest file identifier is ".sha1". Assuming that the file name of the target file is "test.file", the ".sha1" suffix can be added to "test.file" to obtain the file name of the first digest file as "test.file.sha1".

[0076] Step S303, constructing a first protection file of the first summary file. The file name of the first protection file is obtained by encrypting the file name of the first summary file based on the first encryption key corresponding to the target file. The first protection file is used to verify the accuracy of the first summary file.

[0077] Specifically, the above step S303 includes:

[0078] Step S3031: perform a digest operation on the first digest file to obtain the file content of the first protected file.

[0079] Specifically, a digest operation is performed on the first digest file using the second digest algorithm to obtain the file content of the first protected file.

[0080] Optionally, the second digest algorithm is a secure hash algorithm, such as secure hash algorithm 1. In addition, the second digest algorithm may also be adjusted according to actual needs, which is not limited here.

[0081] Step S3032, obtaining a first encryption key corresponding to the target file.

[0082] Specifically, users of the content distribution network service can configure domain names through the control platform of the content distribution network. During the domain name configuration process, encryption keys for each domain name can be configured. The domain name corresponding to the target file will be carried in the access request for the target file, and the encryption key corresponding to the domain name can be queried to obtain the first encryption key.

[0083] Optionally, the first encryption key is an 8-bit random character string key. It should be noted that this is only an example, and the first encryption key can be adjusted according to actual conditions.

[0084] Step S3033: encrypt the file name of the first digest file based on the first encryption key to generate a file name of the first protected file.

[0085] Specifically, the first encryption key and the file name of the first summary file are concatenated, and a digest operation is performed on the concatenated result to obtain the file name of the first protection file. Alternatively, the file name of the first summary file is processed using the first encryption key and other algorithms for verifying the accuracy of the file to generate the file name of the first protection file.

[0086] Step S304: in response to the access request for the target file, the target file, the first summary file and the first protection file are sent to the content distribution network, and the content distribution network is used to verify the accuracy of the received target file based on the first summary file and the first protection file.

[0087] The file verification method of the content distribution network provided by this embodiment, on the one hand, adds a preset summary file identifier to the file name of the target file to obtain the file name of the first summary file. Therefore, the target file can be associated with the first summary file, so as to facilitate the subsequent search for the first summary file corresponding to the target file. On the other hand, the summary operation is performed on the first summary file to obtain the file content of the first protection file. And based on the first encryption key corresponding to the target file and the file name of the first summary file, the file name of the first protection file is generated. Therefore, the first protection file can be associated with the first summary file, so as to facilitate the subsequent search for the protection file corresponding to the first summary file. At the same time, it is ensured that the generated first protection file can be used to verify the accuracy of the first summary file.

[0088] In some optional implementations, the above step S3033 includes:

[0089] Step a1, concatenate the first encryption key and the file name of the first digest file to obtain a target character string.

[0090] Specifically, the first encryption key may be concatenated after the file name of the first summary file. Alternatively, the first encryption key may be concatenated before the file name of the first summary file. Alternatively, the first encryption key and the file name of the first summary file may be concatenated according to a preset concatenation template to obtain a target character string. The concatenation method of the first encryption key and the file name of the first summary file is not limited herein.

[0091] Exemplarily, taking the example of concatenating the first encryption key to the end of the file name of the first digest file, assuming that the first encryption key is "9ddda6c" and the file name of the first digest file is "test.file.sha1", the concatenated target string is "test.file.sha19ddda6c".

[0092] Step a2, performing a digest operation on the target string to obtain an initial file name.

[0093] Specifically, a digest operation is performed on the target character string using a third digest algorithm to obtain an initial file name.

[0094] Optionally, the third digest algorithm is a message digest algorithm. In addition, the third digest algorithm can also be adjusted according to actual needs, for example, a secure hash algorithm, etc., which is not limited here.

[0095] Step a3, adding a preset protection file identifier to the initial file name to obtain a file name of the first protection file.

[0096] Specifically, the preset protection file identifier may be added to a second preset position in the initial file name, for example, the preset protection file identifier may be added as a suffix to the end of the initial file name.

[0097] Furthermore, the preset protection file identifier is related to the digest algorithm (ie, the third digest algorithm) used when performing a digest operation on the target character string.

[0098] For example, a message digest algorithm is used as the third digest algorithm, and the preset protection file identifier is ".md5". Assuming that the initial file name is "9b574b9", the ".md5" suffix can be added to "9b574b9" to obtain the file name of the first protection file "9b574b9.md5".

[0099] The file verification method of the content distribution network provided in this embodiment first concatenates the first encryption key and the file name of the first summary file to obtain a target string. Therefore, the first protection file can be associated with the first summary file. Then, a digest operation is performed on the target string to obtain an initial file name. Therefore, it is possible to prevent the file name of the first protection file from leaking the information of the corresponding first summary file, thereby preventing the first protection file of the first summary file from being tampered with. Then, a preset protection file identifier is added to the initial file name to obtain the file name of the first protection file. Therefore, it is possible to facilitate the content distribution network to determine the protection file through the preset protection file identifier.

[0100] In some optional implementations, the file verification method of the content distribution network of the present disclosure further includes: determining a second encryption key in response to an update instruction for the first encryption key; and updating the file name of the first protected file based on the second encryption key to obtain a second protected file.

[0101] Specifically, when a user changes the encryption key of the domain name corresponding to the target file on the control platform of the content distribution network, the first encryption key corresponding to the target file is changed, and an update instruction for the first encryption key is generated, which includes the second encryption key. The source station updates the first encryption key based on the second encryption key, and updates the file name of the first protected file based on the second encryption key to obtain the second protected file.

[0102] Specifically, the second encryption key is concatenated with the file name of the first summary file to obtain an updated string. A summary operation is performed on the updated string to obtain an updated file name. A preset protection file identifier is added to the updated file name to obtain a file name of the second protection file. The file content of the second protection file is consistent with the file content of the first protection file.

[0103] The file verification method of the content distribution network provided by this embodiment can reduce the risk of encryption key leakage by updating the encryption key. When the first encryption key is updated, the file name of the first protection file is updated based on the updated second encryption key to obtain the second protection file. Therefore, when the encryption key is changed, the protection file of the first summary file is updated in time to avoid the first summary file verification error caused by the encryption key change, and further improve the accuracy and security of the content distribution network file transmission.

[0104] Furthermore, the file verification method of the content distribution network disclosed in the present invention also includes: in response to the second protection file, sending a key update instruction to the content distribution network, the key update instruction is used by the content distribution network to update the locally stored first encryption key to the second encryption key; if the first encryption key of the content distribution network is updated, the first protection file is deleted.

[0105] Specifically, the preset update completion time can be determined according to the encryption key update delay of the network nodes in the content distribution network, and when the time between the issuance time of the key update instruction and the current time reaches the preset update completion time, it is determined that the first encryption key update of the content distribution network is completed. In addition, when the encryption key update is completed, each network node of the content distribution network can send key update completion information to the source station to notify the source station that the encryption key update of the network node is completed, so that the source station can determine the overall update status of the encryption keys of the network nodes in the content distribution network.

[0106] It is understandable that, since there are multiple network nodes in the content distribution network, some network nodes may have a slower update speed. For example, the encryption key of network node A has been updated, but the encryption key of network node B has not been updated. At this time, there will be two encryption keys for the same target file in the content distribution network. If the first protection file is deleted at this time, network node B will not be able to obtain the corresponding protection file through the first encryption key stored locally, resulting in a verification error of the first summary file. Therefore, in the case where the first encryption key of a network node in the content distribution network has not been updated, the first protection file needs to be retained so that the network node can verify the accuracy of the local first summary file through the first protection file or the second protection file. Wait until the first encryption keys of all network nodes in the content distribution network are updated, and then delete the first protection file.

[0107] The file verification method of the content distribution network provided in this embodiment sends a key update instruction to the content distribution network, so that the encryption key of the source station and the content distribution network can be synchronized, and the reliability of the file accuracy verification can be improved. After the encryption key of the content distribution network is updated, the first protection file is deleted. Therefore, it can avoid that the encryption key of some network nodes has not been updated and misjudged the first summary file.

[0108] As a specific example, Figure 4 As shown, the process of processing the target file in the source station using the file verification method of the content distribution network disclosed in the present invention mainly includes the following steps: Step S401, performing a digest operation on the target file to obtain a first digest file. Step S402, performing a digest operation on the file content of the first digest file to obtain the file content of the first protection file. Step S403, generating a file name of the first protection file based on the first encryption key corresponding to the target file and the file name of the first digest file, so that the content distribution network can perform accuracy verification on the received target file according to the first digest file and the first protection file.

[0109] In this embodiment, a third method for verifying files in a content distribution network is provided, which can be used in network nodes of a content distribution network, such as a back-to-source node or an edge node. Figure 5 FIG. 1 is a flow chart of a third method for verifying a file in a content distribution network according to an embodiment of the present disclosure. Figure 5 As shown, the process includes the following steps:

[0110] Step S501, in response to an access request for a target file, obtain a target file, a first digest file, and a first protection file, wherein the first digest file is obtained by the source station performing a digest operation on the target file, the first protection file is constructed by the source station based on the first digest file, and the file name of the first protection file is obtained by the source station encrypting the file name of the first digest file based on a first encryption key corresponding to the target file.

[0111] Specifically, when a network node receives the correct target file for the first time, it will store the target file locally. If a network node receives an access request for a target file, the network node first searches locally to see if the target file is stored. If the target file is not stored, the network node requests the target file from the previous node, and so on, until the request reaches the source station. If the target file is completely written to the local disk, the bypass detection logic is triggered to detect the accuracy of the target file.

[0112] Specifically, the above step S501 includes: in response to an access request for a target file, obtaining a target file. Determining a file name of a first summary file according to the file name of the target file and a preset summary file identifier. Then determining a file name of a first protection file according to the file name of the first summary file. Requesting a first protection file according to the file name of the first protection file. Requesting a first summary file from a domain name corresponding to the target file based on the file name of the first summary file.

[0113] For example, if the target file is named "test.file" and the preset digest file identifier is ".sha1", the first digest file can be named "test.file.sha1". The file name of the first protected file is determined by "test.file.sha1", for example, "9b574b9.md5", and the first protected file is requested according to "9b574b9.md5". And the first digest file is obtained according to the request of "test.file.sha1".

[0114] In addition, the target file and the corresponding first summary file may be obtained in response to an access request for the target file, and the file name of the first protection file may be directly determined according to the file name of the first summary file to request the first protection file.

[0115] It should be noted that the way in which the source station generates the first summary file and the first protection file can be found in the description of the above embodiment, and will not be described in detail here.

[0116] Step S502: construct a second protection file of the first summary file.

[0117] Specifically, an algorithm for verifying the accuracy of a file, such as a secure hash algorithm, a message digest algorithm, or a cyclic redundancy check algorithm, may be used to process the first digest file to obtain the second protected file.

[0118] Step S503: obtaining a verification result of the first summary file based on the comparison result of the first protection file and the second protection file.

[0119] Specifically, if the file content of the first protection file is inconsistent with the file content of the second protection file, it indicates that the first summary file has been tampered with, and the verification result of the first summary file is that the first summary file verification failed. If the file content of the first protection file is consistent with the file content of the second protection file, it indicates that the first summary file has not been tampered with, and the verification result of the first summary file is that the first summary file verification succeeded.

[0120] Step S504: If the first summary file is successfully verified, a summary operation is performed on the target file to obtain a second summary file.

[0121] Specifically, a digest operation may be performed on the target file using a digest algorithm such as a secure hash algorithm or a message digest algorithm to obtain a second digest file.

[0122] Optionally, a digest operation is performed on the target file using a secure hash algorithm to obtain a first digest file, such as secure hash algorithm 1.

[0123] It should be noted that in actual operation, it is necessary to ensure that the digest algorithm used by the first digest file and the second digest file is consistent. The generation method of the second digest file can refer to the generation method of the first digest file in the source station, and will not be repeated here.

[0124] Step S505: obtaining a verification result of the target file based on the comparison result of the first summary file and the second summary file.

[0125] Specifically, if the file content of the first summary file is inconsistent with the file content of the second summary file, it indicates that the target file has been tampered with, and the verification result of the target file is that the target file verification fails. If the file content of the first summary file is consistent with the file content of the second summary file, it indicates that the target file has not been tampered with, and the verification result of the target file is that the target file verification succeeds.

[0126] It should be noted that if the target file and the first summary file stored in all network nodes in the content distribution network are verified successfully, it means that all network nodes in the content distribution network store the correct target file, the first summary file and the first protection file.

[0127] The file verification method of the content distribution network provided in this embodiment is that the content distribution network first verifies the accuracy of the first summary file by obtaining the first protection file, thereby avoiding the target file and the first summary file being tampered with at the same time and mistakenly judging that the received target file is correct, so as to improve the accuracy of the file verification of the content distribution network, and further improve the accuracy of the file transmission of the content distribution network. Then, in the case where the first summary file verification is successful, the accuracy of the target file is further verified by the first summary file of the target file generated by the source station. Therefore, the accuracy of the file transmission of the content distribution network can be further improved.

[0128] In some optional implementations, in the above step S501, obtaining the first protection file includes:

[0129] Step b1, obtaining a first encryption key corresponding to the target file.

[0130] Optionally, the first encryption key is an 8-bit random character string key. It should be noted that this is only an example, and the first encryption key can be adjusted according to actual conditions.

[0131] Step b2: encrypting the file name of the first digest file based on the first encryption key to generate the file name of the first protected file.

[0132] Specifically, the first encryption key and the file name of the first summary file are concatenated, and a digest operation is performed on the concatenated result to obtain the file name of the first protection file. Alternatively, the file name of the first summary file is processed using the first encryption key and other algorithms for verifying the accuracy of the file to generate the file name of the first protection file.

[0133] Step b3: downloading the first protected file based on the file name of the first protected file.

[0134] Specifically, based on the file name of the first protection file, a request is made to the domain name corresponding to the target file for the first protection file.

[0135] The file verification method for a content distribution network provided by this embodiment generates a file name of a first protection file by using a first encryption key and a file name of a first summary file, and then downloads the first protection file by using the file name of the first protection file. Therefore, on the one hand, the first protection file can be associated with the first summary file, so as to facilitate subsequent query of the protection file corresponding to the first summary file. At the same time, the first protection file of the first summary file can be prevented from being tampered with.

[0136] In some optional implementations, the above step b2 includes:

[0137] Step b21, concatenate the first encryption key and the file name of the first digest file to obtain a target character string.

[0138] Specifically, the first encryption key may be concatenated after the file name of the first summary file. Alternatively, the first encryption key may be concatenated before the file name of the first summary file. Alternatively, the first encryption key and the file name of the first summary file may be concatenated according to a preset concatenation template to obtain a target character string. The concatenation method of the first encryption key and the file name of the first summary file is not limited herein.

[0139] Exemplarily, taking the example of concatenating the first encryption key to the end of the file name of the first digest file, assuming that the first encryption key is "9ddda6c" and the file name of the first digest file is "test.file.sha1", the concatenated target string is "test.file.sha19ddda6c".

[0140] Step b22, performing a digest operation on the target character string to obtain an initial file name.

[0141] Specifically, a digest operation is performed on the target character string using a third digest algorithm to obtain an initial file name.

[0142] Optionally, the third digest algorithm is a message digest algorithm. In addition, the third digest algorithm can also be adjusted according to actual needs, for example, a secure hash algorithm, etc., which is not limited here.

[0143] It can be understood that the source station and the network node use the same digest algorithm when performing digest operations on the target character string, so it can ensure that the initial file name is correctly parsed from the file name of the first digest file.

[0144] Step b23, adding a preset protection file identifier to the initial file name to obtain a file name of the first protection file.

[0145] Specifically, the preset protection file identifier may be added to a second preset position in the initial file name, for example, the preset protection file identifier may be added as a suffix to the end of the initial file name.

[0146] Furthermore, the preset protection file identifier is related to the digest algorithm (ie, the third digest algorithm) used when performing a digest operation on the target character string.

[0147] For example, a message digest algorithm is used as the third digest algorithm, and the preset protection file identifier is ".md5". Assuming that the initial file name is "9b574b9", the ".md5" suffix can be added to "9b574b9" to obtain the file name of the first protection file "9b574b9.md5".

[0148] The file verification method for a content distribution network provided in this embodiment, in the process of generating the file name of the first protection file, concatenates the first encryption key with the file name of the first summary file, performs a digest operation on the concatenation result, and obtains an initial file name. Therefore, it is convenient to subsequently search for the protection file corresponding to the first summary file, and at the same time, prevent the protection file of the first summary file from being leaked. Then, a preset protection file identifier is added to the file name of the first protection file. Therefore, it is convenient for the content distribution network to quickly locate the first protection file through the preset protection file identifier, and improve the verification efficiency of the first summary file.

[0149] In some optional implementations, the file verification method for a content distribution network of the present disclosure further includes: determining a second encryption key in response to a key update instruction; and updating the first encryption key to the second encryption key.

[0150] Specifically, the key update instruction is issued by the source station after updating the protection file of the first digest file based on the second encryption key.

[0151] The file verification method of the content distribution network provided in this embodiment updates the first encryption key stored locally in response to the key update instruction, thereby being able to synchronize the encryption keys of the source station and the content distribution network, and improving the reliability of file accuracy verification.

[0152] In some optional implementations, the file content of the first protection file is obtained by the source station performing a digest operation on the first digest file. The above step S502 includes: performing a digest operation on the first digest file to obtain the file content of the second protection file.

[0153] Specifically, a digest operation is performed on the first digest file using the second digest algorithm to obtain the file content of the second protected file.

[0154] Optionally, the second digest algorithm is a secure hash algorithm, such as secure hash algorithm 1. In addition, the second digest algorithm may also be adjusted according to actual needs, which is not limited here.

[0155] It should be noted that the digest algorithms used to generate the file contents of the first protection file and the second protection file are the same.

[0156] The file verification method for a content distribution network provided in this embodiment calculates the file content of the second protection file in the same manner as the file content of the first protection file, thereby ensuring the reliability of the accuracy verification of the first summary file.

[0157] As a specific example, Figure 6As shown, the processing flow of verifying the target file by using the file verification method of the content distribution network disclosed in the network node mainly includes the following steps: Step S601, based on the file name of the first summary file and the first encryption key corresponding to the target file, generate the file name of the first protection file. Step S602, download the first protection file based on the file name of the first protection file. Step S603, download the first summary file based on the file name of the first summary file. Step S604, perform a summary operation on the first summary file to obtain a second protection file. Step S605, based on the comparison result of the first protection file and the second protection file, obtain the verification result of the first summary file. Step S606, if the verification of the first summary file is successful, perform a summary operation on the target file to obtain the second summary file. Step S607, based on the comparison result of the first summary file and the first summary file, obtain the verification result of the target file. It should be noted that the downloading order of the first summary file and the first protection file can be interchanged, and there is no restriction here.

[0158] In this embodiment, a fourth method for verifying files in a content distribution network is provided, which can be used in a network node of a content distribution network. Figure 7 FIG. 4 is a flow chart of a fourth method for verifying a file in a content distribution network according to an embodiment of the present disclosure. Figure 7 As shown, the process includes the following steps:

[0159] Step S701, in response to an access request for a target file, obtain a target file, a first digest file, and a first protection file, wherein the first digest file is obtained by the source station performing a digest operation on the target file, the first protection file is constructed by the source station based on the first digest file, and the file name of the first protection file is obtained by the source station encrypting the file name of the first digest file based on the first encryption key corresponding to the target file. Please refer to the above step S501, which will not be described in detail here.

[0160] Step S702, constructing a second protection file of the first summary file. Please refer to the above step S502, which will not be described in detail here.

[0161] Step S703: Based on the comparison result between the first protection file and the second protection file, the verification result of the first summary file is obtained. Please refer to the above step S503, which will not be described in detail here.

[0162] Step S704: If the first summary file is successfully verified, a summary operation is performed on the target file to obtain a second summary file. Please refer to the above step S504, which will not be described in detail here.

[0163] Step S705: Based on the comparison result between the first summary file and the second summary file, a verification result of the target file is obtained. Please refer to the above step S505, which will not be described in detail here.

[0164] Step S706: If the first summary file or the target file fails to be verified, the target file, the first summary file, and the first protection file are backed up to obtain a backup file.

[0165] Specifically, if the first summary file or the target file fails to be verified, an error handling process is entered to copy the target file, the first summary file, and the first protection file to obtain a backup file.

[0166] Step S707: locally delete the target file, the first summary file, and the first protected file.

[0167] Understandably, the target file, the first summary file and the first protection file are deleted locally, so that the wrong file can be prevented from being distributed, and the target file, the first summary file and the first protection file are downloaded again when a new access request arrives.

[0168] It should be noted that local refers to the current network node.

[0169] Step S708: Generate reporting information based on the backup file and the node information of the network node, where the reporting information is used to locate the reason why the verification of the first summary file or the target file fails.

[0170] Specifically, after generating the report information, the network node reports the report information to the error handling center of the content distribution network. After receiving the report information from the network node, the error handling center extracts the backup file and the node information of the network node where the error occurs from the report information, and starts the problem location process, and manually intervenes to locate the problem until the problem is located.

[0171] The file verification method of the content distribution network provided in this embodiment, if the first summary file or the target file fails to be verified, the target file, the first summary file, and the first protection file are backed up to obtain a backup file. The target file, the first summary file, and the first protection file are deleted locally. Therefore, it is possible to prevent the wrong file from being distributed. In addition, based on the backup file and the node information of the network node, reporting information is generated to locate the cause of the file verification failure. Therefore, it is possible to quickly locate the cause of the error and quickly restore the distribution process of the target file.

[0172] As a specific example, Figure 8As shown, the error handling process of the file verification method of the content distribution network disclosed in the present invention in the network node mainly includes the following steps: Step S801, in the case of file verification failure, back up the target file, the first summary file, and the first protection file to obtain a backup file. Step S802, locally delete the target file, the first summary file, and the first protection file. Step S803, report the backup file and the node information of the current network node to the error handling center to start the problem location process and locate the cause of the file verification failure.

[0173] It should be noted that during the entire file verification process, the Hypertext Transfer Protocol (HTTP) is enabled between the client, the source site, and network nodes at all levels of the content distribution network to prevent sniffing or tampering during file transmission.

[0174] As a specific example, Fig. 9 As shown, the overall processing flow of the file verification method of the content distribution network disclosed in the present invention mainly includes the following steps: Step S901, enabling Hypertext Transfer Protocol Security protection. Step S902, the source station generates a first summary file and a first protection file of the target file. Step S903, the network node of the content distribution network performs accuracy verification on the received target file based on the first summary file and the first protection file. Step S904, if the file verification fails, the network node reports the target file, the first summary file, the first protection file and the node information of the current network node to the error processing center to locate the cause of the file verification failure. Step S905, after receiving the first summary file and the target file, the client performs accuracy verification on the received target file based on the first summary file to determine the accuracy of the target file.

[0175] As a specific application example, a target program is installed in the source station and the network nodes of the content distribution network, and the target program is used to execute the file verification method of the content distribution network disclosed in the present invention. The source station executes the target program to generate a first summary file and a first protection file of the target file. The network nodes of the content distribution network execute the target program to request the first summary file and the first protection file of the target file to verify the accuracy of the local target file. When the file verification fails, the problem location process is started to locate the cause of the verification failure, so as to quickly restore the distribution process of the target file until the target file and the corresponding first summary file are distributed to the client, and the client verifies the accuracy of the received target file based on the first summary file.

[0176] It is worth noting that in the file verification method of the content distribution network disclosed in the present invention, a protection mechanism for the summary file of the original file is proposed. In this protection mechanism, the algorithm and encryption key for the protection file are only held by the distributor (source station) of the original file and the content distribution network. If the algorithm and encryption key are not leaked at the same time, the third party cannot guess the file name of the protection file, and thus cannot tamper with the file content of the protection file. Even if the original file and the corresponding summary file are modified at the same time, the content distribution network can detect the fact that the summary file has been modified by relying on the verification path of the protection file. At the same time, the file detection method disclosed in the present invention also proposes a bypassed strong consistency verification mechanism for the cache file of the entire network node. The network node of the content distribution network triggers the strong consistency verification mechanism after the file is written to the disk. The cached file can be sensed when it is tampered or damaged, and the error in the distributed file is found in time, and it is cleared from the cache of the network node by the subsequent disposal mechanism, thereby ensuring the consistency of all cache files from the source station to each network node of the content distribution network.

[0177] In this embodiment, a file verification device for a content distribution network is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0178] This embodiment provides a file verification device for a content distribution network, which is applied to a source station, such as Fig.10 As shown, including:

[0179] The target file acquisition module 1001 is used to acquire the target file;

[0180] A summary file generating module 1002 is used to perform a summary operation on the target file to obtain a first summary file, and the first summary file is used to verify the accuracy of the target file;

[0181] A protection file generating module 1003 is used to construct a first protection file of the first summary file. The file name of the first protection file is obtained by encrypting the file name of the first summary file based on the first encryption key corresponding to the target file. The first protection file is used to verify the accuracy of the first summary file.

[0182] The distribution data sending module 1004 is used to send the target file, the first summary file and the first protection file to the content distribution network in response to the access request for the target file, and the content distribution network is used to verify the accuracy of the received target file based on the first summary file and the first protection file.

[0183] In some optional implementations, the summary file generation module 1002 includes:

[0184] A summary content generating unit, used for performing a summary operation on a target file to obtain the file content of a first summary file;

[0185] The summary file name generating unit is used to add a preset summary file identifier to the file name of the target file to generate a file name of the first summary file.

[0186] In some optional implementations, the protection file generation module 1003 includes:

[0187] A protection content generating unit, configured to perform a digest operation on the first digest file to obtain the file content of the first protection file;

[0188] An encryption key acquisition unit, used to acquire a first encryption key corresponding to a target file;

[0189] The protection file name generating unit is used to encrypt the file name of the first digest file based on the first encryption key to generate the file name of the first protection file.

[0190] In some optional implementations, the protection file name generation unit includes:

[0191] A data concatenation subunit, used for concatenating the first encryption key with the file name of the first summary file to obtain a target character string;

[0192] A digest operation subunit is used to perform a digest operation on the target string to obtain an initial file name;

[0193] The identifier adding subunit is used to add a preset protection file identifier to the initial file name to obtain the file name of the first protection file.

[0194] In some optional implementations, the file verification device of the content distribution network of the present disclosure further includes:

[0195] A first key updating module, configured to determine a second encryption key in response to an update instruction for the first encryption key;

[0196] The second key updating module is used to update the file name of the first protected file based on the second encryption key to obtain the second protected file.

[0197] In some optional implementations, the file verification device of the content distribution network of the present disclosure further includes:

[0198] An update instruction sending module, used to send a key update instruction to the content distribution network in response to the second protection file, the key update instruction is used by the content distribution network to update the first encryption key stored locally to the second encryption key;

[0199] The protection file deletion module is used to delete the first protection file if the first encryption key of the content distribution network is updated.

[0200] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0201] The file verification device of the content distribution network in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0202] In this embodiment, another file verification device for a content distribution network is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0203] This embodiment provides another file verification device for a content distribution network, which is applied to a network node of the content distribution network, such as Fig.11 As shown, including:

[0204] The distribution data receiving module 1101 is used to obtain the target file, the first digest file and the first protection file in response to the access request for the target file, wherein the first digest file is obtained by the source station performing a digest operation on the target file, the first protection file is constructed by the source station based on the first digest file, and the file name of the first protection file is obtained by the source station encrypting the file name of the first digest file based on the first encryption key corresponding to the target file;

[0205] A protection file construction module 1102, used to construct a second protection file of the first summary file;

[0206] A summary file verification module 1103, configured to obtain a verification result of the first summary file based on a comparison result between the first protection file and the second protection file;

[0207] A summary file construction module 1104 is used to perform a summary operation on the target file to obtain a second summary file if the first summary file verification succeeds;

[0208] The target file verification module 1105 is used to obtain a verification result of the target file based on the comparison result of the first summary file and the second summary file.

[0209] In some optional implementations, the distribution data receiving module 1101 includes:

[0210] A file key acquisition unit, used to acquire a first encryption key corresponding to a target file;

[0211] A file name calculation unit, used to encrypt the file name of the first summary file based on the first encryption key to generate a file name of the first protected file;

[0212] The protection file downloading unit is used to download the first protection file based on the file name of the first protection file.

[0213] In some optional implementations, the file name calculation unit includes:

[0214] A first operator unit is used to concatenate the first encryption key and the file name of the first digest file to obtain a target character string;

[0215] The second operator unit is used to perform a digest operation on the target string to obtain an initial file name;

[0216] The third operator unit is used to add a preset protection file identifier to the initial file name to obtain a file name of the first protection file.

[0217] In some optional implementations, the file verification device of the content distribution network of the present disclosure further includes:

[0218] An update instruction response module, configured to determine a second encryption key in response to a key update instruction;

[0219] The encryption key updating module is used to update the first encryption key to a second encryption key.

[0220] In some optional implementations, the file content of the first protection file is obtained by the source station performing a digest operation on the first digest file. The protection file construction module 1102 includes:

[0221] The protection file construction unit is used to perform a digest operation on the first digest file to obtain the file content of the second protection file.

[0222] In some optional implementations, the file verification device of the content distribution network of the present disclosure further includes:

[0223] A file backup module, used for backing up the target file, the first summary file, and the first protection file to obtain a backup file if the first summary file or the target file fails to be verified;

[0224] A file deletion module, used to locally delete the target file, the first summary file and the first protection file;

[0225] The error reporting module is used to generate reporting information based on the backup file and the node information of the network node, and the reporting information is used to locate the reason why the first summary file or the target file verification fails.

[0226] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0227] The file verification device of the content distribution network in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0228] The present disclosure also provides an electronic device having the above Fig.10 or Fig.11 A file verification device for a content distribution network is shown.

[0229] See also Fig.12 , Fig.12 is a structural block diagram of an electronic device provided by an optional embodiment of the present disclosure, such as Fig.12 As shown, the electronic device includes: one or more processors 1201, a memory 1202, and an interface for connecting various components, including a high-speed interface and a low-speed interface. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.12 A processor 1201 is taken as an example.

[0230] The processor 1201 may be a central processing unit, a network processor or a combination thereof. The processor 1201 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.

[0231] The memory 1202 stores instructions executable by at least one processor 1201, so that the at least one processor 1201 executes the method shown in the above embodiment.

[0232] The memory 1202 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 1202 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 1202 may optionally include a memory remotely arranged relative to the processor 1201, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0233] The memory 1202 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 1202 may also include a combination of the above types of memory.

[0234] The electronic device also includes a communication interface 1203, which is used for the electronic device to communicate with other devices or a communication network.

[0235] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0236] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0237] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A file verification method for a content distribution network, characterized in that: Applied to a source station, the method includes: Get the target file; Performing a digest operation on the target file to obtain a first digest file, wherein the first digest file is used to verify the accuracy of the target file; constructing a first protection file for the first summary file, wherein the first protection file is used to verify the accuracy of the first summary file; In response to an access request for the target file, sending the target file, the first summary file, and the first protection file to a content distribution network, wherein the content distribution network is configured to perform accuracy verification on the received target file based on the first summary file and the first protection file; The first protection file for constructing the first summary file includes: Performing a digest operation on the first digest file to obtain the file content of the first protected file; Obtaining a first encryption key corresponding to the target file; The file name of the first digest file is encrypted based on the first encryption key to generate a file name of the first protected file.

2. The file verification method according to claim 1, characterized in that: The step of encrypting the file name of the first digest file based on the first encryption key to generate the file name of the first protected file includes: Concatenate the first encryption key and the file name of the first digest file to obtain a target character string; Performing a digest operation on the target character string to obtain an initial file name; A preset protection file identifier is added to the initial file name to obtain the file name of the first protection file.

3. The file verification method according to claim 1, characterized in that: The method further comprises: In response to the update instruction for the first encryption key, determining a second encryption key; The file name of the first protected file is updated based on the second encryption key to obtain a second protected file.

4. The file verification method according to claim 3, characterized in that: The method further comprises: In response to the second protection file, sending a key update instruction to the content distribution network, the key update instruction is used by the content distribution network to update the locally stored first encryption key to the second encryption key; If the first encryption key of the content distribution network is updated, the first protection file is deleted.

5. The file verification method according to claim 1, characterized in that: The step of performing a digest operation on the target file to obtain a first digest file includes: Performing a digest operation on the target file to obtain the file content of the first digest file; A preset summary file identifier is added to the file name of the target file to generate a file name of the first summary file.

6. A file verification method for a content distribution network, characterized in that: Applied to a network node of a content distribution network, the method comprises: In response to an access request for a target file, the target file, a first digest file, and a first protection file are acquired, wherein the first digest file is obtained by a source station performing a digest operation on the target file, the file content of the first protection file is obtained by the source station performing a digest operation on the first digest file, and the file name of the first protection file is obtained by the source station performing an encryption process on the file name of the first digest file based on a first encryption key corresponding to the target file; Constructing a second protection file of the first summary file; Obtaining a verification result of the first summary file based on a comparison result between the first protection file and the second protection file; If the first summary file is successfully verified, performing a summary operation on the target file to obtain a second summary file; Based on the comparison result of the first summary file and the second summary file, a verification result of the target file is obtained.

7. The file verification method according to claim 6, characterized in that: Acquiring the first protection file includes: Obtaining a first encryption key corresponding to the target file; Encrypting the file name of the first digest file based on the first encryption key to generate the file name of the first protected file; The first protection file is downloaded based on the file name of the first protection file.

8. The file verification method according to claim 7, characterized in that: The step of encrypting the file name of the first digest file based on the first encryption key to generate the file name of the first protected file includes: Concatenate the first encryption key and the file name of the first digest file to obtain a target character string; Performing a digest operation on the target character string to obtain an initial file name; A preset protection file identifier is added to the initial file name to obtain the file name of the first protection file.

9. The file verification method according to claim 7, characterized in that: The method further comprises: In response to the key update instruction, determining a second encryption key; The first encryption key is updated to the second encryption key.

10. The file verification method according to claim 6, characterized in that: The step of constructing the second protection file of the first summary file comprises: A digest operation is performed on the first digest file to obtain the file content of the second protected file.

11. The file verification method according to claim 6, characterized in that: The method further comprises: If the first summary file or the target file fails to be verified, backing up the target file, the first summary file, and the first protection file to obtain a backup file; locally deleting the target file, the first summary file, and the first protected file; Reporting information is generated based on the backup file and the node information of the network node, and the reporting information is used to locate the reason why the verification of the first summary file or the target file fails.

12. A file verification device for a content distribution network, characterized in that: Applied to a source station, the device comprises: A target file acquisition module is used to acquire the target file; A summary file generating module, used for performing a summary operation on the target file to obtain a first summary file, wherein the first summary file is used for verifying the accuracy of the target file; a protection file generating module, configured to construct a first protection file of the first summary file, wherein the first protection file is used to verify the accuracy of the first summary file; a distribution data sending module, configured to send the target file, the first summary file, and the first protection file to a content distribution network in response to an access request for the target file, wherein the content distribution network is configured to perform accuracy verification on the received target file based on the first summary file and the first protection file; Wherein, the protection file generation module includes: A protection content generating unit, configured to perform a digest operation on the first digest file to obtain the file content of the first protection file; An encryption key acquisition unit, used to acquire a first encryption key corresponding to a target file; The protection file name generating unit is used to encrypt the file name of the first digest file based on the first encryption key to generate the file name of the first protection file.

13. A file verification device for a content distribution network, characterized in that: A network node applied to a content distribution network, the device comprising: a distribution data receiving module, configured to obtain, in response to an access request for a target file, the target file, a first digest file, and a first protection file, wherein the first digest file is obtained by a source station performing a digest operation on the target file, the file content of the first protection file is obtained by the source station performing a digest operation on the first digest file, and the file name of the first protection file is obtained by the source station performing an encryption process on the file name of the first digest file based on a first encryption key corresponding to the target file; A protection file construction module, used for constructing a second protection file of the first summary file; a summary file verification module, configured to obtain a verification result of the first summary file based on a comparison result between the first protection file and the second protection file; A summary file construction module, configured to perform a summary operation on the target file to obtain a second summary file if the first summary file verification succeeds; The target file verification module is used to obtain a verification result of the target file based on a comparison result of the first summary file and the second summary file.

14. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the file verification method for a content distribution network according to any one of claims 1 to 5, or executes the file verification method for a content distribution network according to any one of claims 6 to 11 by executing the computer instructions.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the file verification method for a content distribution network according to any one of claims 1 to 5, or to execute the file verification method for a content distribution network according to any one of claims 6 to 11.

16. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the file verification method for a content distribution network according to any one of claims 1 to 5, or to execute the file verification method for a content distribution network according to any one of claims 6 to 11.

Citation Information

Patent Citations

  • Management device and method for providing file download addresses

    CN103036969A

  • File downloading method and system and server node in CDN

    CN103248695A