Network attack protection method and system for Internet of Things interaction equipment and storage medium

By implementing connection protection, message processing and regular inspection measures in IoT devices, the shortcomings in IoT network security are solved, and strict management of device connections and data exchange is achieved, effectively defending against network attacks, and system stability is improved and performance.

CN118890186APending Publication Date: 2024-11-01HANGZHOU JUYUAN INTELLIGENT INSTR CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410998689.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

The existing IoT technology has shortcomings in network security, especially in device connection management and abnormal device identification, which makes it difficult to effectively defend against network attacks, resulting in excessive system resource utilization and malicious network activities.

Method used

Provide a network attack protection method for Internet of Things interactive devices, including establishing connection protection, message processing protection and regular inspection protection, actively disconnecting abnormal connections, marking unfiled equipment, recording logs, estimating the maximum number of connections to TCP devices, etc. Measures to optimize system resource utilization and secure communication.

Benefits of technology

It significantly improves system stability, security and network performance, reduces the risk of service interruption, and improves user experience and system management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118890186A_ABST
    Figure CN118890186A_ABST
Patent Text Reader

Abstract

The invention discloses a network attack protection method and system for Internet of Things interaction equipment and a storage medium, and the method comprises the steps: starting connection protection, which specifically comprises the steps of establishing connection protection and releasing connection protection; and performing message processing protection, which specifically comprises message analysis, marking of non-filing and message storage. And regular inspection and protection, specifically including regular inspection of the growth amount and the inventory and estimation of the maximum TCP device connection number. The method focuses on enhancing security interaction between devices and preventing network attacks, effectively solves multiple problems of excessive occupation of system resources, invalid data packet transmission, malicious network activities and the like in traditional device connection, optimizes system resource utilization, ensures security communication between the devices, and improves the security of the devices. Therefore, the system stability, the security, the overall network performance and the user experience are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and more specifically, to a network attack protection method, system and storage medium for Internet of Things interactive devices. Background Art

[0002] In the field of computers and the Internet of Things, network security has always been a key issue. Faced with the increasing number of cyber attacks, taking effective measures to protect systems from malicious attacks has become an urgent need. Traditional security strategies, such as setting IP whitelists, limiting the number of connection requests from the same IP, and implementing traffic control, are widely used, but still face challenges.

[0003] In response to this problem, several implementation plans based on IoT technology have been proposed, including power metering data collection systems and smart city service systems. These solutions demonstrate the potential of IoT technology in their application areas. However, they still have shortcomings in ensuring network security: the power metering data collection system mainly focuses on data collection rather than strengthening security, and may be difficult to resist network attacks; and the smart city service system, although making full use of IoT technology, may not fully consider the unique needs of the front-end communication system, such as device connection management and identification of abnormal devices.

[0004] The limitation of these existing solutions is that they do not provide a comprehensive security solution strategy for the front-end communication system, especially the needs in device connection management and abnormal device identification are not fully met. Therefore, these solutions have certain limitations in defending against network attacks and ensuring system stability. Summary of the invention

[0005] The purpose of the present invention is to provide a network attack protection method, system and storage medium for IoT interactive devices, focusing on enhancing secure interaction between devices and preventing network attacks, effectively solving multiple problems existing in traditional device connections such as excessive occupation of system resources, invalid data packet sending and malicious network activities, optimizing system resource utilization, and ensuring secure communication between devices, thereby significantly improving system stability, security and overall network performance and user experience.

[0006] A first aspect of the present invention provides a network attack protection method for an Internet of Things interactive device, comprising the following steps:

[0007] Starting connection protection, which specifically includes establishing connection protection and releasing connection protection; and

[0008] Message processing protection, including message parsing, marking as unarchived, and message storage; and

[0009] Check protection regularly, including regularly checking the growth and retention volume and the estimation of the maximum number of TCP device connections.

[0010] In this solution, the establishment of connection protection specifically includes:

[0011] Check whether the current IoT interactive device is connected to the network, wherein:

[0012] If not connected, no processing will be done;

[0013] If connected, the established connection is actively disconnected, and the number of device connections in the current cache is checked to determine whether the number of device connections will exceed the device connection number threshold after adding one. If it exceeds, the earliest connection in the time domain is disconnected; then the connection is re-established, the connection information is recorded in the cache, and the number of device connections is updated synchronously.

[0014] In this solution, the connection release protection specifically includes: when the connection is released, clearing the designated channel information in the cache, and updating the device connection number after subtracting one.

[0015] In this solution, the message processing protection specifically includes:

[0016] After receiving the message, it is parsed based on the port protocol. If the message is invalid, the connection is actively disconnected.

[0017] If the message is valid, check whether it is marked as unarchived based on the resolved device address, wherein if it is marked, the current message is discarded; if it is not marked, the mark is recorded and the current information is discarded; and

[0018] The parsed valid messages of the abnormal device are stored in the target log file in the specified directory for preservation.

[0019] In this solution, for the devices that have been archived, check whether the number of messages in the current time period in the cache exceeds the message number threshold. If it exceeds, only logs are recorded and the freezing time buffer period is entered. If it does not exceed, the number of messages is increased by one and stored in the cache.

[0020] In this plan, the regular inspection and protection specifically include:

[0021] Regularly check the growth and retention. When the preset level is exceeded, disconnect the connections that have not been archived, and disconnect the connections of the earliest batches in order of the creation time of the archived data; and

[0022] Estimate the maximum number of TCP device connections, where the calculation formula is as follows:

[0023] N max ≈(C a / Cu )*C max / (N*A);

[0024] Among them, N max is the maximum number of TCP connections, C a is the available memory, C u Memory occupied for a single connection, C max is the maximum heap memory of the JVM, N is the number of threads, and A is the thread stack size.

[0025] A second aspect of the present invention further provides a network attack protection system for an Internet of Things interactive device, comprising a memory and a processor, wherein the memory comprises a network attack protection method program for the Internet of Things interactive device, and when the network attack protection method program for the Internet of Things interactive device is executed by the processor, the following steps are implemented:

[0026] Starting connection protection, which specifically includes establishing connection protection and releasing connection protection; and

[0027] Message processing protection, including message parsing, marking as unarchived, and message storage; and

[0028] Check protection regularly, including regularly checking the growth and retention volume and the estimation of the maximum number of TCP device connections.

[0029] In this solution, the establishment of connection protection specifically includes:

[0030] Check whether the current IoT interactive device is connected to the network, wherein:

[0031] If not connected, no processing will be done;

[0032] If connected, the established connection is actively disconnected, and the number of device connections in the current cache is checked to determine whether the number of device connections will exceed the device connection number threshold after adding one. If it exceeds, the earliest connection in the time domain is disconnected; then the connection is re-established, the connection information is recorded in the cache, and the number of device connections is updated synchronously.

[0033] In this solution, the connection release protection specifically includes: when the connection is released, clearing the designated channel information in the cache, and updating the device connection number after subtracting one.

[0034] In this solution, the message processing protection specifically includes:

[0035] After receiving the message, it is parsed based on the port protocol. If the message is invalid, the connection is actively disconnected.

[0036] If the message is valid, check whether it is marked as unarchived based on the resolved device address, wherein if it is marked, the current message is discarded; if it is not marked, the mark is recorded and the current information is discarded; and

[0037] The parsed valid messages of the abnormal device are stored in the target log file in the specified directory for preservation.

[0038] In this solution, for the devices that have been archived, check whether the number of messages in the current time period in the cache exceeds the message number threshold. If it exceeds, only logs are recorded and the freezing time buffer period is entered. If it does not exceed, the number of messages is increased by one and stored in the cache.

[0039] In this plan, the regular inspection and protection specifically include:

[0040] Regularly check the growth and retention. When the preset level is exceeded, disconnect the connections that have not been archived, and disconnect the connections of the earliest batches in order of the creation time of the archived data; and

[0041] Estimate the maximum number of TCP device connections, where the calculation formula is as follows:

[0042] N max ≈(C a / C u )*C max / (N*A);

[0043] Among them, N max is the maximum number of TCP connections, C a is the available memory, C u Memory occupied for a single connection, C max is the maximum heap memory of the JVM, N is the number of threads, and A is the thread stack size.

[0044] The third aspect of the present invention provides a computer-readable storage medium, which includes a network attack protection method program for an Internet of Things interactive device of a machine. When the network attack protection method program for the Internet of Things interactive device is executed by a processor, the steps of the network attack protection method for an Internet of Things interactive device as described in any one of the above items are implemented.

[0045] The present invention discloses a network attack protection method, system and storage medium for an Internet of Things interactive device, which focus on enhancing the secure interaction between devices and preventing network attacks, effectively solving multiple problems existing in traditional device connections, such as excessive occupation of system resources, invalid data packet sending and malicious network activities, optimizing system resource utilization, and ensuring secure communication between devices, thereby significantly improving system stability, security, overall network performance and user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A flow chart showing a network attack protection method for an Internet of Things interactive device of the present invention is shown;

[0047] Figure 2 A flowchart of establishing connection protection of a network attack protection method for an Internet of Things interactive device of the present invention is shown;

[0048] Figure 3 A flowchart of releasing a connection of a network attack protection method for an Internet of Things interactive device of the present invention is shown;

[0049] Figure 4 A flowchart of message processing protection of a network attack protection method for an Internet of Things interactive device of the present invention is shown;

[0050] Figure 5 A block diagram of a network attack protection system for an Internet of Things interactive device of the present invention is shown. DETAILED DESCRIPTION

[0051] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0052] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0053] In view of the obvious defects of the existing technology in network security, such as the limitations exposed by traditional methods such as relying only on IP whitelists, limiting the number of connections to the same IP, and flow control, the present invention proposes a series of innovative measures to comprehensively enhance the security and stability of the Internet of Things communication system. These measures include platform file checking of devices, limiting devices to only a single connection to the platform, verifying the protocol compliance of the device sending data packets, and actively disconnecting abnormal device connections. Through these improvements, the present invention achieves the following advantages and practical effects: (1) Improving system security: By strictly managing device connections and data exchange, the present invention effectively prevents malicious attacks and significantly improves the security of the system. (2) Optimizing system resource utilization: By limiting the number of device connections and actively disconnecting abnormal connections, the present invention optimizes the utilization of system resources and improves the overall performance of the system. (3) Facilitating system management and analysis: By recording and storing abnormal device information in a specified directory, the present invention simplifies the subsequent analysis and processing process and improves the efficiency of system management. (4) Enhancing system stability: Through effective device connection management and data verification measures, the present invention ensures the stable operation of the system and reduces the risk of service interruption due to abnormal situations.

[0054] In summary, the improvement measures of the present invention effectively make up for the deficiencies in the prior art, provide a more comprehensive and efficient network security solution for the IoT communication environment, and achieve higher security and stability.

[0055] Specifically, Figure 1 A flow chart of a network attack protection method for an Internet of Things interactive device of the present application is shown.

[0056] like Figure 1 As shown, the present application discloses a network attack protection method for an IoT interactive device, comprising the following steps:

[0057] S102, starting connection protection, which specifically includes establishing connection protection and releasing connection protection;

[0058] S104, message processing protection, which specifically includes message parsing, marking as unarchived, and message storage;

[0059] S106, regularly checking protection, which specifically includes regularly checking the growth amount and the retention amount and estimating the maximum number of TCP device connections.

[0060] It should be noted that, in this embodiment, connection protection includes connection establishment protection and connection release protection, wherein connection establishment protection includes re-establishing the connection, and connection release protection includes clearing the specified channel information and reducing the number of device connections by one, as well as message processing protection, wherein specifically includes message parsing, marking as unarchived, and message preservation. Specifically, message parsing needs to be performed based on the corresponding port protocol, and marking as unarchived corresponds to checking whether the message from which the device address is parsed is marked as unarchived in the cache. Accordingly, message preservation corresponds to storing the parsed valid message of the abnormal device in the target log file under the specified directory for preservation. Finally, periodic inspection protection is also included, wherein specifically includes periodic inspection of the growth amount and the retention amount and the estimation of the maximum number of TCP device connections. Accordingly, the growth amount and the retention amount are for disconnecting some connections, and the estimation of the maximum number of TCP device connections is for calculating the device connection number threshold.

[0061] According to an embodiment of the present invention, establishing connection protection specifically includes:

[0062] Check whether the current IoT interactive device is connected to the network, wherein:

[0063] If not connected, no processing will be done;

[0064] If connected, the established connection is actively disconnected, and the number of device connections in the current cache is checked to determine whether the number of device connections will exceed the device connection number threshold after adding one. If it exceeds, the earliest connection in the time domain is disconnected; then the connection is re-established, the connection information is recorded in the cache, and the number of device connections is updated synchronously.

[0065] It should be noted that, in this embodiment, Figure 2 As shown, it is a flowchart for establishing connection protection, in which it first checks whether the device is connected. If it is connected, it will actively disconnect the established connection, and then check whether the number of connections in the cache plus "1" exceeds the device connection number threshold. If it exceeds, it will find the connection with the earliest message received time and disconnect the connection. Then, re-establish the connection, record the connection information in the cache, and synchronously update the device connection number to the cache.

[0066] According to an embodiment of the present invention, the connection release protection specifically includes: when the connection is released, clearing the designated channel information in the cache, and updating the device connection number after performing a decrement operation.

[0067] It should be noted that, in this embodiment, Figure 3 As shown, it is a flow chart of releasing the connection, wherein, when releasing the connection protection, specifically when the connection is released, the designated channel information is cleared in the cache, and the number of device connections is updated after being subtracted by one.

[0068] According to an embodiment of the present invention, the message processing protection specifically includes:

[0069] After receiving the message, it is parsed based on the port protocol. If the message is invalid, the connection is actively disconnected.

[0070] If the message is valid, check whether it is marked as unarchived based on the resolved device address, wherein if it is marked, the current message is discarded; if it is not marked, the mark is recorded and the current information is discarded; and

[0071] The parsed valid messages of the abnormal device are stored in the target log file in the specified directory for preservation.

[0072] It should be noted that, in this embodiment, Figure 4 As shown, it is a flowchart of message processing protection, in which, after receiving the message, it is parsed according to the corresponding protocol of the TCP port agreed upon by the platform, and the message is checked to see if it is valid. If not, the connection is actively disconnected. If valid, the device address is parsed, and it is checked whether the cache is marked as unarchived (the validity period of this information is "5" minutes). If there is a mark, the message is discarded and not processed; if there is no mark, the mark is recorded and the message is discarded to complete the mark as unarchived, and the message of the abnormal device will be saved in the device log file under the specified directory.

[0073] According to an embodiment of the present invention, for a device that has been archived, it is checked whether the number of messages in the current time period in the cache exceeds the message number threshold. If it exceeds, only logs are recorded and the freezing time buffer period is entered; if it does not exceed, the number of messages is increased by one and stored in the cache.

[0074] It should be noted that, in this embodiment, the target time period includes "1" minute or "3" minutes. For the archived device, check whether the number of messages received in the cache in the last "1" minute (or "3" minutes) exceeds the message number threshold. If exceeded, only logs are recorded without subsequent processing, and a freezing time buffer period (specifically a "5" minute freezing period) is entered. During this period, no messages sent are processed to reduce the system load. If not exceeded, the number of messages is added to "1" and stored in the cache.

[0075] According to an embodiment of the present invention, the periodic inspection and protection specifically includes:

[0076] Regularly check the growth and retention. When the preset level is exceeded, disconnect the connections that have not been archived, and disconnect the connections of the earliest batches in order of the creation time of the archived data; and

[0077] Estimate the maximum number of TCP device connections, where the calculation formula is as follows:

[0078] N max ≈(C a / C u )*C max / (N*A);

[0079] Among them, N max is the maximum number of TCP connections, C a is the available memory, C u Memory occupied for a single connection, C max is the maximum heap memory of the JVM, N is the number of threads, and A is the thread stack size.

[0080] It should be noted that, in this embodiment, the method further includes regularly checking the growth amount and the retention amount. When the threshold is exceeded, the unarchived connection will be actively disconnected, and the message and the device abnormality (frequent message sending) connection will be sent, and the oldest part will be disconnected in batches in the order of establishment time, corresponding to the earliest batch of connections, and the maximum number of TCP device connections will be estimated as the connection number threshold, wherein the threshold involves multiple factors, including hardware configuration, operating system restrictions, JVM parameter settings, and Netty characteristics, etc. The specific estimated calculation formula is as follows:

[0081] N max ≈(C a / C u )*C max / (N*A);

[0082] Among them, N max is the maximum number of TCP connections, C a is the available memory, C u Memory occupied for a single connection, C max is the maximum heap memory of the JVM, N is the number of threads, and A is the thread stack size. Specifically, available memory refers to the total amount of memory available to the server. The memory occupied by a single connection is the approximate amount of memory used by each TCP connection in the Java program, including connection objects, buffers, threads, etc. The maximum heap memory of the JVM is set by the Java virtual machine parameters (such as -Xmx), which specifically limits the heap memory size of the Java program. The number of threads when the front-end communication Java program is running specifically includes the threads that process the connection and other threads. Furthermore, the thread stack size is the memory size occupied by each thread stack, which can be set by the Java virtual machine parameters (such as -Xss). The default value is usually tens of KB.

[0083] Figure 5 A block diagram of a network attack protection system for an Internet of Things interactive device of the present invention is shown.

[0084] like Figure 2As shown, the present invention discloses a network attack protection system for an Internet of Things interactive device, including a memory and a processor, wherein the memory includes a network attack protection method program for the Internet of Things interactive device, and when the network attack protection method program for the Internet of Things interactive device is executed by the processor, the following steps are implemented:

[0085] Starting connection protection, which specifically includes establishing connection protection and releasing connection protection; and

[0086] Message processing protection, including message parsing, marking as unarchived, and message storage; and

[0087] Check protection regularly, including regularly checking the growth and retention volume and the estimation of the maximum number of TCP device connections.

[0088] It should be noted that, in this embodiment, connection protection includes connection establishment protection and connection release protection, wherein connection establishment protection includes re-establishing the connection, and connection release protection includes clearing the specified channel information and reducing the number of device connections by one, as well as message processing protection, wherein specifically includes message parsing, marking as unarchived, and message preservation. Specifically, message parsing needs to be performed based on the corresponding port protocol, and marking as unarchived corresponds to checking whether the message from which the device address is parsed is marked as unarchived in the cache. Accordingly, message preservation corresponds to storing the parsed valid message of the abnormal device in the target log file under the specified directory for preservation. Finally, periodic inspection protection is also included, wherein specifically includes periodic inspection of the growth amount and the retention amount and the estimation of the maximum number of TCP device connections. Accordingly, the growth amount and the retention amount are for disconnecting some connections, and the estimation of the maximum number of TCP device connections is for calculating the device connection number threshold.

[0089] According to an embodiment of the present invention, establishing connection protection specifically includes:

[0090] Check whether the current IoT interactive device is connected to the network, wherein:

[0091] If not connected, no processing will be done;

[0092] If connected, the established connection is actively disconnected, and the number of device connections in the current cache is checked to determine whether the number of device connections will exceed the device connection number threshold after adding one. If it exceeds, the earliest connection in the time domain is disconnected; then the connection is re-established, the connection information is recorded in the cache, and the number of device connections is updated synchronously.

[0093] It should be noted that, in this embodiment, Figure 2As shown, it is a flowchart for establishing connection protection, in which it first checks whether the device is connected. If it is connected, it will actively disconnect the established connection, and then check whether the number of connections in the cache plus "1" exceeds the device connection number threshold. If it exceeds, it will find the connection with the earliest message received time and disconnect the connection. Then, re-establish the connection, record the connection information in the cache, and synchronously update the device connection number to the cache.

[0094] According to an embodiment of the present invention, the connection release protection specifically includes: when the connection is released, clearing the designated channel information in the cache, and updating the device connection number after performing a decrement operation.

[0095] It should be noted that, in this embodiment, Figure 3 As shown, it is a flow chart of releasing the connection, wherein, when releasing the connection protection, specifically when the connection is released, the designated channel information is cleared in the cache, and the number of device connections is updated after being subtracted by one.

[0096] According to an embodiment of the present invention, the message processing protection specifically includes:

[0097] After receiving the message, it is parsed based on the port protocol. If the message is invalid, the connection is actively disconnected.

[0098] If the message is valid, check whether it is marked as unarchived based on the resolved device address, wherein if it is marked, the current message is discarded; if it is not marked, the mark is recorded and the current information is discarded; and

[0099] The parsed valid messages of the abnormal device are stored in the target log file in the specified directory for preservation.

[0100] It should be noted that, in this embodiment, Figure 4 As shown, it is a flowchart of message processing protection, in which, after receiving the message, it is parsed according to the corresponding protocol of the TCP port agreed upon by the platform, and the message is checked to see if it is valid. If not, the connection is actively disconnected. If valid, the device address is parsed, and it is checked whether the cache is marked as unarchived (the validity period of this information is "5" minutes). If there is a mark, the message is discarded and not processed; if there is no mark, the mark is recorded and the message is discarded to complete the mark as unarchived, and the message of the abnormal device will be saved in the device log file under the specified directory.

[0101] According to an embodiment of the present invention, for a device that has been archived, it is checked whether the number of messages in the current time period in the cache exceeds the message number threshold. If it exceeds, only logs are recorded and the freezing time buffer period is entered; if it does not exceed, the number of messages is increased by one and stored in the cache.

[0102] It should be noted that, in this embodiment, the target time period includes "1" minute or "3" minutes. For the archived device, check whether the number of messages received in the cache in the last "1" minute (or "3" minutes) exceeds the message number threshold. If exceeded, only logs are recorded without subsequent processing, and a freezing time buffer period (specifically a "5" minute freezing period) is entered. During this period, no messages sent are processed to reduce the system load. If not exceeded, the number of messages is added to "1" and stored in the cache.

[0103] According to an embodiment of the present invention, the periodic inspection and protection specifically includes:

[0104] Regularly check the growth and retention. When the preset level is exceeded, disconnect the connections that have not been archived, and disconnect the connections of the earliest batches in order of the creation time of the archived data; and

[0105] Estimate the maximum number of TCP device connections, where the calculation formula is as follows:

[0106] N max ≈(C a / C u )*C max / (N*A);

[0107] Among them, N max is the maximum number of TCP connections, C a is the available memory, C u Memory occupied for a single connection, C max is the maximum heap memory of the JVM, N is the number of threads, and A is the thread stack size.

[0108] It should be noted that, in this embodiment, the method further includes regularly checking the growth amount and the retention amount. When the threshold is exceeded, the unarchived connection will be actively disconnected, and the message and the device abnormality (frequent message sending) connection will be sent, and the oldest part will be disconnected in batches in the order of establishment time, corresponding to the earliest batch of connections, and the maximum number of TCP device connections will be estimated as the connection number threshold, wherein the threshold involves multiple factors, including hardware configuration, operating system restrictions, JVM parameter settings, and Netty characteristics, etc. The specific estimated calculation formula is as follows:

[0109] N max ≈(C a / C u )*C max / (N*A);

[0110] Among them, N max is the maximum number of TCP connections, C a is the available memory, C u Memory occupied for a single connection, C maxis the maximum heap memory of the JVM, N is the number of threads, and A is the thread stack size. Specifically, available memory refers to the total amount of memory available to the server. The memory occupied by a single connection is the approximate amount of memory used by each TCP connection in the Java program, including connection objects, buffers, threads, etc. The maximum heap memory of the JVM is set by the Java virtual machine parameters (such as -Xmx), which specifically limits the heap memory size of the Java program. The number of threads when the front-end communication Java program is running specifically includes the threads that process the connection and other threads. Furthermore, the thread stack size is the memory size occupied by each thread stack, which can be set by the Java virtual machine parameters (such as -Xss). The default value is usually tens of KB.

[0111] The third aspect of the present invention provides a computer-readable storage medium, which includes a network attack protection method program for an Internet of Things interactive device. When the network attack protection method program for the Internet of Things interactive device is executed by a processor, the steps of a network attack protection method for an Internet of Things interactive device as described in any one of the above items are implemented.

[0112] The present invention discloses a network attack protection method, system and storage medium for an Internet of Things interactive device, which focus on enhancing the secure interaction between devices and preventing network attacks, effectively solving multiple problems existing in traditional device connections, such as excessive occupation of system resources, invalid data packet sending and malicious network activities, optimizing system resource utilization, and ensuring secure communication between devices, thereby significantly improving system stability, security, overall network performance and user experience.

[0113] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0114] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0115] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0116] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks or optical disks, and other media that can store program codes.

[0117] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

Claims

1. A network attack protection method for an Internet of Things interactive device, characterized in that: The following steps are involved: Starting connection protection, which specifically includes establishing connection protection and releasing connection protection; and Message processing protection, including message parsing, marking as unarchived, and message storage; and Check protection regularly, including regularly checking the growth and retention volume and the estimation of the maximum number of TCP device connections.

2. A network attack protection method for an Internet of Things interactive device according to claim 1, characterized in that: The establishment of connection protection specifically includes: Check whether the current IoT interactive device is connected to the network, wherein: If not connected, no processing will be done; If connected, the established connection is actively disconnected, and the number of device connections in the current cache is checked to determine whether the number of device connections will exceed the device connection number threshold after adding one. If it exceeds, the earliest connection in the time domain is disconnected; then the connection is re-established, the connection information is recorded in the cache, and the number of device connections is updated synchronously.

3. A network attack protection method for an Internet of Things interactive device according to claim 2, characterized in that: The connection release protection specifically includes: when the connection is released, clearing the designated channel information in the cache, and updating the device connection number after decrementing it by one.

4. A network attack protection method for an Internet of Things interactive device according to claim 3, characterized in that: The message processing protection specifically includes: After receiving the message, it is parsed based on the port protocol. If the message is invalid, the connection is actively disconnected. If the message is valid, check whether it is marked as unarchived based on the resolved device address, wherein if it is marked, the current message is discarded; if it is not marked, the mark is recorded and the current information is discarded; and The parsed valid messages of the abnormal device are stored in the target log file in the specified directory for preservation.

5. A network attack protection method for an Internet of Things interactive device according to claim 4, characterized in that: For the devices that have been archived, check whether the number of messages in the current time period in the cache exceeds the message number threshold. If it exceeds, only logs are recorded and the freezing time buffer period is entered. If it does not exceed, the number of messages is increased by one and stored in the cache.

6. A network attack protection method for an Internet of Things interactive device according to claim 5, characterized in that: The periodic inspection and protection specifically include: Regularly check the growth and retention. When the preset level is exceeded, disconnect the connections that have not been archived, and disconnect the connections of the earliest batches in order of the creation time of the archived data; and Estimate the maximum number of TCP device connections, where the calculation formula is as follows: N max ≈(C a / C u )*C max / (N*A); Among them, N max is the maximum number of TCP connections, C a is the available memory, C u Memory occupied for a single connection, C max is the maximum heap memory of the JVM, N is the number of threads, and A is the thread stack size.

7. A network attack protection system for an Internet of Things interactive device, characterized in that: The invention comprises a memory and a processor, wherein the memory comprises a network attack protection method program of an Internet of Things interactive device, and when the network attack protection method program of the Internet of Things interactive device is executed by the processor, the following steps are implemented: Starting connection protection, which specifically includes establishing connection protection and releasing connection protection; and Message processing protection, including message parsing, marking as unarchived, and message storage; and Check protection regularly, including regularly checking the growth and retention volume and the estimation of the maximum number of TCP device connections.

8. A network attack protection system for an Internet of Things interactive device according to claim 7, characterized in that: The establishment of connection protection specifically includes: Check whether the current IoT interactive device is connected to the network, wherein: If not connected, no processing will be done; If connected, the established connection is actively disconnected, and the number of device connections in the current cache is checked to determine whether the number of device connections will exceed the device connection number threshold after adding one. If it exceeds, the earliest connection in the time domain is disconnected; then the connection is re-established, the connection information is recorded in the cache, and the number of device connections is updated synchronously.

9. A network attack protection system for an Internet of Things interactive device according to claim 8, characterized in that: The connection release protection specifically includes: when the connection is released, clearing the designated channel information in the cache, and updating the device connection number after decrementing it by one.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a network attack protection method program for an Internet of Things interactive device. When the network attack protection method program for the Internet of Things interactive device is executed by a processor, the steps of a network attack protection method for an Internet of Things interactive device as described in any one of claims 1 to 6 are implemented.