CN114697391A - Data processing method, device, equipment and storage medium - Google Patents

Data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN114697391A
CN114697391A CN202210371154.6A CN202210371154A CN114697391A CN 114697391 A CN114697391 A CN 114697391A CN 202210371154 A CN202210371154 A CN 202210371154A CN 114697391 A CN114697391 A CN 114697391A
Authority
CN
China
Prior art keywords
target
network adapter
virtual network
protocol stack
user mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210371154.6A
Other languages
Chinese (zh)
Other versions
CN114697391B (en
Inventor
白宇
黄忠和
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202210371154.6A priority Critical patent/CN114697391B/en
Publication of CN114697391A publication Critical patent/CN114697391A/en
Application granted granted Critical
Publication of CN114697391B publication Critical patent/CN114697391B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present disclosure provides a data processing method, apparatus, device, storage medium, and program product, which relate to the field of computer technologies, and in particular, to the technical fields of artificial intelligence, network traffic processing, and the like. The specific implementation scheme is as follows: in response to receiving an original message from a target object, determining a target virtual network adapter corresponding to the target object; sending the original message to a target user mode protocol stack corresponding to the target virtual network adapter through the target virtual network adapter; and converting the original message into target data based on the target user mode protocol stack. Therefore, a plurality of objects can share one user mode protocol stack, so that the memory occupation amount can be reduced, and the utilization rate of a processor can be improved.

Description

Data processing method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technology, and more particularly, to the field of artificial intelligence, network traffic processing, and the like.
Background
The user mode is a running level of the operating system, which corresponds to the kernel mode. When a process executes a system call and falls into kernel code for execution, the state of the process is the kernel state. When the process executes the user's own code, the state of the process is the user state.
The user mode protocol stack refers to a protocol stack operating in a user mode. The user mode protocol stack can provide better performance than the kernel mode protocol stack, so the method can be applied to the scenes with larger concurrency and throughput in the network. For example, the user mode protocol stack may be used to solve the C10M (i.e., a single million concurrent connections) problem.
Disclosure of Invention
The present disclosure provides a data processing method, apparatus, device, storage medium, and program product.
According to an aspect of the present disclosure, there is provided a data processing method including: in response to receiving an original message from a target object, determining a target virtual network adapter corresponding to the target object; sending the original message to a target user mode protocol stack corresponding to the target virtual network adapter through the target virtual network adapter; and converting the original message into target data based on the target user mode protocol stack.
According to another aspect of the present disclosure, there is provided a data processing apparatus including: the determining module is used for responding to the received original message from the target object and determining a target virtual network adapter corresponding to the target object; the sending module is used for sending the original message to a target user mode protocol stack corresponding to the target virtual network adapter through the target virtual network adapter; and the processing module is used for processing the original message based on the target user mode protocol stack to obtain target data.
Another aspect of the present disclosure provides an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the embodiments of the present disclosure.
According to another aspect of the disclosed embodiments, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method shown in the disclosed embodiments.
According to another aspect of the embodiments of the present disclosure, there is provided a computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the steps of the method shown in the embodiments of the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of an application scenario in which a data processing method may be applied according to an embodiment of the present disclosure;
FIG. 2 schematically shows a flow diagram of a data processing method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a method of sending an original message to a target user mode protocol stack according to an embodiment of the present disclosure;
FIG. 4 schematically shows a flow chart of a data processing method according to another embodiment of the present disclosure;
FIG. 5 schematically shows a flow diagram of a data processing method according to another embodiment of the present disclosure;
FIG. 6 schematically shows a schematic diagram of a data processing method according to another embodiment of the present disclosure;
FIG. 7 is a block diagram of a data processing apparatus used to implement an embodiment of the present disclosure; and
FIG. 8 schematically shows a block diagram of an example electronic device that may be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
An application scenario in which the data processing method can be applied provided by the present disclosure will be described below with reference to fig. 1.
Fig. 1 is a schematic diagram of an application scenario to which a data processing method may be applied according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of an application scenario in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the application scenario 100 includes terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be various servers having a communication traffic processing function, and may include, for example, a game acceleration server, an internet of things access server, a VPN (Virtual Private Network) server, a database server, and the like.
The Server 105 may be a cloud Server, which is also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service extensibility in a conventional physical host and VPS service ("Virtual Private Server", or "VPS" for short). Server 105 may also be a server of a distributed system or a server that incorporates a blockchain.
The server 105 may include a physical network adapter (also known as a physical network card), a user mode protocol stack, and application layer programs. The physical network adapter may be used to receive data packets sent by the terminal devices 101, 102, 103 over the network 104. The user mode protocol stack may be used to convert data packets into target data that may be processed by application layer programs. The application layer program may be used to perform processing such as analysis on the target data and generate a processing result. Such as web pages, information or data, etc., that the application layer program may obtain or generate from the target data.
According to the embodiment of the disclosure, the IP addresses of different terminal devices in the same intranet are the same. For the data messages from these terminal equipments, if they are processed in the same user mode protocol stack, the problem of IP address conflict will result. If a corresponding user mode protocol stack is set for each terminal device for processing the message of the corresponding user, the occupied memory is large, and the utilization rate of the processor is low.
Based on this, in this embodiment, a virtual network adapter (also referred to as a virtual network card) may be created for each terminal device. After receiving the message from the terminal device, determining a virtual network adapter corresponding to the terminal device, and sending the message to a user mode protocol stack through the virtual network adapter. Therefore, the method and the device can realize that multiple users share one user mode protocol stack, thereby improving the processing capacity of the server, reducing the memory occupation amount and improving the utilization rate of the processor.
It should be noted that the data processing method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the data processing apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The data processing method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the data processing apparatus provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure, application and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations, necessary confidentiality measures are taken, and the customs of the public order is not violated.
In the technical scheme of the disclosure, before the personal information of the user is acquired or collected, the authorization or the consent of the user is acquired.
The data processing method provided by the present disclosure will be described below with reference to fig. 2.
Fig. 2 schematically shows a flow chart of a data processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the data processing method 200 includes determining a target virtual network adapter corresponding to a target object in response to receiving an original packet from the target object in operation S210.
According to an embodiment of the present disclosure, the target object may include, for example, a terminal device used by a user. The primitive packet may include, for example, a TCP (Transmission Control Protocol) Datagram, a UDP (User Datagram Protocol) Datagram, and the like.
Then, in operation S220, the original packet is sent to the target user mode protocol stack corresponding to the target virtual network adapter through the target virtual network adapter.
According to an embodiment of the present disclosure, a virtual network adapter, i.e., a network environment is simulated by software, simulating a network adapter. The method and the device can be used for receiving the data message of the corresponding object and sending the data message to the corresponding user mode protocol stack.
According to an embodiment of the present disclosure, a user mode protocol stack may be used to convert a message into data that an application may process. In this embodiment, for example, one or more user mode protocol stacks may be provided, and each user mode protocol stack may be provided with one or more virtual network adapters. Each object may correspond to a virtual network adapter.
In operation S230, the original packet is converted into target data based on the target user mode protocol stack.
According to the embodiment of the disclosure, the original message can be converted into a format which can be processed by the application layer program based on the target user mode protocol stack to obtain the target data, so that the application layer program can subsequently realize various functions, such as proxy, forwarding and the like, according to the target data. For example, the original packet may be converted into an RTP (Real-time Transport Protocol) packet format or the like. RTP is a network transport protocol that can provide data with an end-to-end delivery service with real-time features, such as interactive video audio or analog data under multicast or unicast network services.
According to the embodiment of the disclosure, each object is configured with one virtual network adapter, after the message of the object is received, the virtual network adapter corresponding to the object is determined, and the message is sent to the user mode protocol stack through the virtual network adapter. Therefore, a plurality of objects can share one user mode protocol stack, so that the memory occupation amount can be reduced, and the utilization rate of the processor is improved.
According to the embodiment of the disclosure, for example, the target object may be user-identified according to the original message, and the target virtual network adapter corresponding to the target object may be determined according to the identification result.
According to an embodiment of the present disclosure, the original packet may include an object identifier of the target object. Based on this, for example, object identifications in the original message can be recognized. And then determining the virtual network adapter corresponding to the object identification as a target virtual network adapter.
According to another embodiment of the present disclosure, a target transmission tunnel may also be established with a target object. And then receiving the original message through the target transmission tunnel. Based on this, for example, an object identification corresponding to the target transport tunnel may be determined. And then determining the virtual network adapter corresponding to the object identification as a target virtual network adapter.
The method for sending an original message to a target user mode protocol stack provided by the present disclosure will be described below with reference to fig. 3.
Fig. 3 schematically illustrates a flow chart of a method for sending an original message to a target user mode protocol stack according to an embodiment of the present disclosure.
As shown in fig. 3, the method 320 for sending the original packet to the target user mode protocol stack includes sending the original packet to the target virtual network adapter in operation S321.
According to embodiments of the present disclosure, an original packet may be received, for example, by a physical network adapter and then sent from the physical network adapter to a corresponding target virtual network adapter.
In operation S322, the target virtual network adapter is used to add the target network adapter identification information of the target virtual network adapter to the original message, so as to obtain an intermediate message.
In accordance with embodiments of the present disclosure, each virtual network adapter may be configured with network adapter identification information that may be used to uniquely represent the virtual network adapter. The network adapter identification information may be, for example, an ID (identification code) of the virtual network adapter.
According to the disclosed embodiments, for example, the target network adapter identification information may be written into an original field of the original message, and for example, the target network adapter identification information may be written into an idle field in the original message. Or, a field may be added in the original message, and the identification information of the target network adapter is written in the added field.
In operation S323, the intermediate packet is sent from the target virtual network adapter to the target user mode protocol stack.
According to the embodiment of the disclosure, after receiving the intermediate message, the user mode protocol stack may determine from which object the data in the intermediate message comes according to the network adapter identification information in the intermediate message. Even if the IP addresses of a plurality of objects are the same, the user mode protocol stack can distinguish the plurality of objects when processing the message, thereby solving the problem of conflict caused by the same IP addresses of the objects.
According to an embodiment of the present disclosure, a server may include, for example, a plurality of processors. The processor may include, for example, a Central Processing Unit (CPU). Load balancing may be performed for the plurality of processors to improve processing efficiency.
Based on this, fig. 4 schematically shows a flow chart of a data processing method according to another embodiment of the present disclosure.
As shown in fig. 4, the data processing method 400 includes acquiring load information of a plurality of processors in operation S440.
According to an embodiment of the present disclosure, load information of a processor may be used to represent a load degree of the processor. For example, in the present embodiment, the load information of the processor may include, for example, the utilization rate of the processor, the amount of threads currently being processed, the amount of processes currently being processed, and the like.
In accordance with embodiments of the present disclosure, a user mode protocol stack may run in each processor.
For example, in this embodiment, the number N of processors may be acquired in advance. Wherein N is a positive integer. And correspondingly, starting N user mode protocol stacks, wherein the user mode protocol stacks can correspond to the processors one by one, and one user mode protocol stack is operated in each processor.
Then, in operation S450, a target processor among the plurality of processors is determined according to the load information of the plurality of processors.
According to the embodiment of the disclosure, the processor with the lowest load degree in the plurality of processors can be determined as the target processor according to the load information of the plurality of processors. If the plurality of processors are equally loaded, any one of the plurality of processors may be selected as the target processor.
For example, the utilization rate of each of the plurality of processors may be obtained by taking the utilization rate as the load information. The least utilized processor of the plurality of processors is then determined as the target processor.
In operation S460, for the target object, a target virtual network adapter corresponding to the target object is run in the target processor.
According to embodiments of the present disclosure, a target virtual network adapter may be used to receive a data packet from a target object.
Next, in operation S410, in response to receiving the original packet from the target object, a target virtual network adapter corresponding to the target object is determined.
In operation S420, the original packet is sent to a target user mode protocol stack corresponding to the target virtual network adapter through the target virtual network adapter.
In operation S430, the original packet is converted into target data based on the target user mode protocol stack.
For example, reference may be made to the above in operations S410 to S430 according to an embodiment of the present disclosure, and details are not described herein.
According to an embodiment of the present disclosure, in the case where a server serves a plurality of objects, the above-described operations S440 to S460 may be performed with each object as a target object, thereby running a virtual network adapter corresponding to each object in each processor. When a data message from an object is received, the data message can be provided to a user mode protocol stack in the same processor through a virtual network adapter running in the corresponding processor.
In accordance with embodiments of the present disclosure, a user mode protocol stack may run in each processor, as well as one or more virtual network adapters. Each virtual network adapter corresponds to an object.
According to the embodiment of the present disclosure, the virtual network adapter may be, for example, independently arranged with respect to the corresponding user mode protocol stack, or may be combined with the corresponding user mode protocol stack to become a user mode protocol stack module. The present disclosure is not particularly limited thereto.
According to the embodiment of the disclosure, the objects which need to provide services can be obtained in advance, and then a virtual network adapter is configured for each object. Alternatively, a virtual network adapter may be generated for an object when the physical network adapter first receives a data packet of the object. When the physical network adapter subsequently receives the data packet of the object again, the data packet may be sent to the virtual network adapter corresponding to the object.
If the traffic status information of all objects is stored together, the traffic status information may affect each other, and problems such as memory space competition, entry competition, etc. may occur.
According to the embodiment of the present disclosure, for different virtual network adapters corresponding to the same user mode protocol stack, different state tables may be allocated to the different virtual network adapters, so as to record traffic state information of objects corresponding to the virtual network adapters. Therefore, the flow states of different objects are completely isolated, and the mutual influence is reduced.
Based on this, fig. 5 schematically shows a flow chart of a data processing method according to another embodiment of the present disclosure.
As shown in fig. 5, the data processing method may further include operations S570 to S580.
In operation S570, traffic status information of the target object is acquired.
According to the embodiment of the present disclosure, the traffic status information may be used to indicate a status in a traffic processing process, and may include, for example, a connection status with a target object, socket information, traffic information, and the like. The connection status may include, for example, an unconnected status, a handshake status, a connected status, and the like. socket information may be used to indicate endpoints for two-way communication between application processes on different hosts in a network. Traffic information may include, for example, the type of traffic, bandwidth, amount of data, and so on.
In operation S580, a state table is configured for the target virtual network adapter according to the traffic state information.
According to embodiments of the present disclosure, a state table may be generated for a target virtual network adapter, for example, after the target virtual network adapter is run. And then acquiring the flow state information of the target object in a preset period, and configuring a state table for the target virtual network adapter according to the flow state information. The predetermined period may be set according to actual needs, and the disclosure is not limited thereto.
According to an embodiment of the present disclosure, traffic status information may be recorded in a status table, for example.
According to embodiments of the present disclosure, a state table of a target virtual network adapter may be stored in a cache of a target processor. According to other embodiments of the present disclosure, the state table of the target virtual network adapter may be stored in other locations, which is not specifically limited by the present disclosure.
According to the embodiment of the disclosure, each object corresponds to one virtual network adapter, and a state table can be configured for each virtual network adapter, so as to record the traffic state information of the corresponding object. Therefore, the flow states of different users are isolated, and the mutual influence is reduced.
According to other embodiments of the present disclosure, it may also be determined whether a connection is established with the corresponding object according to the state table. In the case where it is determined that the connection is not established, a connection may be established with the object. If an existing connection is determined, processing such as flow control may be performed based on the data in the status table. The flow control may include, for example, limiting the flow, limiting the bandwidth, and the like.
For example, the data amount of the traffic from the target object may be periodically detected, and the total data amount of the traffic of the target object in each detection period may be recorded in the state table. And in the case that the latest one of the total data amount is larger than the preset flow threshold value, limiting the flow of the target object below a preset flow upper limit or limiting the bandwidth of the target object below a preset bandwidth upper limit. The detection period, the predetermined traffic threshold, the predetermined traffic upper limit, and the predetermined bandwidth upper limit may be set according to actual needs, respectively.
The data processing method shown above is further explained with reference to fig. 6 in conjunction with a specific embodiment. Those skilled in the art will appreciate that the following example embodiments are only for the understanding of the present disclosure, and the present disclosure is not limited thereto.
Fig. 6 schematically shows a schematic diagram of a data processing method according to another embodiment of the present disclosure.
As shown in fig. 6, the server includes a physical network adapter and a plurality of processors, which may include, for example, CPU 1, CPU 2, and CPU N. A process or thread may be initiated for each of the plurality of processors for implementing an object state protocol stack.
According to the embodiment of the present disclosure, a virtual network adapter may be configured for each object, and the object state protocol stack may obtain the data packet of the object through the virtual network.
According to the embodiment of the disclosure, the objects which need to provide services can be obtained in advance, and then a virtual network adapter is configured for each object. Alternatively, a virtual network adapter may be generated for an object when the physical network adapter first receives a data packet of the object. When the physical network adapter subsequently receives the data packet of the object again, the data packet may be sent to the virtual network adapter corresponding to the object.
According to the embodiment of the disclosure, for each object, the currently idle CPU may be determined according to a load balancing policy. And running a virtual network adapter corresponding to the object in the CPU, wherein the virtual network adapter is used for receiving the data message of the object.
For example, in the present embodiment, a virtual network adapter a 'corresponding to the object a and a virtual network adapter B' corresponding to the object B may be run in the CPU 1. A virtual network adapter C' corresponding to the object C may be run in the CPU 2. A virtual network adapter N' corresponding to the object N may be run in the CPU N.
According to embodiments of the present disclosure, a corresponding state table may be configured for each virtual network adapter. The state table may be used to record various information in the process of processing the data packet from the corresponding object, such as TCP connection state, socket information, traffic information, and the like.
For example, in this embodiment, an object a state table may be configured for the virtual network adapter a ', an object B state table may be configured for the virtual network adapter B', an object C state table may be configured for the virtual network adapter C ', and an object N state table may be configured for the virtual network adapter N'.
According to the embodiment of the disclosure, when the physical network adapter receives a data packet, user authentication and traffic identification can be performed on the data packet to determine a target object corresponding to the data packet, and then the data packet is sent to the virtual network adapter corresponding to the target object. For example, when the data packet includes an object identifier, user authentication may be performed according to the object identifier in the data packet, so as to determine a target object corresponding to the data packet. For another example, when the data packet is received through a transmission tunnel, the data packet may be subjected to traffic recognition to determine an object identifier corresponding to the transmission tunnel, so as to determine a corresponding target object according to the object identifier.
Based on this, the data messages from the object A to the virtual network adapter A 'in the CPU 1, the data messages from the object B to the virtual network adapter B' in the CPU 1, the data messages from the object C to the virtual network adapter C 'in the CPU 2, and the data messages from the object N to the virtual network adapter N' in the CPU N.
According to an embodiment of the present disclosure, whether a connection is established with a corresponding object may be determined according to a state table. In the case where it is determined that the connection is not established, a connection may be established with the object. When an existing connection is determined, processing such as flow control may be performed based on the flow information in the status table. The flow control may include, for example, limiting the flow, limiting the bandwidth, setting a token bucket, and so on.
The object state protocol stack in each CPU can acquire the message through the virtual network adapter in the same CPU and process the message. For example, the object state protocol stack may convert messages into messages of a predetermined protocol. The predetermined protocol may include, for example, UDP, RTP, etc.
Then, the converted message may be sent to a corresponding application layer program, so that the application layer program can implement various functions according to the message.
The data processing apparatus provided by the present disclosure will be described below with reference to fig. 7.
Fig. 7 schematically shows a block diagram of a data processing device according to an embodiment of the present disclosure.
As shown in fig. 7, the data processing apparatus 700 includes a determination module 710, a transmission module 720, and a processing module 730.
The determining module 710 is configured to determine, in response to receiving the original packet from the target object, a target virtual network adapter corresponding to the target object.
A sending module 720, configured to send the original packet to a target user mode protocol stack corresponding to the target virtual network adapter through the target virtual network adapter.
And the processing module 730 is configured to process the original packet based on the target user mode protocol stack to obtain target data.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
Fig. 8 schematically illustrates a block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The calculation unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
A number of components in the device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, or the like; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, or the like; and a communication unit 809 such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 801 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and the like. The calculation unit 801 executes the respective methods and processes described above, such as the data processing method. For example, in some embodiments, the data processing method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and/or installed onto device 800 via ROM 802 and/or communications unit 809. When loaded into RAM 803 and executed by the computing unit 801, a computer program may perform one or more steps of the data processing method described above. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the data processing method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (12)

1. A method of data processing, comprising:
in response to receiving an original message from a target object, determining a target virtual network adapter corresponding to the target object;
sending the original message to a target user mode protocol stack corresponding to the target virtual network adapter through the target virtual network adapter; and
and converting the original message into target data based on the target user mode protocol stack.
2. The method of claim 1, wherein the original message includes an object identification of the target object; the determining a target virtual network adapter corresponding to the target object comprises:
identifying an object identifier in the original message; and
and determining the virtual network adapter corresponding to the object identification as the target virtual network adapter.
3. The method of claim 1, further comprising:
establishing a target transmission tunnel with the target object; and
and receiving the original message through a target transmission tunnel.
4. The method of claim 3, wherein the determining a target virtual network adapter corresponding to the target object comprises:
determining an object identifier corresponding to the target transmission tunnel; and
and determining the virtual network adapter corresponding to the object identification as the target virtual network adapter.
5. The method of claim 1, wherein said sending, by the target virtual network adapter, the raw packet to a target user mode protocol stack corresponding to the target virtual network adapter comprises:
sending the original message to the target virtual network adapter;
adding the target network adapter identification information of the target virtual network adapter in the original message by using the target virtual network adapter to obtain an intermediate message; and
and sending the intermediate message from the target virtual network adapter to the target user mode protocol stack.
6. The method of claim 1, further comprising:
acquiring load information of a plurality of processors, wherein a user mode protocol stack runs in each processor;
determining a target processor in the plurality of processors according to the load information of the plurality of processors; and
and aiming at the target object, running a target virtual network adapter corresponding to the target object in the target processor.
7. The method of claim 6, further comprising:
acquiring flow state information of the target object; and
and configuring a state table for the target virtual network adapter according to the flow state information.
8. The method of claim 7, further comprising:
and controlling the flow of the target object according to the state table.
9. A data processing apparatus comprising:
the determining module is used for responding to the received original message from the target object and determining a target virtual network adapter corresponding to the target object;
the sending module is used for sending the original message to a target user mode protocol stack corresponding to the target virtual network adapter through the target virtual network adapter; and
and the processing module is used for processing the original message based on the target user mode protocol stack to obtain target data.
10. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
11. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
12. A computer program product comprising computer program/instructions, characterized in that the computer program/instructions, when executed by a processor, implement the steps of the method according to any of claims 1-8.
CN202210371154.6A 2022-04-08 2022-04-08 Data processing method, device, equipment and storage medium Active CN114697391B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210371154.6A CN114697391B (en) 2022-04-08 2022-04-08 Data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210371154.6A CN114697391B (en) 2022-04-08 2022-04-08 Data processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114697391A true CN114697391A (en) 2022-07-01
CN114697391B CN114697391B (en) 2023-08-18

Family

ID=82142330

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210371154.6A Active CN114697391B (en) 2022-04-08 2022-04-08 Data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114697391B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115460470A (en) * 2022-08-19 2022-12-09 武汉烽火技术服务有限公司 Multicast data forwarding method, device, equipment and readable storage medium
CN115525415A (en) * 2022-10-19 2022-12-27 科东(广州)软件科技有限公司 Data processing method, device, equipment and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040176942A1 (en) * 2003-03-04 2004-09-09 International Business Machines Corporation Method, system and program product for behavioral simulation(s) of a network adapter within a computing node or across multiple nodes of a distributed computing environment
CN110418329A (en) * 2018-04-28 2019-11-05 华为技术有限公司 A kind of wireless communication device and wireless communications method
CN110932890A (en) * 2019-11-20 2020-03-27 厦门网宿有限公司 Data transmission method, server and computer readable storage medium
CN111294220A (en) * 2018-12-07 2020-06-16 网宿科技股份有限公司 Network isolation configuration method and device based on nginx
CN111294316A (en) * 2018-12-07 2020-06-16 网宿科技股份有限公司 Network isolation method and device based on user mode protocol stack virtual router
CN111835544A (en) * 2019-04-19 2020-10-27 厦门网宿有限公司 Monitoring method and system of virtual router based on user mode protocol stack
CN112422453A (en) * 2020-12-09 2021-02-26 新华三信息技术有限公司 Message processing method, device, medium and equipment
WO2022068756A1 (en) * 2020-09-29 2022-04-07 华为云计算技术有限公司 Service mesh system employing microservice, and service governance method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040176942A1 (en) * 2003-03-04 2004-09-09 International Business Machines Corporation Method, system and program product for behavioral simulation(s) of a network adapter within a computing node or across multiple nodes of a distributed computing environment
CN110418329A (en) * 2018-04-28 2019-11-05 华为技术有限公司 A kind of wireless communication device and wireless communications method
US20210068069A1 (en) * 2018-04-28 2021-03-04 Huawei Technologies Co., Ltd. Wireless communications apparatus and wireless communication method
CN111294220A (en) * 2018-12-07 2020-06-16 网宿科技股份有限公司 Network isolation configuration method and device based on nginx
CN111294316A (en) * 2018-12-07 2020-06-16 网宿科技股份有限公司 Network isolation method and device based on user mode protocol stack virtual router
CN111835544A (en) * 2019-04-19 2020-10-27 厦门网宿有限公司 Monitoring method and system of virtual router based on user mode protocol stack
CN110932890A (en) * 2019-11-20 2020-03-27 厦门网宿有限公司 Data transmission method, server and computer readable storage medium
WO2022068756A1 (en) * 2020-09-29 2022-04-07 华为云计算技术有限公司 Service mesh system employing microservice, and service governance method
CN112422453A (en) * 2020-12-09 2021-02-26 新华三信息技术有限公司 Message processing method, device, medium and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
姜惠友;李峻峰;李丹;: "高性能网络协议栈兼容性研究", 电信科学, no. 05 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115460470A (en) * 2022-08-19 2022-12-09 武汉烽火技术服务有限公司 Multicast data forwarding method, device, equipment and readable storage medium
CN115460470B (en) * 2022-08-19 2024-03-26 烽火通信科技股份有限公司 Multicast data forwarding method, device, equipment and readable storage medium
CN115525415A (en) * 2022-10-19 2022-12-27 科东(广州)软件科技有限公司 Data processing method, device, equipment and medium
CN115525415B (en) * 2022-10-19 2023-08-11 科东(广州)软件科技有限公司 Data processing method, device, equipment and medium

Also Published As

Publication number Publication date
CN114697391B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
CN114697391B (en) Data processing method, device, equipment and storage medium
CN113656176B (en) Cloud equipment distribution method, device and system, electronic equipment, medium and product
KR20210156243A (en) Training methods of deep-running frameworks, devices and storage media
US9641595B2 (en) System management apparatus, system management method, and storage medium
CN114500633B (en) Data forwarding method, related device, program product and data transmission system
US11005797B2 (en) Method, system and server for removing alerts
CN115514718B (en) Data interaction method, control layer and equipment based on data transmission system
EP4142258A1 (en) Edge computing network, data transmission method and apparatus, device and storage medium
CN116418689A (en) Request message response method and device, electronic equipment and storage medium
CN112860796B (en) Method, apparatus, device and storage medium for synchronizing data
CN114422404A (en) Flow statistical method, device, equipment and storage medium
CN115373831A (en) Data processing method, device and computer readable storage medium
CN112714420A (en) Network access method and device of wifi hotspot providing equipment and electronic equipment
CN116260855B (en) Communication method, communication device, electronic equipment and storage medium
CN114827055B (en) Data mirroring method and device, electronic equipment and switch cluster
CN114793234B (en) Message processing method, device, equipment and storage medium
CN115664842B (en) Communication link setting method, device, equipment and storage medium
CN114500438B (en) File sharing method and device, electronic equipment and storage medium
CN115277506B (en) Load balancing equipment testing method and system
EP3993366A2 (en) Network load balancer, request message distribution method, program product and system
CN117729006A (en) Route risk analysis method and device based on VPC network, electronic equipment and medium
CN113946702A (en) Image feature storage method and device, storage medium and electronic equipment
CN117336366A (en) Data transmission method and device, terminal and storage medium
CN115767786A (en) Multi-cluster communication method and device, electronic equipment and storage medium
CN115103019A (en) Access request forwarding method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant