Data packet processing method and device, storage medium and electronic equipment

By mirroring and processing data packets in the cloud local hosting system, the problem of low data security during data packet processing between the cloud local hosting system and the public cloud is solved, local interception and processing of data is realized, and the requirements are met Customer demand for data security and local residency.

CN118590345APending Publication Date: 2024-09-03TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202310216146.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-01
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In the existing technology, during the processing of data packets between the cloud local hosting system and the public cloud, data security is low and cannot meet the customer's demand for data to reside locally.

Method used

By mirroring the transmitted data packets in the cloud local hosting system and transmitting them to the target service for processing, local interception and processing of the data packets is realized to ensure that the data is saved locally.

Benefits of technology

It improves data security during data packet processing, meets customers' needs for data to reside locally, and realizes all-round processing and traceability of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590345A
    Figure CN118590345A
Patent Text Reader

Abstract

The invention discloses a data packet processing method and device, a storage medium and electronic equipment. The method comprises the following steps: mirroring a first data packet transmitted by a first virtual private network (VPN) gateway in a cloud local hosting system to obtain a second data packet, the second data packet being the same as the first data packet, the first VPN gateway being connected with a second VPN gateway in a cloud management and control system through a public network, and the second VPN gateway being connected with the second VPN gateway through a public network; the first data packet is a data packet transmitted between the first VPN gateway and the second VPN gateway; transmitting the second data packet to a target service in the cloud local hosting system; and processing the second data packet through the target service to obtain service information of a target service corresponding to the second data packet. According to the method and the device, the technical problem of relatively low data security in a data packet processing process in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data packet processing method and device, a storage medium, and an electronic device. Background Art

[0002] In order to meet users' business needs for data security, low latency, etc., the public cloud's computing, storage, network and other resource facilities are usually deployed in the user's local computer room in the form of hardware and software integration (i.e., cloud-based hosting system). The cloud-based hosting system and the public cloud (cloud-based management and control system) use VPN to achieve interactive data transmission.

[0003] In the related technology, in order to process the interactive data between the cloud-based hosting system and the public cloud, for example, to audit the transmitted data packets (which can also be understood as control traffic), the audit service module is usually deployed in the cloud center area of ​​the cloud control system, and the data packets are intercepted, processed and saved in the cloud center area, thereby meeting the user's requirements for auditing the control traffic.

[0004] However, using the traffic auditing method in the relevant technology, the process of auditing the control traffic (data packets) is all completed in the cloud control system of the public cloud, which cannot meet the needs of customer data to reside locally, reduces the security of data packet processing, and thus causes technical problems of low data security during data packet processing.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The embodiments of the present application provide a data packet processing method and device, a storage medium, and an electronic device to at least solve the technical problem of low data security that occurs during data packet processing.

[0007] According to one aspect of an embodiment of the present application, a data packet processing method is provided, including: mirroring a first data packet transmitted by a first virtual private network VPN gateway in a cloud-native hosting system to obtain a second data packet, wherein the second data packet is the same as the first data packet, the first VPN gateway is connected to a second VPN gateway in a cloud-native management and control system via a public network, and the first data packet is a data packet transmitted between the first VPN gateway and the second VPN gateway; transmitting the second data packet to a target service in the cloud-native hosting system; processing the second data packet through the target service to obtain business information of a target business corresponding to the second data packet.

[0008] Optionally, the above-mentioned transmission of the second data packet to the target service in the cloud local hosting system includes: encapsulating the second data packet into a message of the target transport layer protocol to obtain a target message, wherein the second data packet is a network layer data packet, the second data packet includes network layer data, transport layer data and application layer data, and the data carried in the target message includes the second data packet; transmitting the target message to the target service.

[0009] Optionally, the above-mentioned encapsulating the second data packet into a message of the target transport layer protocol to obtain the target message includes: encapsulating the second data packet into a user datagram protocol UDP message to obtain the target message, wherein the target message includes an IP header, a UDP header and the second data packet; or encapsulating the second data packet into a transmission control protocol TCP message to obtain the target message, wherein the target message includes an IP header, a TCP header and the second data packet.

[0010] Optionally, the above-mentioned processing of the second data packet through the target service to obtain business information of the target business corresponding to the second data packet includes: extracting the second data packet from the target message through the target service, and obtaining network layer data, transport layer data and application layer data in the second data packet; processing the network layer data, transport layer data and application layer data to obtain business information of the target business.

[0011] Optionally, the above-mentioned processing of network layer data, transport layer data and application layer data to obtain business information of the target business includes: encapsulating the network layer data, transport layer data and application layer data according to the target application layer protocol; when the network layer data, transport layer data and application layer data are successfully encapsulated according to the target application layer protocol, obtaining data on the target field in the message of the target application layer protocol to obtain target business data, wherein the message of the target application layer protocol is a message obtained by successfully encapsulating the network layer data, transport layer data and application layer data according to the target application layer protocol; determining the business information of the target business according to the target business data.

[0012] Optionally, the above-mentioned encapsulation of network layer data, transport layer data and application layer data according to the target application layer protocol includes: encapsulating the network layer data, transport layer data and application layer data according to the request message format of the Hypertext Transfer Protocol HTTP; when the network layer data, transport layer data and application layer data are successfully encapsulated according to the target application layer protocol, obtaining data on the target field in the message of the target application layer protocol to obtain target business data, including: when the network layer data, transport layer data and application layer data are successfully encapsulated according to the request message format of HTTP, obtaining data on the body field and the data field in the first message of HTTP to obtain the target business data, wherein the first message is the message obtained by successfully encapsulating the network layer data, transport layer data and application layer data according to the request message format of HTTP.

[0013] Optionally, the above-mentioned encapsulation of network layer data, transport layer data and application layer data according to the target application layer protocol includes: encapsulating the network layer data, transport layer data and application layer data according to the HTTP response message format; when the network layer data, transport layer data and application layer data are successfully encapsulated according to the target application layer protocol, obtaining data on the target field in the message of the target application layer protocol to obtain target business data, including: when the network layer data, transport layer data and application layer data are successfully encapsulated according to the HTTP response message format, obtaining data on the data field in the second HTTP message to obtain the target business data, wherein the second message is a message obtained by successfully encapsulating the network layer data, transport layer data and application layer data according to the HTTP response message format.

[0014] Optionally, the above-mentioned encapsulation of network layer data, transport layer data and application layer data according to the target application layer protocol includes: when the data on the type field in the transport layer data indicates that the transport layer protocol type is TCP, the network layer data, transport layer data and application layer data are encapsulated according to the target application layer protocol.

[0015] Optionally, the above-mentioned processing of network layer data, transport layer data and application layer data to obtain business information of the target business also includes: in the case where encapsulation of network layer data, transport layer data and application layer data according to the target application layer protocol fails, encapsulating the network layer data, transport layer data and application layer data according to the request message format of the transmission control protocol TCP; obtaining data on the data field in the third message of TCP to obtain the target business data, wherein the third message is a message obtained by successfully encapsulating the network layer data, transport layer data and application layer data according to the request message format of TCP; or, in the case where the data on the type field in the transport layer data indicates that the transport layer protocol type is UDP, encapsulating the network layer data, transport layer data and application layer data according to the request message format of the full-duplex communication protocol UDP; obtaining data on the data field in the fourth message of UDP to obtain the target business data, wherein the fourth message is a message obtained by successfully encapsulating the network layer data, transport layer data and application layer data according to the request message format of UDP; determining the business information of the target business according to the target business data.

[0016] Optionally, the above-mentioned determining the business information of the target business based on the target business data includes: obtaining the IP address and port number corresponding to the target business from the target business data; searching for the business module identifier corresponding to the IP address and port number, wherein the business module identifier is used to identify the business module to which the target business belongs; searching for the business operation identifier in the target business data according to the business module identified by the business module identifier, wherein the business operation identifier is used to identify the corresponding operation under the business module; and determining the information in the business information of the target business based on the business module identifier and the business operation identifier.

[0017] Optionally, the above method also includes: when the business information of the target business includes sensitive data, desensitizing the sensitive data in the business information of the target business to obtain business desensitized information, and storing the business desensitized information in the cloud local hosting system; or when the business information of the target business does not include sensitive data, storing the business information of the target business in the cloud local hosting system; or storing the business information of the target business in the cloud local hosting system.

[0018] Optionally, the transmitting the target message to the target service includes: transmitting the target message to the target service through an intranet of the cloud local hosting system.

[0019] Optionally, the method further includes: packaging the business information of the target business in a format required for page display.

[0020] According to another aspect of an embodiment of the present application, a data packet processing device is also provided, including: a first processing unit, used to mirror a first data packet transmitted by a first virtual private network VPN gateway in a cloud-native hosting system to obtain a second data packet, wherein the second data packet is the same as the first data packet, the first VPN gateway is connected to the second VPN gateway in the cloud-native management and control system via a public network, and the first data packet is a data packet transmitted between the first VPN gateway and the second VPN gateway; a transmission unit, used to transmit the second data packet to a target service in the cloud-native hosting system; a second processing unit, used to process the second data packet through the target service to obtain business information of the target business corresponding to the second data packet.

[0021] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned data packet processing method when running.

[0022] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0023] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the data packet processing method through the computer program.

[0024] Through the above-mentioned embodiments provided by the present application, in the cloud local hosting system, by mirroring the first data transmitted by the first gateway, a second data packet is obtained, and the second data packet is transmitted to the target service in the cloud local hosting system, and finally the second data packet is processed by the target service to obtain the business information of the target business corresponding to the second data packet. In other words, in the cloud local hosting system, local interception, target processing and data preservation of the first data packet are realized, which meets the needs of processing the data packet locally by the user, solves the problem of low data security in the process of data packet processing, and achieves the technical effect of improving data security. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0026] Figure 1 is a schematic diagram of an application scenario of an optional data packet processing method according to an embodiment of the present application;

[0027] Figure 2 is a flowchart of an optional data packet processing method according to an embodiment of the present application;

[0028] Figure 3 It is a product schematic diagram of an optional data packet processing method according to an embodiment of the present application;

[0029] Figure 4 is a schematic diagram of a hardware architecture of an optional data packet processing method according to an embodiment of the present application;

[0030] Figure 5 is a schematic diagram of the structure of an optional target message according to an embodiment of the present application;

[0031] Figure 6 is a schematic diagram of an optional three-layer packet data packet according to an embodiment of the present application;

[0032] Figure 7 is an optional flow chart of performing behavior analysis on a layer 3 packet according to an embodiment of the present application;

[0033] Figure 8 is a schematic diagram of the structure of an optional UDP object model according to an embodiment of the present application;

[0034] Fig. 9 This is an optional flow chart of parsing target business data according to business rules according to an embodiment of the present application;

[0035] Fig.10 is an overall flow chart of an optional data packet processing method according to an embodiment of the present application;

[0036] Fig.11 is a schematic diagram of business information of optional parsed business data according to an embodiment of the present application;

[0037] Fig.12 is a schematic structural diagram of an optional data packet processing device according to an embodiment of the present application;

[0038] Fig.13 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0041] The technical solutions in the embodiments of the present application will comply with legal provisions during implementation. When performing operations according to the technical solutions in the embodiments, the data used will not involve user privacy. While ensuring that the operation process is compliant and legal, the security of the data is guaranteed.

[0042] Glossary:

[0043] CDC: Cloud Dedicated Cluster is a fully managed infrastructure cloud product that deploys public cloud computing, storage, network and other resource facilities to the customer's local computer room in a hardware and software integrated manner.

[0044] According to one aspect of the embodiments of the present application, a data packet processing method is provided. As an optional implementation, the data packet processing method can be but is not limited to being applied to Figure 1 The application scenario shown in Figure 1 In the application scenario shown, the terminal device 102 may, but is not limited to, communicate with the server 106 via the network 104, and the server 106 may, but is not limited to, perform operations on the database 108, such as write data operations or read data operations. The terminal device 102 may, but is not limited to, include a human-computer interaction screen, a processor, and a memory. The human-computer interaction screen may, but is not limited to, be used to display the business information of the target service corresponding to the second data packet on the terminal device 102. The processor may, but is not limited to, be used to respond to the human-computer interaction operation, perform the corresponding operation, or generate the corresponding instruction, and send the generated instruction to the server 106. The memory is used to store relevant processing data, such as the first data packet, the business information of the target service and the target service, etc.

[0045] As an optional method, the following steps in the data packet processing method can be executed on the server 106: Step S102, mirroring the first data packet transmitted by the first virtual private network VPN gateway in the cloud local hosting system to obtain a second data packet, wherein the second data packet is the same as the first data packet, the first VPN gateway is connected to the second VPN gateway in the cloud management and control system through a public network, and the first data packet is a data packet transmitted between the first VPN gateway and the second VPN gateway; Step S104, transmitting the second data packet to the target service in the cloud local hosting system; Step S106, processing the second data packet through the target service to obtain business information of the target business corresponding to the second data packet.

[0046] By adopting the above method, in the cloud local hosting system, the first data transmitted by the first gateway is mirrored to obtain the second data packet, and the second data packet is transmitted to the target service in the cloud local hosting system, and finally the second data packet is processed by the target service to obtain the business information of the target business corresponding to the second data packet. In other words, in the cloud local hosting system, the local interception, target processing and data preservation of the first data packet are realized, which meets the needs of processing the data packet locally by the user, solves the problem of low data security in the process of data packet processing, and achieves the technical effect of improving data security.

[0047] In order to solve the problem of low data security in the data packet processing process, a data packet processing method is proposed in an embodiment of the present application. Figure 2 : is a flow chart of a data packet processing method according to an embodiment of the present application, the process comprises the following steps:

[0048] Step S202, mirroring a first data packet transmitted by a first virtual private network VPN gateway in the cloud local hosting system to obtain a second data packet, wherein the second data packet is the same as the first data packet, the first VPN gateway is connected to a second VPN gateway in the cloud management and control system via a public network, and the first data packet is a data packet transmitted between the first VPN gateway and the second VPN gateway;

[0049] Step S204, transmitting the second data packet to a target service in the cloud local hosting system;

[0050] Step S206: Process the second data packet through the target service to obtain service information of the target service corresponding to the second data packet.

[0051] To facilitate understanding of the technical solution of the present application, in the embodiments of the present application, the target service is explained by taking the traffic audit service as an example, wherein the traffic audit service is deployed in the CDC as an internal service.

[0052] like Figure 3 As shown in the figure, in a distributed cloud scenario, the cloud-native hosting system deployed at the customer site (which can also be understood as a CDC dedicated cluster) and the public cloud share a cloud-based control system, and control data packets (which can also be understood as control traffic) are transmitted through VPN.

[0053] like Figure 4 As shown, the transmission of uplink and downlink data (data packets or traffic) is achieved between the public cloud and the cloud-local hosting system through the first VPN gateway and the second VPN gateway, wherein the first VPN gateway and the second VPN gateway are connected through a public network, one end of the public network is connected to the client-side core switch for communicating with the client's local IDC (Internet Data Center), a CDC cabinet will be deployed inside the client's local IDC and connected through a CDC docking switch, the other end of the CDC docking switch is connected to the first VPN gateway for transmitting traffic from or to the second VPN.

[0054] Through the above method, the interconnection between the cloud-based management and control system in the cloud center area and the cloud-based local hosting system (CDC) can be realized, that is, the transmission of uplink and downlink data between the cloud-based management and control system and the cloud-based local hosting system (CDC) can be realized. Among them, CDC is a fully managed infrastructure cloud product that deploys the public cloud's computing, storage, network and other resource facilities to the customer's local computer room in a hardware and software integrated manner.

[0055] It should be noted that the first VPN gateway is deployed in the cloud local hosting system, and the second VPN gateway is deployed in the cloud center area, and is connected to the public network through the access point of the cloud center area (public cloud access point). The cloud center area includes a cloud management and control system.

[0056] In the above embodiment, the uplink and downlink data (first data packet) between the cloud management and control system and the cloud local hosting system (CDC) include but are not limited to two categories: one is the data transmitted by the cloud management and control system to the CDC, for example, the operation instructions issued by the cloud management and control system to the CDC, which are used to indicate what operation the current service performs; the other is the data reported by the CDC to the cloud management and control system, for example, the operation records or business logs reported by the CDC in the local client.

[0057] from Figure 4It can be seen that no matter it is the instruction issued by the cloud control system to the CDC or the data reported by the CDC to the cloud control system, it will be transmitted through the first VPN gateway. Then, by intercepting the first data packet (control traffic) passing through the first VPN gateway and mirroring the first data packet, a second data packet is obtained; finally, the second data packet is sent to the audit service module, and the audit service module is used to perform business analysis on the second data packet to obtain the business information of the corresponding target business, wherein the mirroring operation can be but is not limited to copying the data in the first data packet to obtain a second data packet with the same content.

[0058] Through the above-mentioned embodiments provided by the present application, in the cloud local hosting system, the first data transmitted by the first gateway is mirrored to obtain a second data packet, and the second data packet is transmitted to the target service in the cloud local hosting system, and finally the second data packet is processed by the target service to obtain the business information of the target business corresponding to the second data packet. In other words, in the cloud local hosting system, the local interception and processing of the first data packet is realized, which meets the demand for processing the data packet locally by the user, solves the problem of low data security in the process of data packet processing, and achieves the technical effect of improving data security.

[0059] As an optional example, the transmitting the second data packet to the target service in the cloud local hosting system includes:

[0060] Encapsulating the second data packet into a message of the target transport layer protocol to obtain a target message, wherein the second data packet is a network layer data packet, the second data packet includes network layer data, transport layer data and application layer data, and the data carried in the target message includes the second data packet;

[0061] Transmit the target message to the target service.

[0062] In order to ensure that the information in the data packet is not lost or tampered with during the transmission of the data packet, the data packet is usually encapsulated layer by layer according to the type of the target transport layer protocol, for example, according to the UDP protocol, and then the encapsulated message is transmitted over the network.

[0063] As an optional example, the above-mentioned transmitting the target message to the target service includes:

[0064] The target message is transmitted to the target service through the intranet of the cloud-native hosting system.

[0065] As an optional implementation manner, encapsulating the second data packet into a message of the target transport layer protocol to obtain the target message includes:

[0066] Encapsulating the second data packet into a User Datagram Protocol (UDP) message to obtain a target message, wherein the target message includes an IP header, a UDP header, and the second data packet; or

[0067] The second data packet is encapsulated into a Transmission Control Protocol TCP message to obtain a target message, wherein the target message includes an IP header, a TCP header and the second data packet.

[0068] For example, the second data packet in the embodiment of the present application is encapsulated into a User Datagram Protocol UDP message, and the structure of the message is as follows: Figure 5 As shown in (a), it includes an IP header, a UDP header and a second data packet, wherein the second data packet includes but is not limited to Figure 6 The network layer data (IP data), transport layer data and application layer data are shown.

[0069] For another example, the second data packet in the embodiment of the present application is encapsulated into a User Datagram Protocol UDP message, and the structure of the message is as follows: Figure 5 As shown in (b), it includes an IP header, a TCP header and a second data packet, wherein the second data packet includes but is not limited to Figure 6 The network layer data (IP data), transport layer data and application layer data are shown.

[0070] In the related art, the transmission format of the data packet is generally the Hypertext Transfer Protocol HTTP format, that is, the application layer transmission format. Therefore, when using the data packet processing method in the related art, only the business data transmitted using the HTTP protocol can be intercepted, and ICMP data packets, TCP data packets, and UDP data packets cannot be intercepted.

[0071] However, when the second data packet is encapsulated into a UDP message, all the data in the three-layer packet data packet can be intercepted. In other words, the data packet processing method in the related art can only intercept part of the interactive data between the cloud management and control system and the cloud local hosting system. The data packet processing method in the embodiment of the present application can realize the processing of the full amount of data between the cloud management and control system and the cloud local hosting system, thereby realizing a more comprehensive processing of the interactive data, making it convenient for customers to obtain all-round data information, so as to accurately trace back.

[0072] It should be noted that the reason why the UDP protocol is selected to encapsulate the second data packet is mainly to ensure the network quality when the first data packet is forwarded to the CDC intranet for transmission. In addition, as audit data, partial loss can be allowed, and the use of the UDP protocol provides a method for applications to send encapsulated data packets without establishing a connection.

[0073] As an optional example, the above-mentioned processing of the second data packet by the target service to obtain the service information of the target service corresponding to the second data packet includes:

[0074] Extracting a second data packet from the target message through the target service, and obtaining network layer data, transport layer data, and application layer data in the second data packet;

[0075] The network layer data, transport layer data and application layer data are processed to obtain the business information of the target business.

[0076] Since, in the process of transmitting the second data packet, the second data packet is pre-encapsulated according to the target transport layer protocol, and the encapsulated target message is transmitted, therefore, by Figure 4 The first VPN gateway shown essentially sends the target message containing the second data packet to the audit service module.

[0077] After receiving the target message, the audit service module decodes the target message and converts the network layer data, transport layer data and application layer data into binary data. For example, the decoded network layer data includes: {"ipData":{"src":"9.124.11.77","dst":"11.134.24.69","len":251,"ttl":54,"df":1,"mf":0,"opts":"b""}; the decoded transport layer data includes: {"transmissionData":{"sPort":"80","dPort":"8080","type":"HTTP","version":"1.1", etc.

[0078] For the decoded binary data, it is necessary to encapsulate it into an object of the corresponding type according to the type of transport layer protocol represented by the data on the type field in the transport layer data, and then take out the value of the specific field in the object, and perform business analysis according to the rules corresponding to the type of transport layer protocol to obtain business information related to the business.

[0079] As an optional example, the network layer data, transport layer data and application layer data are processed to obtain the service information of the target service, including:

[0080] Encapsulate network layer data, transport layer data, and application layer data according to the target application layer protocol;

[0081] When the network layer data, the transport layer data and the application layer data are successfully encapsulated according to the target application layer protocol, data on the target field in the message of the target application layer protocol is obtained to obtain the target service data, wherein the message of the target application layer protocol is a message obtained by successfully encapsulating the network layer data, the transport layer data and the application layer data according to the target application layer protocol;

[0082] Determine the business information of the target business based on the target business data.

[0083] In an embodiment of the present application, the target application layer protocol includes but is not limited to the TCP protocol, the UDP protocol, etc. Before performing behavioral analysis on the network layer data, the transport layer data, and the application layer data, it is necessary to determine the type of the transport layer protocol based on the specific fields in the transport layer data, and then encapsulate the three-layer packet data into an object of the corresponding type, and then take out the value of the specific field in the encapsulated object to perform business analysis.

[0084] As an optional example, the encapsulating the network layer data, the transport layer data and the application layer data according to the target application layer protocol includes: encapsulating the network layer data, the transport layer data and the application layer data according to the request message format of the Hypertext Transfer Protocol HTTP;

[0085] When the network layer data, transport layer data and application layer data are successfully encapsulated according to the target application layer protocol, the data on the target field in the message of the target application layer protocol is obtained to obtain the target business data, including: when the network layer data, transport layer data and application layer data are successfully encapsulated according to the HTTP request message format, the data on the body field and the data field in the first HTTP message are obtained to obtain the target business data, wherein the first message is a message obtained by successfully encapsulating the network layer data, transport layer data and application layer data according to the HTTP request message format.

[0086] In combination with the above embodiments, it can be seen that since the data in the decoded three-layer packet data packet is all binary data, and for the same binary character or string, the type of transmission protocol used to transmit the data is different, and the meaning represented by the binary character is also different. Therefore, it is necessary to load the network layer data, the transport layer data and the application layer data with different types of transmission protocols according to the type of transport layer protocol represented by the data on the type field in the transport layer data, and then perform behavioral analysis of the data packet.

[0087] For example, Figure 7 As shown in FIG. 1 , the process of performing behavioral analysis on network layer data, transport layer data, and application layer data includes:

[0088] S702, display network layer data;

[0089] S704, extract the network layer data to obtain the transport layer data;

[0090] like Figure 6 As shown, the data in the three-layer packet data packet includes network layer data, transport layer data and application layer data. After the network layer data is taken out, the transport layer data can be obtained.

[0091] S706, determining the type of the transport layer protocol according to the data in the type field in the transport layer data;

[0092] For example, according to the data on the type field in the transport layer data, it is determined that the type of the transport layer protocol is TCP or UDP.

[0093] S708, when it is determined that the type of the transport layer protocol is TCP according to the data on the type field in the transport layer data, try to encapsulate the network layer data, the transport layer data and the application layer data into a Request model (first message) of the HTTP protocol;

[0094] S710, if the encapsulation is successful, then take out the data in the body and data fields in the Request model, as in step S712;

[0095] If the encapsulation is unsuccessful, execute step S714.

[0096] S712, extract the data in the body and data fields in the Request model;

[0097] S714, attempting to encapsulate the network layer data, the transport layer data, and the application layer data into a Responset model (a second message) of the HTTP protocol;

[0098] If the encapsulation is successful, execute step S716.

[0099] S716, taking out the data byte stream in the Responset model;

[0100] S718: If the attempt to encapsulate the network layer data, the transport layer data and the application layer data into a model object of the HTTP protocol fails, then an attempt is made to encapsulate the network layer data, the transport layer data and the application layer data into a TCP model.

[0101] S720, when the network layer data, the transport layer data and the application layer data are encapsulated into a TCP model, extract the data byte stream in the transport layer data, and execute step S722;

[0102] S722, performing business behavior analysis on the network layer data, the transport layer data, and the application layer data;

[0103] If it is determined based on the data on the type field in the transport layer data that the type of the transport layer protocol is UDP, execute step S724.

[0104] S724, encapsulate the network layer data, transport layer data and application layer data into a UDP model object; then execute the above steps S720~S722, take out the data in the data field of the transport layer data in the UDP model, perform business behavior analysis, and obtain the business module of the target business.

[0105] It should be noted that after encapsulating the decoded three-layer packet data packet, the encapsulated data of each layer is obtained as follows:

[0106]

[0107]

[0108] (1) The fields of the decoded IP layer data (i.e., the network layer data part) are as follows:

[0109] src source ip

[0110] dst destination ip

[0111] len IP packet length

[0112] TTL survival time

[0113] df has no shards

[0114] mf more fragments

[0115] optsoptions

[0116] (2) The decoded transport layer data (i.e., the transmissionData part) fields are as follows:

[0117] typeTransport layer protocol type

[0118] sport source port

[0119] dport destination port

[0120] seq sequence number

[0121] ack confirmation number

[0122] win window size

[0123] sum checksum

[0124] data

[0125] (3) The decoded application layer data (i.e., applicationData part) field, taking HTTP as an example, is as follows:

[0126] version HTTP version number

[0127] headers request headers

[0128] body request body

[0129] data

[0130] method request method

[0131] uri Uniform Resource Identifier

[0132] ack confirmation number

[0133] (4) Other common fields are as follows:

[0134] timestamp

[0135] streamDirection stream direction (CDC is the starting point)

[0136] After acquiring the network layer data, transport layer data and application layer data, they are processed to obtain the business information of the target business.

[0137] As an optional example, for the above step S714, when attempting to encapsulate the network layer data, the transport layer data, and the application layer data into a Request model of the HTTP protocol and the encapsulation fails, the above encapsulating the network layer data, the transport layer data, and the application layer data according to the target application layer protocol includes: encapsulating the network layer data, the transport layer data, and the application layer data according to the HTTP response message format;

[0138] When the network layer data, transport layer data and application layer data are successfully encapsulated according to the target application layer protocol, the data on the target field in the message of the target application layer protocol is obtained to obtain the target business data, including: when the network layer data, transport layer data and application layer data are successfully encapsulated according to the HTTP response message format, the data on the data field in the second HTTP message is obtained to obtain the target business data, wherein the second message is a message obtained by successfully encapsulating the network layer data, transport layer data and application layer data according to the HTTP response message format.

[0139] As another optional example, when the data on the type field in the transport layer data indicates that the transport layer protocol type is TCP, the encapsulation of the network layer data, the transport layer data, and the application layer data according to the target application layer protocol includes:

[0140] When the data on the type field in the transport layer data indicates that the transport layer protocol type is TCP, the network layer data, the transport layer data, and the application layer data are encapsulated according to the target application layer protocol.

[0141] like Figure 7 As shown, in step S718, if the attempt to encapsulate the network layer data, transport layer data and application layer data into a model object of the HTTP protocol fails, an attempt is made to encapsulate the network layer data, transport layer data and application layer data into a TCP model.

[0142] When the data on the type field in the transport layer data indicates that the transport layer protocol type is UDP, the process of encapsulating the network layer data, the transport layer data, and the application layer data according to the target application layer protocol, and processing the network layer data, the transport layer data, and the application layer data includes:

[0143] In the case where encapsulation of the network layer data, the transport layer data and the application layer data according to the target application layer protocol fails, encapsulating the network layer data, the transport layer data and the application layer data according to the request message format of the transmission control protocol TCP; obtaining data on the data field in the third message of TCP to obtain the target business data, wherein the third message is a message obtained by successfully encapsulating the network layer data, the transport layer data and the application layer data according to the request message format of TCP; or,

[0144] When the data on the type field in the transport layer data indicates that the transport layer protocol type is UDP, encapsulate the network layer data, the transport layer data, and the application layer data according to the request message format of the full-duplex communication protocol UDP; obtain the data on the data field in the fourth message of UDP to obtain the target business data, wherein the fourth message is a message obtained by successfully encapsulating the network layer data, the transport layer data, and the application layer data according to the request message format of UDP;

[0145] Determine the business information of the target business based on the target business data.

[0146] Referring to the above steps S718 to S724, if the attempt to encapsulate the network layer data, transport layer data and application layer data into a model object of the HTTP protocol fails, an attempt is made to encapsulate the network layer data, transport layer data and application layer data into a TCP model.

[0147] When the network layer data, transport layer data and application layer data are encapsulated into a TCP model, the data byte stream in the transport layer data is taken out, and the network layer data, transport layer data and application layer data are processed and analyzed for business behavior.

[0148] If the type of the transport layer protocol is determined to be UDP based on the data in the type field of the transport layer data, the network layer data, the transport layer data, and the application layer data are encapsulated into a UDP model object; then the data in the data field of the transport layer data in the UDP model is taken out to perform business behavior analysis to obtain business information of the target business, wherein the structure of the UDP model object is as follows: Figure 8 shown.

[0149] As an optional implementation, the above-mentioned determining the business information of the target business according to the target business data includes:

[0150] Obtain the IP address and port number corresponding to the target service from the target service data;

[0151] Find the service module identifier corresponding to the IP address and the port number, wherein the service module identifier is used to identify the service module to which the target service belongs;

[0152] According to the business module identified by the business module identifier, searching for the business operation identifier in the target business data, wherein the business operation identifier is used to identify the corresponding operation under the business module;

[0153] According to the business module identifier and the business operation identifier, information in the business information of the target business is determined.

[0154] When performing business analysis based on byte streams, it is necessary to obtain the port and IP to identify different business module identifiers; according to different business rules, the byte stream is analyzed for behavior to obtain behavior records with business meanings.

[0155] For example, by connecting with the monitoring team, the byte stream in the data field of the TCP message can be parsed into the monitoring team's heartbeat reporting operation; by connecting with the computing team, the body byte stream in the HTTP request can be converted into an instance creation operation.

[0156] like Fig. 9 As shown, according to different business rules, the steps of parsing the target business data include:

[0157] S902, obtaining original data;

[0158] Among them, the original data includes network layer data, transport layer data and application layer data.

[0159] S904, extract the IP header to obtain the source IP and destination IP; extract the Data byte stream to obtain the transport layer data;

[0160] S906, extract the transport layer header and obtain the source port and destination port;

[0161] S908, identifying the service type according to the source IP, destination IP, source port and destination port;

[0162] S910, determining a service decoding rule according to the service type;

[0163] Different business types correspond to different decoding rules.

[0164] S912, decoding the target service data according to the service decoding rule;

[0165] S914, after decoding, encapsulate the decoded data into a format required to be displayed on the page according to customer requirements.

[0166] As an optional example, the above encapsulation of the decoded data into a format that needs to be displayed on the page includes:

[0167] Encapsulate the business information of the target business in the format required for page display.

[0168] For example, according to customer requirements, the decoded business information of the target business is encapsulated in JSON format.

[0169] The above-mentioned service analysis process is described below in conjunction with specific embodiments.

[0170] S11, assuming that according to the type field in the transport layer, it is determined that the target business data is data in the HTTP protocol format and the message body contains the main business data;

[0171] S12, search based on the IP address and port number to determine that the target business data is a computing business, for example, moduleName is cloudCompute;

[0172] S13, in the computing business, method corresponds to the action field displayed on the page, so action is soft_shutdown_vm;

[0173] S14, sip is the source ip, that is, src in ipData, which is 9.124.11.77; sport is the source port, that is, sPort in the transport layer data, which is 80; dip is the destination ip, that is, dst in ipData, which is 11.134.24.69; dport is the destination port, that is, dPort in transmissionData, which is 80

[0174] S15, protocol is the network protocol, that is, the data on the type field in the transport layer data indicates that the transport layer protocol type is HTTP;

[0175] The contentType package body protocol is application / x-www-form-urlencoded in the request header content-type. The package body protocol indicates that the business information of the target business after behavior analysis will be displayed on the customer's console according to the preset format.

[0176] S16, timestamp is the time when the data packet is generated, which is the value of the timestamp field, "11-02-2022 17:31:20.279433". The time when the data packet is generated is determined based on the value of the timestamp field.

[0177] Exemplarily, after the target business data is subjected to behavioral analysis according to the above steps S11 to S16, the analyzed data is as follows:

[0178] mouduleName Business module

[0179] Action The corresponding operation under this business module

[0180] sip source ip

[0181] sport source port

[0182] dip destination ip

[0183] dport destination port

[0184] protocol Network protocol

[0185] contentType package protocol

[0186] content package content

[0187] timestamp time

[0188] Among them, since the header data format is specified by the transport layer protocol, the IP address and port number can be directly parsed according to the mapping relationship between the IP address and port number and the transport layer protocol; for business analysis (behavior analysis) of business data, the data format specified by the business is parsed, which needs to be parsed according to different business rules.

[0189] It should be noted that the above behavior analysis process and the parsed data are only examples and are not limited thereto. For example, other fields may be included, or only part of the above fields may be included.

[0190] In addition, when the type of the transport layer protocol is determined to be UDP based on the data on the type field in the transport layer data, only the network layer data and transport layer data in the three-layer packet data can be parsed according to the above-mentioned behavioral analysis method; when the type of the transport layer protocol is determined to be TCP based on the data on the type field in the transport layer data, the network layer data, transport layer data and application layer data in the three-layer packet data may be parsed according to the above-mentioned behavioral analysis method, or the network layer data and transport layer data in the three-layer packet data may be parsed.

[0191] By adopting the above method, the entire amount of control traffic (data packets) can be intercepted in the local computer room where the customer is located, and all control traffic can be identified, including conventional computing, storage, and network resource operations, as well as monitoring data, ICMP traffic, etc., so that customers can obtain comprehensive traffic information, thereby accurately tracing back and improving data security.

[0192] like Figure 4 As shown in the figure, according to the data security compliance requirements, after the behavior analysis of the data packet (control traffic) is performed according to the target service, for example, according to the audit service, the sensitive information that may be contained in the data packet needs to be desensitized, and then the desensitized business information is stored in the cloud local hosting system, including:

[0193] If the business information of the target business includes sensitive data, desensitize the sensitive data in the business information of the target business to obtain desensitized business information, and store the desensitized business information in the cloud local hosting system; or

[0194] storing the target business’s business information in a cloud-native hosting system, provided that the target business’s business information does not include sensitive data; or

[0195] Store the business information of the target business in the cloud-native hosting system.

[0196] The main process of the desensitization operation includes: processing the parsed behavioral information through the desensitization framework, and performing the desensitization operation when matching the data that needs to be desensitized. For example, it can be converted into "**" text, or an encryption algorithm can be specified for encryption and desensitization.

[0197] Due to customer security compliance requirements, data must be stored in the cloud local hosting system (customer local), and the storage time can be set freely. At present, customers require that traffic logs need to be saved for half a year, and the daily log volume is about 50GB. If it is saved directly in the local disk, it requires about 9TB of disk capacity, which is a considerable burden for customers. In order to solve this problem, the embodiment of the present application considers saving the log in the local cos of the cloud local hosting system (CDC).

[0198] Obviously, it is easy to understand that in addition to saving traffic logs in the local cos of the cloud local hosting system, it also supports local storage, but the maximum local storage time is about 1 month. The actual selection and setting time can be based on the size of the traffic generated, the actual local disk capacity of the customer, and the cos capacity. Customers can choose and set the effective range for viewing audit results according to their needs, which meets the needs of local residence of customer data and provides customers with comprehensive traffic information.

[0199] In order to understand the technical solution of this application more clearly, Fig.10 The overall flow chart shown further describes the method for processing the above data packets, with specific steps:

[0200] S1002, performing a mirroring operation on a first data packet passing through a first VPN gateway;

[0201] like Figure 4 As shown, both the uplink and downlink data (first data packet) between the cloud management and control system and the cloud local hosting system will pass through the first VPN gateway, and the second data packet will be obtained by mirroring the first data packet.

[0202] S1004, in the cloud local hosting system, the mirrored second data packet is forwarded to the audit service module through the UDP protocol. At this time, the data carried by the UDP protocol is a three-layer packet. That is, during the forwarding process, the second data packet is encapsulated according to the format of the UDP protocol to obtain the target message. The message structure is as follows: Figure 5 As shown in (a).

[0203] S1006, intercepting and decoding the layer 3 message;

[0204] In the related art, the transmission format of the data packet is generally the Hypertext Transfer Protocol HTTP format, that is, the application layer transmission format. Therefore, when using the data packet processing method in the related art, only the business data transmitted using the HTTP protocol can be intercepted, and ICMP data packets, TCP data packets, and UDP data packets cannot be intercepted.

[0205] That is to say, compared with the related technology, the data packet processing method in the embodiment of the present application can realize the processing of the full amount of data between the cloud management and control system and the cloud local hosting system, thereby realizing more comprehensive processing of the interactive data, making it convenient for customers to obtain comprehensive data information, and thus accurately trace back.

[0206] S1008, performing behavior analysis on network layer data, transport layer data, and application layer data;

[0207] That is, the target business data is subjected to business analysis. The specific process of the analysis may refer to steps S902 to S914 in the above embodiment, which will not be described in detail here.

[0208] S1010, searching for a business operation identifier in business data according to the business module identified by the business module identifier;

[0209] The business operation identifier is used to identify the corresponding operation under the business module.

[0210] S1012: Desensitize sensitive information in the parsed business information in accordance with the customer's data security compliance requirements, and store the desensitized business information in the cloud local hosting system.

[0211] It should be noted that after processing the data packets according to the above steps, the obtained business information will be saved to the cloud local hosting system. Customers can view the corresponding full traffic log by setting the time range. The format of the traffic log is as follows: Fig.11 shown.

[0212] For example, by selecting and setting the time field to "Last Hour", you can view the traffic details of the last hour. The page displays specific records after decoding, anonymization, and business analysis, and can display the information of each package in modules.

[0213] Through the above full traffic log, customers can interrupt the business operations displayed in the current traffic log or cancel the display of the displayed business information as needed.

[0214] Compared with the related art, the technical solution provided by this application is used to process data packets, and the beneficial effects produced include but are not limited to:

[0215] (1) Customer data security compliance requirements: The traffic audit solution in the related art is to intercept traffic in the cloud center area and process and save the traffic through the traffic audit service in the cloud center area; the traffic audit method in the embodiment of the present application, from traffic interception to traffic processing and traffic storage, is all performed in the customer's designated computer room (inside the CDC), ensuring that the data does not leave the local area, improving the reliability of data security, and meeting the customer's strict requirements for data security;

[0216] (2) Full data audit requirements: In related technologies, traffic audit solutions can only identify part of the traffic, and cannot identify all the controlled traffic. However, the technical solution of this application can identify all the controlled flow data by intercepting the full controlled traffic, including conventional computing, storage, and network resource operations, as well as monitoring data, ICMP traffic, etc., so that customers can obtain all-round traffic information and accurately trace the traffic information.

[0217] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0218] According to another aspect of the embodiment of the present application, there is also provided Fig.12 A data packet processing device is shown, the device comprising:

[0219] The first processing unit 1202 is used to perform a mirroring operation on a first data packet transmitted by a first virtual private network VPN gateway in the cloud local hosting system to obtain a second data packet, wherein the second data packet is the same as the first data packet, the first VPN gateway is connected to the second VPN gateway in the cloud management and control system through a public network, and the first data packet is a data packet transmitted between the first VPN gateway and the second VPN gateway;

[0220] A transmission unit 1204, configured to transmit the second data packet to a target service in the cloud local hosting system;

[0221] The second processing unit 1206 is used to process the second data packet through the target service to obtain service information of the target service corresponding to the second data packet.

[0222] Optionally, the transmission unit 1204 includes:

[0223] a first encapsulation module, configured to encapsulate the second data packet into a message of a target transport layer protocol to obtain a target message, wherein the second data packet is a network layer data packet, the second data packet includes network layer data, transport layer data and application layer data, and the data carried in the target message includes the second data packet;

[0224] The first transmission module is used to transmit the target message to the target service.

[0225] Optionally, the first packaging module includes:

[0226] A first encapsulation submodule is used to encapsulate the second data packet into a User Datagram Protocol UDP message to obtain a target message, wherein the target message includes an IP header, a UDP header and the second data packet; or

[0227] The second data packet is encapsulated into a Transmission Control Protocol TCP message to obtain a target message, wherein the target message includes an IP header, a TCP header and the second data packet.

[0228] Optionally, the second processing unit 1206 includes:

[0229] A first processing module, configured to extract a second data packet from the target message through a target service, and obtain network layer data, transport layer data, and application layer data in the second data packet;

[0230] The second processing module is used to process the network layer data, the transport layer data and the application layer data to obtain the service information of the target service.

[0231] Optionally, the second processing module includes:

[0232] The second encapsulation submodule is used to encapsulate the network layer data, the transport layer data and the application layer data according to the target application layer protocol;

[0233] The first acquisition submodule is used to obtain the data on the target field in the message of the target application layer protocol to obtain the target business data when the network layer data, the transport layer data and the application layer data are successfully encapsulated according to the target application layer protocol, wherein the message of the target application layer protocol is the message obtained by successfully encapsulating the network layer data, the transport layer data and the application layer data according to the target application layer protocol;

[0234] The first processing submodule is used to determine the business information of the target business according to the target business data.

[0235] Optionally, the second processing module includes:

[0236] The third encapsulation submodule is used to encapsulate the network layer data, the transport layer data and the application layer data according to the request message format of the Hypertext Transfer Protocol HTTP;

[0237] The fourth encapsulation sub-module is used to obtain the data on the body field and the data field in the first HTTP message when the network layer data, the transport layer data and the application layer data are successfully encapsulated according to the HTTP request message format, so as to obtain the target business data, wherein the first message is a message obtained by successfully encapsulating the network layer data, the transport layer data and the application layer data according to the HTTP request message format.

[0238] Optionally, the second processing module includes:

[0239] The fifth encapsulation submodule is used to encapsulate the network layer data, the transport layer data and the application layer data according to the HTTP response message format;

[0240] The second acquisition submodule is used to obtain the data on the data field in the second HTTP message to obtain the target business data when the network layer data, transport layer data and application layer data are successfully encapsulated in accordance with the HTTP response message format, wherein the second message is a message obtained by successfully encapsulating the network layer data, transport layer data and application layer data in accordance with the HTTP response message format.

[0241] Optionally, the second processing module includes:

[0242] The sixth encapsulation submodule is used to encapsulate the network layer data, the transport layer data and the application layer data according to the target application layer protocol when the data on the type field in the transport layer data indicates that the transport layer protocol type is TCP.

[0243] Optionally, the second processing module further includes:

[0244] The second processing submodule is used to encapsulate the network layer data, the transport layer data and the application layer data according to the request message format of the transmission control protocol TCP when the encapsulation of the network layer data, the transport layer data and the application layer data according to the target application layer protocol fails; obtain the data on the data field in the third message of TCP to obtain the target business data, wherein the third message is a message obtained by successfully encapsulating the network layer data, the transport layer data and the application layer data according to the request message format of TCP; or,

[0245] When the data on the type field in the transport layer data indicates that the transport layer protocol type is UDP, encapsulate the network layer data, the transport layer data, and the application layer data according to the request message format of the full-duplex communication protocol UDP; obtain the data on the data field in the fourth message of UDP to obtain the target business data, wherein the fourth message is a message obtained by successfully encapsulating the network layer data, the transport layer data, and the application layer data according to the request message format of UDP;

[0246] Determine the business information of the target business based on the target business data.

[0247] Optionally, the second processing module includes:

[0248] The third acquisition submodule is used to obtain the IP address and port number corresponding to the target service from the target service data;

[0249] A first search submodule is used to search for a service module identifier corresponding to an IP address and a port number, wherein the service module identifier is used to identify a service module to which a target service belongs;

[0250] A second search submodule is used to search for a business operation identifier in the target business data according to the business module identified by the business module identifier, wherein the business operation identifier is used to identify the corresponding operation under the business module;

[0251] The third processing submodule is used to determine information in the business information of the target business according to the business module identifier and the business operation identifier.

[0252] Optionally, the above device further includes:

[0253] A fourth processing submodule is used for desensitizing the sensitive data in the business information of the target business when the business information of the target business includes sensitive data, obtaining business desensitized information, and storing the business desensitized information in the cloud local hosting system; or

[0254] storing the target business’s business information in a cloud-native hosting system, provided that the target business’s business information does not include sensitive data; or

[0255] Store the business information of the target business in the cloud-native hosting system.

[0256] Optionally, the transmission unit 1204 includes:

[0257] The transmission module is used to transmit the target message to the target service through the intranet of the cloud local hosting system.

[0258] Optionally, the above device further includes:

[0259] The third processing unit is used to encapsulate the business information of the target business according to the format required for page display.

[0260] By applying the above device in the cloud local hosting system, the first data transmitted by the first gateway is mirrored to obtain a second data packet, and the second data packet is transmitted to the target service in the cloud local hosting system, and finally the second data packet is processed by the target service to obtain the business information of the target business corresponding to the second data packet. In other words, in the cloud local hosting system, the local interception, target processing and data storage of the first data packet are realized, which meets the needs of processing the data packet locally by the user, solves the problem of low data security in the process of data packet processing, and achieves the technical effect of improving data security.

[0261] It should be noted that the embodiments of the data packet processing device here can refer to the embodiments of the data packet processing method mentioned above, which will not be repeated here.

[0262] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned data packet processing method is also provided. The electronic device may be Fig.13 The terminal device shown in FIG. This embodiment is described by taking the electronic device as a background device as an example. Fig.13 As shown, the electronic device includes a memory 1302 and a processor 1304. The memory 1302 stores a computer program, and the processor 1304 is configured to execute the steps in any of the above method embodiments through the computer program.

[0263] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0264] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0265] S1, mirroring a first data packet transmitted by a first virtual private network VPN gateway in a cloud local hosting system to obtain a second data packet, wherein the second data packet is the same as the first data packet, the first VPN gateway is connected to a second VPN gateway in a cloud management and control system via a public network, and the first data packet is a data packet transmitted between the first VPN gateway and the second VPN gateway;

[0266] S2, transmitting a second data packet to a target service in the cloud local hosting system;

[0267] S3, processing the second data packet through the target service to obtain service information of the target service corresponding to the second data packet.

[0268] Alternatively, a person skilled in the art may understand that: Fig.13 The structure shown is for illustration only, and the electronic device may also be a target terminal such as a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, and a mobile Internet device (MID), a PAD, etc. Fig.13 The electronic device and the electronic equipment described above are not limited in structure. Fig.13 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.13 Different configurations shown.

[0269] Among them, the memory 1302 can be used to store software programs and modules, such as the program instructions / modules corresponding to the data packet processing method and device in the embodiments of the present application. The processor 1304 executes various functional applications and data processing by running the software programs and modules stored in the memory 1302, that is, realizing the above-mentioned data packet processing method. The memory 1302 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1302 may further include a memory remotely located relative to the processor 1304, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1302 can be specifically, but not limited to, used to store a second data packet, a target service, etc. As an example, such as Fig.13 As shown, the memory 1302 may include but is not limited to the first processing unit 1202, the transmission unit 1204 and the second processing unit 1206 in the packet processing device. In addition, it may also include but is not limited to other module units in the packet processing device, which will not be repeated in this example.

[0270] Optionally, the transmission device 1306 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1306 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1306 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0271] In addition, the electronic device further includes: a display 1308 for displaying the direction prompt information of the target sound; and a connection bus 1310 for connecting various module components in the electronic device.

[0272] In other embodiments, the target terminal or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes in the form of network communication. Among them, the nodes may form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.

[0273] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the data packet processing method provided in various optional implementations of the above-mentioned server verification processing and other aspects, wherein the computer program is configured to execute the steps of any of the above-mentioned method embodiments when running.

[0274] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0275] S1, mirroring a first data packet transmitted by a first virtual private network VPN gateway in a cloud local hosting system to obtain a second data packet, wherein the second data packet is the same as the first data packet, the first VPN gateway is connected to a second VPN gateway in a cloud management and control system via a public network, and the first data packet is a data packet transmitted between the first VPN gateway and the second VPN gateway;

[0276] S2, transmitting a second data packet to a target service in the cloud local hosting system;

[0277] S3, processing the second data packet through the target service to obtain service information of the target service corresponding to the second data packet.

[0278] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the hardware related to the target terminal through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0279] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0280] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.

[0281] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0282] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0283] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, 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 solution of this embodiment.

[0284] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0285] The above are only preferred implementations 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 data packet processing method, It is characterized in that include: Performing a mirroring operation on a first data packet transmitted by a first virtual private network VPN gateway in a cloud local hosting system to obtain a second data packet, wherein the second data packet is the same as the first data packet, the first VPN gateway is connected to a second VPN gateway in a cloud management and control system via a public network, and the first data packet is a data packet transmitted between the first VPN gateway and the second VPN gateway; transmitting the second data packet to a target service in the cloud-native hosting system; The second data packet is processed through the target service to obtain service information of the target service corresponding to the second data packet.

2. The method according to claim 1, It is characterized in that The transmitting the second data packet to the target service in the cloud local hosting system includes: encapsulating the second data packet into a message of a target transport layer protocol to obtain a target message, wherein the second data packet is a network layer data packet, the second data packet includes network layer data, transport layer data and application layer data, and the data carried in the target message includes the second data packet; The target message is transmitted to the target service.

3. The method according to claim 2, It is characterized in that The step of encapsulating the second data packet into a message of a target transport layer protocol to obtain a target message includes: encapsulating the second data packet into a User Datagram Protocol (UDP) message to obtain the target message, wherein the target message includes an IP header, a UDP header, and the second data packet; or The second data packet is encapsulated into a Transmission Control Protocol TCP message to obtain the target message, wherein the target message includes an IP header, a TCP header and the second data packet.

4. The method according to claim 2, It is characterized in that The processing of the second data packet by the target service to obtain service information of the target service corresponding to the second data packet includes: Extracting the second data packet from the target message through the target service, and obtaining the network layer data, the transport layer data and the application layer data in the second data packet; The network layer data, the transport layer data and the application layer data are processed to obtain service information of the target service.

5. The method according to claim 4, It is characterized in that The processing of the network layer data, the transport layer data and the application layer data to obtain the service information of the target service includes: Encapsulating the network layer data, the transport layer data and the application layer data according to the target application layer protocol; In the case where the network layer data, the transport layer data and the application layer data are successfully encapsulated according to the target application layer protocol, data on a target field in a message of the target application layer protocol is obtained to obtain target service data, wherein the message of the target application layer protocol is a message obtained by successfully encapsulating the network layer data, the transport layer data and the application layer data according to the target application layer protocol; The business information of the target business is determined according to the target business data.

6. The method according to claim 5, It is characterized in that The encapsulating the network layer data, the transport layer data and the application layer data according to the target application layer protocol includes: encapsulating the network layer data, the transport layer data and the application layer data according to the request message format of the Hypertext Transfer Protocol HTTP; When the network layer data, the transport layer data and the application layer data are successfully encapsulated according to the target application layer protocol, the data on the target field in the message of the target application layer protocol is obtained to obtain the target business data, including: when the network layer data, the transport layer data and the application layer data are successfully encapsulated according to the HTTP request message format, the data on the body field and the data field in the first HTTP message are obtained to obtain the target business data, wherein the first message is a message obtained by successfully encapsulating the network layer data, the transport layer data and the application layer data according to the HTTP request message format.

7. The method according to claim 5, It is characterized in that The encapsulating the network layer data, the transport layer data and the application layer data according to the target application layer protocol includes: encapsulating the network layer data, the transport layer data and the application layer data according to the HTTP response message format; When the network layer data, the transport layer data and the application layer data are successfully encapsulated according to the target application layer protocol, the data on the target field in the message of the target application layer protocol is obtained to obtain the target business data, including: when the network layer data, the transport layer data and the application layer data are successfully encapsulated according to the response message format of the HTTP, the data on the data field in the second message of the HTTP is obtained to obtain the target business data, wherein the second message is a message obtained by successfully encapsulating the network layer data, the transport layer data and the application layer data according to the response message format of the HTTP.

8. The method according to claim 4, It is characterized in that The encapsulating the network layer data, the transport layer data and the application layer data according to the target application layer protocol includes: When the data on the type field in the transport layer data indicates that the transport layer protocol type is TCP, the network layer data, the transport layer data and the application layer data are encapsulated according to the target application layer protocol.

9. The method according to claim 8, It is characterized in that The processing of the network layer data, the transport layer data and the application layer data to obtain the service information of the target service also includes: In the case where encapsulation of the network layer data, the transport layer data and the application layer data according to the target application layer protocol fails, encapsulating the network layer data, the transport layer data and the application layer data according to the request message format of the transmission control protocol TCP; obtaining data on the data field in the third message of the TCP to obtain the target business data, wherein the third message is a message obtained by successfully encapsulating the network layer data, the transport layer data and the application layer data according to the request message format of the TCP; or, When the data on the type field in the transport layer data indicates that the transport layer protocol type is UDP, encapsulate the network layer data, the transport layer data and the application layer data according to the request message format of the full-duplex communication protocol UDP; obtain the data on the data field in the fourth message of the UDP to obtain the target business data, wherein the fourth message is a message obtained by successfully encapsulating the network layer data, the transport layer data and the application layer data according to the request message format of the UDP; The business information of the target business is determined according to the target business data.

10. The method according to any one of claims 5 to 9, It is characterized in that The determining, according to the target service data, service information of the target service includes: Acquire the IP address and port number corresponding to the target service from the target service data; Finding a service module identifier corresponding to the IP address and the port number, wherein the service module identifier is used to identify the service module to which the target service belongs; According to the business module identified by the business module identifier, searching for a business operation identifier in the target business data, wherein the business operation identifier is used to identify a corresponding operation under the business module; Information in the service information of the target service is determined according to the service module identifier and the service operation identifier.

11. The method according to any one of claims 1 to 9, It is characterized in that The method further comprises: In the case where the business information of the target business includes sensitive data, desensitizing the sensitive data in the business information of the target business to obtain business desensitized information, and storing the business desensitized information in the cloud local hosting system; or If the business information of the target business does not include sensitive data, storing the business information of the target business in the cloud local hosting system; or The business information of the target business is stored in the cloud local hosting system.

12. The method according to any one of claims 2 to 9, It is characterized in that The transmitting the target message to the target service includes: The target message is transmitted to the target service through the intranet of the cloud local hosting system.

13. The method according to any one of claims 1 to 9, It is characterized in that The method further comprises: The business information of the target business is encapsulated in a format required for page display.

14. A data packet processing device, It is characterized in that include: A first processing unit is used to perform a mirroring operation on a first data packet transmitted by a first virtual private network VPN gateway in a cloud local hosting system to obtain a second data packet, wherein the second data packet is the same as the first data packet, the first VPN gateway is connected to a second VPN gateway in a cloud management and control system via a public network, and the first data packet is a data packet transmitted between the first VPN gateway and the second VPN gateway; a transmission unit, configured to transmit the second data packet to a target service in the cloud local hosting system; The second processing unit is used to process the second data packet through the target service to obtain service information of the target service corresponding to the second data packet.

15. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or a computer to execute the method described in any one of claims 1 to 13.

16. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 13 are implemented.

17. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 13 through the computer program.

Citation Information

Cited By

  • Communication method applied to Codiger system

    CN120567908A

  • A communication method applied to a Codigger system

    CN120567908B

  • Data transmission methods and apparatus, device, and storage medium

    WO2026194542A1