Data verification method, electronic device, electronic equipment and medium

By adding a unique identifier of the CDN node in the CDN system and performing preset processing, the problem of excessive load caused by the CDN system request loop is solved, and the system performance and reliability are improved.

CN115514697BActive Publication Date: 2024-11-22凌川峰(贵州)信息技术有限公司
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202110683204.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-21
Publication Date
2024-11-22
Estimated Expiration
2041-06-21

AI Technical Summary

Technical Problem

Existing CDN systems may cause request loops when requesting back to the source, resulting in excessive load on the CDN node and inability to serve.

Method used

By adding a unique identifier of the target CDN node in the content access request and performing preset processing when the same node identifier or identification is detected more than one time, avoiding request loops, such as forwarding, masking or responding to special status codes, preventing CDN nodes from being able to prevent requests from being able to use them. Excessive load and performance loss.

Benefits of technology

It effectively avoids excessive load and performance losses caused by request cycles of CDN nodes, ensures smooth return to the source, and improves the performance and reliability of the CDN system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115514697B_ABST
    Figure CN115514697B_ABST
Patent Text Reader

Abstract

The present application discloses a method, an electronic device, an electronic device and a medium for data verification. In the present application, after obtaining a content access request and adding a node identifier corresponding to a target CDN node to a specified request position of the content access request, the specified request position of the content access request is verified, and a preset process is performed on the content access request according to the verification result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to data processing technology, and in particular to a data verification method, an electronic device, an electronic device and a medium. Background Art

[0002] Content Delivery Network (CDN) technology is a technology developed to improve the quality of service (QoS) of the Internet. It optimizes the deployment of content to achieve user access to content nearby and intelligent diversion of network traffic, comprehensively solving the impact of factors such as small network bandwidth, large user access volume, and uneven distribution of network points on user access, and greatly improves the response speed of the network. However, when the edge node of the CDN does not store the content requested by the user, the request needs to be returned to the source after reaching the edge node. The inventors have found that the existing CDN has at least the following problems when implementing request return:

[0003] When multiple CDN systems collaborate, or when the user mismatches the back-to-source information, or the source site itself is also configured with CDN acceleration, the request back-to-source path may repeatedly point to the same node, causing the request to loop within the CDN.

[0004] Therefore, how to avoid the access request loop and thus ensure the service performance of the CDN node has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The embodiments of the present application provide a data verification method, an electronic device, an electronic device and a medium. The technical solution of the present application can avoid the problem in the related art that the CDN node is overloaded and cannot provide services due to too many cycles of access requests in the CDN node.

[0006] According to one aspect of an embodiment of the present application, a data verification method is provided, which is applied to a target CDN node, including:

[0007] Get content access request;

[0008] Adding a node identifier corresponding to the target CDN node to a specified request position of the content access request;

[0009] Verifying a specified request location of the content access request;

[0010] The content access request is processed in a preset manner according to the verification result.

[0011] Optionally, in another embodiment of the method of the present application, the adding the node identifier corresponding to the target CDN node to the specified request position of the content access request includes:

[0012] The node identifier is added to the designated request position of the content access request according to a preset format, wherein the preset format includes: adding in sequence according to the order of time when the target CDN node obtains the content access request, or adding randomly.

[0013] Optionally, in another embodiment of the method of the present application, the verifying the specified request location of the content access request includes:

[0014] Determine whether the specified request position carries the same node identifier, or determine whether the specified request position carries partially the same node identifier; or,

[0015] The number of nodes that carry the same node identifier in the specified request position is determined, or the number of nodes that carry some of the same node identifier in the specified request position is determined.

[0016] Optionally, in another embodiment of the above method of the present application, the specified request location of the content access request includes: a request header, a request line, a request URL or a request body.

[0017] Optionally, in another embodiment based on the above method of the present application, the request header includes one of the following: X-Forwarded-For, Via, or a custom request header.

[0018] Optionally, in another embodiment of the method of the present application, before obtaining the content access request, the method further includes:

[0019] A node identifier corresponding to the target CDN node is generated according to attribute parameters of the target CDN node, wherein the attribute parameters include at least one of a machine unique identifier, a region unique identifier, an operator unique identifier, and a group unique identifier of the machine.

[0020] Optionally, in another embodiment of the method according to the present application, the preset processing includes one of the following:

[0021] The content access request is forwarded to the source station, blocked, responded to with a special status code, disconnected, responded to with a rejection, and reset to an initial state.

[0022] Optionally, in another embodiment of the method of the present application, the verifying the specified request location of the content access request includes:

[0023] Perform verification locally, or report the designated request location to the decision center and obtain the verification result returned by the decision center.

[0024] According to another aspect of the embodiment of the present application, an electronic device for data verification is provided, which is applied to a target CDN node, including:

[0025] An acquisition module, configured to acquire a content access request;

[0026] An adding module, configured to add a node identifier corresponding to the target CDN node to a specified request position of the content access request;

[0027] A verification module, configured to verify a specified request location of the content access request;

[0028] The processing module is configured to perform preset processing on the content access request according to the verification result.

[0029] According to another aspect of the embodiments of the present application, an electronic device is provided, including:

[0030] A memory for storing executable instructions; and

[0031] A display is used to display with the memory to execute the executable instructions to complete the operation of any of the above-mentioned data verification methods.

[0032] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided for storing computer-readable instructions, wherein the instructions, when executed, perform the operations of any of the above-mentioned data verification methods.

[0033] In the present application, after obtaining a content access request and adding the node identifier corresponding to the target CDN node to the designated request position of the content access request, the designated request position of the content access request is verified, and the content access request is preset processed according to the verification result. By applying the technical solution of the present application, each time an access request passes through a CDN node, the CDN node will add a node identifier uniquely corresponding to the CDN node to the request, so that when the same node identifier is detected in the access request or the number of node identifiers appears is greater than one, it is determined that the access request is trapped in an access loop so that it is preset processed, thereby avoiding problems such as too many cycles of the access request causing the CDN node to be overloaded and unable to serve, the request to be unable to return to the source smoothly, and the loss of CDN system performance.

[0034] The technical solution of the present application is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present application and, together with the description, serve to explain the principles of the present application.

[0036] The present application can be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0037] Figure 1 A schematic diagram of an exemplary system architecture of the working principle of data verification proposed in this application;

[0038] Figure 2 A schematic diagram of a data verification method proposed in this application;

[0039] Figure 3-Figure 4 A schematic diagram of a data verification method proposed in this application;

[0040] Figure 5 A schematic diagram of an electronic device for data verification proposed in this application;

[0041] Figure 6 A schematic diagram of another electronic device for data verification proposed in this application. DETAILED DESCRIPTION

[0042] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present application.

[0043] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0044] The following description of at least one exemplary embodiment is merely illustrative in nature and is not intended to limit the present application, its application, or uses.

[0045] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0046] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0047] In addition, the technical solutions between the various embodiments of the present application can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0048] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0049] Combine the following Figure 1-Figure 4 To describe the method for performing data verification according to the exemplary embodiment of the present application. It should be noted that the following application scenarios are only shown for the purpose of facilitating understanding of the spirit and principle of the present application, and the embodiments of the present application are not limited in this respect. On the contrary, the embodiments of the present application can be applied to any applicable scenario.

[0050] in, Figure 1 A schematic diagram showing an exemplary system architecture to which the working principle of data verification according to an embodiment of the present application can be applied.

[0051] Depend on Figure 1 It can be seen that when the CDN node of CDN service provider 1 misconfigures the source station IP address as the domain name of CDN service provider 2 or the CDN node IP of CDN service provider 2, since the source station is mismatched as the address of the CDN node, the request will continue to circulate in the CDN nodes of the two CDN service providers until the client times out and then disconnects, which will consume a lot of CDN node service performance, and the number of requests will double according to the number of cycles, which may cause the CDN node to be unable to serve due to excessive requests. It is understandable that this method will request to circulate inside the CDN, and the request cycle will exhaust the bandwidth of the CDN node, such as the POST request cycle will exhaust the CDN's upstream bandwidth.

[0052] In one implementation, the present application also proposes a method for data verification. Figure 2 The following schematically shows a flow chart of a method for data verification according to an embodiment of the present application. Figure 2 As shown, the method is applied to a CDN node, including:

[0053] S101, obtaining a content access request.

[0054] Among them, the content delivery network (CDN) is a computer network system interconnected through the Internet. The system uses the server closest to each user to send music, pictures, videos, applications and other files to users faster and more reliably, thereby solving the problem of network congestion affecting the quality and efficiency of website access.

[0055] Furthermore, CDN generally implements content distribution through a cache system and a scheduling system. In one method, CDN nodes can quickly provide users with content cached locally. In addition, CDN nodes interact with the source station to obtain and save content updated by the source station and content not available locally, or upload content to the source station.

[0056] In this application, in the process of a CDN node obtaining a content access request, it may be a direct acquisition of a content access request generated by a user client, or it may be a content access request forwarded by other CDN nodes. Specifically, after the current CDN node receives the content access request, it may forward it to the next CDN node. It should be noted that this application does not specifically limit the CDN node. For example, it may be a CDN edge node, a CDN center node, a CDN regional node, and so on.

[0057] Furthermore, for the CDN central node, it can be used to achieve the distribution and management of the entire CDN network. For the CDN edge node, it is used to cache the content provided by the source station, eliminating the intermediate network nodes, and providing users with the content of the source station nearby, thereby improving the website access rate and access quality. In addition, for the CDN regional node, it is a CDN regional node between the CDN central node and the CDN edge node. More content can be cached through the CDN regional node, thereby improving the cache hit rate, and then improving the website access rate and quality.

[0058] Optionally, the CDN node in the present application may correspond to one or more CDN servers.

[0059] S102: Add a node identifier corresponding to the target CDN node to a specified request position of the content access request.

[0060] It should be noted that the present application does not specifically limit the designated request location for adding a node identifier to a content access request. For example, it can be added to the request header of the content access request, or it can be added to the request line, request URL or request body of the content access request, etc. Furthermore, after the CDN node receives the access request, the present application can directly add the CDN node identifier that is exclusive to the node itself to the request header or request body of the access request. Among them, for the request header of the access request (such as X-Forwarded-For, Via, or a custom request header), it is an HTTP extension header that can be used as the designated request location.

[0061] Furthermore, the HTTP / 1.1 (RFC 2616) protocol does not define it. It was first introduced by the cache proxy software Squid to indicate the real IP address of the HTTP requester. Specifically, the format of adding the node identifier to X-Forwarded-For can be added sequentially, for example: client, proxy1, proxy2. This application does not limit this.

[0062] Adding the node identifier to a specified request position of the content access request according to a preset format includes: adding the node identifier to at least one request header included in the access request according to the preset format.

[0063] In one method, when the specified request position of the content access request is a request header, and the corresponding node identifier is uniformly added to a specified request header, the CDN node adds the corresponding node identifier to the request header. In another method, the CDN node can add the corresponding node identifier to any of the specified multiple request headers. In addition, for the request header, it can be a default request header such as X-Forwarded-For, Via, etc., or it can be a custom request header, such as x-test, etc., which is not limited in this application.

[0064] Taking the case where the request location is specified as the request header, and the corresponding node identifiers are uniformly added to a specified request header, when the node identifier corresponding to CDN node 1 is identifier 1, the node identifier corresponding to CDN node 2 is identifier 2, and the node identifier corresponding to CDN node 3 is identifier 3... as an example, when the content access request sent by the user reaches CDN node 1, the corresponding CDN node identifier 1 will be added to the unique request header of the content access request, so that it carries identifier 1. Further, when it is detected that the access request reaches CDN node 2, the corresponding CDN node identifier 2 will also be added to the unique request header, so that it carries identifier 2... until the request process of the access request ends, at which time, the unique request header of the access request carries (identifier 1, identifier 2, identifier 3, identifier 4....).

[0065] Optionally, taking the example of specifying the request location as the request header and adding the corresponding node identifier to any one of the specified multiple request headers, when the content access request sent by the user reaches CDN node 1, the corresponding CDN node identifier 1 will be added to the request header of the content access request, so that it carries identifier 1. Further, when it is detected that the content access request reaches CDN node 2, the corresponding CDN node identifier 2 will be added to another request header, so that it carries identifier 2... until the request process of the content access request ends, at which time, all / part of the request headers of the content access request carry the identifiers of the CDN nodes passed through.

[0066] It is understandable that in the embodiment of the present application, the administrator can flexibly choose to add the CDN node identifier to the specified location of the content access request, so as to avoid the problem of excessive storage capacity of the location (such as the request header and / or request body) caused by fixed addition to a certain location of the content access request.

[0067] For example, when the length of the content already existing in the request header of the content access request exceeds the preset length, in order to avoid the problem of excessive storage capacity caused by continuing to add identifiers to the request header, the present application can choose to add the CDN node identifier to the request body of the access request. Similarly, when the length of the content already existing in the request body of the content access request exceeds the preset length, in order to avoid the problem of excessive storage capacity caused by continuing to add identifiers to the request body, the present application can choose to add the CDN node identifier to the request header of the content access request.

[0068] S103: Verify the specified request location of the content access request.

[0069] Furthermore, when the verification result is that the content access request carries two identical CDN node identifiers, it is determined that the content access request has reached the same CDN node twice in the historical period. Therefore, it can be determined that there is a problem with the back-to-source routing scheduling, such as the CDN node misconfiguring the source station address as the address of another CDN node.

[0070] S104: Perform preset processing on the content access request according to the verification result.

[0071] In order to avoid the disadvantage that the user's content access request repeatedly circulates in the CDN node, the present application adopts the operation of pre-setting the content access request.

[0072] Further, when the verification result is normal, it means that no two identical CDN node identifiers are found in the specified request location of the content access request. In other words, it is determined that no problem of the CDN node misconfiguring the source station address as the address of another CDN node is found. In order not to affect business processing, the present application can forward the content access request to the next CDN node for business processing.

[0073] In the present application, after obtaining a content access request and adding the node identifier corresponding to the target CDN node to the designated request position of the content access request, the designated request position of the content access request is verified, and the content access request is preset and processed according to the verification result. By applying the technical solution of the present application, each time a content access request passes through a CDN node, the CDN node will add an identifier that uniquely corresponds to the CDN node to the designated request position of the content access request, so that when the same node identifier is detected in the content access request or the number of node identifier occurrences is greater than one, it is determined that the content access request has fallen into an access loop, and thus preset processing is performed on it. This avoids problems such as excessive load on the CDN node and inability to provide service due to too many cycles of the content access request, inability to smoothly return to the source of the request, and loss of CDN system performance.

[0074] Optionally, in another embodiment of the above method of the present application, in S101 (adding the node identifier corresponding to the target CDN node to the specified request position of the content access request), the following steps may be implemented:

[0075] The node identifier is added to the designated request position of the content access request according to a preset format, wherein the preset format includes: adding in sequence according to the order of time when the target CDN node obtains the content access request, or adding randomly.

[0076] In the process of receiving a content access request and adding a node identifier to a specified request position of the content access request, the CDN node can add its own node identifier to the content access request in the order of the time when the content access request passes through the CDN node, from front to back or from back to front. In another way, the CDN node can also randomly add a node identifier to the content access request.

[0077] Optionally, the specified request location of the content access request proposed in this application includes: request header, request line, request URL or request body.

[0078] Optionally, the request header proposed in this application may include one of the following: X-Forwarded-For, Via, or a custom request header.

[0079] This application adds the node identifier corresponding to the target CDN node to the request header (via header) of the content access request, and takes the request header of each access request as an example for explanation:

[0080] First, it is determined that each time a content access request passes through a CDN node, a node identifier will be added to the request header of the content access request. The node identifier is a pre-generated identifier for each CDN node, and each CDN node identifier corresponds to a CDN node. Further, when the client's content access request reaches CDN node 1, identifier 1 is added to the via header of the content access request. When the business component of CDN node 1 verifies that there is no identical node identifier, that is, the content access request does not loop, the content access request is sent to CDN node 2. Similarly, when the client's content access request reaches CDN node 2, identifier 2 is added to the via header of the content access request so that the via carries node identifier 1 and node identifier 2.

[0081] In one example, if Figure 3 As shown, if the next hop of CDN node 2 is the IP address of the source station, it can be determined that the content access request has not been looped, and the content access request is returned to the source station.

[0082] In another example, if Figure 4 As shown, when the content access request passes through CDN node 1 again, CDN node 1 adds identifier 1 to the via header of the content access request again. When the anti-loop component of CDN node 1 determines that there are currently two node identifiers 1 and node identifier 2, it is determined that the content access request is looped, and the preset processing is performed on the content access request.

[0083] Optionally, in another embodiment of the above method of the present application, in S103 (checking the specified request location of the content access request), the following steps may be implemented:

[0084] Determine whether the specified request location carries the same node identifier, or determine whether the specified request location carries partially the same node identifier; or,

[0085] Determine the number of identical node identifiers carried in the specified request position, or determine the number of partially identical node identifiers carried in the specified request position.

[0086] Among them, the present application can determine whether the content access request carries at least two identical CDN node identifiers by detecting whether all or part of the same node identifiers exist at the specified request position of the content access request. Alternatively, it can determine whether the content access request carries at least two identical CDN node identifiers by detecting whether multiple all or part of the same node identifiers exist at the specified request position of the content access request.

[0087] It should be noted that the present application does not specifically limit the number of identical node identifiers, for example, two, or a number greater than two.

[0088] In one way, in the process of determining whether a content access request carries the same CDN node identifier in an embodiment of the present application, it can be determined by detecting the request header of the content access request or the number of repetitions of a certain content in the request body. For example, if there are two identical identifiers in the request header, it is determined that the access request has reached the same CDN node twice. Therefore, the system corresponding to the CDN node has a problem that the CDN node misconfigures the source station address as the address of other CDN nodes. Alternatively, when there are two identical information contents in the request body, it can also represent that the access request has reached the same CDN node twice. It can be understood that this method can easily determine whether the access request has reached the same CDN node. If it is determined that the content access request is trapped in a loop in the CDN node, the current CDN node can directly return to the source station, or the current CDN node can reject this content access request, or the current CDN node can interrupt this content access request. It should be noted that those skilled in the art can select the corresponding operation mode according to actual needs to avoid the access request from falling into a loop, and this application does not make special restrictions on this.

[0089] Optionally, in another embodiment of the method of the present application, before S101 (obtaining a content access request), the following steps may be implemented:

[0090] A node identifier corresponding to the target CDN node is generated according to the attribute parameters of the target CDN node, where the attribute parameters include at least one of a machine unique identifier, a region unique identifier, a carrier unique identifier, and a group unique identifier of the machine.

[0091] Furthermore, the present application needs to pre-identify each CDN node with a special CDN node identifier before obtaining a content access request. The node identifier can be generated by the machine name, the region name, the operator name, and the group name of the machine, etc. In addition, the machine name, the region name, the operator name, and the group of the machine can be encrypted separately, and the encrypted string can also be used as a node identifier. It should be noted that each CDN node identifier needs to be unique, so that it can be ensured that the node identifier carried in the access request can be used to determine whether the request is trapped in an access loop.

[0092] Optionally, in another embodiment of the method according to the present application, the preset processing includes one of the following:

[0093] Forward content access requests to the origin site, block them, respond with special status codes, disconnect, respond with rejections, and reset to the initial state.

[0094] It can be understood that the purpose of this application to execute preset events for content access requests is to avoid CDN service failure due to loops, CDN node bandwidth exhaustion, and prevent malicious configuration from causing CDN service providers to attack each other, resulting in traffic dead loop oscillations. It can accurately match the situation of loops caused by passing through the same CDN node multiple times.

[0095] Furthermore, when the present application determines that a loop problem occurs in a content access request, it can also perform preset processing on the content access request according to the verification result corresponding to the problem. The preset processing can include forwarding the content access request to the source station, blocking, responding to a special status code, disconnecting, responding to a rejection, and returning to the initial state to prevent the content access request from looping within the CDN node. In addition, after determining to perform the preset processing, the present application can also generate corresponding alarm information so as to subsequently notify the operation and maintenance personnel to troubleshoot potential faults.

[0096] Among them, special processing can also be a hierarchical strategy: for example, if it is repeated n times, it will be directly returned to the source, and if it is repeated m (m>n) times, it will be blocked or directly responded to rejection, etc. It can be understood that the order of this strategy can be adjusted as needed, and the strategy level can also be adjusted as needed.

[0097] For example, let n be 1 and m be 2. For example, when the first CDN node loop event is detected, the content access request is directly returned to the source. When the second CDN node loop event is detected, it is determined that during the configuration of the source domain name, the CDN node address corresponding to the source domain name may be mismatched with other unrelated node addresses (that is, the CDN node address corresponding to the source domain name does not contain the resource information corresponding to the content access request). Therefore, the content access request will fall into the CDN node loop again because the resource information cannot be obtained during the return-to-source process. In response to this situation, the content request is directly blocked or rejected.

[0098] Furthermore, in the case of forwarding content access requests to the source station for back-to-source, the mismatched source station address can be manually modified by the operation and maintenance personnel or automatically by the CDN node to the correct source station address. The source station refers to the original site that provides the resources requested by the content access request. Therefore, when the application determines that the access request is looping, the CDN node directly pulls the content from the source station and returns it to the user end. This avoids the problem of poor communication experience and loss of CDN system performance caused by the user's inability to obtain access resources due to mismatched addresses.

[0099] In another way, if the application determines that the resource storage location corresponding to the content access request is a CDN node, that is, the CDN node stores the access resource information corresponding to the content access request. Then the application can directly refuse to process the content access request or block the content access request. Then notify the operation and maintenance personnel to reconfigure the CDN resource node address. It can be understood that the resource information does not need to be returned to the source, and can be obtained directly from the CDN node that stores the resource information.

[0100] It should be noted that the subject that performs the preset processing in the present application can be executed by the CDN node, or by the anti-loop component deployed in the CDN node.

[0101] Optionally, in another embodiment of the method of the present application, verifying the specified request location of the content access request includes:

[0102] Perform verification locally, or report the specified request location to the decision center and obtain the verification result returned by the decision center.

[0103] Among them, in the process of verifying the designated request location of the content access request, the CDN node can perform verification locally. It can be understood that the anti-loop function can be pre-configured in the business component of each CDN node. The CDN node determines whether the content access request carries at least two identical CDN node identifiers based on whether there are all identical or partially identical node identifiers at the designated request location of the content access request. Alternatively, the CDN node can determine whether the content access request carries at least two identical CDN node identifiers based on whether there are multiple all identical or partially identical node identifiers at the designated request location of the content access request.

[0104] In another way, in the process of verifying the designated request location of the content access request, the present application may also pre-configure an anti-loop component to the CDN node, wherein the anti-loop component has a decision center, and the anti-loop component forwards the content access request to the decision center, so that the decision center detects whether there are all the same or partially the same node identifiers at the designated request location of the content access request to determine whether the content access request carries at least two identical CDN node identifiers. Alternatively, the decision center may determine whether the content access request carries at least two identical CDN node identifiers based on detecting whether there are multiple all the same or partially the same node identifiers at the designated request location of the content access request.

[0105] Furthermore, the decision center can also have more judgment logic. For example, the target CDN node reports all information (such as identification information added to the specified request location of the content access request) so that the decision center can subsequently collect the request header or request body data of all content access requests under the CDN node, and then determine whether there are duplicate CDN node identifiers in the request header or request body of the same content access request, and then issue corresponding policies to avoid the problem of internal loops in CDN nodes.

[0106] It should be noted that a decision center may be deployed for one or more anti-loop components. In one approach, the decision center may be divided according to regions, that is, in the same region, one or more anti-loop components may be deployed with a corresponding decision center.

[0107] Optionally, after performing preset processing on the content access request according to the verification result, the present application further includes: generating alarm information for prompting an operation and maintenance user.

[0108] Furthermore, the application may generate alarm information by the business component in the CDN node or by the business component of the decision center. The application does not limit this. In one way, it can be determined according to the load of the CDN node. For example, when the load of the target CDN node is large, in order to reduce the load of the target CDN node, the business component of the decision center generates an alarm message for prompting the operation and maintenance user.

[0109] In another embodiment of the present application, Figure 5 As shown, the present application also provides an electronic device for data verification. It includes an acquisition module 201, an adding module 202, a verification module 203, and a processing module 204, which are applied to a target CDN node, wherein:

[0110] The acquisition module 201 is configured to acquire a content access request;

[0111] An adding module 202 is configured to add a node identifier corresponding to the target CDN node to a specified request position of the content access request;

[0112] A verification module 203, configured to verify a specified request location of the content access request;

[0113] The processing module 204 is configured to perform a preset process on the content access request according to the verification result.

[0114] In the present application, after obtaining a content access request and adding the node identifier corresponding to the target CDN node to the designated request position of the content access request, the designated request position of the content access request is verified, and the content access request is preset processed according to the verification result. By applying the technical solution of the present application, each time an access request passes through a CDN node, the CDN node will add an identifier that uniquely corresponds to the CDN node to the request, so that when it is subsequently detected that there are two identical identifiers in the access request or the number of node identifiers appears is greater than one, it can be determined that the access request is trapped in an access loop so that it can be preset processed. This avoids problems such as excessive CDN node load and inability to provide services due to too many cycles of access requests, inability to smoothly return to the source, and loss of CDN system performance.

[0115] In another embodiment of the present application, the adding module 202 is configured as follows:

[0116] The node identifier is added to the designated request position of the content access request according to a preset format, wherein the preset format includes: adding in sequence according to the order of time when the target CDN node obtains the content access request, or adding randomly.

[0117] In another embodiment of the present application, the verification module 203 is configured as follows:

[0118] Determine whether the specified request location carries the same node identifier, or determine whether the specified request location carries partially the same node identifier; or,

[0119] Determine the number of identical node identifiers carried in the specified request position, or determine the number of partially identical node identifiers carried in the specified request position.

[0120] In another embodiment of the present application, the adding module 202 is configured as follows:

[0121] The specified request location of the content access request includes: request header, request line, request URL or request body.

[0122] In another embodiment of the present application, the adding module 202 is configured as follows:

[0123] The request header includes one of the following: X-Forwarded-For, Via, or a custom request header.

[0124] In another embodiment of the present application, the adding module 202 is configured as follows:

[0125] A node identifier corresponding to the target CDN node is generated according to attribute parameters of the target CDN node, wherein the attribute parameters include at least one of a machine unique identifier, a region unique identifier, an operator unique identifier, and a group unique identifier of the machine.

[0126] In another embodiment of the present application, the processing module 204 is configured to:

[0127] The content access request is forwarded to the source station, blocked, responded to with a special status code, disconnected, responded to with a rejection, and reset to an initial state.

[0128] In another embodiment of the present application, the verification module 203 is configured as follows:

[0129] Perform verification locally, or report the designated request location to the decision center and obtain the verification result returned by the decision center.

[0130] Figure 6 3 is a logical structure block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0131] Reference Figure 6 , the electronic device 300 may include one or more of the following components: a processor 301 and a memory 302 .

[0132] The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 301 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0133] The memory 302 may include one or more computer-readable storage media, which may be non-transitory. The memory 302 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 302 is used to store at least one instruction, which is used to be executed by the processor 301 to implement the interactive special effects calibration method provided in the method embodiment of the present application.

[0134] In some embodiments, the electronic device 300 may further optionally include: a peripheral device interface 303 and at least one peripheral device. The processor 301, the memory 302 and the peripheral device interface 303 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 303 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 304, a touch display screen 305, a camera 306, an audio circuit 307, a positioning component 308 and a power supply 309.

[0135] The peripheral device interface 303 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 301 and the memory 302. In some embodiments, the processor 301, the memory 302, and the peripheral device interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302, and the peripheral device interface 303 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0136] The radio frequency circuit 304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 304 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 304 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 304 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 304 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 304 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0137] The display screen 305 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos and any combination thereof. When the display screen 305 is a touch display screen, the display screen 305 also has the ability to collect touch signals on the surface or above the surface of the display screen 305. The touch signal can be input to the processor 301 as a control signal for processing. At this time, the display screen 305 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 305 can be one, and the front panel of the electronic device 300 is set; in other embodiments, the display screen 305 can be at least two, which are respectively set on different surfaces of the electronic device 300 or are folded; in some other embodiments, the display screen 305 can be a flexible display screen, which is set on the curved surface or folded surface of the electronic device 300. Even, the display screen 305 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 305 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).

[0138] The camera assembly 306 is used to capture images or videos. Optionally, the camera assembly 306 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 306 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0139] The audio circuit 307 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 301 for processing, or input them into the radio frequency circuit 304 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the electronic device 300. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 301 or the radio frequency circuit 304 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 307 may also include a headphone jack.

[0140] The positioning component 308 is used to locate the current geographic location of the electronic device 300 to implement navigation or LBS (Location Based Service). The positioning component 308 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system, Russia's Grenas system or the European Union's Galileo system.

[0141] The power supply 309 is used to power various components in the electronic device 300. The power supply 309 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 309 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0142] In some embodiments, the electronic device 300 further includes one or more sensors 410 , including but not limited to: an acceleration sensor 411 , a gyroscope sensor 412 , a pressure sensor 413 , a fingerprint sensor 414 , an optical sensor 415 , and a proximity sensor 416 .

[0143] The acceleration sensor 411 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the electronic device 300. For example, the acceleration sensor 411 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 301 can control the touch display screen 305 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 411. The acceleration sensor 411 can also be used for collecting game or user motion data.

[0144] The gyro sensor 412 can detect the body direction and rotation angle of the electronic device 300, and the gyro sensor 412 can cooperate with the acceleration sensor 411 to collect the user's 3D actions on the electronic device 300. The processor 301 can implement the following functions based on the data collected by the gyro sensor 412: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0145] The pressure sensor 413 can be set on the side frame of the electronic device 300 and / or the lower layer of the touch display screen 305. When the pressure sensor 413 is set on the side frame of the electronic device 300, it can detect the user's holding signal of the electronic device 300, and the processor 301 performs left and right hand recognition or shortcut operations according to the holding signal collected by the pressure sensor 413. When the pressure sensor 413 is set on the lower layer of the touch display screen 305, the processor 301 controls the operability controls on the UI interface according to the user's pressure operation on the touch display screen 305. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0146] The fingerprint sensor 414 is used to collect the user's fingerprint, and the processor 301 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 301 authorizes the user to perform relevant sensitive operations, which include unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 414 can be set on the front, back, or side of the electronic device 300. When a physical button or a manufacturer logo is set on the electronic device 300, the fingerprint sensor 414 can be integrated with the physical button or the manufacturer logo.

[0147] The optical sensor 415 is used to collect the ambient light intensity. In one embodiment, the processor 301 can control the display brightness of the touch display screen 305 according to the ambient light intensity collected by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 305 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 305 is reduced. In another embodiment, the processor 301 can also dynamically adjust the shooting parameters of the camera assembly 306 according to the ambient light intensity collected by the optical sensor 415.

[0148] The proximity sensor 416, also called a distance sensor, is usually arranged on the front panel of the electronic device 300. The proximity sensor 416 is used to collect the distance between the user and the front of the electronic device 300. In one embodiment, when the proximity sensor 416 detects that the distance between the user and the front of the electronic device 300 is gradually decreasing, the processor 301 controls the touch display screen 305 to switch from the screen-on state to the screen-off state; when the proximity sensor 416 detects that the distance between the user and the front of the electronic device 300 is gradually increasing, the processor 301 controls the touch display screen 305 to switch from the screen-off state to the screen-on state.

[0149] Those skilled in the art will understand that Figure 6 The structure shown in the figure does not constitute a limitation on the electronic device 300, and may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0150] In an exemplary embodiment, a non-temporary computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, and the above instructions can be executed by the processor 420 of the electronic device 300 to complete the above method based on data verification, the method comprising: obtaining a content access request, adding the node identifier corresponding to the target CDN node to the specified request position of the content access request; verifying the specified request position of the content access request, and performing preset processing on the content access request according to the verification result. Optionally, the above instructions can also be executed by the processor 420 of the electronic device 300 to complete the other steps involved in the above exemplary embodiment. For example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0151] In an exemplary embodiment, an application / computer program product is also provided, including one or more instructions, which can be executed by the processor 420 of the electronic device 300 to complete the above-mentioned method based on data verification, the method comprising: obtaining a content access request, adding the node identifier corresponding to the target CDN node to the specified request position of the content access request; verifying the specified request position of the content access request, and performing preset processing on the content access request according to the verification result. Optionally, the above-mentioned instructions can also be executed by the processor 420 of the electronic device 300 to complete other steps involved in the above-mentioned exemplary embodiment.

[0152] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0153] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for data verification, characterized in that: Applied to the target CDN node, including: Get content access request; Adding a node identifier corresponding to the target CDN node to a specified request position of the content access request; The adding the node identifier corresponding to the target CDN node to the designated request position of the content access request comprises: when the length of the content already existing in the request header of the content access request exceeds a first preset length, adding the node identifier to the request body of the content access request, or when the length of the content already existing in the request body exceeds a second preset length, adding the node identifier to the request header; The adding the node identifier corresponding to the target CDN node to the designated request position of the content access request further includes: when the access request passes through each CDN node, each CDN node adds a node identifier uniquely corresponding to each CDN node to the access request; Verifying a specified request location of the content access request; The content access request is processed in a preset manner according to the verification result, wherein the verification result includes subsequently determining that the content access request is trapped in an access loop when it is detected that the same node identifier exists in the content access request or the number of occurrences of the node identifier is greater than one.

2. The method according to claim 1, characterized in that The adding the node identifier corresponding to the target CDN node to the specified request position of the content access request includes: The node identifier is added to the designated request position of the content access request according to a preset format, wherein the preset format includes: adding in sequence according to the order of time when the target CDN node obtains the content access request, or adding randomly.

3. The method according to claim 1, characterized in that The verifying the specified request location of the content access request includes: Determine whether the specified request position carries the same node identifier, or determine whether the specified request position carries partially the same node identifier; or, The number of nodes that carry the same node identifier in the specified request position is determined, or the number of nodes that carry some of the same node identifier in the specified request position is determined.

4. The method according to claim 1, characterized in that The specified request location of the content access request includes: a request header, a request line, a request URL or a request body.

5. The method according to claim 4, characterized in that The request header includes one of the following: X-Forwarded-For, Via, or a custom request header.

6. The method according to claim 1, characterized in that Before obtaining the content access request, the method further includes: A node identifier corresponding to the target CDN node is generated according to attribute parameters of the target CDN node, wherein the attribute parameters include at least one of a machine unique identifier, a region unique identifier, an operator unique identifier, and a group unique identifier of the machine.

7. The method according to claim 1, characterized in that The preset processing includes one of the following: The content access request is forwarded to the source station, blocked, responded to with a special status code, disconnected, responded to with a rejection, and reset to an initial state.

8. The method according to claim 1, characterized in that The verifying the specified request location of the content access request includes: Perform verification locally, or report the designated request location to the decision center and obtain the verification result returned by the decision center.

9. An electronic device for data verification, characterized in that: Applied to the target CDN node, including: An acquisition module, configured to acquire a content access request; an adding module, configured to add the node identifier corresponding to the target CDN node to the specified request position of the content access request; the adding the node identifier corresponding to the target CDN node to the specified request position of the content access request comprises: when the length of the content already existing in the request header of the content access request exceeds a first preset length, adding the node identifier to the request body of the content access request, or when the length of the content already existing in the request body exceeds a second preset length, adding the node identifier to the request header; The adding the node identifier corresponding to the target CDN node to the designated request position of the content access request further includes: when the access request passes through each CDN node, each CDN node adds a node identifier uniquely corresponding to each CDN node to the access request; A verification module, configured to verify a specified request location of the content access request; The processing module is configured to perform preset processing on the content access request according to the verification result, wherein the verification result includes subsequently determining that the content access request is trapped in an access loop when it is detected that the same node identifier exists in the content access request or the number of occurrences of the node identifier is greater than one.

10. An electronic device, characterized in that: include: A memory for storing executable instructions; as well as, A processor is used to display with the memory to execute the executable instructions to complete the operation of the data verification method described in any one of claims 1-8.

11. A computer-readable storage medium for storing computer-readable instructions, characterized in that: When the instruction is executed, the operation of the data verification method described in any one of claims 1-8 is performed.

Citation Information

Patent Citations

  • Method, device and system of CDN (content delivery network) flow distribution

    CN103312629A

  • Method and device for defending CDN flow amplification attacks

    CN103685253A

  • Nearby scheduling method and system for content distribution network

    CN110753250A

  • Content looping detection processing method and device and computer readable storage medium

    CN111404761A

  • Router, transfer loop prevention method, and program

    JP2012151806A