Security protection method and device, computer readable medium and electronic device
By dividing the network protection system into the smallest scheduling unit and scaling it up and down, the problem of poor network security protection in existing technologies is solved, stable and effective attack detection is achieved in high-concurrency environments, and the robustness and protection effect of the system are improved.
Patent Information
- Application Number
- CN202110662712.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-15
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2041-06-15
AI Technical Summary
Existing technologies are not effective in protecting network security, especially when faced with high concurrency requests. Protection systems are prone to crashing and have difficulty effectively identifying and blocking malicious requests.
The network protection system is divided into the smallest scheduling unit (protection unit). Each protection unit contains a network management unit and a detection unit. The network management unit distributes resource access requests to the detection unit for attack detection, and blocks the request when the detection result is offensive. It supports scaling up and down to cope with high concurrency requests.
It improves the effectiveness and robustness of network security protection, can operate stably under high concurrency requests, effectively identify and block malicious requests, and reduce system complexity and resource consumption.
Smart Images

Figure CN115484039B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, and specifically relates to a security protection method, device, computer-readable medium, and electronic device. Background Technology
[0002] The development of network information technology is fostering a new industrial and technological revolution, but it also brings enormous security risks. In the information age, the importance of network security is self-evident. With the continuous development of communication and internet technologies, network applications are becoming increasingly diverse, and network coverage is expanding, making network security increasingly important in production and daily life. At the same time, security incidents such as website tampering, malicious website injection, SQL injection, XSS vulnerabilities, and CSRF attacks occur frequently. Numerous security issues exist in network access, requiring corresponding protection. However, among related technologies, network security protection is not yet effective.
[0003] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0004] The purpose of this application is to provide a security protection method, device, computer-readable medium, and electronic device that at least to some extent overcomes the technical problem of poor network security protection in related technologies.
[0005] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0006] According to one aspect of an embodiment of this application, a security protection method is provided. The security protection method includes:
[0007] The system acquires resource access requests and allocates them to protection units. A protection unit is the smallest scheduling unit that provides network protection functions after the protection system is segmented. The protection unit includes a network management unit and at least one detection unit for implementing the network protection functions.
[0008] The network management unit sends the resource access request to the detection unit.
[0009] The detection unit performs attack detection on the resource access request and obtains the detection result, which includes both malicious and non-malicious requests.
[0010] When the detection result is an malicious request, the resource access request corresponding to the detection result is blocked.
[0011] According to one aspect of an embodiment of this application, a safety protection device is provided. The safety protection device includes:
[0012] The resource access request acquisition module is configured to acquire resource access requests and allocate the resource access requests to the protection unit. The protection unit is the smallest scheduling unit that provides network protection functions after the protection system is segmented. The protection unit includes a network management unit and at least one detection unit for implementing the network protection functions.
[0013] The resource access request sending module is configured to send the resource access request to the detection unit through the network management unit;
[0014] An attack detection module is configured to perform attack detection on the resource access request through the detection unit and obtain a detection result, the detection result including offensive requests and non-offensive requests;
[0015] The request blocking module is configured to block the resource access request corresponding to the detection result when the detection result is an malicious request.
[0016] In some embodiments of this application, based on the above technical solutions, the resource access request sending module includes:
[0017] The resource access request loading unit is configured to load the resource access request into the corresponding storage page of the protection unit in the shared storage space through the network management unit. The storage page is visible to the protection unit corresponding to the storage page, but not visible to other protection units other than the protection unit corresponding to the storage page.
[0018] The detection request sending unit is configured to send a detection request to the detection unit through the network management unit;
[0019] The resource access request reading unit is configured to receive the detection request through the detection unit and read the resource access request from the storage page according to the detection request.
[0020] In some embodiments of this application, based on the above technical solutions, the attack detection module includes:
[0021] The parsing processing unit is configured to parse and process the resource access requests in the corresponding storage pages in the shared storage space through the detection unit to obtain the data to be detected;
[0022] The matching detection unit is configured to perform matching detection on the data to be detected and the malicious data in a preset database to obtain the detection result.
[0023] In some embodiments of this application, based on the above technical solutions, the resource access request loading unit includes:
[0024] The resource request information acquisition subunit is configured to acquire resource request information, which includes request length information and flag bits.
[0025] The resource request information caching subunit is configured to cache the received resource request information and wait to receive the next resource request information when it is determined, based on the request length information and the received resource request information, that the resource request information has not been fully received.
[0026] The resource request information aggregation subunit is configured to aggregate cached resource request information with the same flag bit to form the resource access request when it is determined that the resource request information has been received completely based on the request length information and the received resource request information.
[0027] The resource access request loading subunit is configured to load the resource access request formed by aggregating the resource request information through the network management unit into the corresponding storage page of the protection unit in the shared storage space.
[0028] In some embodiments of this application, based on the above technical solutions, the safety protection device further includes:
[0029] A status information caching unit is configured to cache the status information of the resource access request through the network management unit. The status information includes the IP information, port information, and timestamp information of the resource access request.
[0030] The status information loading unit is configured to load the status information of the resource access request into the corresponding storage page of the protection unit in the shared storage space through the network management unit.
[0031] In some embodiments of this application, based on the above technical solutions, the detection request sending unit includes:
[0032] The index address determination subunit is configured to perform traffic routing processing on the resource access request based on the status information of the resource access request to determine the index address for addressing the detection unit;
[0033] The detection request sending subunit is configured to send a detection request to the detection unit corresponding to the index address through the network management unit. The detection request includes the storage address information of the resource access request in the shared storage space.
[0034] In some embodiments of this application, based on the above technical solutions, the safety protection device further includes:
[0035] The IP information and port information acquisition unit is configured to acquire the IP information and port information corresponding to the resource access request through the network management unit, wherein the IP information includes the source IP address and the port information includes the source port information.
[0036] The detection result return unit is configured to return the detection result to the requesting end that sent the resource access request based on the source IP address and the source port information.
[0037] In some embodiments of this application, based on the above technical solutions, the safety protection device further includes:
[0038] CPU binding units are configured to allocate and bind one or more CPUs for running the protection unit to each of the protection units;
[0039] The protection unit quantity increase unit is configured to increase the number of protection units and the number of corresponding bound CPUs when the average CPU utilization of the CPU bound to the protection unit is higher than a first preset threshold.
[0040] The protection unit quantity reduction unit is configured to reduce the number of protection units and the number of CPUs correspondingly bound when the average CPU utilization of the CPUs bound to the protection unit is lower than a second preset threshold, wherein the second preset threshold is less than the first preset threshold.
[0041] In some embodiments of this application, based on the above technical solutions, the storage page, the network management unit and the detection unit in the protection unit corresponding to the storage page are bound to the same hardware architecture node.
[0042] According to one aspect of the embodiments of this application, a computer-readable medium is provided, on which a computer program is stored, which, when executed by a processor, implements the security protection method as described in the above technical solutions.
[0043] According to one aspect of the embodiments of this application, an electronic device is provided, the electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform a security protection method as described above by executing the executable instructions.
[0044] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the security protection method as described in the above technical solutions.
[0045] In the technical solution provided in this application embodiment, the protection unit is the smallest scheduling unit that provides network protection function after the protection system is segmented. The protection unit includes a network management unit and at least one detection unit for implementing network protection function. This application first allocates resource access requests to the protection unit, and then performs attack detection on the resource access requests through the detection unit to obtain the detection result. When the detection result is an attack request, the resource access request corresponding to the detection result is blocked, thereby preventing the resource access request with the detection result of an attack request from continuing to be transmitted and causing harm, so that this application has a better network security protection effect.
[0046] Furthermore, since the protection unit is the smallest scheduling unit that provides network protection functions after the protection system is divided, and the scheduling granularity of the protection system is the protection unit, the protection system can be easily expanded or reduced in size. As a result, the security protection method, device, computer-readable medium and electronic device of this application have good robustness when facing high-concurrency resource access requests, and can improve the network security protection effect of this application.
[0047] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0048] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0049] Figure 1 An exemplary device architecture block diagram illustrating the application of the present application's technical solutions is shown schematically.
[0050] Figure 2 The steps of the security protection method provided in the embodiments of this application are illustrated schematically.
[0051] Figure 3The illustration schematically shows the steps of sending a resource access request to the detection unit through the network management unit in an embodiment of this application.
[0052] Figure 4 The diagram illustrates the internal structure and processing flow of the protection system in the embodiments of this application.
[0053] Figure 5 A schematic diagram illustrating the data processing flow of the protection unit in an embodiment of this application is shown.
[0054] Figure 6 This illustration schematically shows the steps in this embodiment of the application whereby the network management unit loads a resource access request into the corresponding storage page of the protection unit in the shared storage space.
[0055] Figure 7 The illustration schematically shows some steps of the method in this application embodiment after the cached resource request information with the same flag bit is aggregated to form a resource access request.
[0056] Figure 8 The schematic diagram illustrates the steps of sending a detection request from the network management unit to the detection unit in an embodiment of this application.
[0057] Figure 9 The illustration schematically shows the steps of detecting attacks on resource access requests through a detection unit and obtaining detection results in an embodiment of this application.
[0058] Figure 10 The illustration schematically shows some steps of the method after blocking the resource access request corresponding to the detection result in an embodiment of this application.
[0059] Figure 11 The illustration schematically shows some steps of the method in this embodiment of the application before obtaining the resource access request and allocating the resource access request to the protection unit.
[0060] Figure 12 A schematic diagram of the structure of the safety protection device provided in the embodiments of this application is shown.
[0061] Figure 13 A structural block diagram of an electronic device for implementing embodiments of this application is shown schematically. Detailed Implementation
[0062] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0063] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0064] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0065] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0066] Before providing a detailed description of the security protection methods, security protection devices, and other technical solutions provided in the embodiments of this application, a brief introduction will be given to the cloud technology and blockchain technology involved in some embodiments of this application.
[0067] Cloud technology refers to a managed technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data computing, storage, processing, and sharing.
[0068] Cloud computing is a computing model that distributes computing tasks across a large pool of computers, enabling various application systems to access computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, resources in the "cloud" appear infinitely scalable, readily available, on-demand, and expandable, with payment based on usage.
[0069] As a provider of fundamental cloud computing capabilities, a cloud resource pool (referred to as a cloud platform, generally called an IaaS (Infrastructure as a Service) platform) is established. Various types of virtual resources are deployed in the resource pool for external customers to choose from. The cloud resource pool mainly includes: computing devices (virtualized machines containing operating systems), storage devices, and network devices.
[0070] Based on logical function, a PaaS (Platform as a Service) layer can be deployed on top of the IaaS (Infrastructure as a Service) layer, and a SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. Alternatively, SaaS can be deployed directly on top of IaaS. PaaS is a platform for running software, such as databases and web containers. SaaS refers to various types of business software, such as web portals and bulk SMS senders. Generally speaking, SaaS and PaaS are upper layers compared to IaaS.
[0071] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types (storage devices are also called storage nodes) in the network to work together through application software or application interfaces to provide data storage and business access functions to the outside world.
[0072] Cloud security refers to the collective term for security software, hardware, users, organizations, and security cloud platforms based on cloud computing business models. Cloud security integrates emerging technologies and concepts such as parallel processing, grid computing, and the identification of unknown virus behavior. Through a large network of clients, it monitors abnormal software behavior on the network, obtains the latest information on Trojans and malware on the internet, sends it to the server for automatic analysis and processing, and then distributes solutions for viruses and Trojans to each client.
[0073] The main research directions in cloud security include: 1. Cloud computing security, which mainly studies how to ensure the security of the cloud itself and various applications on the cloud, including cloud computer system security, secure storage and isolation of user data, user access authentication, information transmission security, network attack protection, and compliance auditing; 2. Cloudification of security infrastructure, which mainly studies how to use cloud computing to build and integrate security infrastructure resources and optimize security protection mechanisms, including building a large-scale security event and information collection and processing platform through cloud computing technology to achieve the collection and correlation analysis of massive amounts of information and improve the ability to control network-wide security events and risks; 3. Cloud security services, which mainly studies various security services provided to users based on cloud computing platforms, such as antivirus services.
[0074] Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying platform, a platform product service layer, and an application service layer.
[0075] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operational monitoring. The user management module is responsible for managing the identity information of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the correspondence between user real identities and blockchain addresses (access management). Furthermore, under authorization, it monitors and audits transactions of certain real identities and provides risk control rule configuration (risk control audit). The basic services module is deployed on all blockchain node devices to verify the validity of business requests. After consensus is reached on valid requests, they are recorded in storage. For a new business request, the basic services first perform interface adaptation parsing and authentication (interface adaptation), and then encrypt the business information through a consensus algorithm (consensus management). After encryption, the data is transmitted completely and consistently to the shared ledger (network communication) and recorded and stored. The smart contract module is responsible for contract registration, issuance, triggering, and execution. Developers can define contract logic using a programming language and publish it to the blockchain (contract registration). According to the contract terms, the key or other events are invoked to trigger execution and complete the contract logic. It also provides functions for contract upgrades and cancellations. The operation monitoring module is mainly responsible for deployment, configuration modification, contract settings, cloud adaptation, and real-time status visualization output during product release, such as alarms, monitoring network conditions, and monitoring the health status of node devices.
[0076] The platform's product service layer provides the basic capabilities and implementation frameworks for typical applications. Developers can leverage these basic capabilities, along with the specific characteristics of their business needs, to implement blockchain-based business logic. The application service layer provides blockchain-based application services to business stakeholders.
[0077] The system involved in the embodiments of this application can be a distributed system formed by connecting a client and multiple nodes (any form of computing device in the network, such as a server or user terminal) through network communication.
[0078] The safety protection method and device provided in this application will be described in detail below with reference to specific embodiments.
[0079] Figure 1 An exemplary device architecture block diagram illustrating the application of the present application's technical solutions is shown schematically.
[0080] like Figure 1 As shown, the device architecture 100 may include a terminal device 110, a network 120, and a server 130. The terminal device 110 may include various electronic devices such as smartphones, tablets, laptops, and desktop computers. The server 130 may be a standalone physical server, a server cluster or distributed device composed of multiple physical servers, or a cloud server providing cloud computing services. The network 120 may be a communication medium of various connection types capable of providing a communication link between the terminal device 110 and the server 130, such as a wired communication link or a wireless communication link.
[0081] Depending on the implementation requirements, the device architecture in this application embodiment can have any number of terminal devices, networks, and servers. For example, server 130 can be a server group composed of multiple server devices. In addition, the technical solutions provided in this application embodiment can be applied to terminal device 110, or to server 130, or can be implemented jointly by terminal device 110 and server 130. This application does not impose any special limitations on this.
[0082] For example, when terminal device 110 sends a resource access request to server 130, server 130 can execute the security protection method provided in this application. This method allocates the resource access request to the protection unit of the protection system, performs attack detection on the resource access request through the detection unit, obtains the detection result, and blocks the resource access request corresponding to the detection result when the detection result is an attack request. This prevents the resource access request with the detection result of an attack request from continuing to be transmitted and causing harm, thus giving this application a better network security protection effect.
[0083] It is understandable that there are numerous security issues in network access, requiring appropriate protection. Network security protection is particularly ineffective when servers or service systems face high concurrency requests.
[0084] Since a protection unit is the smallest scheduling unit providing network protection functions obtained by dividing the protection system, the scheduling granularity of the protection system is at the protection unit level. Therefore, the protection system can be expanded by increasing the number of protection units and scaled down by decreasing the number of protection units, thereby reducing the structural complexity of the protection system. Furthermore, it facilitates the expansion of the protection system to prevent crashes when facing high concurrency access requests, and also facilitates the scaling down of the protection system to reduce resource consumption when the number of access requests is low. Thus, it improves the network security protection effect of the security protection method, apparatus, computer-readable medium, and electronic device of the embodiments of this application.
[0085] In practical applications, the security protection method of this application can be applied to a web server or to an intrusion detection relay station between the web server and the user's client.
[0086] Figure 2 The steps of the security protection method provided in this application embodiment are illustrated schematically. The subject executing this security protection method can be a terminal device or a server. Figure 2 As shown, this safety protection method mainly includes the following steps S210 to S240:
[0087] S210. Obtain resource access requests and assign them to protection units.
[0088] The protection unit is the smallest scheduling unit that provides network protection functions after the protection system is divided. The protection unit includes a network management unit and at least one detection unit for implementing network protection functions.
[0089] The system acquires resource access requests from external nodes, such as HttpGet and HttpPost requests based on the HTTP (Hypertext Transfer Protocol) protocol or other network requests based on other transport protocols. These resource access requests are then distributed among the protection units of the protection system. Specifically, the resource access requests can be evenly distributed among the protection units of the protection system to ensure load balancing among the various protection units when the protection system comprises multiple protection units. This improves the security of servers or service systems employing the security protection methods, apparatus, computer-readable media, and electronic devices of this application, thereby enhancing the network security protection effect of servers or service systems using the security protection methods, apparatus, computer-readable media, and electronic devices of this application.
[0090] Furthermore, since a protection unit is the smallest scheduling unit providing network protection functions obtained after dividing the protection system, the scheduling granularity of the protection system is at the protection unit level. Therefore, when the protection system needs to be expanded, the number of protection units can be increased; when the protection system needs to be scaled down, the number of protection units can be decreased, thus enabling the protection system to easily expand and shrink. The protection system of this application employs a segmentation design, enabling it to achieve horizontal scaling with high efficiency when facing high-concurrency resource access requests. This gives the security protection method of this application good robustness and improves the network security protection effect of this application.
[0091] Network protection functions include the ability to prevent malicious resource access requests from harming the network, thus achieving network security protection. Specifically, network protection functions include the ability to detect attacks on resource access requests and block resource access requests that are detected as malicious.
[0092] S220. Send the resource access request to the detection unit through the network management unit.
[0093] In a specific embodiment, the protection system can be deployed on Kubernetes (k8s). The network management unit can run in a container deployed on Kubernetes. Resource access requests can be sent to the detection unit via the network management unit. The detection unit can also run in a container deployed on Kubernetes.
[0094] Figure 3 This illustration schematically depicts the steps in an embodiment of this application where a resource access request is sent from the network management unit to the detection unit. For example... Figure 3As shown, based on the above embodiments, in some embodiments, the step S220 of sending the resource access request to the detection unit through the network management unit may further include the following steps S310 to S330:
[0095] S310. The network management unit loads the resource access request into the corresponding storage page of the protection unit in the shared storage space. The storage page is visible to the protection unit corresponding to the storage page. The storage page is not visible to other protection units besides the protection unit corresponding to the storage page.
[0096] Figure 4 A schematic diagram illustrating the internal structure and processing flow of the protection system in an embodiment of this application is shown. Figure 4 As shown, the protection system 400 includes two protection units 410. Each protection unit 410 includes a network management unit 411 and a protection detection unit 412. The network management unit 411 can load resource access requests into the corresponding storage page 421 of the protection unit 410 in the shared storage space 420. The storage page 421 is visible to the corresponding protection unit 410. The storage page 421 is not visible to other protection units 410 besides the one corresponding to it.
[0097] Figure 5 A schematic diagram illustrating the data processing flow of the protection unit in an embodiment of this application is shown. Figure 5 As shown, the network management unit 510 can load resource access requests into the corresponding storage page 530 of the protection unit in the shared storage space. The storage page 530 is visible to the network management unit 510 and the protection detection unit 520 within the corresponding protection unit 500, but not to other protection units besides the corresponding protection unit 500. This improves the addressing efficiency of the network management unit in accessing the corresponding storage page of the protection unit in the shared storage space, thereby reducing the time spent by the network management unit loading resource access requests into the corresponding storage page of the protection unit in the shared storage space, and improving operational efficiency.
[0098] It is understandable that the detection unit needs to perform attack detection on resource access requests, which consumes a lot of CPU resources. By adopting a layout where one network management module corresponds to two or more protection and detection modules, the load of the network management module and the protection and detection module can be balanced, thereby improving the operating efficiency of the protection unit when system resources are fixed.
[0099] Figure 6 This illustration schematically depicts the steps in an embodiment of this application whereby the network management unit loads a resource access request into the corresponding storage page of the protection unit in the shared storage space. For example... Figure 6 As shown, based on the above embodiments, in some embodiments, the step S310, in which the network management unit loads the resource access request into the corresponding storage page of the protection unit in the shared storage space, may further include the following steps S610 to S640:
[0100] S610. Obtain resource request information, which includes request length information and flag bits;
[0101] S620. When it is determined from the request length information and the received resource request information that the resource request information has not been fully received, the received resource request information is cached and the next resource request information is waited to be received.
[0102] S630. When it is determined that the resource request information has been received completely based on the request length information and the received resource request information, the cached resource request information with the same flag bit is aggregated to form a resource access request.
[0103] S640. The resource access request formed by aggregating resource request information through the network management unit is loaded into the corresponding storage page of the protection unit in the shared storage space.
[0104] It is understandable that due to limitations such as network bandwidth, some resource access requests may be split into multiple resource request messages. Each resource request message can be encapsulated into a network data packet. Resource request messages with the same flag bits originate from the same resource access request. When all resource request messages are received, the cached resource request messages with the same flag bits are aggregated to form a new resource access request, thus restoring the split resource request messages into a complete resource access request. Therefore, subsequent attack detection on the complete resource access request can fully detect whether the entire resource access request contains malicious data, avoiding the problem of failing to identify malicious data due to splitting malicious data into different resource request messages, and improving the identification rate of malicious requests by the security protection method of this application.
[0105] Specifically, the length of the resource request information can be stored in the Content-Length variable in the request header of the resource access request.
[0106] In some implementations, the network management unit can enable network listening to obtain resource request information in real time. Furthermore, the network management unit can establish an HTTP session table for each resource request's network data packet to store the status information of that resource request. When aggregating resource request information to form a resource access request, the status information of the resource request information is also aggregated to obtain the status information of the resource access request.
[0107] Figure 7 This illustration schematically shows part of the steps in the method described in this application embodiment, after aggregating cached resource request information with the same flag bit to form a resource access request. For example... Figure 7 As shown, based on the above embodiments, in some embodiments, after aggregating cached resource request information with the same flag bit to form a resource access request in step S630, the security protection method may further include the following steps S710 to S720:
[0108] S710. The status information of resource access requests is cached through the network management unit. The status information includes the IP information, port information, and timestamp information of the resource access request.
[0109] S720. The status information of the resource access request is loaded into the corresponding storage page of the protection unit in the shared storage space through the network management unit.
[0110] It is understandable that when the network management unit obtains a resource access request, it receives the status information of that resource access request. This status information includes IP information, port information, and timestamp information. The IP information may include the source IP address and the destination IP address. The port information may include the source port information and the destination port number. The timestamp information may include the timestamp when the protection system received the resource access request, or it may include the timestamps of each resource request information received by the protection system within the resource access request. Therefore, the network management unit can cache the status information of the resource access request and load it into the corresponding storage page of the protection unit in the shared storage space, facilitating subsequent reading and use of the resource access request's status information.
[0111] S320. Send a detection request to the detection unit through the network management unit.
[0112] like Figure 5 As shown, the network management unit 510 can send a detection request to the detection unit 520, so that the detection unit 520 can perform attack detection on the resource access request. The detection request may include the storage address information of the resource access request corresponding to the detection request in the shared storage space.
[0113] Figure 8 The schematic diagram illustrates the steps of sending a detection request from the network management unit to the detection unit in an embodiment of this application. For example... Figure 8 As shown, based on the above embodiments, in some embodiments, the step S320 of sending a detection request to the detection unit through the network management unit may further include the following steps S810 to S820:
[0114] S810. Based on the status information of the resource access request, the resource access request is diverted to determine the index address used for the addressing detection unit.
[0115] S820. A detection request is sent from the network management unit to the detection unit corresponding to the index address. The detection request includes the storage address information of the resource access request in the shared storage space.
[0116] The network management unit sends a detection request to the detection unit. Specifically, the resource access request can first be sorted according to the status information of the resource access request to determine the index address used to address the detection unit, and then the network management unit sends the detection request to the detection unit corresponding to the index address.
[0117] Specifically, resource access requests can be routed based on their timestamp information. For example, resource access requests can be sorted according to their received timestamps, with earlier received timestamps placed after later ones. Once sorted, detection requests containing the storage address information of the resource access requests in the shared storage space can be sent to each detection unit in turn, according to the sorted order. For example, when the protection unit includes two detection units: Detection Unit A and Detection Unit B, a detection request containing the storage address information of the resource access request in the shared storage space can be generated based on the currently ranked first resource access request, and then this detection request is sent to Detection Unit A; a detection request containing the storage address information of the resource access request in the shared storage space can be generated based on the currently ranked second resource access request, and then this detection request is sent to Detection Unit B; a detection request containing the storage address information of the resource access request in the shared storage space can be generated based on the currently ranked third resource access request, and then this detection request is sent to Detection Unit A; a detection request containing the storage address information of the resource access request in the shared storage space can be generated based on the currently ranked fourth resource access request, and then this detection request is sent to Detection Unit B, and so on. This improves the detection efficiency of resource access requests, fully utilizes the detection resources of the detection units, and avoids load imbalance between detection units.
[0118] In some implementations, the detection request corresponding to the resource access request can be sent to each detection unit in turn according to the request length of the resource access request. For example, when the protection unit includes two detection units: Detection Unit A and Detection Unit B, a detection request can be generated based on the currently ranked first resource access request, with a length of 3 units, and sent to Detection Unit A; a corresponding detection request can be generated based on the currently ranked second resource access request, with a length of 1 unit, and sent to Detection Unit B; a corresponding detection request can be generated based on the currently ranked third resource access request, with a length of 2 units, and sent to Detection Unit B; a corresponding detection request can be generated based on the currently ranked fourth resource access request, with a length of 1 unit, and sent to Detection Unit A; a corresponding detection request can be generated based on the currently ranked fifth resource access request, with a length of 2 units, and sent to Detection Unit A; a corresponding detection request can be generated based on the currently ranked sixth resource access request, with a length of 3 units, and sent to Detection Unit B. And so on. This ensures that when resource access requests are sent to each detection unit in a round-robin fashion, the sum of the request lengths of one or more resource access requests sent to each detection unit is similar. This further helps to avoid load imbalance among detection units.
[0119] S330. Receive the detection request through the detection unit, and read the resource access request from the storage page according to the detection request.
[0120] like Figure 5 As shown, after receiving a detection request, the detection unit 520 can read the resource access request from the corresponding storage page 530 based on the detection request. Since the detection request includes the storage address information of the resource access request in the shared storage space, the detection unit can read the resource access request from the corresponding storage page in the shared storage space after receiving the detection request. Therefore, after the network management unit loads the resource access request into the corresponding storage page of the protection unit in the shared storage space, the detection unit can read the resource access request from the corresponding storage page based on the detection request. This avoids copying the relevant data of the resource access request between the network management unit and the detection unit, thereby reducing system resource consumption, making the interaction between the units within the protection unit more efficient, and saving internal resources of the network management unit and the detection unit.
[0121] S230. The detection unit performs attack detection on resource access requests and obtains the detection results. The detection results include malicious requests and non-malicious requests.
[0122] like Figure 5 As shown, after the detection unit 520 performs attack detection on the resource access request, the detection result can be obtained. Specifically, the detection result can be returned to the network management unit 510.
[0123] Figure 9 This illustration schematically depicts the steps involved in detecting attacks on resource access requests using a detection unit, and obtaining the detection results in an embodiment of this application. For example... Figure 9 As shown, based on the above embodiments, in some embodiments, the step S230 of detecting attacks on resource access requests through the detection unit and obtaining detection results may further include the following steps S910 to S920:
[0124] S910. The detection unit parses and processes the resource access requests in the corresponding storage pages in the shared storage space to obtain the data to be detected;
[0125] S920. The detection unit performs matching detection on the data to be detected and the malicious data in the preset database to obtain the detection result.
[0126] The detection unit parses and processes resource access requests in the corresponding storage pages of the shared storage space to obtain the data to be detected. Then, the detection unit matches the data to be detected with malicious data in a preset database to obtain the detection result. Specifically, the detection unit parses both the Header and Body of the resource access requests in the corresponding storage pages of the shared storage space, extracts the data to be detected from the Header and Body, and then matches the data to be detected with malicious data in the preset database to obtain the detection result. The detection result includes both malicious and non-malicious requests.
[0127] Specifically, an attack detection engine can be used to match the data to be detected with malicious data in a pre-set database. The protection system of this application can be architected between the client and the web server, and the attack detection can be for web attack detection. Here, malicious requests are resource access requests containing suspected malicious data, while non-malicious requests are resource access requests that do not contain suspected malicious data. Specifically, malicious data can be data related to network security attacks such as website tampering, website malware injection, SQL injection, XSS vulnerabilities, and CSRF attacks. Therefore, attack detection of resource access requests can be achieved efficiently and conveniently, facilitating subsequent interception or blocking of malicious resource access requests.
[0128] S240. When the detection result is an attack request, block the resource access request corresponding to the detection result.
[0129] In some implementations, when the detection unit detects an attack on a resource access request and finds it to be an offensive request, the resource access request corresponding to the detection result is blocked. When the detection unit detects an attack on a resource access request and finds it to be a non-offensive request, the resource access request corresponding to the detection result is allowed. This enables the protection unit to provide network protection functions, preventing resource access requests containing offensive data from continuing to be transmitted and causing harm, while allowing resource access requests without offensive data to be transmitted normally. This improves the security of servers or service systems using the security protection methods, devices, computer-readable media, and electronic devices of this application, giving this application a better network security protection effect.
[0130] Figure 10 The illustration schematically shows some steps of the method in this embodiment of the application after blocking the resource access request corresponding to the detection result. For example... Figure 10 As shown, based on the above embodiments, in some embodiments, after blocking the resource access request corresponding to the detection result in step S240, the security protection method may further include the following steps S1010 to S1020:
[0131] S1010. Obtain the IP information and port information corresponding to the resource access request through the network management unit. The IP information includes the source IP address, and the port information includes the source port information.
[0132] S1020. Return the detection results to the requesting end that sent the resource access request based on the source IP address and source port information.
[0133] like Figure 5 As shown, after the detection result is returned to the network management unit 510, and after the protection unit 500 blocks the resource access request that is detected as an attack request, the detection result can be returned to the requesting end that sent the resource access request based on the source IP address and source port information. The requesting end can be a client or server that sent the resource access request using the source IP address and source port information. This allows the requesting end to receive a response to its resource access request and to know that the resource access request was detected as an attack request. This helps the requesting end to self-check for sources of attack data and fix corresponding system vulnerabilities, thereby improving the security of the requesting end and enhancing the security protection effect of the security protection method of this application.
[0134] Figure 11The illustration schematically shows some steps of the method in this embodiment of the application before obtaining the resource access request and allocating the resource access request to the protection unit. For example... Figure 11 As shown, based on the above embodiments, in some embodiments, before obtaining the resource access request and allocating the resource access request to the protection unit in step S210, the security protection method may further include the following steps S1110 to S1130:
[0135] S1110. Assign and bind one or more CPUs for running the protection unit to each protection unit;
[0136] S1120. When the average CPU utilization of the CPU bound to the protection unit is higher than the first preset threshold, increase the number of protection units and the number of CPUs bound to them.
[0137] S1130. When the average CPU utilization of the CPU bound to the protection unit is lower than the second preset threshold, reduce the number of protection units and the number of CPUs bound to them.
[0138] Before acquiring resource access requests and allocating them to protection units, one or more CPUs (central processing units) can be allocated and bound to each protection unit for running the protection unit. Furthermore, when the average CPU utilization of the CPUs bound to a protection unit is higher than a first preset threshold, the number of protection units and the corresponding number of bound CPUs are increased; when the average CPU utilization of the CPUs bound to a protection unit is lower than a second preset threshold, the number of protection units and the corresponding number of bound CPUs are decreased. The second preset threshold is less than the first preset threshold. This ensures that the CPU utilization of the CPUs bound to the protection units does not exceed the first preset threshold or fall below the second preset threshold, thereby preventing CPU overload and avoiding system crashes due to overload when facing high concurrency requests. This improves the security of the protection system and even the server or service system equipped with the security protection method of this application, thus enhancing the security protection effect of the security protection method of this application.
[0139] Furthermore, the protection system of this application embodiment is divided into protection units, enabling each protection unit to provide attack detection services independently, and the system resource consumption of a single protection unit is low. Therefore, when the traffic of resource access requests received by the protection system is low, i.e., when the average CPU utilization of the CPU bound to the protection unit is lower than a second preset threshold, the number of protection units can be reduced, saving system resources and improving system operating efficiency. Conversely, when the traffic of resource access requests received by the protection system is high, i.e., when the average CPU utilization of the CPU bound to the protection unit is higher than a first preset threshold, the number of protection units can be increased, enabling the protection system to have better robustness when facing high-concurrency resource access requests. This improves the security of the protection system and even the server or service system equipped with the security protection method of this application embodiment, thereby enhancing the security protection effect of the security protection method of this application. Specifically, the protection system of this application embodiment can be architected on a cloud server, facilitating the expansion and reduction of protection units within the protection system. This improves the expansion efficiency of protection units in the protection system during sudden increases in resource access request traffic, which is beneficial to improving the security protection effect of the protection system.
[0140] In a specific example, the CPU management strategy of the protection system can be adjusted to static, and Kubernetes' QoS (Quality of Service) mechanism can be adopted to limit the CPU at the Guaranteed level. This allows the protection unit to exclusively occupy and bind to the CPU core, avoiding changes in the CPU running the protection unit during its operation. It enables QoS management of the protection units in the protection system, resulting in higher performance for the protection units and improving the robustness of the protection system when dealing with high concurrency requests.
[0141] Based on the above embodiments, in some embodiments, when one or more protection units of the protection system fail, the number of protection units and the number of CPUs bound to them can be increased. This allows the newly added protection units to take over the attack detection of resource access requests from the failed protection units, thereby preventing the protection system from becoming paralyzed and improving its robustness. This ultimately enhances the security protection effect of the protection system.
[0142] Based on the above embodiments, in some embodiments, the storage page, the CPU bound to the network management unit and the detection unit in the corresponding protection unit, are located in the same hardware architecture node. This shortens the data transmission distance between the storage page and the CPU bound to the network management unit and the detection unit in the corresponding protection unit, thereby improving the internal interaction efficiency of the protection unit and enhancing the robustness of the protection unit and the protection system. This further improves the security of the protection system and even the server or service system equipped with the security protection method of this application, thus enhancing the security protection effect of the security protection method of this application.
[0143] Specifically, the hardware architecture node can be a NUMA (Non-Uniform Memory Access) node. This allows for shorter transmission distances between the storage page and the CPUs bound to the network management unit and detection unit within the corresponding protection unit. This improves the NUMA affinity between the network management unit, storage page, and detection unit, optimizes the topology management within the protection unit, enhances the internal interaction efficiency of the protection unit, and improves the robustness of the protection unit and the protection system. Ultimately, this further enhances the security of the protection system and even the server or service system equipped with the security protection method of this application, thereby improving the security protection effect of the security protection method of this application.
[0144] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0145] The following describes an embodiment of the apparatus of this application, which can be used to execute the security protection method described in the above embodiments of this application. Figure 12 A schematic structural block diagram of the safety protection device provided in an embodiment of this application is shown. Figure 12 As shown, the safety protection device 1200 may include:
[0146] The resource access request acquisition module 1210 is configured to acquire resource access requests and allocate them to protection units. The protection unit is the smallest scheduling unit that provides network protection functions after the protection system is divided. The protection unit includes a network management unit and at least one detection unit for implementing network protection functions.
[0147] The resource access request sending module 1220 is configured to send resource access requests to the detection unit through the network management unit;
[0148] The attack detection module 1230 is configured to perform attack detection on resource access requests through the detection unit and obtain detection results, which include offensive and non-offensive requests.
[0149] The request blocking module 1240 is configured to block the resource access request corresponding to the detection result when the detection result is an malicious request.
[0150] In some embodiments of this application, based on the above embodiments, the resource access request sending module includes:
[0151] The resource access request loading unit is configured to load the resource access request into the corresponding storage page of the protection unit in the shared storage space through the network management unit. The storage page is visible to the protection unit corresponding to the storage page, but not visible to other protection units other than the protection unit corresponding to the storage page.
[0152] The detection request sending unit is configured to send detection requests to the detection unit through the network management unit;
[0153] The resource access request reading unit is configured to receive detection requests through the detection unit and read resource access requests from the storage page based on the detection requests.
[0154] In some embodiments of this application, based on the above embodiments, the attack detection module includes:
[0155] The parsing and processing unit is configured to parse and process resource access requests in the corresponding storage pages in the shared storage space through the detection unit to obtain the data to be detected;
[0156] The matching detection unit is configured to perform matching detection on the data to be detected and the malicious data in the preset database to obtain the detection result.
[0157] In some embodiments of this application, based on the above embodiments, the resource access request loading unit includes:
[0158] The resource request information acquisition subunit is configured to acquire resource request information, which includes request length information and flag bits.
[0159] The resource request information caching subunit is configured to cache the received resource request information and wait to receive the next resource request information when it is determined that the resource request information has not been fully received based on the request length information and the received resource request information.
[0160] The resource request information aggregation subunit is configured to aggregate cached resource request information with the same flag bit to form a resource access request when it is determined that the resource request information has been received based on the request length information and the received resource request information.
[0161] The resource access request loading subunit is configured to load the resource access request formed by aggregating resource request information through the network management unit into the corresponding storage page of the protection unit in the shared storage space.
[0162] In some embodiments of this application, based on the above embodiments, the safety protection device further includes:
[0163] The status information caching unit is configured to cache the status information of resource access requests through the network management unit. The status information includes the IP information, port information and timestamp information of the resource access request.
[0164] The status information loading unit is configured to load the status information of the resource access request into the corresponding storage page of the protection unit in the shared storage space through the network management unit.
[0165] In some embodiments of this application, based on the above embodiments, the detection request sending unit includes:
[0166] The index address determination subunit is configured to perform traffic routing on resource access requests based on the status information of the resource access requests to determine the index address used for the address detection unit;
[0167] The detection request sending subunit is configured to send a detection request to the detection unit corresponding to the index address through the network management unit. The detection request includes the storage address information of the resource access request in the shared storage space.
[0168] In some embodiments of this application, based on the above embodiments, the safety protection device further includes:
[0169] The IP information and port information acquisition unit is configured to acquire IP information and port information corresponding to resource access requests through the network management unit. The IP information includes the source IP address and the port information includes the source port information.
[0170] The detection result return unit is configured to return the detection result to the requesting end that sent the resource access request based on the source IP address and source port information.
[0171] In some embodiments of this application, based on the above embodiments, the safety protection device further includes:
[0172] CPU binding units are configured to allocate and bind one or more CPUs for running the protection unit to each protection unit;
[0173] The protection unit quantity increase unit is configured to increase the number of protection units and the number of CPUs bound to them when the average CPU utilization of the CPUs bound to the protection units is higher than a first preset threshold.
[0174] The protection unit number reduction unit is configured to reduce the number of protection units and the number of CPUs bound to them when the average CPU utilization of the CPUs bound to the protection units is lower than a second preset threshold, wherein the second preset threshold is less than a first preset threshold.
[0175] In some embodiments of this application, based on the above embodiments, the CPUs bound to the storage page, the network management unit, and the detection unit in the protection unit corresponding to the storage page are located in the same hardware architecture node.
[0176] The specific details of the safety protection devices provided in the various embodiments of this application have been described in detail in the corresponding method embodiments, and will not be repeated here.
[0177] Figure 13 A structural block diagram of an electronic device for implementing embodiments of this application is shown schematically.
[0178] It should be noted that, Figure 13 The electronic device 1300 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0179] like Figure 13 As shown, the electronic device 1300 includes a central processing unit (CPU) 1301, which can perform various appropriate actions and processes according to programs stored in read-only memory (ROM) 1302 or programs loaded from storage section 1308 into random access memory (RAM). The random access memory 1303 also stores various programs and data required for the operation of the device. The CPU 1301, ROM 1302, and RAM 1303 are interconnected via a bus 1304. An input / output interface 1305 (i.e., I / O interface) is also connected to the bus 1304.
[0180] The following components are connected to the input / output interface 1305: an input section 1306 including a keyboard, mouse, etc.; an output section 1307 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a local area network card, modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the input / output interface 1305 as needed. Removable media 1311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on the drive 1310 as needed so that computer programs read from them can be installed into the storage section 1308 as needed.
[0181] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1309, and / or installed from removable medium 1311. When the computer program is executed by central processing unit 1301, it performs the various functions defined in the apparatus of this application.
[0182] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution apparatus, device, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution device, apparatus, or apparatus. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0183] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using dedicated hardware-based means to perform the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0184] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0185] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.
[0186] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0187] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A security protection method, characterized in that, The method includes: Obtain resource access requests and allocate the resource access requests to protection units. The protection unit is the smallest scheduling unit that provides network protection functions after the protection system is divided. The protection unit includes a network management unit and at least two detection units for implementing the network protection functions. The network management unit loads the resource access request into the corresponding storage page of the protection unit in the shared storage space. The storage page is visible to the protection unit corresponding to the storage page, but not visible to other protection units besides the protection unit corresponding to the storage page. The storage page and the CPU bound to the network management unit and the detection unit in the protection unit corresponding to the storage page are located in the same hardware architecture node. The network management unit sorts the resource access requests according to the order of their received timestamps, and sends the detection requests to each detection unit in sequence to achieve load balancing among the detection units. The detection request includes the storage address information of the resource access request corresponding to the detection request in the shared storage space. The detection unit receives the detection request and reads the resource access request from the storage page according to the detection request. The detection unit performs attack detection on the resource access request and obtains the detection result, which includes both malicious and non-malicious requests. When the detection result is an malicious request, the resource access request corresponding to the detection result is blocked.
2. The security protection method according to claim 1, characterized in that, The step of performing attack detection on the resource access request through the detection unit and obtaining the detection result includes: The detection unit parses and processes the resource access requests in the corresponding storage pages in the shared storage space to obtain the data to be detected. The detection unit performs matching and detection on the data to be detected and the malicious data in the preset database to obtain the detection result.
3. The security protection method according to claim 1, characterized in that, The step of loading the resource access request into the corresponding storage page of the protection unit in the shared storage space through the network management unit includes: Obtain resource request information, which includes request length information and flag bits; When it is determined, based on the request length information and the received resource request information, that the resource request information has not been fully received, the received resource request information is cached and the system waits to receive the next resource request information. When it is determined that the resource request information has been received completely based on the request length information and the received resource request information, the cached resource request information with the same flag bit is aggregated to form the resource access request. The network management unit loads the resource access request, formed by aggregating the resource request information, into the corresponding storage page of the protection unit in the shared storage space.
4. The security protection method according to claim 3, characterized in that, After aggregating cached resource request information with the same flag bit to form the resource access request, the method further includes: The network management unit caches the status information of the resource access request, which includes the IP information, port information, and timestamp information of the resource access request. The network management unit loads the status information of the resource access request into the corresponding storage page of the protection unit in the shared storage space.
5. The safety protection method according to claim 4, characterized in that, The method further includes: The resource access request is routed according to the status information of the resource access request to determine the index address used to address the detection unit; The network management unit sends a detection request to the detection unit corresponding to the index address.
6. The security protection method according to claim 4, characterized in that, After blocking the resource access request corresponding to the detection result, the security protection method further includes: The network management unit obtains the IP information and port information corresponding to the resource access request, wherein the IP information includes the source IP address and the port information includes the source port information. The detection result is returned to the requesting end that sent the resource access request based on the source IP address and the source port information.
7. The security protection method according to any one of claims 1-6, characterized in that, Before acquiring a resource access request and allocating the resource access request to a protection unit, the method further includes: Each of the protection units is assigned and bound to one or more CPUs for running the protection unit; When the average CPU utilization of the CPU bound to the protection unit is higher than a first preset threshold, the number of protection units and the number of CPUs bound to them are increased. When the average CPU utilization of the CPU bound to the protection unit is lower than the second preset threshold, the number of protection units and the number of CPUs bound to them are reduced, wherein the second preset threshold is less than the first preset threshold.
8. A safety protection device, characterized in that, The safety protection device includes: The resource access request acquisition module is configured to acquire resource access requests and allocate the resource access requests to the protection unit. The protection unit is the smallest scheduling unit that provides network protection functions after the protection system is segmented. The protection unit includes a network management unit and at least two detection units for implementing the network protection functions. The resource access request sending module is configured to load the resource access request into the corresponding storage page of the protection unit in the shared storage space through the network management unit. The storage page is visible to the protection unit corresponding to the storage page, but not visible to other protection units besides the protection unit corresponding to the storage page. The storage page and the CPUs bound to the network management unit and the detection unit in the protection unit corresponding to the storage page are located in the same hardware architecture node. The network management unit sorts the resource access requests according to the order of their received timestamps and sends the detection requests to each detection unit in the order of sorting to achieve load balancing among the detection units. The detection request includes the storage address information of the resource access request corresponding to the detection request in the shared storage space. The detection unit receives the detection request and reads the resource access request from the storage page according to the detection request. An attack detection module is configured to perform attack detection on the resource access request through the detection unit and obtain a detection result, the detection result including offensive requests and non-offensive requests; The request blocking module is configured to block the resource access request corresponding to the detection result when the detection result is an malicious request.
9. A computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the security protection method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the security protection method according to any one of claims 1 to 7 by executing the executable instructions.
11. A computer program product, characterized in that, include: Computer instructions, which are stored in a computer-readable storage medium; The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions to cause the computer device to perform the security protection method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Shared-memory-based method for conducting communication among multiple processes
CN103514053A
Parallel protection method and device for multiple safety services
CN107959682A
Kubernetes-based container number flexible adjustment implementation method and device
CN108769100A
Web application firewall, protection system and access method
CN109587102A
High-speed data query platform based on shared memory
CN111143357A
