Source data verification method, server, system and storage medium

Through the communication between the CDN node and the log server, the verification information calculated by the CDN node is used to verify the back-to-source data, which solves the problem in the existing technology that the back-to-source data verification depends on the origin site, and improves the CDN download acceleration scenario. Content consistency checking flexibility and accuracy.

CN113300875BActive Publication Date: 2024-09-20ALIBABA GROUP HOLDING LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110185013.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-10
Publication Date
2024-09-20
Estimated Expiration
2041-02-10

AI Technical Summary

Technical Problem

In the current CDN download acceleration scenario, the back-to-origin data verification relies on the Content-MD5 HTTP header of the origin site, which results in insufficient flexibility and cannot effectively solve the problem of back-to-source data consistency verification, especially when the origin site is abnormal. Or when it is hijacked, it may cause the client to run abnormally.

Method used

By establishing communication between the CDN node and the log server, the CDN node calculates the verification information of the file fragments and generates log records. The log server performs content consistency verification based on the verification information of different CDN nodes, reducing dependence on the origin site. , improve verification flexibility.

Benefits of technology

It realizes back-to-origin data verification without the need for the origin site to respond to the MD5 HTTP header, improves the flexibility and accuracy of content consistency verification in CDN download acceleration scenarios, reduces dependence on the origin site's computing resources, and reduces The risk of content consistency issues is eliminated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113300875B
    Figure CN113300875B
Patent Text Reader

Abstract

The embodiments of the present application provide a method, server, system and storage medium for back-to-source data verification. In the back-to-source data verification system, the log records uploaded by the CDN node to the log server include the verification information calculated by the CDN node for the file fragments returned to the source. Furthermore, the log server can perform content consistency verification on the file fragments returned from different CDN nodes based on the verification information calculated by different CDN nodes for the same file fragments. This back-to-source data verification method relies on the verification value calculated by the CDN node requesting the back-to-source data for the file fragments obtained by returning to the source, and does not rely on the source station, so that the entire verification process is transparent to the source station, and no improvements are required on the source station side, which greatly improves the flexibility of the back-to-source data verification operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a back-to-source data verification method, server, system and storage medium. Background Art

[0002] In the CDN (Content Delivery Network) download acceleration scenario, when a user accesses a URL (Uniform Resource Locator), if the CDN node does not cache the corresponding content or the cache has expired, the CDN node can use the back-to-source method to obtain the corresponding content from the source site.

[0003] However, in some scenarios, due to reasons such as hijacking of the back-to-source connection or abnormality of the source station, the CDN node pulls dirty data back to the source. After the dirty data is distributed to the client, it will cause the client to run abnormally.

[0004] In the prior art, the CDN node can perform consistency verification on the pulled back-to-source content based on the Content-MD5 HTTP (Hypertext Transfer Protocol) header corresponding to the source station response file. However, this verification method is highly dependent on the source station and cannot flexibly implement back-to-source data verification. Therefore, a new solution needs to be proposed. Summary of the invention

[0005] Multiple aspects of the present application provide a back-to-source data verification method, server, system and storage medium to reduce the dependence of back-to-source data consistency verification on the source station and improve the flexibility of back-to-source data verification.

[0006] An embodiment of the present application provides a back-to-source data verification system, comprising: multiple CDN nodes, a source station and a log server; a first CDN node among the multiple CDN nodes, configured to: send a back-to-source request for a file fragment to the source station; receive the file fragment sent by the source station according to the back-to-source request for the fragment; calculate verification information of the file fragment to generate a first log record containing the verification information of the file fragment, and send the first log record to the log server; the log server is configured to: query a second log record of the file fragment in the saved log record; the second log record contains verification information calculated by the second CDN node for the file fragment returned to the source; and perform consistency verification on the file fragment according to the verification information in the first log record and the verification information in the second log record.

[0007] An embodiment of the present application also provides a method for verifying back-to-source data, including: obtaining a first log record sent by a first CDN node, the first log record including verification information calculated by the first CDN node for the back-to-source file fragments; querying a second log record of the file fragments in the saved log records; the second log record including verification information calculated by the second CDN node for the back-to-source file fragments; and performing consistency verification on the file fragments according to the verification information in the first log record and the verification information in the second log record.

[0008] An embodiment of the present application also provides a method for verifying back-to-source data, which is applicable to CDN nodes, including: sending a back-to-source request for a file slice to a source station; receiving the file slice sent by the source station according to the back-to-source request; calculating the verification information of the file slice to generate a log record containing the verification information of the file slice; sending the log record of the file slice to a log server, so that the log server performs consistency verification on the file slice according to the verification information in the log record and the verification information generated by other CDN nodes according to the back-to-source file slice.

[0009] An embodiment of the present application also provides a CDN server, including: a memory, a processor, and a communication component; the memory is used to store one or more computer instructions; the processor is used to execute the one or more computer instructions to: execute the steps in the back-to-source data verification method provided in the embodiment of the present application.

[0010] The embodiment of the present application also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in the source data verification method provided in the embodiment of the present application can be implemented.

[0011] In the back-to-source data verification system provided in the embodiment of the present application, the log server can obtain the log records uploaded by different CDN nodes for the same file fragments, and the log records uploaded by each CDN node include the verification information calculated by the CDN node for the file fragments returned to the source. Furthermore, the log server can perform content consistency verification on the file fragments returned to the source from different CDN nodes based on the verification information calculated by different CDN nodes for the same file fragments. This back-to-source data verification method relies on the verification value calculated by the CDN node requesting the back-to-source data for the file fragments obtained by returning to the source, and does not rely on the source station, so that the entire verification process is transparent to the source station, and no improvements are required on the source station side, which greatly improves the flexibility of the back-to-source data verification operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0013] Figure 1 A schematic diagram of the structure of a back-to-source data verification system provided by an exemplary embodiment of the present application;

[0014] Figure 2 A flowchart of a method for verifying back-to-source data provided by an exemplary embodiment of the present application;

[0015] Figure 3 A flowchart of a method for verifying back-to-source data provided by an exemplary embodiment of the present application;

[0016] Figure 4 A schematic diagram of the structure of a CDN server provided for an exemplary embodiment of the present application;

[0017] Figure 5 A schematic diagram of the structure of a log server provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0019] Content Delivery Network (CDN) consists of data centers and cache servers (CDN nodes). Cache servers are distributed in areas or networks where user access is relatively concentrated. When users access network resources, data centers can use global load technology to direct users' access to the cache server closest to the user, greatly reducing the user's access delay.

[0020] In the CDN download acceleration scenario, when a user accesses a UR, if the CDN node does not cache the corresponding content or the cache has expired, the CDN node can use the back-to-source method to obtain the corresponding content from the source station.

[0021] However, in some scenarios, due to reasons such as hijacking of the back-to-source connection or abnormalities in the source station, the CDN node pulls dirty data (Dirty Read) when it goes back to the source. For example, due to abnormalities such as storage on the source station side, the CDN node responds with incorrect data to the CDN node. Or, the source station contains multiple clusters, and the data between the multiple clusters is not synchronized. For the same URL, the CDN node obtains different file contents from different clusters. Among them, dirty data refers to data that is not within a given range or is meaningless for actual needs, or the data is in an illegal format, or there is non-standard coding and ambiguous logic in the data. After the dirty data is distributed to the client, it will cause the client to run abnormally, thereby affecting the user experience.

[0022] To ensure the accuracy of the back-to-source data, in the prior art, the CDN node can perform a consistency check on the pulled back-to-source content based on the Content-MD5 HTTP header corresponding to the source site response file.

[0023] In this method, the source station needs to respond with the Content-MD5 header so that the CDN node can verify the content consistency of the back-to-source data. When the source station receives the back-to-source request from the CDN node, it can calculate the MD5 value of the file and put the MD5 value in the HTTP response header to respond to the CDN node. After the CDN node downloads the complete file from the source station, it calculates the MD5 value of the file and compares it with the MD5 value in the HTTP response header. If the comparison is consistent, it is determined that the back-to-source file has content consistency. Otherwise, it is confirmed that the back-to-source file does not have content consistency.

[0024] However, in reality, on the one hand, many source sites do not have the ability to respond to the MD5 HTTP header; on the other hand, the source site needs to consume a certain amount of computing resources and a certain amount of development work to calculate the MD5 value. As a result, in some CDN download acceleration scenarios, there is a greater risk of content consistency issues and it is impossible to flexibly implement back-to-source data verification.

[0025] In view of the above technical problems, a solution is provided in some embodiments of the present application. The technical solutions provided by the embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0026] Figure 1 A schematic diagram of the structure of a back-to-source data verification system provided by an exemplary embodiment of the present application is shown in FIG. Figure 1 As shown, the back-to-source data verification system 100 includes: a source station 10, multiple CDN nodes 20 and a log server 30.

[0027] In the back-to-source data verification system 100 , the number of CDN nodes 20 may be two or more, which is not limited in this embodiment.

[0028] The content distribution network is a tree structure, which mainly includes three levels: the central level, the middle level and the edge level. Among them, the central node in the central level is the root node in the tree structure, the CDN node in the middle level is the child node of the CDN node in the central level, and the CDN node in the edge level is the child node of the CDN node in the middle level.

[0029] Among them, the central nodes in the central layer are mainly used to achieve functions such as load balancing, data content distribution, and access scheduling. The CDN nodes in the middle layer are used to connect the CDN nodes in the edge layer and the central nodes in the central layer to relieve the data access pressure of the central nodes in the central layer. The CDN nodes in the edge layer are used to synchronize the source site content and directly respond to user requests to quickly distribute the content to users.

[0030] In this embodiment, the CDN node 20 that initiates the back-to-origin request to the origin station 10 may be implemented as any CDN node in the intermediate layer.

[0031] Usually, when a client requests a file from an edge-level CDN node, if the edge-level CDN node does not cache the file, the edge-level CDN node can request the file from the connected middle-level CDN node. If the middle-level CDN node does not store the file, it can request the source site to retrieve the file.

[0032] In the CDN accelerated download scenario, CDN can enable the fragmented back-to-source function. Among them, fragmented back-to-source is a way of requesting the server of the source station to return part of the data content within a specified range, which is conducive to the distribution acceleration of larger files, reducing the consumption of back-to-source traffic, and improving the resource response speed.

[0033] Among them, any CDN node among the multiple CDN nodes is used to: send a fragment return-to-source request for a file to the source station 10.

[0034] When the source station 10 receives the back-to-source request sent by the CDN node, it can send the file fragment to the CDN node. Usually, the back-to-source request of the CDN node includes the range of the file fragment requested to be obtained, and the source station 10 can send the corresponding file fragment according to the range of the file fragment sent by the CDN node.

[0035] For example, if the range of file segments specified in the CDN node's back-to-origin request is 0-100, the range of file segments responded by the origin station 10 is 0-100.

[0036] After receiving the file segments sent by the source station 10 , the CDN node may generate verification information of the file segments, generate log records of the file segments according to the verification information of the file segments, and send the log records to the log server 30 .

[0037] Among them, Figure 1 As shown, the log server 30 can establish communication connections with the multiple CDN nodes 20 respectively, and can receive log records uploaded by each CDN node according to the file segments obtained by returning to the source.

[0038] Each time a log record of a file segment uploaded by a CDN node is received, the log server 30 may query whether other log records of the file segment have been saved in the saved log records. If other log records of the file segment have not been saved, the received log record is saved. If other log records of the file segment have been saved, the content consistency of the file segment is determined based on the verification information in the received log record and the verification information in other log records of the file segment.

[0039] Next, for the convenience of description, the log record of the file segment currently received by the log server 30 is described as the first log record, and the CDN node that uploads the first log record is the first CDN node. The first log record contains verification information generated by the first CDN node according to the file segment returned to the source.

[0040] The log server 30 can query whether there are other log records of the file fragment in the saved log records. If not found, the first log record is saved in the saved log record. If other log records are found (recorded as second log records), the consistency of the file fragment can be checked according to the verification information of the file fragment in the first log record and the verification information of the file fragment in the second log record. Among them, the second log record is uploaded by the second CDN node, and the verification information of the file fragment in the second log record is generated by the second CDN node based on the file fragment returned to the source. The second CDN node is different from the first CDN node.

[0041] After the log server 30 performs consistency check on the source data, if it is determined that the source data has content consistency, it can be considered that there is no abnormality in the source return operation. The CDN node at the intermediate level that returns the source data can send the source data to the CDN node at the edge level, so that the CDN node at the edge level synchronizes the source site content and directly responds to user requests to quickly distribute the content to users.

[0042] In this embodiment, the CDN node can be deployed as a server device, for example, including but not limited to conventional servers, cloud servers, cloud hosts, virtual centers and other servers, and this embodiment does not limit this. Among them, the composition of the server device mainly includes a processor, a hard disk, a memory, a system bus, etc., which is similar to the general computer architecture and will not be repeated.

[0043] In the back-to-source data verification system 100, wired communication or wireless communication can be used between the CDN node 20 and the source station 10, and between the CDN node 20 and the log server 30. Among them, the wireless communication method includes short-distance communication methods such as Bluetooth, ZigBee, infrared, WiFi (WIreless-Fidelity, wireless fidelity technology), as well as long-distance wireless communication methods such as LORA, and can also include wireless communication methods based on mobile networks. Among them, when connected through mobile network communication, the network standard of the mobile network can be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), 5G, WiMax, etc.

[0044] In this embodiment, the log server can obtain log records uploaded by different CDN nodes for the same file fragments. The log records uploaded by each CDN node include the verification information calculated by the CDN node for the file fragments returned to the source. Furthermore, the log server can perform content consistency verification on the file fragments returned to the source from different CDN nodes based on the verification information calculated by different CDN nodes for the same file fragments. This method of returning to the source data verification relies on the verification value calculated by the CDN node requesting the return to the source data for the file fragments obtained by returning to the source, and does not rely on the source station, making the entire verification process transparent to the source station, without the need for improvements on the source station side, greatly improving the flexibility of the return to the source data verification operation.

[0045] In some optional embodiments, the CDN node may calculate the verification value of the file fragment when receiving the file fragment returned to the source, and generate a log record according to the verification information of the file fragment.

[0046] Optionally, the check value may be implemented as at least one of an information summary value, a parity check code value, and a Gray code value of the file segment.

[0047] Among them, parity check is a method for checking the correctness of code transmission. The consistency check is performed based on whether the number of "1" in the digits of a set of binary codes being transmitted is odd or even. The use of an odd number is called odd check, and vice versa, it is called even check. Multiple CDN nodes can predefine which check method to use. Usually, a parity check bit can be set specifically to make the number of "1" in this set of code data an odd number or an even number. When performing a consistency check, it can be checked whether the number of "1" is an odd number or an even number, which will not be repeated here.

[0048] Among them, Gray code is also called cyclic binary code or reflected binary code. In digital systems, various data need to be converted into binary code before they can be processed. Gray code is a weightless code that can encode binary data. Multiple CDN nodes can pre-agree to use Gray code to encode the file fragments downloaded from the source to achieve consistency verification based on Gray code.

[0049] The message digest value is calculated based on the message digest algorithm (MD). In some embodiments, the fifth version of the message digest algorithm (MD5) can be used to calculate the MD5 value of the file fragment. MD5 is a cryptographic hash function that can generate a 128-bit (16-byte) hash value to ensure that the information transmission is complete and consistent. Multiple CDN nodes can pre-agree to use MD5 to calculate the file fragments downloaded from the source, and obtain the MD5 of each file fragment.

[0050] After obtaining the checksum of the file shard, the identifier of the file to which the file shard belongs, the shard range of the shard file, and the checksum calculated by the CDN node for the file shard can be used as a set of triple data, and the triple data can be used as a log record back to the source. That is, for any file shard, its log record includes: the identifier of the file to which the file shard belongs, the shard range of the shard file, and the checksum calculated by the CDN node for the file shard.

[0051] Based on the above, when the log server 30 receives the first log record of the file shard sent by the first CDN node, the identifier of the file to which the file shard belongs and the shard range of the file shard in the log record can be used as a query keyword (key), and in the saved log records, the log record corresponding to the identifier of the file to which the file shard belongs and the shard range of the shard file is queried as the second log record of the file shard.

[0052] The identifier of the file to which the file segment belongs may be the name, path, unique identification code or URL of the file, etc., which is not limited in this embodiment.

[0053] In some embodiments, when the file identifier is implemented as a URL and the check value is implemented as an MD5 value, a log record of a file segment will contain the following triple: (file URL, file segment range, file segment MD5 value).

[0054] That is, when the log server 30 receives the first log record, it can use the URL of the file and the range of the file fragment in the first log record as query keywords to query whether there are other log records of the file fragment in the saved log records.

[0055] If the second log record is queried from the log server 30, a consistency check may be performed on the file segment according to the check information of the file segment in the first log record and the check information of the file segment in the second log record.

[0056] Optionally, if multiple other log records of the file fragment are found in the saved log records, the multiple other log records can be used as the second log record for comparing and verifying the information. Alternatively, a log record closest in time to the first log record can be selected from the multiple other log records in the order of their timestamps as the second log record for comparing and verifying the information, which is not limited in this embodiment.

[0057] After querying the second log record, the log server 30 can obtain the first check value of the file segment from the first log record, and obtain the second check value of the file segment from the second log record. Next, it is determined whether the first check value and the second check value are consistent.

[0058] If the first check value and the second check value are consistent, the log server 30 can determine that the file fragment returned by the first CDN and the file fragment returned by the second CDN node have content consistency, that is, the return operation of the file fragment is not abnormal. If the first check value and the second check value are inconsistent, the log server 30 can determine that the content of the file fragment returned by the first CDN and the file fragment returned by the second CDN node are inconsistent, that is, the return operation of the file fragment is abnormal.

[0059] Continuing with the example of implementing the checksum as an MD5 value, the log server 30 can obtain the MD5 value of the file segment from the first log record, and obtain the MD5 value of the file segment from the second log record. If the two MD5 values ​​are consistent, the log server 30 can determine that the return-to-source operation of the file segment is not abnormal. If the two MD5 values ​​are inconsistent, the log server 30 can determine that the return-to-source operation of the file segment is abnormal.

[0060] Optionally, after the log server 30 determines that an abnormality occurs in the file fragment returned to the source, an alarm message may be sent to the CDN node that caches the file fragment to prompt that an abnormality occurs in the resource associated with the file fragment.

[0061] Optionally, after the log server 30 determines that the file fragment returned to the source is abnormal, a refresh operation of the file to which the file fragment belongs can be triggered. In this embodiment, the log server 30 can send a content refresh request to the content management node to trigger the content management node to delete the cache of the file to which the file fragment belongs in the content distribution network.

[0062] The back-to-source data verification system 100 provided in the above and following embodiments of the present application can be used to detect occasional dirty data problems in CDN file download scenarios, and does not require the source station to calculate or respond to the MD5 verification header of the file.

[0063] Usually, for the same resource file, there may be multiple CDN nodes in the CDN system that go back to the source to download the resource file. According to historical data statistics of CDN download acceleration scenarios, the proportion of requests that CDN returns to the source to obtain dirty data is low. For example, in some cases, the proportion of dirty data returned to the source can be less than 0.01%. When multiple CDN nodes return to the source to download the same resource file, the return-to-source data obtained by most CDN nodes is normal, and a few CDN nodes may obtain dirty data.

[0064] Based on the technical solution provided by the embodiment of the present application, each CDN node can perform MD5 calculation on the file fragments downloaded from the source to obtain the verification information of the file fragments. Next, a log record is generated according to the triple of the file URL, the file fragment range, and the MD5 value of the file fragment. Assuming that there are n CDN nodes returning the same URL, n CDN nodes will generate n log records. After each log record is generated, it can be collected and uploaded to the log server in real time.

[0065] The log server can perform real-time streaming calculations on the log records uploaded by the CDN node. If the latest uploaded log record is the first log record generated by a certain file segment, the log record is directly stored in the log server without comparison processing. If the latest uploaded log record is not the first log record generated by the file segment, the file URL and the range of the file segment are used as query keywords to query the previous log record of the file segment. The previous log record can be the log record that is most closely connected to the timestamp of the latest log record. Next, compare the MD5 value in the latest log record with the MD5 value in the previous log record.

[0066] If the comparison is consistent, it can be determined that the content of the file fragments obtained by each CDN node is consistent; if the comparison is inconsistent, it can be determined that the content of the file fragments obtained by each CDN node is inconsistent. At this time, the log server can issue an alarm message and call the refresh interface of the content management to refresh the entire network to clear all caches of the resource on the CDN system.

[0067] Based on cross-validation of the MD5 values ​​calculated by CDN nodes and detection of dirty data problems, it can meet the content consistency verification requirements in CDN download acceleration scenarios in most cases, and provide CDN download acceleration products with the ability to detect and repair dirty data problems back to the source. At the same time, this solution does not require the source station to respond to the MD5 HTTP header, and is highly versatile and applicable to various CDN download acceleration scenarios, so I will not go into details one by one.

[0068] Figure 2 is a flow chart of a method for verifying back-source data provided by an exemplary embodiment of the present application. When the method is executed on the CDN node side, it may include the following steps: Figure 2 Steps shown:

[0069] Step 201: Send a fragment retrieval request for the file to the source station.

[0070] Step 202: Receive the file fragments sent by the source station according to the fragment return request.

[0071] Step 203: Calculate the verification information of the file segment to generate a log record containing the verification information of the file segment.

[0072] Step 204: Send the log record of the file slice to the log server, so that the log server performs consistency verification on the file slice according to the verification information in the log record and the verification information generated by other CDN nodes according to the file slice returned to the source.

[0073] In some exemplary embodiments, a method for calculating the verification information of the file shard to generate a log record containing the verification information of the file shard includes: calculating the verification value of the file shard; generating a log record of the file shard based on the identifier of the file to which the file shard belongs, the shard range of the shard file, and the verification value of the file shard.

[0074] In some exemplary embodiments, the check value of the file segment includes: at least one of an information summary value, a parity check code value, and a Gray code value of the file segment.

[0075] In this embodiment, the log records uploaded by the CDN node to the log server include the verification information calculated by the CDN node for the file fragments returned to the source. Furthermore, the log server can perform content consistency verification on the file fragments returned to the source from different CDN nodes based on the verification information calculated by different CDN nodes for the same file fragments. This method of verifying the return-to-source data relies on the verification value calculated by the CDN node requesting the return-to-source data for the file fragments obtained by returning to the source, and does not rely on the source station, making the entire verification process transparent to the source station, without the need for improvements on the source station side, greatly improving the flexibility of the return-to-source data verification operation.

[0076] Figure 3 is a flow chart of a method for verifying source data provided by another exemplary embodiment of the present application. When the method is executed on the log server side, it may include the following steps: Figure 3 Steps shown:

[0077] Step 301: Obtain a first log record sent by a first CDN node, where the first log record includes verification information calculated by the first CDN node for the file fragments returned to the source.

[0078] Step 302: In the saved log records, query the second log record of the file segment; the second log record includes verification information calculated by the second CDN node for the file segment returned to the source.

[0079] Step 303: Perform a consistency check on the file segment according to the verification information in the first log record and the verification information in the second log record.

[0080] In some exemplary embodiments, the first log record includes: an identifier of the file to which the file shard belongs, a shard range of the shard file, and a first verification value calculated by the first CDN node for the file shard; the second log record includes: an identifier of the file to which the file shard belongs, a shard range of the shard file, and a second verification value calculated by the second CDN node for the file shard.

[0081] In some exemplary embodiments, a method for querying the second log record of the file shard in the saved log records includes: based on the identifier of the file corresponding to each of the saved log records and the shard range, querying the log record corresponding to the identifier of the file to which the file shard belongs and the shard range of the shard file in the saved log records as the second log record.

[0082] In some exemplary embodiments, a method for performing consistency verification on the file shard based on the verification information of the file shard in the first log record and the verification information of the file shard in the second log record includes: obtaining the first verification value of the file shard from the first log record, and obtaining the second verification value of the file shard from the second log record; if the first verification value and the second verification value are consistent, it is determined that there is no abnormality in the return-to-source operation of the file shard; if the first verification value and the second verification value are inconsistent, it is determined that there is an abnormality in the return-to-source operation of the file shard.

[0083] The check value of the file segment includes at least one of an information summary value, a parity check code value and a Gray code value of the file segment.

[0084] In some exemplary embodiments, the method further includes: if it is determined that an abnormality occurs in the back-to-source operation of the file segment, sending a content refresh request to a content management node to trigger the content management node to delete the cache of the file to which the file segment belongs in the content distribution network.

[0085] In this embodiment, the log server can obtain log records uploaded by different CDN nodes for the same file fragments. The log records uploaded by each CDN node include verification information calculated by the CDN node for the file fragments returned to the source. Furthermore, the log server can perform content consistency verification on the file fragments returned from different CDN nodes based on the verification information calculated by different CDN nodes for the same file fragments. This method of back-to-source data verification relies on the verification value calculated by the CDN node requesting the back-to-source data for the file fragments obtained by returning to the source, and does not rely on the source station, making the entire verification process transparent to the source station, without the need for improvements on the source station side, greatly improving the flexibility of the back-to-source data verification operation.

[0086] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 201 to 204 can be device A; for another example, the execution subject of steps 201 and 202 can be device A, and the execution subject of step 203 can be device B; and so on.

[0087] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as 201, 202, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0088] Figure 4 1 is a schematic diagram of the structure of a log server provided by an exemplary embodiment of the present application, and the log server is applicable to the source data verification system provided by the aforementioned embodiment. Figure 4 As shown, the log server includes: a memory 401 , a processor 402 and a communication component 403 .

[0089] The memory 401 is used to store computer programs and can be configured to store various other data to support operations on the CDN server. Examples of such data include instructions for any application or method operating on the CDN server, contact data, phone book data, messages, pictures, videos, etc.

[0090] The processor 402 is coupled to the memory 401 and is used to execute the computer program in the memory 401, so as to: obtain a first log record sent by the first CDN node through the communication component 403, wherein the first log record includes verification information calculated by the first CDN node for the file fragment returned to the source. In the saved log records, query the second log record of the file fragment; the second log record includes verification information calculated by the second CDN node for the file fragment returned to the source. According to the verification information in the first log record and the verification information in the second log record, perform consistency verification on the file fragment.

[0091] In some exemplary embodiments, the first log record includes: an identifier of the file to which the file shard belongs, a shard range of the shard file, and a first verification value calculated by the first CDN node for the file shard; the second log record includes: an identifier of the file to which the file shard belongs, a shard range of the shard file, and a second verification value calculated by the second CDN node for the file shard.

[0092] In some exemplary embodiments, when the processor 402 queries the second log record of the file shard in the saved log records, it is specifically used to: based on the identifier of the file corresponding to each of the saved log records and the shard range, query the saved log records for the log record corresponding to the identifier of the file to which the file shard belongs and the shard range of the shard file as the second log record.

[0093] In some exemplary embodiments, when the processor 402 performs consistency verification on the file shard based on the verification information of the file shard in the first log record and the verification information of the file shard in the second log record, it is specifically used to: obtain the first verification value of the file shard from the first log record, and obtain the second verification value of the file shard from the second log record; if the first verification value and the second verification value are consistent, it is determined that there is no abnormality in the return-to-source operation of the file shard; if the first verification value and the second verification value are inconsistent, it is determined that there is an abnormality in the return-to-source operation of the file shard.

[0094] The check value of the file segment includes at least one of an information summary value, a parity check code value and a Gray code value of the file segment.

[0095] In some exemplary embodiments, the processor 402 is further configured to: if it is determined that an abnormality occurs in the back-to-source operation of the file segment, send a content refresh request to the content management node to trigger the content management node to delete the cache of the file to which the file segment belongs in the content distribution network.

[0096] Further, if Figure 4 As shown, the CDN server also includes: a power supply component 404 and other components. Figure 4 The CDN server only includes some components. Figure 4 Components shown.

[0097] In this embodiment, the log records uploaded by the CDN node to the log server include the verification information calculated by the CDN node for the file fragments returned to the source. Furthermore, the log server can perform content consistency verification on the file fragments returned to the source from different CDN nodes based on the verification information calculated by different CDN nodes for the same file fragments. This method of verifying the return-to-source data relies on the verification value calculated by the CDN node requesting the return-to-source data for the file fragments obtained from the return-to-source, and does not rely on the source station, making the entire verification process transparent to the source station, without the need for improvements on the source station side, greatly improving the flexibility of the return-to-source data verification operation.

[0098] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement the steps that can be executed by the log server in the above method embodiment.

[0099] Figure 5 The structure diagram of a CDN server provided by an exemplary embodiment of the present application is shown, and the CDN server is applicable to the back-to-source data verification system provided by the aforementioned embodiment. Figure 5 As shown, the CDN server includes: a memory 501 , a processor 502 and a communication component 503 .

[0100] The memory 501 is used to store computer programs and can be configured to store various other data to support operations on the log server. Examples of such data include instructions for any application or method operating on the log server, contact data, phone book data, messages, pictures, videos, etc.

[0101] The processor 502 is coupled to the memory 501 and is used to execute the computer program in the memory 501, so as to: send a fragment return source request for the file to the source station through the communication component 503; receive the file fragment sent by the source station according to the fragment return source request; calculate the verification information of the file fragment to generate a log record containing the verification information of the file fragment; send the log record of the file slice to the log server, so that the log server performs consistency verification on the file fragment according to the verification information in the log record and the verification information generated by other CDN nodes according to the file fragment returned to the source.

[0102] In some exemplary embodiments, when the processor 502 calculates the verification information of the file shard to generate a log record containing the verification information of the file shard, it is specifically used to: calculate the verification value of the file shard; and generate a log record of the file shard based on the identifier of the file to which the file shard belongs, the shard range of the shard file, and the verification value of the file shard.

[0103] In some exemplary embodiments, the check value of the file segment includes: at least one of an information summary value, a parity check code value, and a Gray code value of the file segment.

[0104] Further, if Figure 5 As shown, the log server also includes: a power supply component 504 and other components. Figure 5 Only some components are shown schematically, which does not mean that the log server only includes Figure 5 Components shown.

[0105] In this embodiment, the log server can obtain log records uploaded by different CDN nodes for the same file fragments. The log records uploaded by each CDN node include the verification information calculated by the CDN node for the file fragments returned to the source. Furthermore, the log server can perform content consistency verification on the file fragments returned to the source from different CDN nodes based on the verification information calculated by different CDN nodes for the same file fragments. This method of returning to the source data verification relies on the verification value calculated by the CDN node requesting the return to the source data for the file fragments obtained by returning to the source, and does not rely on the source station, making the entire verification process transparent to the source station, without the need for improvements on the source station side, greatly improving the flexibility of the return to the source data verification operation.

[0106] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed, each step that can be executed by the CDN server in the above method embodiment can be implemented.

[0107] Above Figure 4 and Figure 5 The memory in can be implemented by any type of volatile or non-volatile storage device or a combination of them, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0108] Above Figure 4 and Figure 5 The communication component in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can be implemented based on near field communication (NFC) technology, radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0109] Above Figure 4 and Figure 5 The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.

[0110] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0111] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0114] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0115] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0116] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0117] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0118] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A back-to-source data verification system, characterized in that: include: Multiple CDN nodes, origin servers, and log servers; A first CDN node among the multiple CDN nodes is configured to: send a fragment back-to-origin request for a file to the source station; Receiving the file fragments sent by the source station according to the fragment return request; Calculating the verification information of the file segment to generate a first log record containing the verification information of the file segment, and sending the first log record to a log server; The log server is used to: query the second log record of the file segment in the saved log record; the second log record includes verification information calculated by the second CDN node for the file segment returned to the source; and perform consistency verification on the file segment according to the verification information in the first log record and the verification information in the second log record.

2. A method for verifying source data, characterized in that: include: Obtain a first log record sent by a first CDN node, where the first log record includes verification information calculated by the first CDN node for the file fragments returned to the source; In the saved log records, query the second log record of the file segment; the second log record includes verification information calculated by the second CDN node for the file segment returned to the source; Perform a consistency check on the file segment according to the verification information in the first log record and the verification information in the second log record.

3. The method according to claim 2, characterized in that The first log record includes: an identifier of a file to which the file fragment belongs, a fragment range of the fragment file, and a first checksum calculated by the first CDN node for the file fragment; The second log record includes: an identifier of the file to which the file fragment belongs, a fragment range of the fragment file, and a second check value calculated by the second CDN node for the file fragment.

4. The method according to claim 3, characterized in that In the saved log records, querying the second log record of the file segment includes: According to the identification of the files corresponding to each of the saved log records and the shard range, in the saved log records, the log record corresponding to the identification of the file to which the file shard belongs and the shard range of the shard file is queried as the second log record.

5. The method according to claim 3, characterized in that: Performing consistency verification on the file slice according to the verification information of the file slice in the first log record and the verification information of the file slice in the second log record includes: Obtaining the first checksum of the file segment from the first log record, and obtaining the second checksum of the file segment from the second log record; If the first check value is consistent with the second check value, it is determined that the return-to-source operation of the file segment is normal; If the first check value and the second check value are inconsistent, it is determined that an abnormality occurs in the return-to-source operation of the file segment.

6. The method according to claim 5, characterized in that Also includes: If it is determined that the back-to-source operation of the file segment is abnormal, a content refresh request is sent to the content management node to trigger the content management node to delete the cache of the file to which the file segment belongs in the content distribution network.

7. A method for verifying source data, characterized in that: include: Send a sharded back-to-origin request for the file to the origin server; Receiving the file fragments sent by the source station according to the fragment return request; Calculating verification information of the file segment to generate a log record containing the verification information of the file segment; The log record of the file slice is sent to the log server, so that the log server performs consistency verification on the file slice according to the verification information in the log record and the verification information generated by other CDN nodes according to the file slice returned to the source.

8. The method according to claim 7, characterized in that Calculating the verification information of the file segment to generate a log record containing the verification information of the file segment, including: Calculating a checksum of the file segment; A log record of the file slice is generated according to an identifier of the file to which the file slice belongs, a slice range of the slice file, and a check value of the file slice.

9. The method according to claim 8, characterized in that The check value of the file segment includes: at least one of an information summary value, a parity check code value, and a Gray code value of the file segment.

10. A log server, characterized in that: include: Memory, processor, and communication components; The memory is used to store one or more computer instructions; The processor is configured to execute the one or more computer instructions to: perform the steps in the method according to any one of claims 2-6.

11. A CDN server, characterized in that: include: Memory, processor, and communication components; The memory is used to store one or more computer instructions; The processor is configured to execute the one or more computer instructions to: perform the steps in the method of any one of claims 7-9.

12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it can implement the method described in any one of claims 2 to 6 or the method described in any one of claims 7 to 9.