Network service identification method and system, electronic equipment and readable storage medium
By obtaining and parsing the key information of non-external link messages on the network card, identifying business categories, and transmitting only the information of specific business messages to the host for processing, it solves the problem of large host CPU resource usage and low service identification efficiency, and realizes resource optimization. Efficient utilization and improvement of identification efficiency.
Patent Information
- Application Number
- CN202310150827.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2024-08-23
AI Technical Summary
In the existing technology, service identification is completely dependent on the host CPU, which results in large CPU resource usage, low resource utilization, low identification efficiency, and increased result return delay.
Obtain the key information of non-external link messages on the network card, perform parsing and rule matching within the network card, identify business categories, and transmit only the key information of specific business messages to the host for further processing, releasing host CPU resources and improving business identification efficiency.
By reading key information of messages and identifying business categories on the network card, the host CPU parsing load is reduced, resource utilization and business identification efficiency are improved, and performance load balancing is achieved.
Smart Images

Figure CN118540237A
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of communication technology, and in particular, to a network service identification method, system, electronic device, and readable storage medium. Background Art
[0002] With the continuous development and evolution of 5G technology, the types of new 4G / 5G services are also increasing. Due to the huge traffic of business data transmitted by Hypertext Transfer Protocol (HTTP) / Hypertext Transfer Protocol over Secure Socket Layer (HTTPS) or Transmission Control Protocol (TCP) / User Datagram Protocol (UDP), and WEB3.0, the business data is complex. Business identification is the core function of the Deep Packet Inspection (DPI) system. The existing network has a huge demand for business identification capabilities. Based on equipment performance considerations, it is unable to carry a large number of business identification requests.
[0003] At present, in traditional network devices, the network card is only responsible for receiving and sending packets. All traffic passing through the network card will be sent to the host's central processing unit (CPU) for processing. The host CPU performs protocol analysis, service identification, and call record generation from 2-3 layers to 4-7 layers on all traffic sent by the network card.
[0004] Since service identification is completely dependent on the host CPU, it will occupy a large amount of CPU resources, resulting in low host resource utilization, low service identification efficiency, and increased delay in transmitting identification results. Summary of the invention
[0005] The embodiments of the present invention provide a network service identification method, system, electronic device and readable storage medium to solve the problem that the existing service identification completely relies on the host CPU, resulting in a large amount of CPU resources being occupied, which further leads to low host resource utilization, low service identification efficiency, and increased delay in transmitting identification results.
[0006] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:
[0007] In a first aspect, an embodiment of the present invention provides a network service identification method, including:
[0008] When the network card receives a non-external link message, it obtains key information corresponding to the non-external link message;
[0009] When the non-external link message is a specific service message, key information of the non-external link message is transmitted to the host, so that the host identifies the target action of the specific service according to the key information.
[0010] Optionally, also include:
[0011] When the network card receives the external link message, the external link message is returned to the exit of the network card for forwarding or discarding.
[0012] Optionally, the acquiring key information corresponding to the non-external link message includes:
[0013] The non-external link message is parsed to obtain key information corresponding to the non-external link message.
[0014] Optionally, after obtaining the key information corresponding to the non-external link message, the step further includes:
[0015] Rule matching is performed on key information of the non-external link message to identify the service category of the non-external link message, and the identification result of the service category is used to determine whether the non-external link message is a specific service message.
[0016] Optionally, also include:
[0017] The key information corresponding to the non-external link message and the business category identification result corresponding to the non-external link message are stored as a record of the non-external link message.
[0018] Optionally, also include:
[0019] If the non-external link message is a non-specific service message, the non-specific service message is transmitted back to the egress of the network card to be forwarded or discarded.
[0020] Optionally, also include:
[0021] The record of the specific service message is transmitted to the host, so that the key information corresponding to the specific service message and the service category identification result corresponding to the specific service message are stored in the host.
[0022] In a second aspect, an embodiment of the present invention provides a network service identification system, including:
[0023] A receiving module, used for obtaining key information corresponding to a non-external link message when the network card receives the non-external link message;
[0024] The identification module is used to transmit key information of the specific business message to the host when the non-external link message is a specific business message, so that the host can identify the target action of the specific business according to the key information.
[0025] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the network service identification method described in the first aspect are implemented.
[0026] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the network service identification method described in the first aspect are implemented.
[0027] In an embodiment of the present invention, key information corresponding to a received non-external link message is obtained on the network card, and the key information of the message is read in the network card. According to business needs, the key information of the specific business message is transmitted to the host, so that the host can identify the target action of the specific business according to the key information, thereby realizing that the host only processes specific businesses with business needs, thereby releasing the host's CPU resources, improving the host resource utilization, and enhancing the business identification efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0029] Figure 1 A schematic diagram of a flow chart of a network service identification method according to an embodiment of the present invention;
[0030] Figure 2 A schematic diagram of the working process of performing network service identification according to an embodiment of the present invention;
[0031] Figure 3 A schematic diagram of a detailed working process of a method for identifying network services according to an embodiment of the present invention;
[0032] Figure 4 A schematic diagram of the working process of the external link identification module according to an embodiment of the present invention;
[0033] Figure 5 A schematic diagram of the information summary format of an embodiment of the present invention;
[0034] Figure 6 This is a schematic diagram of the key information format of an embodiment of the present invention;
[0035] Figure 7 A schematic diagram showing examples of service categories in an embodiment of the present invention;
[0036] Figure 8 A schematic diagram of the structure of a network service identification system according to an embodiment of the present invention;
[0037] Fig. 9 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] Please refer to Figure 1 , an embodiment of the present invention provides a network service identification method, comprising:
[0040] Step 11: When the network card receives a non-external link message, key information corresponding to the non-external link message is obtained;
[0041] Step 12: When the non-external link message is a specific service message, the key information of the non-external link message is transmitted to the host, so that the host identifies the target action of the specific service according to the key information.
[0042] Among them, the target action can also be described as a refined action, that is, the host identifies the refined action of the specific business based on the key information. For example, if WeChat is a specific business, sending red envelopes on WeChat is one of the target actions or refined actions of the specific business of WeChat.
[0043] In an embodiment of the present invention, key information corresponding to a received non-external link message is obtained on the network card, and the key information of the message is read in the network card. According to business needs, the key information of the specific business message is transmitted to the host, so that the host can identify the target action of the specific business according to the key information, thereby realizing that the host only processes specific businesses with business needs, thereby releasing the host's CPU resources, improving the host resource utilization, and enhancing the business identification efficiency.
[0044] In the embodiment of the present invention, optionally, the method further includes:
[0045] When the network card receives the external link message, the external link message is returned to the exit of the network card for forwarding or discarding.
[0046] Please refer to Figure 2 and Figure 3Steps 2 and 3 of this paper implement the filtering of external link messages through the external link identification module deployed on the network card. Please refer to Figure 4 , is a schematic diagram of the working process of the external link identification module of the embodiment of the present invention. The external link identification module loads the external link identification library, uses the pattern matching algorithm to match the information summary of the message received by the network card, filters out the external link message, and returns the non-external link message to the exit of the network card for forwarding or discarding. For the information summary format, please refer to Figure 5 , remove non-business related messages on the network card to free up CPU resources on the host. Figure 4 The external link identification library in is one of the formats. The processing methods of non-external link messages also include mirroring and link removal.
[0047] In the embodiment of the present invention, optionally, the acquiring key information corresponding to the non-external link message includes:
[0048] The non-external link message is parsed to obtain key information corresponding to the non-external link message.
[0049] Please refer to Figure 2 and Figure 3 In step 4, the non-external link message can be sent to the message parsing module deployed on the network card for protocol field parsing to obtain the key information corresponding to the non-external link message. Specifically, the message parsing module uses the message parsing engine deployed on the smart network card system-on-chip (SoC), which is based on the open source pcap4j or jpcap framework to parse the message to obtain the key information. Figure 5 Schematic diagram of the key information format, the key fields include at least one of the following items: source IP, source port, destination IP, destination port, protocol type, window size, payload length and payload information, etc.
[0050] In the embodiment of the present invention, optionally, after obtaining the key information corresponding to the non-external link message, the method further includes:
[0051] Rule matching is performed on key information of the non-external link message to identify the service category of the non-external link message, and the identification result of the service category is used to determine whether the non-external link message is a specific service message.
[0052] Please refer to Figure 2 and Figure 3In step 7, the key information of the non-external link message can be sent to the business identification module deployed on the network card to realize the identification of the business category. Specifically, the business identification module performs business marking through the business identification engine deployed on the smart network card. The identification engine is loaded with the business identification rule library. The identification input is the key information output from the message parsing module. The identification method is to match the field of the rule containing the business category in the key information of the message with the rule field in the business identification rule library. If the corresponding business category is matched, the message is marked as the corresponding category in the table, that is, the business category identification result of the non-external link message is marked in the table.
[0053] Among them, please refer to Figure 7 For example, business categories can be divided into major business categories and minor business categories, where the major business category numbers and minor business category numbers are numbered according to business needs. For example, instant messaging is a major business category, and instant messaging software such as Fetion, QQ, Wangxin, Mi Chat, WeChat, Renren, go SMS, ICQ, Paltalk and TeamSpeak are all minor business categories.
[0054] After obtaining the key information of non-external link messages, business identification and labeling are implemented on the network card, which can further reduce the parsing work of the host CPU and alleviate the load of message identification work on the host.
[0055] In the embodiment of the present invention, optionally, the method further includes:
[0056] The key information corresponding to the non-external link message and the business category identification result corresponding to the non-external link message are stored as a record of the non-external link message.
[0057] Please refer to Figure 2 and Figure 3 In step 5 and step 7, after the non-external link message is parsed in the message parsing module to obtain the key information corresponding to the non-external link message, the key information corresponding to the non-external link message can be written into the information recording module 1 deployed on the network card; the key information of the non-external link message is identified in the service identification module to obtain the service category identification result corresponding to the non-external link message, and similarly, the service category identification result corresponding to the non-external link message can be written into the information recording module 1 deployed on the network card. Therefore, the records stored in the information recording module 1 include: the key information of all non-external link messages and the service category identification results corresponding to all non-external link messages.
[0058] In the embodiment of the present invention, optionally, the method further includes:
[0059] If the non-external link message is a non-specific service message, the non-specific service message is transmitted back to the egress of the network card to be forwarded or discarded.
[0060] Please refer to Figure 2 and Figure 3 In step 6 and step 8, according to the actual business identification requirements, the business identification module is used to filter the specific business messages. Specifically, the required specific business messages are filtered out according to the identification results of the business categories, and the non-specific business is returned to the egress of the network card for forwarding or discarding. The messages related to non-specific business are removed on the network card to release CPU resources on the host.
[0061] In the embodiment of the present invention, optionally, the method further includes:
[0062] The record of the specific service message is transmitted to the host, so that the key information corresponding to the specific service message and the service category identification result corresponding to the specific service message are stored in the host.
[0063] Please refer to Figure 2 and Figure 3 In step 9, further, according to business needs, the relevant records of the current specific business message in the information recording module 1 are synchronized to the information recording module 2 on the host, that is, the key information corresponding to the specific business message and the corresponding business category identification result are stored in the host.
[0064] It is worth noting that, although the key information of the specific service message has been transmitted to the host in step 8, the two transmission requests do not overlap with the purpose of transmitting the record of the specific service message containing the key information corresponding to the specific message to the host. In the embodiment of the present invention, the transmission record is to synchronize the record of the specific service message on the information recording module 1 deployed on the network card to the information recording module 2 deployed on the host, so as to achieve the purpose of synchronizing the data related to the specific service.
[0065] Please refer to Figure 2 and Figure 3 In step 8 and step 10, the key information of the specific service message is further transmitted to the service refinement identification module deployed on the CPU system of the host for refined action identification, and the identification result is transmitted to the information recording module 2. Therefore, the information stored in the information recording module 2 includes: the key information of the specific service message, the service category identification result corresponding to the key information of the specific service, and the target action corresponding to the specific service message.
[0066] Among them, the business refined identification module uses a refined message parsing engine, which supports two methods of refined identification: the first is to obtain the key fields related to the business refined actions in a specific message, and identify the refined actions of the current business through this field; the second is based on a neural network method to collect key information of the specific business message to be identified, perform modeling analysis and output the identification results.
[0067] The embodiment of the present invention can implement external link message filtering, message key information analysis and message service category identification on the network card, reducing the host CPU's load on parsing and filtering messages. According to business needs, the messages on the network card that need further refined identification are transmitted to the host, and refined business identification is performed on the host. The network card and the host are responsible for different processes of business identification, which not only releases the host performance, but also reasonably utilizes the network card processor performance, realizes performance load balancing, and improves business identification accuracy and efficiency.
[0068] Please refer to Figure 8 The present invention also provides a network service identification system 80, comprising:
[0069] The receiving module 81 is used to obtain key information corresponding to the non-external link message when the network card receives the non-external link message;
[0070] The identification module 82 is used to transmit key information of the specific service message to the host when the non-external link message is a specific service message, so that the host can identify the target action of the specific service according to the key information.
[0071] Optionally, the network service identification system 80 further includes:
[0072] The external link identification module is used to return the external link message to the exit of the network card for forwarding or discarding when the network card receives the external link message.
[0073] Optionally, the receiving module 81 includes:
[0074] The message parsing module is used to parse the non-external link message to obtain key information corresponding to the non-external link message.
[0075] Optionally, the network service identification system 80 further includes:
[0076] The first service identification module is used to perform rule matching on key information of the non-external link message to identify the service category of the non-external link message, and the identification result of the service category is used to determine whether the non-external link message is a specific service message.
[0077] Optionally, the network service identification system 80 further includes:
[0078] The information recording module is used to store the key information corresponding to the non-external link message and the business category identification result corresponding to the non-external link message as a record of the non-external link message.
[0079] Optionally, the network service identification system 80 further includes:
[0080] The second service identification module is used to return the non-specific service message to the exit of the network card for forwarding or discarding if the non-external link message is a non-specific service message.
[0081] Optionally, the network service identification system 80 further includes:
[0082] The information synchronization module is used to transmit the record of the specific business message to the host, so as to store the key information corresponding to the specific business message and the business category identification result corresponding to the specific business message in the host.
[0083] The network service identification device provided in the embodiment of the present application can achieve Figures 1 to 7 The various processes implemented by the method embodiment and achieving the same technical effect are not described here to avoid repetition.
[0084] An embodiment of the present invention provides an electronic device 90, see Fig. 9 As shown, Fig. 9 This is a principle block diagram of an electronic device 90 according to an embodiment of the present invention, including a processor 91, a memory 92, and a program or instruction stored in the memory 92 and executable on the processor 91. When the program or instruction is executed by the processor, the steps in any one of the network service identification methods of the present invention are implemented.
[0085] An embodiment of the present invention provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of an embodiment of a network service identification method such as any one of the above-mentioned items is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0086] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0087] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0088] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0089] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a service classification device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0090] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A network service identification method, characterized in that: include: When the network card receives a non-external link message, it obtains key information corresponding to the non-external link message; When the non-external link message is a specific service message, key information of the non-external link message is transmitted to the host, so that the host identifies the target action of the specific service according to the key information.
2. The method according to claim 1, characterized in that Also includes: When the network card receives the external link message, the external link message is returned to the exit of the network card for forwarding or discarding.
3. The method according to claim 1, characterized in that The acquiring of key information corresponding to the non-external link message includes: The non-external link message is parsed to obtain key information corresponding to the non-external link message.
4. The method according to claim 1, characterized in that: After acquiring the key information corresponding to the non-external link message, the following further includes: Rule matching is performed on key information of the non-external link message to identify the service category of the non-external link message, and the identification result of the service category is used to determine whether the non-external link message is a specific service message.
5. The method according to claim 4, characterized in that Also includes: The key information corresponding to the non-external link message and the business category identification result corresponding to the non-external link message are stored as a record of the non-external link message.
6. The method according to claim 4, characterized in that Also includes: If the non-external link message is a non-specific service message, the non-specific service message is transmitted back to the egress of the network card to be forwarded or discarded.
7. The method according to claim 5, characterized in that Also includes: The record of the specific service message is transmitted to the host, so that the key information corresponding to the specific service message and the service category identification result corresponding to the specific service message are stored in the host.
8. A network service identification system, characterized in that: include: A receiving module, used for obtaining key information corresponding to a non-external link message when the network card receives the non-external link message; The identification module is used to transmit key information of the specific business message to the host when the non-external link message is a specific business message, so that the host can identify the target action of the specific business according to the key information.
9. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the network service identification method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: A computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the network service identification method according to any one of claims 1 to 7 are implemented.
