Method, device and equipment for defending network attack

Through dynamic scheduling of IPv6 addresses and fast IP switching, the cost and latency problems in the existing technology are solved, and efficient response to DDoS attacks and service continuity are achieved, and user experience is improved.

CN119071047APending Publication Date: 2024-12-03ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411130320.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing technology has high cost and latency problems when defending against cyber attacks, especially when facing DDoS attacks, there is an update delay in switching IP addresses through the domain name system (DNS), which cannot quickly respond to cyber attacks, affecting service continuity and user experience. .

Method used

Dynamic IP scheduling is used using IPv6 addresses. By obtaining the attacked IP address, determining the replacement IP address, and promptly notifying the client to update, the client re-establishing the network connection, and using the IPv6 address pool to achieve fast IP switching, reducing operational costs and response time .

Benefits of technology

It realizes rapid switching of IP addresses when a network attack occurs, avoids users being affected, ensures the continuity of business services, significantly improves user experience, reduces operating costs, and provides stronger cyber attack defense capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071047A_ABST
    Figure CN119071047A_ABST
Patent Text Reader

Abstract

The invention provides a method, a device and equipment for defending network attacks. According to the scheme, the method comprises the steps that firstly, a first IP address attacked by a network is obtained, the first IP address is an IP address adopted by terminal equipment running a client and a service server for establishing first network connection, and the service server is used for providing target service for the client; then, a second IP address used for replacing the first IP address is determined from an IP address set corresponding to the service server; and then, IP address updating information is sent to the client so as to indicate the terminal equipment to establish a second network connection with the business server based on the second IP address, and the second network connection is used for acquiring the target business service. Wherein the IP address is an IPv6 (Internet Protocol Version 6) address.
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 method, device and equipment for defending against network attacks. Background Art

[0002] In today's rapidly expanding digital world, cybersecurity has become a critical factor for Internet infrastructure and online services. In particular, cyber attacks such as Distributed Denial-of-Service (DDoS) attacks can quickly paralyze network services and cause significant economic losses to companies. The increasing complexity and frequency of cyber attacks require more intelligent and flexible defense mechanisms.

[0003] Currently, when a network attack occurs, the Domain Name System (DNS) can be used to switch the IP address accessed by the user to another IP address, but there are problems such as DNS change delay and high cost. Therefore, a more economical and effective method of defending against network attacks is needed. Summary of the invention

[0004] In view of this, the embodiments of the present application provide methods, devices and equipment for defending against network attacks to solve the problems of high cost and delay in existing methods for defending against network attacks.

[0005] According to the first aspect of an embodiment of the present application, a method for defending against network attacks is provided, including: obtaining a first IP address that is attacked by the network; the first IP address is an IP address used by a terminal device running a client to establish a first network connection with a service server; the service server is used to provide a target service to the client; from a set of IP addresses corresponding to the service server, a second IP address used to replace the first IP address is determined; IP address update information is sent to the client; the IP address update information is used to instruct the terminal device to establish a second network connection with the service server based on the second IP address for obtaining the target service; the IP address is an IPv6 address.

[0006] According to the second aspect of an embodiment of the present application, a device for defending against network attacks is provided, including: a first IP address acquisition module, used to acquire a first IP address attacked by the network; the first IP address is an IP address used by a terminal device running a client to establish a first network connection with a business server; the business server is used to provide a target business service to the client; a second IP address determination module, used to determine a second IP address for replacing the first IP address from a set of IP addresses corresponding to the business server; an IP address update information sending module, used to send IP address update information to the client; the IP address update information is used to instruct the terminal device to establish a second network connection with the business server for obtaining the target business service based on the second IP address; the IP address is an IPv6 address.

[0007] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the method for defending against network attacks when executing the computer instructions.

[0008] One embodiment of the present specification can achieve at least the following beneficial effects: when it is learned that the first IPv6 address used by the client to establish a network connection with the service server is facing a network attack, a second IPv6 address used to replace the first IPv6 address is determined in the IPv6 address pool corresponding to the service server, and the newly determined second IPv6 address is promptly notified to the client so that the client can re-establish a network connection with the service server based on the new second IPv6 address. Therefore, by quickly and promptly replacing the new IP address, users can be prevented from being affected by network attacks to a large extent, thereby ensuring the continuity of business services and a better user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0010] Figure 1 A schematic diagram of an application scenario of a method for defending against network attacks provided in an embodiment of this specification;

[0011] Figure 2 A flowchart of a method for defending against network attacks provided in an embodiment of this specification;

[0012] Figure 3 A flowchart of a method for defending against network attacks in an actual application scenario provided by an embodiment of this specification;

[0013] Figure 4 A swimming lane diagram of a method for defending against network attacks in an actual application scenario provided by an embodiment of this specification;

[0014] Figure 5 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of a structure of a device for defending against network attacks;

[0015] Figure 6 The embodiments of this specification provide corresponding to Figure 2 A block diagram of a computing device. DETAILED DESCRIPTION

[0016] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0017] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0018] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0019] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards in the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0020] First, the terms involved in one or more embodiments of the present application are explained.

[0021] IP address (Internet Protocol Address): IP address is a unified address format provided by the IP protocol. It assigns a logical address to each network and each host on the Internet to mask the difference in physical addresses. Each IP address is unique within its global scope, ensuring that data can be accurately transmitted between devices. IP addresses are divided into two categories: IPv4 and IPv6.

[0022] IPv4 (Internet Protocol version 4): Internet Protocol version 4. This is the most widely used version of IP addresses so far. IPv4 addresses consist of 32 bits and are usually represented as four decimal numbers, each ranging from 0 to 255, separated by dots, such as 192.168.0.1. Due to the limited number of IPv4 addresses, they are gradually being exhausted, which is also the main reason for the introduction of IPv6. IPv4 can support about 4.3 billion IP addresses.

[0023] IPv6 (Internet Protocol version 6): Internet Protocol version 6. IPv6 addresses consist of 128 bits, which allows the Internet to continue to grow and maintain scalability. IPv6 addresses are usually represented as 8 groups of 4 hexadecimal numbers separated by colons, such as 2001:0db8:85a3:0000:0000:8a2e:0370:7334. Unlike the limited address resources of IPv4, IPv6 has an almost unlimited address space, so that each device or service can be assigned one or more independent IP addresses, thereby reducing costs and management complexity. This is also a reflection of the multi-address feature of IPv6.

[0024] DNS (Domain Name System): Domain Name System is a core service of the Internet. As a distributed database that can map domain names and IP addresses to each other, it enables people to access the Internet more conveniently without having to remember IP address strings that can be directly read by machines. Domain name resolution needs to be completed by a dedicated domain name resolution server. For example, when an application process needs to map a host domain name to an IP address, a domain name resolution function can be called. The domain name resolution function puts the domain name to be converted in a DNS request and sends it to the local domain name resolution (Local DNS) server in the form of a UDP message. After the Local DNS server finds the domain name, it returns the corresponding IP address in the response message. In actual applications, domain name resolution based on the Local DNS server may have problems such as domain name hijacking, inaccurate intelligent resolution, and slow resolution changes.

[0025] HttpDNS: HttpDNS uses the Http protocol (HyperText Transfer Protocol) to interact with the DNS server, replacing the traditional interaction with the DNS server based on the UDP protocol (User Datagram Protocol). Different from the original DNS domain name system resolution method, HttpDNS resolution technology uses the HTTP protocol to request the 80 port of the DNS server, replacing the original DNS protocol to request the 53 port of the DNS server. HttpDNS resolution technology bypasses the operator's Local DNS server, effectively preventing domain name hijacking and improving domain name resolution efficiency. In addition, because the HttpDNS server obtains the real client IP instead of the Local DNS IP, it can accurately locate the client's geographic location and operator information, thereby effectively improving scheduling accuracy.

[0026] Network attack: Network attack refers to the action of attempting to damage, expose, change, steal, destroy or make network services and connections unavailable. The types of network attacks can include active attacks (e.g., tampering, forgery, denial of service, etc.) and passive attacks (e.g., interception, eavesdropping, etc.). Common attack methods include DDoS attacks, brute force attacks, network scanning attacks, etc.

[0027] Denial-of-Service (DoS) attack: A malicious network attack method in which the attacker uses various means to make the target system or network resources unable to provide normal services to legitimate users. DoS attacks usually have two main methods: (1) Resource exhaustion attack: The attacker occupies the key resources of the target system (such as CPU, memory, disk space or network bandwidth, etc.) by sending a large number of requests, causing the system to be overwhelmed and unable to process normal requests. For example, the Syn Flood attack sends a large number of incomplete TCP three-way handshakes, making the connection queue of the target server full and unable to establish new connections. (2) Protocol weakness exploitation: Exploiting vulnerabilities in the design or implementation of the protocol to put the target system into an abnormal state and unable to provide services normally. For example, the Teardrop attack exploits a vulnerability in the reassembly of IP fragments to cause the target system to crash.

[0028] Distributed Denial-of-Service (DDoS) attack: It is an extended form of DoS attack. The attacker controls multiple machines (called "zombies" or "botnets") to launch attacks on the target at the same time, which significantly increases the intensity of the attack and the difficulty of defense. DDoS attacks send massive requests to the target at the same time through a large-scale coordinated malicious node network, instantly overwhelming the target's bandwidth or resources. Typical types of DDoS attacks include: (1) Bandwidth consumption attacks: such as UDP flood attacks and DNS amplification attacks, which use large traffic to impact the target's network bandwidth. (2) Resource consumption attacks: such as CC attacks (Challenge Collapsar, application layer attacks), which are attack methods specifically targeting network application services and focus on attacking Web server resources. The attacker generates a large number of seemingly normal HTTP requests to flood the target website server, consuming server resources, especially CPU and memory resources, thereby affecting or blocking normal user service requests. (3) Protocol layer attacks: Exploiting the weaknesses of the TCP / IP protocol stack, such as SYN flood attacks and ACK flood attacks.

[0029] Dynamic IP scheduling: Through specific network mechanisms and protocols, IP addresses are dynamically allocated and replaced in real time according to security policies such as network traffic analysis to achieve optimal configuration and efficient use of network addresses. It can be used as a defense against network attacks, especially DDoS attacks. In the embodiments of this specification, a dynamic IP scheduling scheme is adopted to quickly switch IP addresses when potential network attacks are detected, thereby protecting systems and services from attacks.

[0030] The rapid development of the Internet era has brought about a wide range of network security challenges, especially the frequent occurrence of network attacks, which has led to increasingly serious service interruptions. Network attacks such as DDoS attacks have become the main cause of service interruptions and network security incidents. Network attacks such as DDoS attacks use different technologies and strategies to generate a large number of false access requests or send malicious traffic, exhausting the resources or bandwidth of the target server, resulting in legitimate users being unable to access related network services normally.

[0031] Traditional network security defense measures, such as using firewalls, intrusion detection and prevention systems (IDS / IPS) and applying Web application firewalls (WAF), are often insufficient in the face of advanced and persistent attacks. In addition, when a DDoS attack occurs, the domain name system (DNS) can be used to switch the IP address accessed by the user to a different IP address to reduce the impact of the network attack on the user when the network attack occurs.

[0032] However, there is an inevitable update delay in the scheme of changing IP addresses by using the Domain Name System (DNS). This is because there is a significant delay in the propagation of DNS changes on the network, and the local DNS server on the operator side caches DNS information, so that DNS changes in the entire domain usually require a delay of about five minutes. In other words, even if the server switches the IP address, the attack traffic can still reach the target server during the DNS update delay, which continues to affect service continuity and user experience.

[0033] In addition, under the current IPv4 protocol, due to the limited IPv4 address resources, when the server is attacked by DDoS, it is difficult for the service provider to quickly change the IP address for effective protection, resulting in slow response and failure to respond in time. Moreover, when taking the countermeasure of changing the IP address, the service provider has to invest a lot of money in network security resources in order to improve the availability of the service, such as purchasing additional IP addresses. It can be seen that the economic cost of trying to respond to network attacks by changing the IP address is relatively high when using IPv4 addresses.

[0034] In view of the above reasons, currently people rarely use the solution of switching IP addresses to deal with network attacks such as DDoS attacks.

[0035] In reality, IP addresses are infrastructure, and their transformation and upgrade require adaptation by various related parties such as clients, operators, and cloud service systems. Therefore, the upgrade is complex and costly, so the IPv4 protocol has been used for a long time. The inventors have noticed that with the gradual popularization of the IPv6 protocol in recent years, the extremely rich address space provided by the IPv6 protocol provides a new idea for achieving network protection based on address diversity.

[0036] In view of this, in the embodiments of the present specification, a new type of network attack defense scheme based on a large number of low-cost IPv6 addresses is provided, which achieves the purpose of defending against network attacks by switching IP addresses. On the one hand, the use of IPv6 provides a huge, almost unlimited address space, and the cost of using these addresses is much lower than that of IPv4 addresses, which means that service providers can easily and at a very low cost allocate and replace IPv6 addresses, thereby more effectively resisting network attacks and maintaining service continuity, that is, it is possible to achieve fast IP switching when the service is attacked by utilizing the huge address space provided by the IPv6 protocol, and significantly reduce operating costs and response time. On the other hand, when it is determined that the IP address needs to be switched, all clients are notified through an efficient and reliable IP scheduling channel, without waiting for the propagation delay of the DNS change in the network, which significantly improves the availability of the service and the user experience, and can achieve a fast and efficient response to network attacks (especially DDoS attacks), with a stronger ability to intercept attacks and protect service continuity.

[0037] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0038] Figure 1 A schematic diagram of an application scenario of a method for defending against network attacks provided in an embodiment of this specification.

[0039] like Figure 1 As shown, the terminal device 110 running the client can establish a network connection with the service server 120 based on the first IP address to obtain service services from the service server. Figure 1 In the application scenario shown, the service server 120 is a server for providing service services corresponding to the client running on the terminal device 110. Figure 1 Only one terminal device 110 is shown. It is understandable that in actual application, there may be a large number of terminal devices 110 used by a large number of users to establish network connections with the business server 120 and obtain business services.

[0040] In actual application scenarios, there may be a malicious terminal device 130 that launches a malicious network attack, establishes a network connection with the service server 120 based on the first IP address, and consumes the resources or bandwidth of the service server 120 to affect or block service requests of normal users such as the terminal device 110. Figure 1 Only one malicious terminal device 130 is shown in the figure. It is understandable that in actual application, there are usually a large number of malicious terminal devices 130 that attempt to or have already established a network with the service server 120.

[0041] In the embodiments of this specification, Figure 1 As shown in , a network attack identification server 140 for identifying network attacks can be set. The network attack identification server 140 can identify network attacks based on network traffic and provide the network attack identification results to the IP address scheduling server 150, such as Figure 1 As shown in the process 101 in FIG. 1 . Then, the IP address scheduling server 150 can determine the new IP address according to the preset IP address change strategy, and notify the new IP address to the terminal device 110 running the client, such as Figure 1 As shown in the process 102 in FIG. Then, the terminal device 110 running the client can disconnect the network connection established based on the old IP address and establish a connection with the service server 120 based on the new IP address, as shown in FIG. Figure 1 As shown in process 103. Wherein, the old IP address and the new IP address can both be IP addresses.

[0042] In such Figure 1 In the application scenario shown, the server (business server 120, network attack identification server 140 or IP address scheduling server 150) can be connected to one or more terminal devices through a local area network connection, a wide area network connection, an Internet connection or other types of data networks. In the embodiment of this specification, a long connection channel can be established in advance between the IP address scheduling server 150 and the terminal device 110 based on the Http protocol. And in actual applications, the IP address scheduling server 150 in the embodiment of this specification can play the role of an HttpDNS server, that is, it can be used to respond to the DNS resolution request sent by the client based on the UDP protocol to achieve resolution of the domain name.

[0043] Figure 1 The server (business server 120, network attack identification server 140 or IP address dispatch server 150) may include but is not limited to any device, equipment, platform, equipment cluster, etc. with computing and processing capabilities. In actual application, optionally, Figure 1The network attack identification server 140 and the IP address scheduling server 150 in the embodiment can be provided by the same device. In practical application, optionally, the network attack identification server 140 or the IP address scheduling server 150 can also determine and implement other strategies for defending against network attacks in addition to the IP address switching strategy.

[0044] In actual application, the business server 120 and the client installed in the terminal device 110 can be provided and maintained by a business service provider. The business service may include any type of service provided based on the Internet, including but not limited to e-commerce services, financial services, office services, social services, transportation services, etc. The network attack identification server 140 and the IP address scheduling server 150 can be provided and maintained by an Internet service provider. An Internet service provider can be a company that provides Internet services to the public, also known as an Internet service provider, Internet service provider, etc. Currently, some companies can serve as both business service providers and Internet service providers.

[0045] Figure 1 The terminal device 110 may be an intelligent device with data computing and processing functions, including but not limited to smart phones, tablet computers, laptops, PDAs, personal computers, smart home devices, vehicle-mounted devices, etc. Figure 1 The terminal device 110 in the embodiment may be installed with a client corresponding to the service server 120, and the client may be a program product, and specifically may include an application installed in an operating system, a small program parasitic in the application, etc. In actual application, the terminal device 110 may establish a network connection with the service server 120 in response to a user's operation.

[0046] Figure 1 The malicious terminal device 130 in the example may be similar to the terminal device 110, and may be an intelligent device with data computing and processing functions, including but not limited to smart phones, tablet computers, laptop computers, PDAs, personal computers, smart home devices, vehicle-mounted devices, etc. The malicious terminal device 130 may also be installed with a client corresponding to the service server 120, which may be a program product, and may specifically include an application installed in the operating system, a small program parasitic on the application, etc. In actual application, the malicious terminal device 130 may initiate the establishment of a network connection with the service server 120 in response to the direct or indirect control of a malicious attacker.

[0047] like Figure 1As shown in, the solution based on the embodiment of this specification dynamically updates the IP address and quickly notifies all client applications on the user side through a reliable network channel, ensuring that users will not feel service interruption even when attacked, eliminating service interruption time, thereby significantly improving user experience.

[0048] Further, in the embodiments of this specification, the IP address used to establish the network connection can be an IPv6 address. Based on the solution of the embodiments of this specification, the characteristics of IPv6 providing nearly unlimited address space and low cost of IPv6 addresses are fully utilized, and a large number of IPv6 addresses can be configured for each business server. Once a network attack is detected, it can be immediately switched to another pre-configured IP address, and effective protection against network attacks can be achieved by deploying and dimensioning multiple IP addresses with a smaller economic burden.

[0049] To sum up, the technical solution provided in the embodiments of this specification can effectively alleviate the limitations of existing protection measures, provide a low-cost, high-efficiency network security protection solution, while ensuring service reliability and user experience, and promote the application and development of IPv6 technology in the field of network security defense.

[0050] In the embodiments of this specification, a method for defending against network attacks is provided, and also involves an apparatus for defending against network attacks and a computing device, which will be described in detail one by one in the following embodiments.

[0051] Figure 2 A flowchart of a method for defending against network attacks provided in an embodiment of this specification.

[0052] From the program perspective, the execution subject of the process can be a program installed on an application server or application terminal. It can be understood that the method can be executed by any device, equipment, platform, or device cluster with computing and processing capabilities. In actual application, Figure 2 The method of defending against network attacks shown can be Figure 1 The IP address shown in is dispatched by the server 150.

[0053] like Figure 2 As shown, the process may include the following steps:

[0054] Step 202: Acquire a first IP address attacked by the network; the first IP address is an IP address used by a terminal device running a client to establish a first network connection with a service server; the service server is used to provide target service to the client.

[0055] In actual application, a business server for providing the target business service may be deployed. Specifically, the business server for providing the target business service may be a business server cluster, and the business server cluster may include multiple business servers. In this application, unless otherwise specified, the term business server may include the meaning of a business server cluster. Each business server in the business server cluster may be configured with an IP address so that the terminal device establishes a network connection with the business server based on the configured IP address.

[0056] When the client needs to obtain the target business service, the terminal device can establish a first network connection with the business server based on the first IP address. When the first IP address encounters a network attack, the IP address can be changed, specifically, it can be changed to a second IP address different from the first IP address for providing the target business service, thereby preventing the network attack from affecting the provision of the target business service to the client.

[0057] Step 204: Determine a second IP address for replacing the first IP address from the IP address set corresponding to the service server.

[0058] In actual application, a corresponding IP address set can be configured for a business server cluster. Specifically, a business server in the business server cluster can be configured with one or more IP addresses in the IP address set. An IP address in the IP address set can correspond to one or more business servers in the business server cluster. That is, a network connection can be established with one or more business servers in the business server cluster based on any IP address in the IP address set.

[0059] Optionally, the second IP address and the first IP address may correspond to different devices. In this case, when the user terminal uses the second IP address instead of the first IP address to establish a network connection with the service server, it may actually be to establish a network connection with a different server than before. The first IP address may have a mapping relationship with the first service server, and the second IP address may have a mapping relationship with the second service server, and both the first service server and the second service server are used to provide target service. For example, the first network connection may be a network connection established with the first service server based on the first IP address, and the second network connection may be a network connection established with the second service server based on the second IP address. Since the second IP address has not been subjected to a network attack, the second service server corresponding to the second IP address has sufficient computing resources and bandwidth to provide service services to users. In this way, the purpose of replacing the server device providing the service is achieved by changing the IP address, and even very serious network attacks can be dealt with.

[0060] Optionally, the second IP address and the first IP address may correspond to the same device. In this case, when the user terminal uses the second IP address instead of the first IP address to establish a network connection with the service server, it can actually establish a network connection with the same server as before, and change the channel for establishing a network connection with the server. Thus, after the terminal devices of legitimate users who previously established a first network connection with the service server based on the first IP address are switched to establish a second network connection with the service server based on the second IP address, the mapping relationship between the first IP address and the service server can be disconnected, so that the attacker can no longer access the service server based on the first IP address, thereby achieving the purpose of preventing network attacks. In this way, when the network attack is not very serious and the server device providing the service is sufficient to support the current access traffic, the original network channel used by the attacker can be closed by allowing the legitimate user to switch the network connection channel, so that the attacker can no longer continue to carry out network attacks.

[0061] Furthermore, in the embodiments of this specification, the first IP address and the second IP address may both be IPv6 addresses. Figure 1 In the IP address scheduling server 150 shown in , an IPv6 address pool corresponding to the business server can be maintained, and one or more IPv6 addresses having a mapping relationship with each business server in the business server cluster are pre-stored in the IPv6 address pool. For example, the server used to provide the target business service may include servers distributed in several computer rooms, and one or more IPv6 addresses can be pre-configured for the server in each of the several computer rooms. In actual application, when it is detected that an IPv6 address is under attack, the specific business server having a mapping relationship with it can be determined based on the IPv6 address, and then, a new IPv6 address can be determined from the IP address set corresponding to the business server cluster to which the specific business server belongs.

[0062] Step 206: Send IP address update information to the client; the IP address update information is used to instruct the terminal device to establish a second network connection with the service server for obtaining the target service based on the second IP address.

[0063] In an embodiment of the present specification, a user accesses a business server through a client, and a terminal device running the client establishes a first network connection with the business server based on a first IP address. If the first IP address encounters a network attack, in order to avoid the situation where the client cannot normally access the business server and the business server cannot normally provide business services to the user, the IP address scheduling server 150 can send the second IP address to the client after determining the second IP address to replace the first IP address, and instruct the client to re-establish a network connection with the business server based on the second IP address.

[0064] In step 206, the IP address update information may carry an IP information replacement instruction, which is used to inform the client that it needs to perform an operation of switching the network connection. Further optionally, the IP information replacement instruction may also carry condition information for switching the network connection, such as confirming that the data processing operation based on the old network connection has been completed before disconnecting the old network connection, and establishing a new network connection according to a specified delay time. Also optionally, in actual application, the IP information replacement instruction may not need to carry the condition information for switching the network connection, but the condition information for switching the network connection may be pre-stored in the client, so that when the client receives the IP address update information, it implements the specific process of network switching based on the pre-stored condition information.

[0065] In step 206, the IP address update information may also carry an old IP address, that is, a first IP address, for informing the client of the network to be disconnected when switching network connections. The IP address update information may also carry a new IP address, that is, a second IP address, for informing the client of the network to be connected when switching network connections.

[0066] In actual application, after receiving the IP address update information, the client may directly instruct the terminal device to disconnect the old network connection and establish a new network connection. Alternatively, after receiving the IP address update information, the client may instruct the terminal device to disconnect the old network connection and establish a new network connection through other programs for network management.

[0067] It should be understood that in the methods described in one or more embodiments of this specification, the order of some steps can be adjusted according to actual needs, or some steps can be omitted.

[0068] Figure 2The method, when it is known that the first IPv6 address used by the client to establish a network connection with the service server is facing a network attack, determines a second IPv6 address used to replace the first IPv6 address in the IPv6 address pool corresponding to the service server, and promptly notifies the client of the newly determined second IPv6 address so that the client can re-establish a network connection with the service server based on the new second IPv6 address. Therefore, by quickly and promptly replacing the new IP address, it is possible to avoid users being affected by network attacks to a large extent, ensure the continuity of business services, ensure a better user experience, and use the advantages of the IPv6 protocol at a low cost and high efficiency, providing a new network security defense solution.

[0069] based on Figure 2 The method, the embodiments of this specification also provide some specific implementation methods of the method, which are described below.

[0070] In one or more embodiments of this specification, a network traffic intelligent analysis and identification mechanism is provided. By identifying network traffic, potential network threats can be discovered and dealt with early, for example, network attacks such as DDoS attacks can be discovered in a timely manner. In actual application, the solution for identifying network attacks based on network traffic analysis can be implemented as follows: Figure 1 The network attack identification server 140 shown in FIG.

[0071] Specifically, in step 202, the obtaining of the first IP address attacked by the network may include: first, real-time traffic tracking, that is, obtaining network traffic data used to access the target business service; then, automatically performing feature extraction, that is, extracting network traffic feature information from the network traffic data; thereafter, performing feature analysis, that is, based on the network traffic feature information, determining attack identification result information corresponding to the target business service, the attack identification result information including attack type information and attack target information, and the attack target information may include the attacked IP address.

[0072] Furthermore, when performing traffic tracking in real time, an efficient real-time network traffic tracking system can be constructed to continuously track network traffic data. Specifically, the data of the network connection can be monitored, recorded, and counted. The technology of how to monitor, record, and count the data of the network connection can refer to the prior art, and this application is not limited to this. In the embodiments of this specification, all information transmitted via the network can be regarded as the scope of network traffic tracking. The network traffic tracking methods performed in the embodiments of this specification comply with the restrictions and specifications of relevant laws and regulations, and are performed with the knowledge and authorization of the user.

[0073] Furthermore, when automatically extracting features, network traffic features can be extracted based on traffic tracking data, including traffic size, frequency, packet type and its distribution pattern, source IP address features, historical data comparison, etc.

[0074] Furthermore, when performing feature analysis, optionally, network attacks can be identified based on statistical methods, including but not limited to analysis methods based on covariance matrices, analysis methods based on entropy, analysis methods based on hidden Markov models, etc. For example, based on the analysis of traffic data volume and frequency, sudden changes in traffic data volume and access frequency can be found, thereby identifying DDoS attacks. In actual applications, a baseline model of network traffic can be established in advance based on normal traffic data, and a risk threshold can be set so as to identify abnormal situations that exceed the threshold based on the characteristics of real-time data traffic.

[0075] Furthermore, when performing feature analysis, optionally, network attacks can be identified based on machine learning methods. Specifically, the behavioral characteristics of normal and abnormal network traffic can be learned and identified. By analyzing the behavioral patterns and characteristics in the network traffic, abnormal connections, access frequencies, and data volumes can be identified, and the perception system can be identified through analysis to determine whether it is under potential attack. In actual applications, machine learning algorithms such as classification, clustering, time series analysis, and deep learning can be used to detect and identify abnormal network traffic patterns.

[0076] In the embodiments of this specification, multi-dimensional attack identification result information can be obtained by performing feature analysis.

[0077] Furthermore, the attack identification result information may include attack type information. The attack type information may include first attack type information and second attack type information, wherein the first attack type information may be used to indicate whether a network attack has occurred, and the second attack type information may be used to indicate the specific type of network attack suffered. In practical applications, taking the determination of attack identification result information based on a machine learning method as an example, the process of determining the attack type information may be a multi-classification process. For example, the identification results contained in the attack type information may include N categories, wherein the first category may be that no network attack has occurred, the second category may be that a DDos attack has occurred, the third category may be that a virus and malware attack has occurred, ..., and the Nth category may be a password attack. As an example, if features such as a surge in traffic, an abnormally high number of requests, and concurrent requests from multiple source IPs are identified, it can be identified as a risk of DDos attack.

[0078] Furthermore, the attack identification result information may include attack target information. For example, when the attack type information is a DDos attack, the attack target information may include the attacked IP address. For another example, when the attack type information is a password attack, the attack target information may include the attacked account.

[0079] Furthermore, the attack identification result information may include attack source information. Specifically, the attack source information may include attack source IP information, attack source address information, etc. In practical applications, when the attack source IP information is determined, the geographical location of the attack source IP, the organization information to which it belongs, etc. may be further analyzed; when the geographical location of the attack source is determined, the country information and region information of the attack source may be further analyzed; thereby, it is convenient to take effective measures to cut off network attacks from the attack source side.

[0080] Furthermore, the attack identification result information may include attack scale information, attack intensity information or attack urgency information. Generally, the intensity of a network attack is positively correlated with the scale of the network attack, and both the intensity and scale of the network attack can reflect the urgency of the network attack. Specifically, the urgency of the network attack can be determined based on the scale information reflected by the network traffic characteristics. In practical applications, the attack urgency information can be determined by setting a threshold or building a model. As an example, taking a DDos attack as an example, if there is a mild scanning behavior or non-large-scale malicious traffic, the attack urgency can be determined as "low"; if there is a medium-scale malicious traffic, the attack urgency can be determined as "medium"; if there is a large-scale malicious traffic, the attack urgency can be determined as "high".

[0081] Traditional strategies for dealing with network attacks are usually static, such as configuring firewall rules, restricting suspicious IPs, limiting the number of requests for each IP, etc. These strategies are pre-set and static. On the one hand, traditional static defense strategies can be used to deal with attacks in known specific attack modes, but they are not easy to deal with diverse and rapidly changing attack methods. Attackers may bypass current limiting and connection control by adjusting attack methods or distributing attack sources. On the other hand, traditional static defense strategies are usually based on fixed preset values, which cannot dynamically adapt to changes in traffic. Sometimes normal traffic fluctuations may be restricted, resulting in the rejection or delay of legitimate users' requests.

[0082] In the embodiments of this specification, the defense strategy is dynamically changed. By analyzing the traffic behavior in real time, abnormal requests are identified and filtered, and then the blocking strategy can be dynamically adjusted according to the traffic characteristics. Specifically, when a network attack is perceived, the defense strategy can be dynamically adjusted according to the attack identification result information, for example, referring to the scale, intensity, and urgency of the attack.

[0083] When a network attack is identified, but the attack scale is small (for example, the attack scale parameter is less than the preset first attack scale threshold), the intensity is low, the urgency is low, and the impact on the business service system is within an acceptable range, at this time, an alarm message indicating the existence of a potential network attack can be sent to the developer without triggering any operation to block the attack. The attack scale parameter may include any parameter that can reflect the scale of the attack, such as traffic data volume, access frequency, etc., but is not limited thereto.

[0084] When a network attack is identified and the attack is large in scale (for example, the attack scale parameter is greater than or equal to the preset first attack scale threshold), of high intensity, and of medium urgency, a preliminary defense strategy can be implemented. For example, the establishment of connections at the source of the attack can be limited to protect the business service system.

[0085] When a network attack is identified and the attack is large in scale (for example, the attack scale parameter is greater than or equal to the preset second attack scale threshold, and the second attack scale threshold is greater than the first attack scale threshold), the intensity is very high, and the urgency is high, and the initial defense strategy cannot effectively respond at this time, the IP dynamic change mechanism can be triggered, including dynamically blocking the IP address and dynamically changing the IP address.

[0086] In one or more embodiments of the present specification, in step 204, before determining the second IP address for replacing the first IP address from the IP address set corresponding to the service server, the method may further include: judging whether the attack scale against the first IP address is greater than or equal to a preset attack scale threshold (i.e., the second attack scale threshold above) according to the attack scale information in the attack identification result information, and obtaining an attack scale determination result. Then, if the attack scale determination result is yes, the second IP address for replacing the first IP address may be determined from the IP address set corresponding to the service server.

[0087] As described above, in the embodiments of the present specification, a dynamic defense mechanism can be executed. On the one hand, network traffic information is continuously collected in real time, and network attacks are regularly identified based on the network traffic information. On the other hand, when the network traffic intelligent analysis mechanism identifies an attack activity, it can dynamically decide whether to trigger the IP address change mechanism. Specifically, for attacks of lower intensity, the IP address may not be changed, but only preliminary defense strategies such as traffic cleaning and current limiting may be adopted. For attacks of higher intensity, the IP address of the target server may be quickly changed, and the new IP address may be notified to the client application.

[0088] In practical application, it can be Figure 1 The network attack identification server 140 shown in the figure performs intelligent analysis of network traffic and executes preliminary defense strategies. When the IP dynamic change mechanism needs to be triggered, the network attack identification server 140 can be notified. Figure 1 The IP address dispatching server 150 shown in the figure selects a new IP address and notifies the client so that the client application can quickly switch the IP address. Alternatively, the IP address dispatching server 150 may also select a new IP address and notify the client so that the client application can quickly switch the IP address. Figure 1 The network attack identification server 140 shown in FIG. 1 performs intelligent analysis of network traffic and sends the analysis results to the network attack identification server 140. Figure 1 The IP address scheduling server 150 shown then executes the preliminary defense strategy and triggers the IP dynamic change mechanism when the preset conditions are met.

[0089] Traditional network security defense measures, such as using firewalls, intrusion detection and prevention systems (IDS / IPS), and applying Web application firewalls (WAF), are often insufficient in the face of advanced and persistent attacks, and these traditional network security defense measures usually rely on static security policies, which means that their defense capabilities are likely to be circumvented when the attack mode changes. For example, traditional protection methods often cannot provide timely and effective defense responses against large-scale DDoS attacks, especially when attackers frequently change their attack strategies, and their defense capabilities are even more difficult to work.

[0090] In view of this, based on the solution of the embodiments of this specification, a mechanism for automated detection of network attacks and response is implemented, which automatically triggers mechanisms such as traffic cleaning, IP address change, and end application reconnection, thereby reducing manual intervention and response time, thereby greatly enhancing the defense capabilities against network attacks and avoiding the situation where services cannot be restored to normal during the attack.

[0091] In one or more embodiments of this specification, Figure 1The IP address scheduling server 150 shown in the figure can manage a wide IPv6 address pool. When the IP dynamic change mechanism is triggered, one or more new IP addresses can be immediately selected and allocated from the IPv6 address pool for providing to the client.

[0092] In actual application, network attacks usually target IP addresses, and in the embodiments of this specification, such as Figure 1 The attack identification result information determined by the network attack identification server 140 shown in can include attack target information, such as the attacked IP address. Thus, a new IP address can be determined based on the attacked IP address.

[0093] Specifically, the step of determining the second IP address for replacing the first IP address from the set of IP addresses corresponding to the service server (step 204) may include: determining the set of IP addresses corresponding to the service server according to the first IP address; and determining the second IP address for replacing the first IP address from the set of IP addresses using a preset IP scheduling rule. That is, the new second IP address and the attacked first IP address have a mapping relationship with the service server providing the same target service.

[0094] Furthermore, when a new IP address is selected from the IP address set, it may be based on a preset IP scheduling rule.

[0095] Optionally, the adopting of a preset IP scheduling rule to determine the second IP address from the IP address set to replace the first IP address may specifically include: randomly selecting any IP address except the first IP address from the IP address set as the second IP address.

[0096] Optionally, the adopting of a preset IP scheduling rule to determine the second IP address from the IP address set to replace the first IP address may specifically include: determining the second IP address from the IP address set to replace the first IP address according to a preset load balancing rule. The load balancing rule includes that the access traffic of the service server corresponding to each IP address meets a preset traffic restriction condition.

[0097] Further, the load balancing rule may include that the access flow of the business server corresponding to each IP address is not greater than a preset flow threshold. As an example, assuming that the access flow of the business server in the first computer room corresponding to IP-1 is W1, the access flow of the business server in the second computer room corresponding to IP-2 is W2, ..., and the access flow of the business server in the nth computer room corresponding to IP-n is Wn, then, before sending part of the corresponding IP addresses of each computer room as the newly determined IP address to the client, the change in the access flow of the business server in each computer room involving the increase in flow when switching the IP address can be estimated. Assuming that the estimated access flow change of each computer room is W1', W2', ..., Wn', it can be judged whether W1', W2', ..., Wn' all meet the preset flow threshold W0. If so, the determined new IP address can be sent to the client, if not, the new IP address can be re-determined. In this way, it can be ensured that the flow of the existing computer room will not be overloaded.

[0098] Or further, the load balancing rule may include that the traffic difference between the access traffic of each business server used to provide the target business service is not greater than a preset percentage threshold. As an example, assuming that the access traffic of the business server in the first computer room corresponding to IP-1 is W1, the access traffic of the business server in the second computer room corresponding to IP-2 is W2, ..., and the access traffic of the business server in the nth computer room corresponding to IP-n is Wn, then, when determining a new IP address, W1, W2, ..., Wn can be referred to to determine the IP address of the computer room with lower access traffic as the new IP address, thereby achieving balanced distribution of traffic in each computer room, macroscopically ensuring the processing efficiency of user services, and reducing the risks of each computer room server such as downtime and vulnerability to network attacks due to traffic overload.

[0099] As shown above, in actual application, a load balancing priority strategy can be adopted. In order to prevent a large amount of traffic from concentrating on the server equipment in a particular computer room when switching IP addresses, when determining the new IP, you can consider allocating traffic to each computer room relatively evenly, or limit the maximum threshold of the computer room traffic.

[0100] Optionally, the use of a preset IP scheduling rule to determine a second IP address from the IP address set to replace the first IP address may specifically include: obtaining first geographic location information of the terminal device and second geographic location information of a business server used to provide the target business service; based on the first geographic location information and the second geographic location information, determining an IP address corresponding to a business server that meets a preset geographic location condition as the second IP address used to replace the first IP address; the geographic location condition is used to indicate that the time spent on executing a business request based on a network connection between the terminal device and the business server meets a preset condition.

[0101] As an example, when determining a new IP address, the geographical location of the computer room where the server with a mapping relationship to the IP address is located and the distance between the terminal device running the client can be used as a reference factor. Specifically, for a certain user terminal, when there are servers in multiple computer rooms that can all serve as backup connectable servers, a server that is relatively close to the geographical location of the user terminal can be selected from the multiple backup connectable servers, and then the IP address corresponding to the selected server is determined as the new IP address used to replace the attacked old IP address and sent to the client.

[0102] As shown above, in actual application, the round-trip time (RTT) optimization principle can be adopted. The relationship between the user's area and the geographical location of the computer room server can be considered, and the new IP corresponding to the computer room server with the closest geographical location can be preferentially allocated to the user, thereby ensuring the lowest access delay.

[0103] In the embodiments of the present specification, one or more preset IP scheduling rules may be referred to at the same time. Optionally, load balancing and preferred round-trip delay may be considered at the same time. As an optional example, on the one hand, the IP addresses in the IP address set other than the first IP address may be scored based on the preset load balancing rule to obtain a first score; on the other hand, the IP addresses in the IP address set other than the first IP address may be scored based on the preset preferred round-trip delay rule to obtain a second score; then, the comprehensive score of the IP addresses in the IP address set other than the first IP address may be calculated based on the first score and the first weight value corresponding to the first score, the second score and the second weight value corresponding to the second score; then, based on the comprehensive score, the second IP address may be determined from the IP addresses in the IP address set other than the first IP address.

[0104] In actual application, by considering multiple IP address determination conditions, it is possible to comprehensively balance multiple factors such as server equipment load and network communication efficiency, thereby determining a better IP address, which is more conducive to providing users with stable business services.

[0105] In one or more embodiments of this specification, in the Figure 1 A network channel can be pre-established between the IP address dispatching server 150 and the terminal device 110 running the client. A long connection channel is a network connection established between the client and the server. This connection is kept alive for a long time through the heartbeat mechanism, and two-way communication can be achieved, and messages can be sent from the client to the server, and messages can also be sent from the server to the client.

[0106] Specifically, the sending of the IP address update information to the client (step 206) may include: sending the IP address update information to the client based on a pre-established long connection channel.

[0107] Based on the solution of the embodiments of this specification, the IP address scheduling server 150 sends the IP address to be switched to the client application through the established network channel without updating the DNS record, which greatly reduces the update delay existing in the traditional DNS announcement method, thereby quickly notifying the client of the newly determined IP address when an attack occurs.

[0108] In one or more embodiments of the present specification, after receiving the IP address update information, the client can, according to the indication of the IP address update information, instruct the terminal device to establish a network connection based on the second IP address carried in the IP address update information for replacing the first IP address.

[0109] Specifically, after sending the IP address update information to the client (step 206), it may also include: after the client receives the IP address update information, the client instructs the terminal device to disconnect the first network connection established with the business server based on the first IP address; then, the terminal device establishes a second network connection with the business server based on the second IP address.

[0110] Furthermore, considering that when the client receives the IP address update information, the client may be performing data processing operations based on the old network connection, such as sending or receiving data. In order to minimize the impact of network disconnection and reconnection on users, the network disconnection and reconnection operations can be performed after the client completes the current data processing operations. That is, when the client receives the new IP address, it can not disconnect the old network connection immediately, but first complete the data processing on the old network connection before disconnecting the network connection, so as to avoid the adverse impact of business interruption.

[0111] Specifically, before the terminal device disconnects the first network connection, the process may further include: the terminal device determines whether a data processing operation based on the first network connection has been completed. Thus, if the data processing operation based on the first network connection has been completed, the terminal device disconnects the first network connection. If the data processing operation based on the first network connection has not been completed, the terminal device may disconnect the first network connection after the data processing operation is completed.

[0112] Therefore, based on the solution of the embodiments of this specification, when a network attack is encountered and an attempt is made to respond, service interruption caused by changing the new IP address can be avoided, and the client user can avoid the bad experience of service unavailability or connection interruption.

[0113] Furthermore, after processing the service data and disconnecting the network connection, it is necessary to reconnect based on the new IP address. Considering that a large number of terminal devices may have the need to reconnect to the network (in fact, the terminal devices that have established the first network connection based on the attacked first IP address may all have the need to reconnect to the network), in order to avoid the traffic impact on the server that establishes the connection based on the second IP address, the timing for at least some of the terminal devices that have the need to establish the second network connection with the service server based on the second IP address can be appropriately delayed.

[0114] Specifically, the terminal device establishes a second network connection with the service server based on the second IP address, which may include: the terminal device determines a delay duration according to a preset connection establishment delay rule; after the delay duration, the terminal device establishes a second network connection with the service server based on the second IP address.

[0115] More specifically, after the delay time, the terminal device establishes a second network connection with the service server based on the second IP address, which may specifically include: starting from the moment when the client receives the IP address update information, after the delay time, the terminal device establishes a second network connection with the service server based on the second IP address. For example, the moment when the terminal device receives the IP address update information is the first moment T1, then the second moment T2=T1+t can be determined based on the first moment T1 and the delay time t, and then the terminal device can initiate a request to establish a second network connection with the service server based on the second IP address at the second moment T2.

[0116] In actual application, in order to avoid unnecessary impact on users and minimize the probability that users cannot access the business server normally, a second network connection for accessing the business service is usually established immediately after the first network connection for accessing the business service is disconnected. Therefore, what is said in the embodiments of this specification that the terminal device establishes a second network connection with the business server based on the second IP address after the delay period can actually include that after the delay period, the terminal device disconnects the first network connection established with the business server based on the first IP address and establishes a second network connection with the business server based on the second IP address. In other words, the first network connection can be disconnected after the determined delay period, and the second network connection can be established immediately after the first network connection is disconnected.

[0117] Furthermore, the delay strategy for network establishment can be implemented by different program modules. Optionally, the client can determine the delay duration after receiving the IP address update information, and instruct the terminal device to disconnect the first network connection and establish a second network connection after the duration indicated by the delay duration. Or optionally, the client can determine the delay duration after receiving the IP address update information, and instruct the terminal device to disconnect the first network connection and establish a second network connection after the duration indicated by the delay duration. Or optionally, the client can instruct other program modules on the terminal device except the client to determine the delay duration after receiving the IP address update information, and the client or the other program modules instruct the terminal device to disconnect the first network connection and establish a second network connection after the duration indicated by the delay duration.

[0118] Furthermore, for terminal devices that need to re-establish network connections based on new IP addresses due to network attacks, different terminal devices can establish new network connections in batches according to preset connection establishment rules to avoid traffic impact on the new IP address.

[0119] Optionally, for each client that needs to reconnect, the delay duration can be randomly determined within a preset duration range as the delay duration corresponding to the client. Since the delay duration is randomly determined, it can be ensured that when there are a large number of clients, each client has a relatively uniform and different delay duration, and establishes a network connection with the business server based on their respective corresponding delay durations, which can avoid a large amount of traffic from initiating connection establishment at the same time, avoid exponential growth of traffic, and protect the back-end business service system.

[0120] Optionally, different delay durations corresponding to different foreground and background states can be determined based on the foreground and background states of the client running on the terminal device, so that the terminal devices where the clients in different foreground and background states are located can access the new IP address in sequence. Specifically, the terminal device determines the delay duration according to a preset connection establishment delay rule, which may specifically include: obtaining the usage status information of the client, the usage status information includes first status information or second status information; the first status information is used to indicate that the client is in the foreground running state, and the second status information is used to indicate that the client is in the background running state; if the usage status information indicates the first status information, then the first delay duration is determined from the first duration range; if the usage status information indicates the second status information, then the second delay duration is determined from the second duration range; the characteristic value of the second duration range is greater than the characteristic value of the first duration range.

[0121] The characteristic value may include the mean, median, maximum, minimum, etc. of the duration range, and more specifically, the mean, median, maximum, minimum, etc. calculated based on the integer values ​​in the duration range. The characteristic value of the second duration range is greater than the characteristic value of the first duration range, and specifically, the mean of the second duration range is greater than the mean of the first duration range, or the median of the second duration range is greater than the median of the first duration range, or the maximum value of the second duration range is greater than the maximum value of the first duration range, or the minimum value of the second duration range is greater than the minimum value of the first duration range.

[0122] For example, if the client is in the foreground running state, the delay duration can be any random value between 5s and 30s, and the delay durations of different clients in the foreground running state can be different; if the client is in the background running state, the delay duration can be any random value between 30s and 60s, and the delay durations of different clients in the background running state can be different.

[0123] Optionally, different delay durations corresponding to different task attributes may also be determined based on the task attributes currently being executed by the client running on the terminal device, so that the terminal devices where the clients executing different task attributes are located access the new IP address in sequence. Specifically, the terminal device determines the delay duration according to a preset connection establishment delay rule, which may specifically include: obtaining the task attribute information of the task currently being executed by the client; determining the delay duration according to the task attribute information. The task attribute information may include task type information, task urgency information, etc. In actual application, a functional relationship between each task attribute information and the delay duration may be established in advance, so that the delay duration may be calculated based on the preset functional relationship according to different task attribute information; or, a mapping relationship between different task attribute information and delay duration may be established in advance, so that different delay durations may be determined by looking up a table according to different task attribute information.

[0124] Therefore, based on the solution of the embodiment of this specification, after receiving the new IP address, the client does not disconnect immediately after completing the processing of the currently operating data based on the old network connection, but instead performs a random delay or a delay based on preset rules. In this way, it is possible to avoid a large amount of traffic initiating connection establishment at the same time, avoid exponential growth of traffic, and protect the back-end business system.

[0125] In one or more embodiments of the present specification, a mechanism for storing and updating an IP address in a client or a terminal device where the client is located is also provided.

[0126] Optionally, after notifying the client of the new IP address, the client can perform persistent storage of the new IP address to ensure that when the client application is restarted, it can still resolve and use the changed IP address instead of using the attacked IP address. After sending the IP address update information to the client (step 206), it can also include: the terminal device stores the first mapping relationship information between the domain name used to access the target business service and the second IP address.

[0127] Specifically, the first mapping relationship information can be stored in the cache corresponding to the client, or the first mapping relationship information can be stored in the cache of the terminal device, or the first mapping relationship information can be stored in the cache corresponding to the client and in the cache of the terminal device. As a result, when the client accesses the domain name of the target business service again, the second IP address can be determined by querying the cache corresponding to the client or the cache of the terminal device, and then a network connection for obtaining the target business service can be established based on the second IP address. When other programs (for example, applications or applets) running on the terminal device need to access the domain name of the target business service, the second IP address can be determined by querying the cache of the terminal device, and then a network connection for obtaining the target business service can be established based on the second IP address.

[0128] Optionally, when storing the IP address, the client may consider factors such as the validity period and the corresponding network type, which can be used to indicate the valid use conditions of the IP address to achieve life cycle management of the IP address stored by the client. After sending the IP address update information to the client (step 206), it may also include: the client determines the valid condition information corresponding to the second IP address, the valid condition information includes at least one of the lifetime information or the network type information, in other words, the valid condition information is used to indicate the condition under which the client resolves the domain name to the second IP address information; the terminal device stores the second mapping relationship information between the domain name for accessing the target business service, the second IP address and the valid condition information; the valid condition information is used to indicate the condition under which the mapping relationship between the domain name and the second IP address is established.

[0129] Optionally, first, the client can determine the lifetime information corresponding to the second IP address; then, the client can store second mapping relationship information between the domain name used to access the target business service, the second IP address, and the lifetime information, and the lifetime information is used to indicate the validity period of the second mapping relationship information.

[0130] Optionally, first, the client can determine the network type information corresponding to the second IP address, and the network type information may include a cellular network or a wireless local area network; then, the client can store third mapping relationship information between the domain name used to access the target business service, the second IP address, and the network type information, wherein the network type information can be used to indicate that the second IP address is used when the client accesses the target business service according to the network type represented by the network type information.

[0131] Optionally, first, the client may determine the time-to-live information corresponding to the second IP address and determine the network type information corresponding to the second IP address; then, the client may store the mapping relationship information between the domain name used to access the target business service, the second IP address, the time-to-live information, and the network type information. For example, a typical data structure correspondence relationship may be as follows: domain name→IP→Time-To-Live (TTL value)→network type (e.g., 5G and / or WIFI).

[0132] Based on at least one embodiment of this specification, an efficient dynamic defense mechanism based on the multi-address characteristics of IPv6 is proposed, so that when facing a network attack, not only can the IP address be quickly changed, but also the new IP address can be notified to all users in a timely and reliable manner through automation technology, thereby ensuring service continuity and better user experience. Based on at least one embodiment of this specification, the traditional static security defense mode is abandoned, and a dynamic and adaptive method is adopted to utilize the advantages of the IPv6 protocol at low cost and efficiently, providing a new network security defense solution.

[0133] The various technical features in the above embodiments can be combined arbitrarily as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, any combination of the various technical features in the above embodiments also falls within the scope of this specification.

[0134] According to the above description, the embodiment of this specification provides a flowchart of a method for defending against network attacks in an actual application scenario, such as Figure 3 shown.

[0135] exist Figure 3 In step 302, the network traffic can be analyzed and identified. Specifically, traffic data from the client to the service server for providing the target service can be obtained, and traffic features can be extracted from the traffic data and analyzed to identify whether the service server is under network attack.

[0136] Step 304: Based on the network traffic analysis results obtained in step 302, it can be determined whether there is attack traffic. Specifically, it can be determined whether there is attack traffic targeting the target IP address. If so, step 306 can be executed, otherwise, the process ends.

[0137] Step 306: If the judgment result of step 304 indicates that there is attack traffic targeting the target IP address, the defense measures that can be taken include changing the IP address, specifically, determining a new IP address for replacing the target IP address (i.e., the old IP address). In actual application, the old IP address and the new IP address can both be IPv6 addresses, so that network traffic attacks can be defended at a lower cost and higher efficiency by adopting a strategy of switching IP addresses.

[0138] Step 308: After the new IP address is determined, the new IP address can be provided to the client application currently accessing the service server in a timely manner.

[0139] Step 310: After receiving the new IP address, the client may disconnect the network connection established with the service server based on the old IP address.

[0140] Step 312: The client may establish a new network connection with the service server based on the new IP address.

[0141] In addition, in order to more clearly describe the solution provided by the embodiments of this specification, a swimming lane schematic diagram of a method for defending against network attacks in an actual application scenario is also provided, such as Figure 4 shown.

[0142] exist Figure 4 In step 402, the terminal device running the client establishes a network connection with the service server for providing the target service based on the IPv6 address. At this time, the terminal device that establishes a network connection with the service server may include a terminal device used by a legitimate user who normally needs to obtain the service, and may also include a terminal device used by a malicious attacker.

[0143] Step 404: The network attack identification server can track network data traffic in real time. In actual application, an existing real-time network traffic acquisition system can be established or used to implement it, for example, the Aliguard system can be used to implement it.

[0144] Step 406: The network attack identification server can extract network traffic features based on the acquired network data traffic information. For example, network traffic features including but not limited to traffic data volume, network request frequency, data packet type and its distribution pattern, source IP address features of network requests, historical data comparison, etc. can be extracted.

[0145] Step 408: The network attack identification server can identify whether a network attack has occurred based on the extracted network traffic features. Specifically, it can identify whether an attack has occurred, and if an attack has occurred, it can identify the target IP address of the attack, the source IP address of the attack, the scale and intensity of the attack, etc.

[0146] In the embodiments of this specification, a network traffic intelligent analysis and identification mechanism is provided, such as Figure 4 In steps 404 to 408, real-time traffic tracking, extraction of network traffic features, and combining algorithm strategies to analyze traffic data and features, these algorithms can learn and identify behavioral characteristics of normal and abnormal network traffic, for example, can identify abnormal network traffic and perceive network attacks such as DDoS attacks.

[0147] In an embodiment of the present specification, an IP address scheduling server can manage an IPv6 address pool, and the IPv6 addresses in the IPv6 address pool are pre-registered and usable. Optionally, the addresses in the IPv6 address pool may not have a mapping relationship with any server device, and when they need to be used, a new IPv6 address is allocated to each server device from the IPv6 address pool. Or optionally, a mapping relationship between the IPv6 addresses in the IPv6 address pool and specific server devices can be established in advance, so that when the first IP address with a mapping relationship with the target server is identified as being under attack, it can be quickly switched to a second IP address with a mapping relationship with the target server.

[0148] Step 410: When a network attack such as a DDos attack is identified, the IP address scheduling server may select a new IPv6 address from a preset IPv6 address pool to replace the old IPv6 address identified as being attacked. Further, when determining a new IPv6 address, it may be selected randomly, or it may be selected according to a preset IP scheduling rule, which may include a load balancing rule, a preferred RTT rule, etc.

[0149] Step 412: After the IP address scheduling server determines the new IPv6 address to replace the old IPv6 address that is under attack, it can send the new IPv6 address to the client in a timely manner through the long connection channel pre-established with the client. Further, after the IP address scheduling server determines the new IPv6 address, if the mapping relationship between the new IPv6 address and the target server has not been established before, it can establish the mapping relationship between the new IPv6 address and the target server.

[0150] In the embodiments of the present specification, when the network traffic intelligent analysis mechanism identifies an attack activity, it can dynamically and quickly change the IP address of the target server and notify the client application of the new IP address. In the process of switching the IP address, there is no need to update the DNS record, which greatly reduces the IP address update delay in the traditional DNS announcement method, so that the changed IP address can be quickly updated and notified to the client when a network attack occurs, reducing the risk of client users encountering network service unavailability due to network attacks and improving the user's network experience.

[0151] Step 414: The terminal device running the client can receive the new IPv6 address sent by the IP address scheduling server. It can be understood that the terminal device that receives the new IPv6 address sent by the IP address scheduling server in step 414 can specifically include terminal devices used by legitimate users, but does not include terminal devices used by malicious attackers. In actual application, the network attack identification server can identify malicious attackers when identifying network attacks. Therefore, when the IP address scheduling server sends a new IPv6 address, it can send the new IPv6 address to clients other than the identified malicious attackers.

[0152] Step 416 and step 418: After receiving the new IPv6 address sent by the IP address scheduling server, the terminal device running the client can disconnect the first network connection established with the service server based on the old IPv6 address and establish a second network connection with the service server based on the new IPv6 address. In actual application, after disconnecting the old network connection, the client can immediately reestablish a new network connection so that the network service can be uninterrupted.

[0153] Optionally, when the client receives the new IPv6 address, it may not immediately disconnect the old network connection based on the old IPv6 address, but may first process the data on the old network connection before disconnecting the network connection to avoid interrupting network business services. Optionally, after processing the business data and disconnecting the old network connection, when re-establishing the connection based on the new IPv6 address, in order to avoid a large amount of traffic initiating the connection establishment behavior at the same time, the client side may adopt a random delay strategy to avoid exponential growth of traffic and protect the back-end business system. It can be seen that after the server's IP address is changed, the client application can reconnect to the server's new IP address without loss, without interfering with user operations.

[0154] Based on at least some of the embodiments of this specification, a highly adaptive and responsive network security defense system is constructed. This system can ensure that network services maintain their availability and stability even when they are under potential attacks through real-time traffic tracking, intelligent analysis and identification, dynamic protection IP address dynamic update mechanism on the server side, and network reconnection strategy on the client side.

[0155] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.

[0156] Figure 5 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of the structure of a device for defending against network attacks.

[0157] like Figure 5 As shown, the device may include the following modules.

[0158] The first IP address acquisition module 502 is used to acquire the first IP address attacked by the network; the first IP address is the IP address used by the terminal device running the client to establish a first network connection with the business server; the business server is used to provide the target business service to the client.

[0159] The second IP address determining module 504 is configured to determine a second IP address for replacing the first IP address from a set of IP addresses corresponding to the service server.

[0160] The IP address update information sending module 506 is used to send IP address update information to the client; the IP address update information is used to instruct the terminal device to establish a second network connection with the business server based on the second IP address for obtaining the target business service; the IP address is an IPv6 address.

[0161] based on Figure 5 The present specification also provides some specific implementation schemes of the method, which are described below.

[0162] Optionally, the first IP address acquisition module 502 may specifically include: a traffic data acquisition unit, used to acquire network traffic data used to access the target business service; a feature information extraction unit, used to extract network traffic feature information from the network traffic data; an attack identification result information determination unit, used to determine the attack identification result information corresponding to the target business service based on the network traffic feature information, the attack identification result information including attack type information and attack target information, and the attack target information including the attacked IP address.

[0163] Optionally, the attack identification result information may also include attack scale information; the network attack defense device may also include an attack scale judgment module, which is used to determine whether the attack scale against the first IP address is greater than or equal to a preset attack scale threshold value before determining the second IP address used to replace the first IP address from the IP address set corresponding to the service server, and obtain an attack scale judgment result. Accordingly, the second IP address determination module 504 may be specifically used to: if the attack scale judgment result is yes, determine the second IP address used to replace the first IP address from the IP address set corresponding to the service server.

[0164] Optionally, the second IP address determination module 504 may specifically include: an IP address set determination unit, used to determine the IP address set corresponding to the business server based on the first IP address; a second IP address determination unit, used to adopt a preset IP scheduling rule to determine a second IP address from the IP address set to replace the first IP address.

[0165] Optionally, the second IP address determination unit can be specifically used to: determine a second IP address from the IP address set to replace the first IP address according to a preset load balancing rule; the load balancing rule includes that the access traffic of the business servers corresponding to each IP address meets the preset traffic limitation conditions.

[0166] Optionally, the second IP address determination unit can be specifically used to: obtain the first geographic location information of the terminal device and the second geographic location information of the business server used to provide the target business service; determine the IP address corresponding to the business server that meets the preset geographic location condition as the second IP address used to replace the first IP address based on the first geographic location information and the second geographic location information; the geographic location condition is used to indicate that the time spent on executing the business request based on the network connection between the terminal device and the business server meets the preset condition.

[0167] Optionally, the IP address update information sending module 506 may be specifically configured to send the IP address update information to the client based on a pre-established long connection channel.

[0168] Optionally, the apparatus for defending against network attacks may further include: a network connection module of the terminal device, configured to disconnect the first network connection; and establish a second network connection with the service server based on the second IP address.

[0169] Optionally, the apparatus for defending against network attacks may further include: a data processing status judgment module, configured to judge whether a data processing operation based on the first network connection has been completed before the terminal device disconnects the first network connection. Accordingly, the network connection module may be specifically configured to disconnect the first network connection if the data processing operation based on the first network connection has been completed.

[0170] Optionally, the network connection module can be specifically used to: first, determine the delay duration according to a preset connection establishment delay rule; then, after the delay duration, the terminal device establishes a second network connection with the business server based on the second IP address.

[0171] Optionally, the terminal device determines the delay duration according to a preset connection establishment delay rule, which may specifically include: first, obtaining the usage status information of the client, the usage status information including first status information or second status information, the first status information is used to indicate that the client is in the foreground running state, and the second status information is used to indicate that the client is in the background running state; then, if the usage status information indicates the first status information, determining the first delay duration from the first duration range; if the usage status information indicates the second status information, determining the second delay duration from the second duration range; the characteristic value of the second duration range is greater than the characteristic value of the first duration range.

[0172] Optionally, the apparatus for defending against network attacks may further include: a storage module of the terminal device, configured to store first mapping relationship information between a domain name used to access the target business service and the second IP address.

[0173] Optionally, the device for defending against network attacks may further include: an IP address valid condition determination module, used to determine valid condition information corresponding to the second IP address, the valid condition information including at least one of lifetime information or network type information. Accordingly, the storage module may be specifically used to store second mapping relationship information between the domain name used to access the target business service, the second IP address, and the valid condition information; the valid condition information is used to indicate the condition under which the mapping relationship between the domain name and the second IP address is established.

[0174] It is understood that the above modules refer to computer programs or program segments for executing one or more specific functions. In addition, the distinction between the above modules does not mean that the actual program codes must also be separated.

[0175] The above is a schematic scheme of a device for defending against network attacks of this embodiment. It should be noted that the technical scheme of the device for defending against network attacks and the technical scheme of the method for defending against network attacks are of the same concept, and the details of the technical scheme of the device for defending against network attacks that are not described in detail can be found in the description of the technical scheme of the method for defending against network attacks.

[0176] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.

[0177] Figure 6 The block diagram of a computing device 600 according to an embodiment of the present application is shown. The components of the computing device 600 include but are not limited to a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and the database 650 is used to store data.

[0178] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0179] In one embodiment of the present application, the above components of the computing device 600 and Figure 6 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 6The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0180] The computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 600 may also be a mobile or stationary server.

[0181] Among them, when the processor 620 executes the computer instructions, the steps of the method for defending against network attacks are implemented.

[0182] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned method for defending against network attacks belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned method for defending against network attacks.

[0183] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The devices, equipment and methods provided in the embodiments of this specification correspond to each other, so the devices and equipment also have beneficial technical effects similar to the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding devices and equipment will not be repeated here.

[0184] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0185] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0186] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0187] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0188] For the convenience of description, the above device is described in terms of functions and is described separately in various units. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

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

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

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

[0192] 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 in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

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

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

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

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

[0197] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

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

Claims

1. A method for defending against network attacks, include: Get the first IP address attacked by the network; The first IP address is an IP address used by the terminal device running the client to establish a first network connection with the service server; The business server is used to provide target business services to the client; Determine, from a set of IP addresses corresponding to the service server, a second IP address for replacing the first IP address; Sending IP address update information to the client; The IP address update information is used to instruct the terminal device to establish a second network connection with the service server based on the second IP address for obtaining the target service; the IP address is an IPv6 address.

2. The method according to claim 1, in, The obtaining of the first IP address attacked by the network specifically includes: Obtaining network traffic data used to access the target business service; Extracting network traffic characteristic information from the network traffic data; Based on the network traffic feature information, attack identification result information corresponding to the target business service is determined; the attack identification result information includes attack type information and attack target information; the attack target information includes the attacked IP address.

3. The method according to claim 2, in, The attack identification result information also includes attack scale information; before determining the second IP address for replacing the first IP address from the IP address set corresponding to the service server, the method further includes: According to the attack scale information, determine whether the attack scale against the first IP address is greater than or equal to a preset attack scale threshold, and obtain an attack scale determination result; The determining, from the IP address set corresponding to the service server, a second IP address for replacing the first IP address specifically includes: If the attack scale determination result is yes, a second IP address for replacing the first IP address is determined from the IP address set corresponding to the service server.

4. The method according to claim 1, in, The determining, from the IP address set corresponding to the service server, a second IP address for replacing the first IP address specifically includes: Determine, according to the first IP address, a set of IP addresses corresponding to the service server; A preset IP scheduling rule is adopted to determine a second IP address from the IP address set to replace the first IP address.

5. The method according to claim 4, in, The adopting a preset IP scheduling rule to determine a second IP address for replacing the first IP address from the IP address set specifically includes: According to a preset load balancing rule, a second IP address for replacing the first IP address is determined from the IP address set; the load balancing rule includes that the access traffic of the business server corresponding to each IP address meets the preset traffic restriction condition.

6. The method according to claim 4, in, The adopting a preset IP scheduling rule to determine a second IP address for replacing the first IP address from the IP address set specifically includes: Acquire first geographic location information of the terminal device and second geographic location information of a service server for providing the target service; Based on the first geographic location information and the second geographic location information, the IP address corresponding to the business server that meets the preset geographic location conditions is determined as the second IP address used to replace the first IP address; the geographic location conditions are used to indicate that the time taken to execute a business request based on a network connection between the terminal device and the business server meets the preset conditions.

7. The method according to claim 1, in, The sending of IP address update information to the client specifically includes: Based on the pre-established long connection channel, the IP address update information is sent to the client.

8. The method according to claim 1, in, After sending the IP address update information to the client, the method further includes: The terminal device disconnects the first network connection; The terminal device establishes a second network connection with the service server based on the second IP address.

9. The method according to claim 8, before the terminal device disconnects the first network connection, include: The terminal device determines whether the data processing operation based on the first network connection has been completed; The terminal device disconnecting the first network connection specifically includes: If the data processing operation based on the first network connection is completed, the terminal device disconnects the first network connection.

10. The method according to claim 8, wherein the terminal device establishes a second network connection with the service server based on the second IP address, specifically include: The terminal device determines the delay duration according to a preset connection establishment delay rule; After the delay period, the terminal device establishes a second network connection with the service server based on the second IP address.

11. The method according to claim 10, wherein the terminal device determines the delay time according to a preset connection establishment delay rule, specifically include: Acquire usage status information of the client; the usage status information includes first status information or second status information; The first status information is used to indicate that the client is in the foreground running state; the second status information is used to indicate that the client is in the background running state; If the usage status information indicates first status information, determining a first delay duration from a first duration range; If the usage status information indicates second status information, a second delay duration is determined from a second duration range; and a characteristic value of the second duration range is greater than the characteristic value of the first duration range.

12. The method according to claim 1, further comprising: sending the IP address update information to the client. include: The terminal device stores first mapping relationship information between the domain name used to access the target business service and the second IP address.

13. The method according to claim 1, further comprising: sending the IP address update information to the client. include: Determining valid condition information corresponding to the second IP address; The validity condition information includes at least one of lifetime information or network type information; Storing second mapping relationship information between the domain name used to access the target business service, the second IP address, and the validity condition information; The validity condition information is used to indicate a condition under which a mapping relationship between the domain name and the second IP address is established.

14. A device for defending against network attacks, include: A first IP address acquisition module, used to acquire a first IP address attacked by the network; The first IP address is an IP address used by the terminal device running the client to establish a first network connection with the service server; The business server is used to provide target business services to the client; A second IP address determination module, used to determine a second IP address for replacing the first IP address from a set of IP addresses corresponding to the service server; An IP address update information sending module is used to send IP address update information to the client; the IP address update information is used to instruct the terminal device to establish a second network connection with the business server based on the second IP address for obtaining the target business service; the IP address is an IPv6 address.

15. A computing device, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 13 when executing the computer instructions.