A real IP identification method, device, electronic device and storage medium

By obtaining domain name information and parsing records from Web access requests, generating and comparing message characteristics, the problem of cloud WAF being unable to identify real IPs is solved, and accurate IP identification and security improvement of Web sites are achieved.

CN114567613BActive Publication Date: 2024-10-25CHINA TELECOM NETWORK SECURITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210191739.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-28
Publication Date
2024-10-25
Estimated Expiration
2042-02-28

AI Technical Summary

Technical Problem

Existing cloud Web application firewalls (WAF) cannot directly identify the real Internet Protocol (IP) of a Web site, allowing unknown threats to bypass detection and directly attack the Web site.

Method used

By obtaining domain name information and domain name resolution records from the Web access request sent by the target terminal, generating target response messages and candidate response messages, and selecting real response messages that meet the preset conditions based on the similarity of message features to determine the real IP.

Benefits of technology

Accurately identify the real IP of the Web site to prevent unknown threats from bypassing cloud WAF detection and direct attacks, and enhance the security of the Web site.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114567613B_ABST
    Figure CN114567613B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a real IP identification method, device, electronic device and storage medium, which relates to the field of network security technology. In the present application, based on the Web access request sent by the target terminal, the domain name information corresponding to the target Web site is determined, and at least one candidate IP contained in the domain name resolution record corresponding to the domain name information within the set historical time range; then, the target message feature of the target response message obtained based on the Web access request, and the candidate message feature of the candidate response message corresponding to at least one candidate IP are obtained; finally, based on the feature similarity between each of the at least one candidate message feature and the target message feature, the real response message that meets the preset feature similarity condition is selected, so that the candidate IP corresponding to the real response message is used as the real IP of the target Web site, and the real IP of the target Web site can be accurately identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a real IP identification method, device, electronic device and storage medium. Background Art

[0002] With the continuous development of the information age, the impact of the World Wide Web (Web) on daily life has become more and more profound. Therefore, as a website that carries and publishes various Web applications, it is inevitable that it has become the target of many unknown threats. Therefore, in order to better protect Web sites, various Web Application Firewalls (WAF) have emerged.

[0003] Currently, WAF can be divided into three categories: hardware WAF, software WAF and cloud WAF. Among them, cloud WAF is a cloud-based WAF with simple deployment, low maintenance cost, and no need to install software programs and hardware equipment. You only need to resolve the domain name to the relevant address to use the protection function of cloud WAF.

[0004] Typically, a cloud WAF consists of a control center and end nodes. The control center is used to parse and schedule client access requests to Web sites, while the end nodes are used to filter illegal client access requests to Web sites.

[0005] For example, in order to protect the website and accelerate the access to the website, the proxy port is pre-configured and the corresponding address mapping rules are set to hide the real IP of the website, and the domain name resolution right of the website is transferred to the cloud WAF, that is, the Domain Name System (DNS) resolution site is set as the DNS site of the cloud WAF; then, the DNS site is scheduled through the control center of the cloud WAF, and the access request for the website is resolved to the designated end node for detection; finally, after the designated end node completes the detection of the access request and confirms that the access request is safe, it can be submitted to the website, and then the access request is responded to.

[0006] However, by adopting the above-mentioned Web site protection method, the proxy port is configured through the cloud WAF and the corresponding address mapping rules are set to access the Web site. The real Internet Protocol (IP) for accessing the Web site cannot be directly identified. In this way, when the access request carrying unknown threats is for the real IP, the detection of the cloud WAF can be bypassed, and such access request can be directly sent to the Web site, thereby causing unknown threats to attack the Web site.

[0007] Therefore, using the above method, the real IP address of the website cannot be identified, and thus the attack on the website by unknown threats in the access request for the real IP address of the website cannot be avoided. Summary of the invention

[0008] The present application provides a real IP identification method, device, electronic device and storage medium for accurately identifying the real IP of a website.

[0009] In a first aspect, an embodiment of the present application provides a real IP identification method, the method comprising:

[0010] The domain name information corresponding to the target Web site is obtained from the Web access request sent by the target terminal, and the domain name resolution record corresponding to the domain name information within a set historical time range is determined; wherein the domain name resolution record includes: at least one candidate IP.

[0011] Based on the Web access request, a corresponding target response message is generated, and a target message feature of the target response message is obtained.

[0012] Based on at least one candidate IP included in the domain name resolution record, the target Web site is accessed, a candidate response message corresponding to each of the at least one candidate IP is generated, and a candidate message feature of each of the at least one candidate response message is obtained.

[0013] Based on the feature similarity between at least one candidate message feature and the target message feature, a real response message that meets the preset feature similarity condition is selected from at least one candidate response message, and the candidate IP corresponding to the real response message is used as the real IP of the target Web site.

[0014] In a second aspect, an embodiment of the present application further provides a real IP identification device, the device comprising:

[0015] The resolution module is used to obtain the domain name information corresponding to the target Web site from the Web access request sent by the target terminal, and to determine the domain name resolution record corresponding to the domain name information within a set historical time range; wherein the domain name resolution record includes: at least one candidate IP.

[0016] The acquisition module is used to generate a corresponding target response message based on a Web access request, and obtain the target message characteristics of the target response message; and based on at least one candidate IP included in the domain name resolution record, access the target Web site, respectively generate a candidate response message corresponding to at least one candidate IP, and obtain the candidate message characteristics of at least one candidate response message.

[0017] The processing module is used to select a real response message that meets a preset feature similarity condition from at least one candidate response message based on the feature similarity between at least one candidate message feature and the target message feature, and use the candidate IP corresponding to the real response message as the real IP of the target Web site.

[0018] In an optional embodiment, when selecting a real response message that satisfies a preset feature similarity condition from at least one candidate response message based on the feature similarity between each of at least one candidate message feature and the target message feature, the processing module is specifically used to:

[0019] Based on the similarity sets corresponding to at least one candidate message feature, feature similarities between the corresponding candidate message feature and the target message feature are determined respectively; wherein each similarity set includes: sub-similarity of three different attributes between the corresponding candidate message feature and the target message feature.

[0020] Based on the obtained at least one feature similarity, a real response message that meets a preset feature similarity condition is selected from each candidate response message.

[0021] In an optional embodiment, before selecting a real response message that satisfies a preset feature similarity condition from at least one candidate response message based on the feature similarity between each of at least one candidate message feature and the target message feature, the processing module is further used to:

[0022] For at least one candidate message feature, perform the following operations respectively:

[0023] Obtain a candidate message feature and a target message feature; wherein a candidate message feature includes: at least one attribute of a corresponding candidate response line, a candidate response header, and a candidate response body, and a target message feature includes: at least one attribute of a target response line, a target response header, and a target response body.

[0024] A first sub-similarity between the candidate response line and the target response line, a second sub-similarity between the candidate response header and the target response header, and a third sub-similarity between the candidate response body and the target response body are determined.

[0025] Based on the first sub-similarity, the second sub-similarity and the third sub-similarity, a similarity set corresponding to the candidate message feature is generated.

[0026] In an optional embodiment, when determining a first sub-similarity between a candidate response line and a target response line, a second sub-similarity between a candidate response header and a target response header, and a third sub-similarity between a candidate response body and a target response body, the processing module is specifically configured to:

[0027] Based on the comparison result between the candidate response row and the target response row, a first sub-similarity set corresponding to the comparison result is determined; wherein the comparison result indicates whether the candidate response row is the same as the target response row.

[0028] Based on the character similarity between the candidate character array corresponding to the candidate response header and the target character array corresponding to the target response header, a second sub-similarity corresponding to the character similarity setting is determined.

[0029] Based on the number of character differences between the candidate hash array corresponding to the candidate response body and the target hash array corresponding to the target response body, a third sub-similarity corresponding to the number of character differences is selected from a preset third sub-similarity set.

[0030] In an optional embodiment, when determining the second sub-similarity of the corresponding character similarity setting based on the character similarity between the candidate character array corresponding to the candidate response header and the target character array corresponding to the target response header, the processing module is specifically used to:

[0031] The candidate character array and the target character array are summarized to obtain the number of identical characters corresponding to the candidate character array and the target character array and the total number of characters.

[0032] Based on the number of identical characters and the total number of characters, the character similarity between the candidate character array and the target character array is obtained, and the character similarity is used as the second sub-similarity.

[0033] In an optional embodiment, in the process of determining the first sub-similarity set corresponding to the comparison result based on the comparison result between the candidate response line and the target response line, the processing module is further configured to:

[0034] If the first sub-similarity is less than the set first sub-similarity threshold, it is directly determined that a candidate IP corresponding to a candidate message feature is not the real IP of the target Web site.

[0035] In an optional embodiment, in the process of determining the second sub-similarity of the corresponding character similarity setting based on the character similarity between the candidate character array corresponding to the candidate response header and the target character array corresponding to the target response header, the processing module is further used to:

[0036] If the array length of the candidate character array is different from the array length of the target character array, it is directly determined that the candidate IP corresponding to a candidate message feature is not the real IP of the target Web site.

[0037] If the second sub-similarity is less than the set second sub-similarity threshold, it is directly determined that a candidate IP corresponding to a candidate message feature is not the real IP of the target Web site.

[0038] In an optional embodiment, in the process of selecting a third sub-similarity corresponding to the number of character differences from a preset third sub-similarity set based on the number of character differences between the candidate hash array corresponding to the candidate response body and the target hash array corresponding to the target response body, the processing module is further configured to:

[0039] If the third sub-similarity is less than the set third sub-similarity threshold, it is directly determined that a candidate IP corresponding to a candidate message feature is not the real IP of the target Web site.

[0040] In a third aspect, the present application provides an electronic device, the electronic device comprising:

[0041] Memory, used to store computer programs;

[0042] The processor is used to implement the above-mentioned steps of a real IP identification method when executing the computer program stored in the memory.

[0043] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned steps of a real IP identification method are implemented.

[0044] In a fifth aspect, a computer program product is provided. When the computer program product is called by a computer, the computer executes the steps of a real IP identification method as described in the first aspect.

[0045] The real IP identification method provided in the embodiment of the present application determines the domain name information corresponding to the target Web site based on the Web access request sent by the target terminal, and at least one candidate IP contained in the domain name resolution record corresponding to the domain name information within a set historical time range; then, obtains the target message feature of the target response message obtained based on the Web access request, and the candidate message feature of the candidate response message corresponding to each of the at least one candidate IP; finally, based on the feature similarity between each of the at least one candidate message feature and the target message feature, selects the real response message that meets the preset feature similarity condition, so that the candidate IP corresponding to the real response message is used as the real IP of the target Web site.

[0046] In this way, the real IP address of the target Web site is determined based on the feature similarity between at least one candidate message feature and the target message feature. This avoids the technical defect of the traditional method of configuring the proxy port through the cloud WAF and setting the corresponding address mapping rules to access the target Web site, but cannot directly identify the real IP address of the target Web site. The real IP address of the target Web site can be accurately identified. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 The system architecture diagram applicable to the embodiments of the present application is exemplarily shown;

[0048] Figure 2 The following is a flow chart of a real IP identification method provided by an embodiment of the present application;

[0049] Figure 3 A logical schematic diagram of obtaining domain name information and its corresponding domain name resolution record provided by an embodiment of the present application is exemplified;

[0050] Figure 4 A schematic diagram of a method for obtaining a similarity set provided in an embodiment of the present application is exemplarily shown;

[0051] Figure 5 A schematic diagram of a method for obtaining various message attributes provided in an embodiment of the present application is exemplarily shown;

[0052] Figure 6 The present invention provides a method based on Figure 2 Schematic diagram of the

[0053] Figure 7 The following is a schematic diagram showing the structure of a real IP identification device provided in an embodiment of the present application;

[0054] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is exemplarily shown. DETAILED DESCRIPTION

[0055] In order to accurately identify the real IP address of the target Web site, in an embodiment of the present application, the domain name information corresponding to the target Web site is determined according to the Web access request, and at least one candidate IP included in the domain name resolution record corresponding to the domain name information within a set historical time range; then, the target message feature of the target response message obtained based on the Web access request and the candidate message feature of the candidate response message corresponding to each of the at least one candidate IP are obtained; finally, based on the feature similarity between each of the at least one candidate message feature and the target message feature, the real response message that meets the preset feature similarity condition is selected, so that the candidate IP corresponding to the real response message is used as the real IP address of the target Web site.

[0056] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are first explained below.

[0057] (1) Cloud WAF: This refers to implementing the WAF function on the cloud. For example, by simply handing over the domain name resolution rights to the cloud WAF, you can use DNS scheduling technology to change the original flow of network traffic; then, the network traffic is pulled to the cloud WAF, which purifies and filters the traffic and then sends the safe traffic back to the real backend application, thereby achieving the role of security filtering and protection.

[0058] (2) Simhash algorithm: By performing word segmentation, hashing, weighting, merging and dimensionality reduction operations on each text in turn, the SimHash value corresponding to each text is obtained. Then, by comparing the SimHash values ​​corresponding to different texts, the corresponding Hamming distance is obtained, and then the similarity between the texts is obtained.

[0059] (3) DNS: It is a system for naming machines on the Internet. As a distributed database that maps domain names and IP addresses, it enables easy access to the Internet without having to remember IP strings that can be directly read by machines.

[0060] (4) Hamming distance: Also known as code distance, in information coding, the number of bits that are encoded differently in the corresponding bits of two legal codes, that is, the number of bits with different values ​​in the corresponding bits of two code words is called the Hamming distance of the two code words. For example, 10101 and 00110 are different in the first, fourth, and fifth bits starting from the first bit, so the Hamming distance is 3.

[0061] It should be noted that the above-mentioned naming method of technical terms is only an example, and the embodiments of the present application do not limit the naming method of the above-mentioned technical terms.

[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present application. 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 invention.

[0063] It should be noted that in the description of this application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. A and B are connected, which can represent two situations: A and B are directly connected and A and B are connected through C. In addition, in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0064] See also Figure 1 , which is a system architecture diagram applicable to the embodiment of the present application, and the system architecture includes: a terminal device 101, a server 102 and a target website 103. The terminal device 101 and the server 102 can exchange information via wireless communication or wired communication.

[0065] Exemplarily, the terminal device 101 can access the network through cellular mobile communication technology to communicate with the server 102. The cellular mobile communication technology, for example, includes the fifth generation mobile communication (5th Generation Mobile Networks, 5G) technology.

[0066] Optionally, the terminal device 101 may access the network via a short-range wireless communication method, thereby communicating with the server 102 . The short-range wireless communication method, for example, includes Wireless Fidelity (Wi-Fi) technology.

[0067] The embodiment of the present application does not limit the number of servers and other devices mentioned above. Figure 1 Only one terminal device is used as an example for description.

[0068] The terminal device 101 is a device that can provide voice and / or data connectivity to users, including handheld terminal devices with wireless connection functions, vehicle-mounted terminal devices, etc.

[0069] Exemplarily, the terminal device can be: a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile Internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal device in industrial control, a wireless terminal device in unmanned driving, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, etc.

[0070] It should be noted that, for ease of understanding, in this article, the terminal device is also referred to as a target terminal.

[0071] Server 102 is used to obtain domain name information corresponding to a target Web site from a Web access request sent by a target terminal, and to determine a domain name resolution record corresponding to the domain name information within a set historical time range; then, based on the Web access request, a corresponding target response message is generated, and a target message feature of the target response message is obtained; further, based on at least one candidate IP included in the domain name resolution record, the target Web site is accessed, and candidate response messages corresponding to at least one candidate IP are generated respectively, and candidate message features of at least one candidate response message are obtained; finally, based on the feature similarity between each of at least one candidate message feature and the target message feature, a real response message that meets a preset feature similarity condition is selected from at least one candidate response message, and the candidate IP corresponding to the real response message is used as the real IP of the target Web site.

[0072] The target Web site 103 stores a large amount of data, resources and information, and can also allocate and call various resources to meet relevant business needs.

[0073] Further, based on the above system architecture, see Figure 2 As shown, the embodiment of the present application provides a real IP identification method, and the specific steps are as follows:

[0074] S201: Acquire domain name information corresponding to a target Web site from a Web access request sent by a target terminal, and determine a domain name resolution record corresponding to the domain name information within a set historical time range.

[0075] For details, see Figure 3 As shown, when executing step S201, after receiving the Web access request from the target terminal, the server parses the Web access request through the information parsing module to obtain each data packet, and then obtains the domain name information of the target Web site to be accessed through the data classification module; further, based on the correspondence between the feature identifier of the domain name information and the domain name resolution record, combined with the set historical time range, the domain name resolution record corresponding to the domain name information within the set historical time range is screened out.

[0076] It should be noted that the domain name resolution record includes: at least one candidate IP obtained by resolving the domain name information; and after the server receives the Web access request sent by the target terminal, it is necessary to determine whether the Web access request carries the corresponding domain name information. Only when it is determined that the Web access request carries the corresponding domain name information can the target Web site be accessed based on the Web access request.

[0077] S202: Based on the Web access request, a corresponding target response message is generated, and a target message feature of the target response message is obtained.

[0078] Specifically, when executing step S202, after receiving the Web access request, the server obtains the access IP address corresponding to the target Web site through domain name resolution, and then accesses the target Web site based on the access IP address, obtains the corresponding target response message, and then parses the target response message to obtain the target message characteristics of the target response message.

[0079] Exemplarily, assuming that the domain name information of the target Web site is "www.micrsoft.com", the server resolves the access IP address corresponding to the domain name information "www.micrsoft.com" according to the mapping relationship between the domain name information and the access IP address contained in the DNS, and then accesses the target Web site according to the obtained access IP address, and then obtains the corresponding target response message, such as: "HTTP / 1.1 304 Not Modified", "Date: Sat, 15 Oct 2022 15:28:37", and the target message characteristics of the target response message; wherein the target message characteristics include: at least one attribute in the target response line, the target response header, and the target response body. For example, the target message characteristics of the above-mentioned corresponding target response message include: target response line "HTTP / 1.1 304 Not Modified", "Date: Sat, 15 Oct 2022 15:28:37", wherein the target response line includes a status line and a message header, that is, "HTTP / 1.1 304 Not Modified" is the status line of the target response message, and "Date: Sat, 15 Oct 2022 15:28:37" is the message header of the target response message, and the target response header and target response body are both empty.

[0080] S203: Based on at least one candidate IP included in the domain name resolution record, access the target Web site, generate candidate response messages corresponding to at least one candidate IP respectively, and obtain candidate message features of at least one candidate response message respectively.

[0081] Specifically, when executing step S203, after obtaining the target message characteristics of the target response message, the server accesses the target Web site according to at least one candidate IP included in the domain name resolution record corresponding to the domain name information, and generates candidate response messages corresponding to at least one candidate IP respectively, thereby obtaining the candidate message characteristics of each candidate message; wherein each candidate message characteristic includes: a corresponding candidate response line, a candidate response header, and at least one attribute in a candidate response body.

[0082] S204: Based on the feature similarity between at least one candidate message feature and the target message feature, select a real response message that meets the preset feature similarity condition from at least one candidate response message, and use the candidate IP corresponding to the real response message as the real IP of the target Web site.

[0083] It should be noted that before executing step S204, it is necessary to pre-select and obtain at least one similarity set corresponding to each candidate message feature, wherein each similarity set includes: the sub-similarity of each of the three different attributes between the corresponding candidate message feature and the target message feature, see Figure 4 As shown, in the embodiment of the present application, for a candidate message feature, a method flow for obtaining a corresponding similarity set is as follows:

[0084] S401: Obtain a candidate message feature and a target message feature.

[0085] For details, see Figure 5 As shown, when executing step S401, the server obtains a candidate response line, and / or a candidate response header, and / or a candidate response body of a corresponding candidate response message from a candidate message feature based on the data types of the message response line, the message response header, and the message response body, and a set data classification model, and obtains a target response line, and / or a target response header, and / or a target response body of a target response message from the target message feature.

[0086] It should be noted that, for the sake of ease of description and understanding, the above-mentioned candidate message features include: the candidate response line, candidate response header and candidate response body of the corresponding candidate response message, and the above-mentioned target message features include: the target response line, target response header and target response body of the target response message.

[0087] S402: Determine a first sub-similarity between the candidate response line and the target response line, a second sub-similarity between the candidate response header and the target response header, and a third sub-similarity between the candidate response body and the target response body.

[0088] Specifically, when executing step S402, after obtaining a candidate message feature and a target message feature, the server determines the first sub-similarity set for the corresponding comparison result based on the comparison result between the candidate response line and the target response line; wherein the comparison result indicates whether the candidate response line is the same as the target response line. Optionally, the server can also directly obtain the corresponding comparison result by determining whether the status line of the target response line is equal to the status line of a candidate response line.

[0089] Exemplarily, assuming that the server obtains a candidate response line CLR1 of a candidate response feature and a target response line TLR1 of a target response feature, the candidate response line CLR1 and the target response line TLR1 are analyzed and compared through the character analysis module to obtain a comparison result between the candidate response line CLR1 and the target response line TLR1.

[0090] For example, if the response row similarity between the candidate response row CLR1 and the target response row is greater than the preset row similarity threshold, then the comparison result between the candidate response row CLR1 and the target response row TLR1 is determined to be: the candidate response row CLR1 and the target response row TLR1 are the same; if the response row similarity between the candidate response row CLR1 and the target response row is less than or equal to the preset row similarity threshold, then the comparison result between the candidate response row CLR1 and the target response row TLR1 is determined to be: the candidate response row CLR1 and the target response row TLR1 are not the same.

[0091] Next, the server determines the first sub-similarity corresponding to the comparison result between the candidate response row CLR1 and the target response row TLR1 according to the corresponding relationship between the comparison result and the first sub-similarity. For the convenience of calculation, the first sub-similarity can be a normalized value, for example, the first sub-similarity corresponding to the comparison result that represents the same candidate response row and the target response row is 1; the first sub-similarity corresponding to the comparison result that represents the different candidate response row and the target response row is 0.4.

[0092] Optionally, if the first sub-similarity is less than the set first sub-similarity threshold, it is directly determined that the candidate IP corresponding to a candidate message feature is not the real IP of the target Web site. For example, the set first sub-similarity threshold α=0.95, if the comparison result of the candidate response line and the target response line is the same, the corresponding first sub-similarity is 0.4, which is less than the set first sub-similarity threshold α=0.95, it is directly determined that the candidate IP corresponding to a candidate message feature is not the real IP of the target Web site, and then the next candidate IP is judged whether it is the real IP of the target Web site.

[0093] Further, after determining the first sub-similarity between the candidate response line and the target response line, the server determines a second sub-similarity corresponding to the character similarity setting based on the character similarity between the candidate character array corresponding to the candidate response header and the target character array corresponding to the target response header.

[0094] In one possible implementation, the server summarizes the candidate character array and the target character array to obtain the number of identical characters and the total number of characters corresponding to the candidate character array and the target character array; then, based on the number of identical characters and the total number of characters, the server obtains the character similarity between the candidate character array and the target character array, and uses the character similarity as the second sub-similarity.

[0095] Exemplarily, assuming that the candidate response message and the target response message are both Hyper Text Transfer Protocol (HTTP) response messages, it is easy to know that the candidate response header of the candidate response message and the target response header of the target response message are both in the form of multiple lines of Key: Value key-value pairs. The Key: Value key-value pairs of the candidate response header and the target response header are respectively concatenated to form a multi-line string sequence, thereby obtaining a candidate character array and a target character array; further, the candidate character array and the target character array are summarized to obtain the number of identical characters and the total number of characters corresponding to the candidate character array and the target character array; finally, based on the number of identical characters and the total number of characters, the character similarity of the candidate character array and the target character array is determined, and the character similarity is used as the second sub-similarity.

[0096] For example, suppose the candidate character array A k [N] and the target character array B k [M], the server can complete the aggregation of the candidate character array and the target character array, and the determination of the second sub-similarity according to the character similarity calculation formula. The character similarity calculation formula is as follows:

[0097]

[0098] Among them, A k [N] is the candidate character array, N is the length of the candidate character array; B k [M] is the target character array, M is the length of the target character array; A k [N]∩B k [M] is the number of characters in the same character set in the candidate character array and the target character array; A k [N]∪B k [M] is the number of characters in the character set after the candidate character array and the target character array are combined, and each character in the combined character set is different from each other.

[0099] For example, suppose the candidate character array A k [N] and the target character array B k In [M], both N and M are 10, and A k [N]∩B k[M] corresponds to 8 characters in the same character set. k [N]∪B k The number of characters in the summarized character set corresponding to [M] is 12, so it is easy to know that the candidate character array A k [N] and the target character array B k Character similarity of [M] Then we can know that the candidate character array A k [N] and the target character array B k The second sub-similarity of [M] is 0.67.

[0100] Optionally, if the array length of the candidate character array is different from the array length of the target character array, then it is directly determined that the candidate IP corresponding to a candidate message feature is not the real IP of the target Web site. k [N] array length N = 15, and the target character array B k The array length of [M] is M = 16, so it is easy to know that the candidate character array A k [N] and the target character array B k [M] If the lengths of their respective arrays are not equal, it can be directly determined that the candidate IP corresponding to a candidate message feature is not the real IP of the target Web site, and then a judgment is made as to whether the next candidate IP is the real IP of the target Web site.

[0101] Optionally, if the second sub-similarity is less than the set second sub-similarity threshold, then the candidate IP corresponding to a candidate message feature is directly determined to be not the real IP of the target Web site. For example, if the set second sub-similarity threshold β = 0.90, if the candidate character array A k [N] and the target character array B k The second sub-similarity of [M] is 0.67, which is less than the set second sub-similarity threshold β=0.90. It is directly determined that the candidate IP corresponding to a candidate message feature is not the real IP of the target Web site, and then the next candidate IP is judged whether it is the real IP of the target Web site.

[0102] Furthermore, after determining the second sub-similarity between the candidate response header and the target response header, the server selects a third sub-similarity corresponding to the number of character differences from a preset third sub-similarity set based on the number of character differences between the candidate hash array corresponding to the candidate response body and the target hash array corresponding to the target response body.

[0103] In a possible implementation, after obtaining the candidate response body and the target response body, the server performs word segmentation, hashing, weighting, merging and dimension reduction on the candidate hash array corresponding to the candidate response body and the target hash array corresponding to the target response body based on the Simhash algorithm to obtain their respective Simhash values; further, based on the number of character differences in the two Simhash values ​​obtained, the Hamming distance is calculated to determine the Hamming distance between the candidate hash array and the target hash array; finally, according to the obtained Hamming distance and the preset correspondence table between the Hamming distance and the third sub-similarity, the third sub-similarity corresponding to the Hamming distance is selected.

[0104] Optionally, if the third sub-similarity is less than the set third sub-similarity threshold, it is directly determined that the candidate IP corresponding to a candidate message feature is not the real IP of the target Web site. For example, if the set third sub-similarity threshold γ=0.85, if the third sub-similarity between the candidate hash array and the target hash array is 0.82, it is directly determined that the candidate IP corresponding to a candidate message feature is not the real IP of the target Web site, and then the next candidate IP is judged to be the real IP of the target Web site.

[0105] S403: Generate a similarity set corresponding to a candidate message feature based on the first sub-similarity, the second sub-similarity and the third sub-similarity.

[0106] Specifically, the server obtains a first sub-similarity between the candidate response line and the target response line, a second sub-similarity between the candidate response header and the target response header, and a third sub-similarity between the candidate response body and the target response body, and can generate a similarity set corresponding to a candidate message feature based on the first sub-similarity, the second sub-similarity and the third sub-similarity.

[0107] Based on the above steps, the server obtains the similarity sets corresponding to each candidate message feature; wherein each similarity set includes: the sub-similarity of each of the three different attributes between the corresponding candidate message feature and the target message feature.

[0108] Further, the server determines the feature similarity between the corresponding candidate message feature and the target message feature based on the similarity set corresponding to each of the at least one candidate message feature. Specifically, the server can determine the feature similarity between the corresponding candidate message feature and the target message feature based on the feature similarity calculation formula, wherein the feature similarity calculation formula is as follows:

[0109] ξ=μ1v1+μ2v2+μ3v3

[0110] Among them, ξ is the feature similarity between the corresponding candidate message feature and the target message feature; v1, v2, v3 are respectively: the first sub-similarity, the second sub-similarity, and the third sub-similarity; μ1, μ2, μ3 are respectively the weighting factors of the third sub-similarity, and μ1+μ2+μ3=1, and μ1, μ2, and μ3 can all be set according to actual needs.

[0111] Exemplarily, if the first sub-similarity v1=1 and the corresponding weighting factor μ1=0.5 between a candidate response feature and the target response feature; the second sub-similarity v2=0.93 and the corresponding weighting factor μ2=0.3; the third sub-similarity v3=0.88 and the corresponding weighting factor μ3=0.2, then according to the above feature similarity calculation formula, the feature similarity between the candidate message feature and the target message feature ξ=1×0.5+0.3×0.98+0.2×0.92=0.83072 can be obtained.

[0112] Furthermore, the server selects a real response message that meets a preset feature similarity condition from each candidate response message based on the at least one feature similarity obtained.

[0113] Exemplarily, assuming that the feature similarities between the five candidate message features and the target message features are: ξ1=0.954, ξ2=0.878, ξ3=0.921, ξ4=0.907, ξ5=0.936, then the candidate response message corresponding to the maximum feature similarity is selected as the real response message corresponding to accessing the target Web site, and then the candidate IP corresponding to the real response message is used as the real IP of the target Web site.

[0114] Based on the above method steps, see Figure 6 As shown, the server obtains the domain name information corresponding to the target Web site from the Web access request sent by the target terminal, and determines the domain name resolution record corresponding to the domain name information within a set historical time range; generates a corresponding target response message based on the Web access request, and obtains the target message feature of the target response message; based on at least one candidate IP included in the domain name resolution record, accesses the target Web site, generates candidate response messages corresponding to at least one candidate IP respectively, and obtains the candidate message feature of at least one candidate response message; based on the feature similarity between each of the at least one candidate message feature and the target message feature, selects a real response message that meets the preset feature similarity condition from at least one candidate response message, and uses the candidate IP corresponding to the real response message as the real IP of the target Web site.

[0115] The real IP identification method provided in the embodiment of the present application determines the domain name information corresponding to the target Web site based on the Web access request sent by the target terminal, and at least one candidate IP contained in the domain name resolution record corresponding to the domain name information within a set historical time range; then, obtains the target message feature of the target response message obtained based on the Web access request, and the candidate message feature of the candidate response message corresponding to at least one candidate IP; finally, based on the feature similarity between at least one candidate message feature and the target message feature, selects the real response message that meets the preset feature similarity condition, so as to use the candidate IP corresponding to the real response message as the real IP of the target Web site. In this way, the real IP of the target Web site is determined according to the feature similarity between at least one candidate message feature and the target message feature, avoiding the technical defect that the real IP of the target Web site cannot be directly identified in the traditional way of configuring the proxy port and setting the corresponding address mapping rules to access the target Web site through the cloud WAF, and the real IP of the target Web site can be accurately identified.

[0116] Based on the same technical concept, the embodiment of the present application also provides a real IP identification device, which can implement the above method flow of the embodiment of the present application. Figure 7 As shown, the real IP identification device includes: a parsing module 701, an acquisition module 702 and a processing module 703, wherein:

[0117] The resolution module 701 is used to obtain the domain name information corresponding to the target Web site from the Web access request sent by the target terminal, and determine the domain name resolution record corresponding to the domain name information within a set historical time range; wherein the domain name resolution record includes: at least one candidate IP.

[0118] The acquisition module 702 is used to generate a corresponding target response message based on the Web access request, and obtain the target message characteristics of the target response message; and based on at least one candidate IP included in the domain name resolution record, access the target Web site, respectively generate a candidate response message corresponding to at least one candidate IP, and obtain the candidate message characteristics of at least one candidate response message.

[0119] Processing module 703 is used to select a real response message that meets a preset feature similarity condition from at least one candidate response message based on the feature similarity between at least one candidate message feature and the target message feature, and use the candidate IP corresponding to the real response message as the real IP of the target Web site.

[0120] In an optional embodiment, when selecting a real response message that satisfies a preset feature similarity condition from at least one candidate response message based on the feature similarity between each of at least one candidate message feature and the target message feature, the processing module 703 is specifically used to:

[0121] Based on the similarity sets corresponding to at least one candidate message feature, feature similarities between the corresponding candidate message feature and the target message feature are determined respectively; wherein each similarity set includes: sub-similarity of three different attributes between the corresponding candidate message feature and the target message feature.

[0122] Based on the obtained at least one feature similarity, a real response message that meets a preset feature similarity condition is selected from each candidate response message.

[0123] In an optional embodiment, before selecting a real response message that satisfies a preset feature similarity condition from at least one candidate response message based on the feature similarity between each of at least one candidate message feature and the target message feature, the processing module 703 is further used to:

[0124] For at least one candidate message feature, perform the following operations respectively:

[0125] Obtain a candidate message feature and a target message feature; wherein a candidate message feature includes: at least one attribute of a corresponding candidate response line, a candidate response header, and a candidate response body, and a target message feature includes: at least one attribute of a target response line, a target response header, and a target response body.

[0126] A first sub-similarity between the candidate response line and the target response line, a second sub-similarity between the candidate response header and the target response header, and a third sub-similarity between the candidate response body and the target response body are determined.

[0127] Based on the first sub-similarity, the second sub-similarity and the third sub-similarity, a similarity set corresponding to the candidate message feature is generated.

[0128] In an optional embodiment, when determining the first sub-similarity between the candidate response line and the target response line, the second sub-similarity between the candidate response header and the target response header, and the third sub-similarity between the candidate response body and the target response body, the processing module 703 is specifically configured to:

[0129] Based on the comparison result between the candidate response row and the target response row, a first sub-similarity set corresponding to the comparison result is determined; wherein the comparison result indicates whether the candidate response row is the same as the target response row.

[0130] Based on the character similarity between the candidate character array corresponding to the candidate response header and the target character array corresponding to the target response header, a second sub-similarity corresponding to the character similarity setting is determined.

[0131] Based on the number of character differences between the candidate hash array corresponding to the candidate response body and the target hash array corresponding to the target response body, a third sub-similarity corresponding to the number of character differences is selected from a preset third sub-similarity set.

[0132] In an optional embodiment, when determining the second sub-similarity of the corresponding character similarity setting based on the character similarity between the candidate character array corresponding to the candidate response header and the target character array corresponding to the target response header, the processing module 703 is specifically used to:

[0133] The candidate character array and the target character array are summarized to obtain the number of identical characters corresponding to the candidate character array and the target character array and the total number of characters.

[0134] Based on the number of identical characters and the total number of characters, the character similarity between the candidate character array and the target character array is obtained, and the character similarity is used as the second sub-similarity.

[0135] In an optional embodiment, in the process of determining the first sub-similarity set corresponding to the comparison result based on the comparison result between the candidate response line and the target response line, the processing module 703 is further configured to:

[0136] If the first sub-similarity is less than the set first sub-similarity threshold, it is directly determined that a candidate IP corresponding to a candidate message feature is not the real IP of the target Web site.

[0137] In an optional embodiment, in the process of determining the second sub-similarity of the corresponding character similarity setting based on the character similarity between the candidate character array corresponding to the candidate response header and the target character array corresponding to the target response header, the processing module 703 is further used to:

[0138] If the array length of the candidate character array is different from the array length of the target character array, it is directly determined that the candidate IP corresponding to a candidate message feature is not the real IP of the target Web site.

[0139] If the second sub-similarity is less than the set second sub-similarity threshold, it is directly determined that a candidate IP corresponding to a candidate message feature is not the real IP of the target Web site.

[0140] In an optional embodiment, in the process of selecting a third sub-similarity corresponding to the number of character differences from a preset third sub-similarity set based on the number of character differences between the candidate hash array corresponding to the candidate response body and the target hash array corresponding to the target response body, the processing module 703 is further configured to:

[0141] If the third sub-similarity is less than the set third sub-similarity threshold, it is directly determined that a candidate IP corresponding to a candidate message feature is not the real IP of the target Web site.

[0142] Based on the same technical concept, the embodiment of the present application also provides an electronic device, which can implement the method flow provided in the above embodiment of the present application. In one embodiment, the electronic device can be a server, or a terminal device or other electronic device. Figure 8 As shown, the electronic device may include:

[0143] At least one processor 801, and a memory 802 connected to the at least one processor 801. The specific connection medium between the processor 801 and the memory 802 is not limited in the embodiment of the present application. Figure 8 In the example, the processor 801 and the memory 802 are connected via a bus 800. Figure 8 The connections between other components are shown in bold lines, and are not intended to be limiting. The bus 800 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 8 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 801 can also be called a controller, and there is no limitation on the name.

[0144] In the embodiment of the present application, the memory 802 stores instructions that can be executed by at least one processor 801. The at least one processor 801 can execute a real IP identification method discussed above by executing the instructions stored in the memory 802. The processor 801 can implement Figure 7 The functions of each module in the device shown.

[0145] Among them, the processor 801 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 802 and calling the data stored in the memory 802, the various functions of the device and process data, the device can be monitored as a whole.

[0146] In one possible design, the processor 801 may include one or more processing units, and the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 801. In some embodiments, the processor 801 and the memory 802 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

[0147] Processor 801 may be a general-purpose processor, such as a CPU (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of a real IP identification method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0148] The memory 802 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 802 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 802 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 802 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0149] By programming the processor 801, the code corresponding to the real IP identification method described in the above embodiment can be fixed into the chip, so that the chip can execute the real IP identification method when running. Figure 2The steps of a real IP identification method in the embodiment shown are as follows: How to design and program the processor 801 is a technique known to those skilled in the art and will not be described in detail here.

[0150] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes a real IP identification method discussed above.

[0151] In some possible implementations, various aspects of a real IP identification method provided by the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on a device, the program code is used to enable the control device to execute the steps of a real IP identification method according to various exemplary implementations of the present application described above in this specification.

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

[0153] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 generate 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.

[0154] 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.

[0155] 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.

Claims

1. A real Internet Protocol IP identification method, characterized in that: include: Acquire domain name information corresponding to a target Web site from a global wide area network Web access request sent by a target terminal, and determine a domain name resolution record corresponding to the domain name information within a set historical time range; wherein the domain name resolution record includes: at least one candidate IP; Based on the Web access request, a corresponding target response message is generated, and a target message feature of the target response message is obtained; wherein the target message feature includes: a target response line, a target response header, and a target response body; Based on at least one candidate IP included in the domain name resolution record, access the target Web site, generate candidate response messages corresponding to each of the at least one candidate IP, and obtain candidate message features of each of the at least one candidate response messages; wherein each candidate message feature includes: a corresponding candidate response line, a candidate response header, and a candidate response body; Based on the similarity sets corresponding to the at least one candidate message, the feature similarities between the corresponding candidate message and the target message are determined respectively; wherein each similarity set includes: sub-similarity of three different attributes between the feature of the corresponding candidate message and the feature of the target message; Based on the obtained at least one feature similarity, a real response message that meets a preset feature similarity condition is selected from the at least one candidate response message, and the candidate IP corresponding to the real response message is used as the real IP of the target Web site.

2. The method according to claim 1, characterized in that Before respectively determining the feature similarity between the corresponding candidate message feature and the target message feature based on the similarity set corresponding to each of the at least one candidate message feature, the method further includes: For the at least one candidate message feature, perform the following operations respectively: Acquire the candidate message feature and the target message feature; determining a first sub-similarity between the candidate response line and the target response line, a second sub-similarity between the candidate response header and the target response header, and a third sub-similarity between the candidate response body and the target response body; Based on the first sub-similarity, the second sub-similarity and the third sub-similarity, a similarity set corresponding to the one candidate message feature is generated.

3. The method according to claim 2, characterized in that The determining a first sub-similarity between the candidate response line and the target response line, a second sub-similarity between the candidate response header and the target response header, and a third sub-similarity between the candidate response body and the target response body includes: Based on the comparison result between the candidate response row and the target response row, determining a first sub-similarity set corresponding to the comparison result; wherein the comparison result indicates whether the candidate response row is the same as the target response row; Based on the character similarity between the candidate character array corresponding to the candidate response header and the target character array corresponding to the target response header, determining a second sub-similarity set corresponding to the character similarity; Based on the number of character differences between the candidate hash array corresponding to the candidate response body and the target hash array corresponding to the target response body, a third sub-similarity corresponding to the number of character differences is selected from a preset third sub-similarity set.

4. The method according to claim 3, characterized in that The determining, based on the character similarity between the candidate character array corresponding to the candidate response header and the target character array corresponding to the target response header, a second sub-similarity corresponding to the character similarity setting includes: Summarizing the candidate character array and the target character array to obtain the number of identical characters and the total number of characters corresponding to the candidate character array and the target character array; Based on the number of identical characters and the total number of characters, character similarity between the candidate character array and the target character array is obtained, and the character similarity is used as the second sub-similarity.

5. The method according to claim 3, characterized in that The process of determining the first sub-similarity set corresponding to the comparison result based on the comparison result between the candidate response row and the target response row further includes: If the first sub-similarity is less than a set first sub-similarity threshold, it is directly determined that the candidate IP corresponding to the one candidate message feature is not the real IP of the target Web site.

6. The method according to claim 3 or 4, characterized in that The process of determining the second sub-similarity corresponding to the character similarity setting based on the character similarity between the candidate character array corresponding to the candidate response header and the target character array corresponding to the target response header further includes: If the array length of the candidate character array is different from the array length of the target character array, it is directly determined that the candidate IP corresponding to the one candidate message feature is not the real IP of the target Web site; If the second sub-similarity is less than a set second sub-similarity threshold, it is directly determined that the candidate IP corresponding to the one candidate message feature is not the real IP of the target Web site.

7. The method according to claim 3, characterized in that The process of selecting a third sub-similarity corresponding to the number of character differences between the candidate hash array corresponding to the candidate response body and the target hash array corresponding to the target response body from a preset third sub-similarity set based on the number of character differences between the candidate hash array corresponding to the candidate response body, further includes: If the third sub-similarity is less than the set third sub-similarity threshold, it is directly determined that the candidate IP corresponding to the one candidate message feature is not the real IP of the target Web site.

8. A real IP identification device, characterized in that: include: A resolution module, used to obtain domain name information corresponding to a target Web site from a global wide area network Web access request sent by a target terminal, and to determine a domain name resolution record corresponding to the domain name information within a set historical time range; wherein the domain name resolution record includes: at least one candidate IP; An acquisition module is used to generate a corresponding target response message based on the Web access request, and obtain a target message feature of the target response message; and based on at least one candidate IP included in the domain name resolution record, access the target Web site, respectively generate candidate response messages corresponding to the at least one candidate IP, and obtain candidate message features of each of the at least one candidate response messages; wherein the target message features include: a target response line, a target response header, and a target response body, and each candidate message feature includes: a corresponding candidate response line, a candidate response header, and a candidate response body; A processing module is used to determine the feature similarity between the corresponding candidate message and the target message based on the similarity set corresponding to each of the at least one candidate message; wherein each similarity set includes: the sub-similarity of each of the three different attributes between the corresponding candidate message feature and the target message feature, and based on the at least one feature similarity obtained, select the real response message that meets the preset feature similarity condition from the at least one candidate response message, and use the candidate IP corresponding to the real response message as the real IP of the target Web site.

9. The device according to claim 8, characterized in that Before respectively determining the feature similarity between the corresponding candidate message feature and the target message feature based on the similarity sets corresponding to the at least one candidate message feature, the processing module is further used to: For the at least one candidate message feature, perform the following operations respectively: Acquire the candidate message feature and the target message feature; determining a first sub-similarity between the candidate response line and the target response line, a second sub-similarity between the candidate response header and the target response header, and a third sub-similarity between the candidate response body and the target response body; Based on the first sub-similarity, the second sub-similarity and the third sub-similarity, a similarity set corresponding to the one candidate message feature is generated.

10. The device according to claim 9, characterized in that When determining the first sub-similarity between the candidate response line and the target response line, the second sub-similarity between the candidate response header and the target response header, and the third sub-similarity between the candidate response body and the target response body, the processing module is specifically configured to: Based on the comparison result between the candidate response row and the target response row, determining a first sub-similarity set corresponding to the comparison result; wherein the comparison result indicates whether the candidate response row is the same as the target response row; Based on the character similarity between the candidate character array corresponding to the candidate response header and the target character array corresponding to the target response header, determining a second sub-similarity set corresponding to the character similarity; Based on the number of character differences between the candidate hash array corresponding to the candidate response body and the target hash array corresponding to the target response body, a third sub-similarity corresponding to the number of character differences is selected from a preset third sub-similarity set.

11. The device according to claim 10, characterized in that When determining the second sub-similarity corresponding to the character similarity setting based on the character similarity between the candidate character array corresponding to the candidate response header and the target character array corresponding to the target response header, the processing module is specifically used to: Summarizing the candidate character array and the target character array to obtain the number of identical characters and the total number of characters corresponding to the candidate character array and the target character array; Based on the number of identical characters and the total number of characters, character similarity between the candidate character array and the target character array is obtained, and the character similarity is used as the second sub-similarity.

12. The device according to claim 10, characterized in that In the process of determining the first sub-similarity set corresponding to the comparison result based on the comparison result between the candidate response row and the target response row, the processing module is further used to: If the first sub-similarity is less than a set first sub-similarity threshold, it is directly determined that the candidate IP corresponding to the one candidate message feature is not the real IP of the target Web site.

13. The device according to claim 10 or 11, characterized in that In the process of determining the second sub-similarity corresponding to the character similarity setting based on the character similarity between the candidate character array corresponding to the candidate response header and the target character array corresponding to the target response header, the processing module is further used to: If the array length of the candidate character array is different from the array length of the target character array, it is directly determined that the candidate IP corresponding to the one candidate message feature is not the real IP of the target Web site; If the second sub-similarity is less than a set second sub-similarity threshold, it is directly determined that the candidate IP corresponding to the one candidate message feature is not the real IP of the target Web site.

14. The device according to claim 10, characterized in that In the process of selecting the third sub-similarity corresponding to the number of character differences between the candidate hash array corresponding to the candidate response body and the target hash array corresponding to the target response body from a preset third sub-similarity set based on the number of character differences between the candidate hash array corresponding to the candidate response body, the processing module is further used to: If the third sub-similarity is less than the set third sub-similarity threshold, it is directly determined that the candidate IP corresponding to the one candidate message feature is not the real IP of the target Web site.

15. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

17. A computer program product, characterized in that When the computer program product is called by a computer, the computer is caused to execute the method according to any one of claims 1 to 7.