[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

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

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

Info

Publication number
CN114697391B
CN114697391B CN202210371154.6A CN202210371154A CN114697391B CN 114697391 B CN114697391 B CN 114697391B CN 202210371154 A CN202210371154 A CN 202210371154A CN 114697391 B CN114697391 B CN 114697391B
Authority
CN
China
Prior art keywords
target
network adapter
virtual network
protocol stack
original message
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.)
Active
Application number
CN202210371154.6A
Other languages
Chinese (zh)
Other versions
CN114697391A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The disclosure provides a data processing method, a device, equipment, a storage medium and a program product, and relates to the technical field of computers, in particular to the technical fields of artificial intelligence, network traffic processing and the like. The specific implementation scheme is as follows: determining a target virtual network adapter corresponding to the target object in response to receiving the original message from the target object; sending the original message to a target user state 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 state protocol stack. Therefore, a user state protocol stack can be shared by a plurality of objects, so that the occupied amount of the memory can be reduced, and the utilization rate of the processor is improved.

Description

Data processing method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the technical fields of artificial intelligence, network traffic processing, and the like.
Background
The user state is an operating level of the operating system, which corresponds to the kernel state. When a process executes a system call and falls into kernel code for execution, the state of the process is kernel mode. When the process executes the code of the user, the state of the process is the user state.
The user state protocol stack refers to a protocol stack running in a user state. The user mode protocol stack can provide better performance than the kernel mode protocol stack, so that the user mode protocol stack can be applied to the scene of higher concurrency and higher throughput in a network. For example, a user mode protocol stack may be used to solve the C10M (i.e., single-machine multi-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: determining a target virtual network adapter corresponding to a target object in response to receiving an original message from 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 state protocol stack.
According to another aspect of the present disclosure, there is provided a data processing apparatus including: the determining module is used for determining a target virtual network adapter corresponding to a target object in response to receiving an original message from the target object; the sending module is used for sending the original message to a target user state 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 state protocol stack to obtain target data.
Another aspect of the present disclosure provides an electronic device, comprising: 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 methods shown in the embodiments of the present disclosure.
According to another aspect of the disclosed embodiments, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the methods shown in the disclosed embodiments.
According to another aspect of the disclosed embodiments, there is provided a computer program product comprising a computer program/instruction, characterized in that the computer program/instruction, when executed by a processor, implements the steps of the method shown in the disclosed embodiments.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for 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 illustrates a flow chart of a data processing method according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of a method of sending an original message to a target user state protocol stack, in accordance with an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of a data processing method according to another embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow chart of a data processing method according to another embodiment of the present disclosure;
FIG. 6 schematically illustrates 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 illustrates 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 in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one 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 in the present disclosure will be described below with reference to fig. 1.
Fig. 1 is a schematic view of an application scenario in which a data processing method may be applied according to an embodiment of the present disclosure. It should be noted that fig. 1 illustrates 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 it 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 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and 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, 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 large management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS"). The 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 messages sent by the terminal devices 101, 102, 103 via the network 104. The user mode protocol stack may be used to convert the data packets into target data that the application layer program may process. The application layer program may be used to perform processing such as analysis on the target data and generate a processing result. For example, the application layer program may obtain or generate web pages, information, data, etc. based on 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 data messages from these terminal devices, if they are processed in the same user mode protocol stack, the problem of IP address collision may result. If a corresponding user state protocol stack is set for each terminal device and is used for processing the message of the corresponding user, the occupied memory is larger, and the processor utilization rate is lower.
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 equipment, determining a virtual network adapter corresponding to the terminal equipment, and sending the message to a user mode protocol stack through the virtual network adapter. Therefore, a user state protocol stack can be shared by multiple users, so that the processing capacity of the server can be improved, the occupied amount of the memory can be reduced, and the utilization rate of the processor can be improved.
It should be noted that the data processing method provided in the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the data processing apparatus provided by the embodiments of the present disclosure may be generally provided in the server 105. The data processing method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the data processing apparatus provided by the embodiments of the present disclosure may also be provided 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 related processes of collecting, storing, using, processing, transmitting, providing, disclosing, applying and the like of the personal information of the user all conform to the regulations of related laws and regulations, necessary security measures are adopted, and the public order harmony is not violated.
In the technical scheme of the disclosure, the authorization or consent of the user is obtained before the personal information of the user is obtained or acquired.
The data processing method provided by the present disclosure will be described below with reference to fig. 2.
Fig. 2 schematically illustrates 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 message from the target object in operation S210.
According to embodiments of the present disclosure, the target object may include, for example, a terminal device used by a user. The original message may include, for example, a TCP (Transmission Control Protocol ) data message, a UDP (User Datagram Protocol, user datagram protocol) data message, and so on.
Then, in operation S220, the original message is transmitted to the target user mode protocol stack corresponding to the target virtual network adapter through the target virtual network adapter.
According to embodiments of the present disclosure, a virtual network adapter, i.e., a network environment is emulated in software, emulating a network adapter. The method 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 embodiments of the present disclosure, a user mode protocol stack may be used to convert messages into data that an application may process. In this embodiment, for example, one or more user mode protocol stacks may be set, and each user mode protocol stack may set one or more virtual network adapters. Each object may correspond to a virtual network adapter.
In operation S230, the original message is converted into the target data based on the target user state 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 state protocol stack to obtain target data, so that the application layer program can realize various functions, such as proxy, forwarding and the like, according to the target data. For example, the original message may be converted to an RTP (Real-time Transport Protocol ) message format, or the like. RTP is a network transport protocol that provides end-to-end transport services with real-time features for data, such as interactive video audio or analog data under multicast or unicast network services.
According to the embodiment of the disclosure, by configuring one virtual network adapter for each object, after receiving the message of the object, determining the virtual network adapter corresponding to the object, and sending the message to the user state protocol stack through the virtual network adapter. Therefore, a user state protocol stack can be shared by a plurality of objects, so that the occupied amount of the memory can be reduced, and the utilization rate of the processor is improved.
According to the embodiment of the disclosure, for example, the user identification can be performed on the target object according to the original message, and the target virtual network adapter corresponding to the target object is determined according to the identification result.
According to embodiments of the present disclosure, the original message may include an object identification of the target object. Based on this, for example, the object identification in the original message can be identified. Then, the virtual network adapter corresponding to the object identification is determined as the target virtual network adapter.
According to another embodiment of the present disclosure, a target transport tunnel may also be established with the 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. Then, the virtual network adapter corresponding to the object identification is determined as the target virtual network adapter.
The method for sending the original message to the target user state protocol stack provided in the present disclosure will be described below with reference to fig. 3.
Fig. 3 schematically illustrates a flow chart of a method of sending an original message to a target user state protocol stack according to an embodiment of the disclosure.
As shown in fig. 3, the method 320 for sending the original message to the target user state protocol stack includes sending the original message to the target virtual network adapter in operation S321.
According to embodiments of the present disclosure, an original message 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.
According to embodiments of the present disclosure, each virtual network adapter may be configured with network adapter identification information, which 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, the target network adapter identification information may be written into a field of the original message, for example, and the target network adapter identification information may be written into an idle field of the original message. Alternatively, a field may be newly added to the original packet, and the target network adapter identification information may be written into the newly added field.
In operation S323, the intermediate message is sent from the target virtual network adapter to the target user state protocol stack.
According to the embodiment of the disclosure, after receiving the intermediate message, the user state protocol stack can determine which object the data in the intermediate message comes from according to the network adapter identification information in the intermediate message. Even if the IP addresses of the objects are the same, the user state protocol stack can distinguish the objects when processing the message, so that the problem of conflict caused by the same IP addresses of the objects can be solved.
According to embodiments of the present disclosure, a server may include, for example, a plurality of processors. The processor may include, for example, a CPU (Central Processing Unit ). Load balancing may be performed for the plurality of processors to improve processing efficiency.
Based on this, fig. 4 schematically shows a flowchart 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 embodiments of the present disclosure, load information of a processor may be used to represent a degree of load of the processor. Illustratively, in the present embodiment, the load information of the processor may include, for example, a utilization rate of the processor, a thread amount currently being processed, a process amount currently being processed, and the like.
In accordance with embodiments of the present disclosure, a user mode protocol stack may be run in each processor.
Illustratively, in the present embodiment, the number N of processors may be acquired in advance. Wherein N is a positive integer. And then correspondingly starting N user state protocol stacks, wherein the user state protocol stacks can be in one-to-one correspondence with the processors, and one user state protocol stack is operated in each processor.
Then, in operation S450, a target processor among the plurality of processors is determined according to 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 load levels of the plurality of processors are the same, any one of the plurality of processors may be selected as the target processor.
Illustratively, taking the utilization rate as the load information as an example, the utilization rate of each of the plurality of processors may be acquired. And then determining the processor with the lowest utilization rate among the plurality of processors as a target processor.
In operation S460, for a target object, a target virtual network adapter corresponding to the target object is run in a target processor.
According to embodiments of the present disclosure, a target virtual network adapter may be used to receive data messages from a target object.
Next, in operation S410, a target virtual network adapter corresponding to the target object is determined in response to receiving the original message from the target object.
In operation S420, the original message is sent to the target user mode protocol stack corresponding to the target virtual network adapter through the target virtual network adapter.
In operation S430, the original message is converted into target data based on the target user state protocol stack.
Operations S410 to S430 may refer to the above, and are not described herein.
According to an embodiment of the present disclosure, in case that a server serves a plurality of objects, each object may be taken as a target object, and the above-described operations S440 to S460 may be performed, thereby running a virtual network adapter corresponding to each object in each processor. When receiving the data message from the object, the data message can be provided to the user mode protocol stack in the same processor through the virtual network adapter running in the corresponding processor.
In accordance with embodiments of the present disclosure, one user mode protocol stack may be run in each processor, along with one or more virtual network adapters. Each virtual network adapter corresponds to an object.
According to the embodiments of the present disclosure, the virtual network adapter may be configured independently, for example, with respect to a corresponding user mode protocol stack, or may be combined with the corresponding user mode protocol stack to form a user mode protocol stack module. The present disclosure is not particularly limited thereto.
According to an embodiment of the present disclosure, an object that needs to be serviced may be acquired in advance, and then one virtual network adapter may be configured for each object. Alternatively, a virtual network adapter may be generated for the object when the physical network adapter first receives a data packet for the object. When the physical network adapter subsequently receives the data message of the object, the data message can be sent to the virtual network adapter corresponding to the object.
If the traffic status information of all the objects are stored together, the traffic status information may affect each other, and problems such as storage space competition, entry competition, etc. occur.
According to the embodiment of the disclosure, for different virtual network adapters corresponding to the same user mode protocol stack, different state tables can be allocated to the different virtual network adapters and used for recording traffic state information of objects corresponding to the virtual network adapters. Thus, the flow states of different objects are completely isolated, and the influence of the flow states is reduced.
Based on this, fig. 5 schematically shows a flowchart 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 state information of the target object is acquired.
According to embodiments of the present disclosure, traffic state information may be used to represent a state during traffic processing, and may include, for example, a connection state with a target object, socket information, traffic information, and the like. The connection state may include, for example, an unconnected state, a handshake state, a connected state, and so on. socket information may be used to indicate endpoints in a network that are in bi-directional communication between application processes on different hosts. 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, which is not particularly limited in the present disclosure.
According to embodiments of the present disclosure, traffic state information may be recorded in a state table, for example.
According to embodiments of the present disclosure, a state table of a target virtual network adapter may be stored into a cache of a target processor. According to other embodiments of the present disclosure, the state table of the target virtual network adapter may also 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 and used for recording traffic state information of the corresponding object. Therefore, the flow states of different users are isolated, and the influence of the users on each other is reduced.
According to other embodiments of the present disclosure, it may also be determined whether a connection is established with a corresponding object according to a state table. In the event that it is determined that a connection is not established, a connection may be established with the object. In the case where the existing connection is determined, processing such as flow control may be performed based on data in the state table. Flow control may include, for example, limiting flow, limiting bandwidth, and the like.
For example, the data amount of the flow from the target object may be periodically detected, and the total data amount of the flow of the target object in each detection period may be recorded in the state table. In the case where the total data amount is more than the predetermined flow threshold recently, the flow of the target object is limited below the predetermined flow upper limit or the bandwidth of the target object is limited below the predetermined bandwidth upper limit. The detection period, the preset flow threshold, the preset flow upper limit and the preset bandwidth upper limit can be set according to actual needs respectively.
The data processing method shown above is further described with reference to fig. 6 in conjunction with a specific embodiment. Those skilled in the art will appreciate that the following example embodiments are merely for the understanding of the present disclosure, and the present disclosure is not limited thereto.
Fig. 6 schematically illustrates a schematic diagram of a data processing method according to another embodiment of the present disclosure.
In fig. 6, the server is shown to include 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 started for each of the plurality of processors for implementing the object state protocol stack.
According to the embodiment of the disclosure, a virtual network adapter can be configured for each object, and the object state protocol stack can acquire the data message of the object through the virtual network.
According to an embodiment of the present disclosure, an object that needs to be serviced may be acquired in advance, and then one virtual network adapter may be configured for each object. Alternatively, a virtual network adapter may be generated for the object when the physical network adapter first receives a data packet for the object. When the physical network adapter subsequently receives the data message of the object, the data message can be sent to the virtual network adapter corresponding to the object.
According to embodiments of the present 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, and receiving the data message of the object.
Illustratively, 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. The 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 such as TCP connection state, socket information, traffic information, etc. during processing of the data message from the corresponding object.
In this embodiment, the object a state table may be configured for the virtual network adapter a ', the object B state table may be configured for the virtual network adapter B', the object C state table may be configured for the virtual network adapter C ', and the 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 the data message, user authentication and flow identification can be performed on the data message to determine a target object corresponding to the data message, and then the data message is sent to the virtual network adapter corresponding to the target object. For example, in the case that 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, in the case that the data packet is received through the 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 message from the object a is sent to the virtual network adapter a 'in the CPU 1, and the data message from the object B is sent to the virtual network adapter B' in the CPU 1, the data message from the object C is sent to the virtual network adapter C 'in the CPU 2, and the data message from the object N is sent to the virtual network adapter N' in the CPU N.
According to embodiments of the present disclosure, it may be determined whether a connection is established with a corresponding object according to a state table. In the event that it is determined that a connection is not established, a connection may be established with the object. When the existing connection is determined, processing such as flow control may be performed based on the flow information in the state table. Flow control may include, for example, limiting flow, limiting bandwidth, setting token bucket, and so forth.
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 a message into a message of a predetermined protocol. The predetermined protocol may include, for example, UDP, RTP, and the like.
The converted message may then be sent to a corresponding application layer program so that the application layer program may 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 apparatus 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.
A determining module 710, configured to determine, in response to receiving the original message from the target object, a target virtual network adapter corresponding to the target object.
And the sending module 720 is configured to send, through the target virtual network adapter, the original packet to a target user state protocol stack corresponding to the target virtual network adapter.
And a processing module 730, configured to process the original message based on the target user state protocol stack to obtain target data.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
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 telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary 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 computing 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 the bus 804.
Various components in device 800 are connected to I/O interface 805, including: an input unit 806 such as a keyboard, mouse, etc.; 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, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, or the like. 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.
The computing unit 801 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the respective methods and processes described above, such as a data processing method. For example, in some embodiments, the data processing method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 800 via ROM 802 and/or communication unit 809. When a computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the data processing method described above may be performed. 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 can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On 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, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code 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 code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. 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. The 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 pointing device (e.g., a mouse or 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 may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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 a client and a server. The client and server are typically 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 appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (11)

1. A data processing method, comprising:
determining a target virtual network adapter corresponding to a target object in response to receiving an original message from the target object;
sending the original message to a target user state protocol stack corresponding to the target virtual network adapter in a plurality of user state protocol stacks through the target virtual network adapter, wherein each user state protocol stack corresponds to a plurality of virtual network adapters, and each object corresponds to one virtual network adapter; and
and converting the original message into target data based on the target user state 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 includes:
identifying an object identifier in the original message; and
and determining the virtual network adapter corresponding to the object identifier 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 identifier as the target virtual network adapter.
5. The method of claim 1, wherein the sending, by the target virtual network adapter, the original message to a target user state protocol stack corresponding to the target virtual network adapter from among a plurality of user state protocol stacks, comprises:
sending the original message to the target virtual network adapter;
adding target network adapter identification information of the target virtual network adapter into 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:
load information of a plurality of processors is obtained, wherein a user mode protocol stack is operated in each processor;
determining a target processor in the plurality of processors according to 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 traffic 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 determining a target virtual network adapter corresponding to a target object in response to receiving an original message from the target object;
the sending module is used for sending the original message to a target user state protocol stack corresponding to the target virtual network adapter in a plurality of user state protocol stacks through the target virtual network adapter, wherein each user state protocol stack corresponds to a plurality of virtual network adapters, and each object corresponds to one virtual network adapter; and
and the processing module is used for processing the original message based on the target user state 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 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 storing computer instructions for causing the computer to perform the method of any one 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 CN114697391A (en) 2022-07-01
CN114697391B true 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)

Families Citing this family (2)

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

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* 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

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110418329A (en) * 2018-04-28 2019-11-05 华为技术有限公司 A kind of wireless communication device and wireless communications 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
高性能网络协议栈兼容性研究;姜惠友;李峻峰;李丹;;电信科学(05);全文 *

Also Published As

Publication number Publication date
CN114697391A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
US11218506B2 (en) Session maturity model with trusted sources
CN109729106B (en) Method, system and computer program product for processing computing tasks
CN114697391B (en) Data processing method, device, equipment and storage medium
CN114500633B (en) Data forwarding method, related device, program product and data transmission system
CN111414208A (en) Application program starting method, device and equipment
US10715424B2 (en) Network traffic management with queues affinitized to one or more cores
CN111177513B (en) Determination method and device of abnormal access address, electronic equipment and storage medium
CN107342929B (en) Method, device and system for sending new message notification
CN113778593B (en) Cloud desktop control method and device, electronic equipment, storage medium and program product
CN115514718B (en) Data interaction method, control layer and equipment based on data transmission system
CN117478590A (en) Message processing method and device, electronic equipment and storage medium
EP4142258A1 (en) Edge computing network, data transmission method and apparatus, device and storage medium
CN113726881B (en) Communication connection establishment method, related device and computer readable storage medium
EP3993366A2 (en) Network load balancer, request message distribution method, program product and system
CN112714420B (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
CN114979128A (en) Cross-region communication method and device and electronic equipment
CN115664842B (en) Communication link setting method, device, equipment and storage medium
CN116896583B (en) Remote control method, device, electronic equipment and storage medium
CN115037803B (en) Service calling method, electronic equipment and storage medium
CN115277506B (en) Load balancing equipment testing method and system
CN114827055B (en) Data mirroring method and device, electronic equipment and switch cluster
CN117459432B (en) Interface testing method, device, equipment and storage medium
CN116306407B (en) Verification method, device, equipment and storage medium of Network On Chip (NOC)
CN114500438B (en) File sharing method and device, electronic equipment and 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