A data processing method, device, equipment and computer readable storage medium

By assigning unique address information to each user and encapsulating it in the requested data block, the problem of high CPU resource consumption and memory utilization when the multi-user DHCP function and DNS function is implemented in the prior art is solved, and more efficient resource utilization is achieved.

CN116055452BActive Publication Date: 2025-03-14SANGFOR TECH INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211526729.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-30
Publication Date
2025-03-14
Estimated Expiration
2042-11-30

AI Technical Summary

Technical Problem

When implementing the DHCP and DNS functions of multiple users, the prior art needs to create a DHCP/DNS/DHCPv6 process for each user, resulting in a large CPU resource consumption and a high memory usage rate.

Method used

By receiving the requested data block from the user, each user is assigned a unique address information, and the address information is encapsulated in the requested data block and sent to the second data processing device to realize dynamic configuration of the host.

Benefits of technology

This method avoids creating a separate DHCP/DNS/DHCPv6 process for each user, and only needs to create a single process for all users, reducing CPU resource consumption and memory usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116055452B_ABST
    Figure CN116055452B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a data processing method, which includes: receiving a request data block sent by a user for realizing dynamic configuration of a host, and assigning address information to the user; wherein each user has unique address information; adding the address information to the request data block to obtain a target data block; sending the target data block to a second data processing device corresponding to the request data block; receiving a response data block sent by the second data processing device for realizing dynamic configuration of the host, and sending the response data block to the user based on the address information; wherein the response data block is determined by the second data processing device based on the request data block. The embodiment of the present application also discloses a data processing device, a device, and a computer-readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data processing method, device, equipment and computer-readable storage medium. Background Art

[0002] At present, the Dynamic Host Configuration Protocol (DHCP) function and Domain Name System (DNS) function of multiple users are usually implemented based on the Open VSwitch (OVS) standard; among them, the plug-in solution is to use DNSmasq to divide a namespace (NameSpace) for each user in the Internet Protocol Address (IP Address) in the Virtual Private Cloud (VPC) network (that is, to distinguish users by NameSpace), and then create a DHCP / DNS / DHCP for IPv6 (DHCPv6) process for each user, and each user implements the DHCP function and DNS function through their own DHCP / DNS / DHCPv6 process; however, in the process of implementing the DHCP function and DNS function of multiple users, the plug-in solution needs to create a DHCP / DNS / DHCPv6 process for each user to implement the DHCP function and DNS function, resulting in a large consumption of central processing unit (CPU) resources, thereby resulting in a large memory usage rate. Summary of the invention

[0003] To solve the above technical problems, the embodiments of the present application hope to provide a data processing method, apparatus, device and computer-readable storage medium, which can solve the problems of large CPU resource consumption and high memory usage in related technologies.

[0004] The technical solution of this application is implemented as follows:

[0005] A data processing method, the method comprising:

[0006] Receiving a request data block sent by a user for realizing dynamic configuration of a host, and allocating address information to the user; wherein each user has unique address information;

[0007] Adding the address information to the request data block to obtain a target data block;

[0008] Sending the target data block to a second data processing device corresponding to the request data block;

[0009] Receive a response data block sent by the second data processing device for implementing dynamic configuration of the host, and send the response data block to the user based on the address information; wherein the response data block is determined by the second data processing device based on the request data block.

[0010] In the above solution, the adding of the address information to the request data block to obtain the target data block includes:

[0011] Creating a target data packet at a target location of the requested data block;

[0012] The address information is added to the target data packet to obtain the target data block.

[0013] In the above solution, the step of creating a target data packet at a target location of the requested data block includes:

[0014] Creating a first sub-target data packet at a first sub-target position of the requested data block; wherein the target data packet includes the first sub-target data packet;

[0015] Correspondingly, the adding the address information to the target data packet to obtain the target data block includes:

[0016] The address information is added to the first sub-target data packet to obtain the target data block.

[0017] In the above solution, the step of creating a target data packet at a target location of the requested data block includes:

[0018] Creating a second sub-target data packet at the second sub-target position of the request data block, and creating a third sub-target data packet at the third sub-target position of the request data block; wherein the target data packet includes the second sub-target data packet and the third sub-target data packet;

[0019] In the above solution, the adding of the address information to the target data packet to obtain the target data block includes:

[0020] Add the address information to the second sub-target data packet to obtain the target data block.

[0021] In the above solution, the sending of the target data block to the second data processing device corresponding to the request data block includes:

[0022] Analyze the target data block to determine the target port number of the target data block;

[0023] The target data block is sent to the second data processing device based on the target port number.

[0024] A data processing method, applied to a second data processing device, comprising:

[0025] receiving a target data block sent by a first data processing device;

[0026] Decapsulating the target data block to obtain a request data block for realizing dynamic configuration of the host and address information allocated to the user; wherein each user has unique address information;

[0027] Based on the request data block, obtaining a response data block corresponding to the request data block for implementing dynamic configuration of the host;

[0028] The response data block is sent to the first data processing device based on the address information; wherein the response data block is used by the first data processing device to forward to the user.

[0029] In the above scheme, the decapsulation process of the target data block to obtain the request data block for realizing the dynamic configuration of the host and the address information allocated to the user includes:

[0030] In the case where the target data block includes a first sub-target data packet, the target data block is decapsulated using a first decapsulation method corresponding to the type of the first sub-target data packet to obtain the request data block and the address information;

[0031] In the case where the target data block includes a second sub-target data packet and a third sub-target data packet, the target data block is decapsulated using a second decapsulation method corresponding to the type of the second sub-target data packet to obtain the request data block and the address information.

[0032] A first data processing device, comprising:

[0033] An allocation unit, used for receiving a request data block sent by a user for realizing dynamic configuration of a host, and allocating address information to the user; wherein each user has unique address information;

[0034] A first processing unit, configured to add the address information to the request data block to obtain a target data block;

[0035] A first sending unit, configured to send the target data block to a second data processing device corresponding to the request data block;

[0036] The first receiving unit is used to receive a response data block sent by the second data processing device for implementing dynamic configuration of the host, and send the response data block to the user based on the address information; wherein the response data block is determined by the second data processing device based on the request data block.

[0037] A second data processing device, comprising:

[0038] A second receiving unit, configured to receive a target data block sent by the first data processing device;

[0039] A second processing unit is used to decapsulate the target data block to obtain a request data block for realizing dynamic configuration of the host and address information allocated to the user; wherein each user has unique address information;

[0040] An acquiring unit, configured to acquire, based on the request data block, a response data block corresponding to the request data block and used to implement dynamic configuration of the host;

[0041] The second sending unit is used to send the response data block to the first data processing device based on the address information; wherein the response data block is used by the first data processing device to forward it to the user.

[0042] A first data processing device, the first data processing device comprising: a first processor, a first memory and a first communication bus;

[0043] The first communication bus is used to realize the communication connection between the first processor and the first memory;

[0044] The first processor is used to execute the data processing program stored in the first memory to implement the steps of the above-mentioned data processing method.

[0045] A second data processing device, the second data processing device comprising: a second processor, a second memory, and a second communication bus;

[0046] The second communication bus is used to realize the communication connection between the second processor and the second memory;

[0047] The second processor is used to execute the data processing program stored in the second memory to implement the steps of the above-mentioned data processing method.

[0048] A computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the data processing method as described above.

[0049] The data processing method, apparatus, device and computer-readable storage medium provided in the embodiments of the present application first receive a request data block sent by a user for implementing dynamic configuration of a host, and assign unique address information to each user, then add the address information to the request data block to obtain a target data block, and then send the target data block to a second data processing device corresponding to the request data block, and then receive a response data block sent by the second data processing device for implementing dynamic configuration of the host, and send the response data block to the user based on the address information, wherein the response data block is determined by the second data processing device based on the request data block. In this way, users are distinguished by encapsulating the unique address information of each user in the request data block instead of distinguishing users through NameSpace. Therefore, there is no need to create a DHCP / DNS / DHCPv6 process for each user, but only needs to create a DHCP / DNS / DHCPv6 process for all users, so that the DHCP function and DNS function of each user can be realized, which not only reduces the consumption of CPU resources, but also reduces the memory usage. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application;

[0051] Figure 2 A flowchart of another data processing method provided in an embodiment of the present application;

[0052] Figure 3 A flowchart of another data processing method provided in an embodiment of the present application;

[0053] Figure 4 A schematic diagram of the structure of a DHCP request data block in a data processing method provided in an embodiment of the present application;

[0054] Figure 5 A schematic diagram of the structure of a target request data block in a data processing method provided in an embodiment of the present application;

[0055] Figure 6 A schematic diagram of the structure of another target request data block in a data processing method provided in an embodiment of the present application;

[0056] Figure 7 A schematic diagram of the structure of a first data processing device provided in an embodiment of the present application;

[0057] Figure 8 A schematic diagram of the structure of a second data processing device provided in an embodiment of the present application;

[0058] Fig. 9A schematic diagram of the structure of a first data processing device provided in an embodiment of the present application;

[0059] Fig.10 A schematic diagram of the structure of a second data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0061] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0062] The present application embodiment provides a data processing method, which can be applied to a first data processing device, referring to Figure 1 As shown, the method comprises the following steps:

[0063] Step 101: Receive a request data block sent by a user for implementing dynamic configuration of a host, and allocate address information to the user.

[0064] Each user has unique address information.

[0065] In the embodiment of the present application, the host dynamic configuration may refer to that when the client logs in to the second data processing device, the Internet Protocol Address (IPAddress) and the subnet mask assigned by the second data processing device can be automatically obtained; the request data block may refer to the request message; the address information can be used to uniquely identify the user, and the address information may be the virtual address information assigned by the first data processing device; it should be noted that a request data block may also include multiple data packets.

[0066] In a feasible implementation, the first data processing device may refer to a distributed virtual switch (DVS); the request data block used to implement dynamic configuration of the host may refer to a Dynamic Host Configuration Protocol (DHCP) request message, may refer to a Domain Name System (DNS) request message, may refer to a DHCPv6 (DHCP for IPv6) request message, and of course, the request data block may also refer to other request messages that can implement dynamic configuration of the host; the address information may refer to an address allocated to a user in a distributed virtual switch (DVS).

[0067] Step 102: Add address information to the request data block to obtain the target data block.

[0068] In the embodiment of the present application, adding the address information to the request data block may be achieved by encapsulating the address information and the request data block.

[0069] In a feasible implementation, when the request data block refers to a DHCP request message, the target data block may refer to a message obtained by adding address information to the DHCP request message; it should be noted that a target data block may also include multiple data packets.

[0070] In an embodiment of the present application, the address information may be processed first, and then the processed address information may be added to the request data block to obtain the target data block.

[0071] Step 103: Send the target data block to the second data processing device corresponding to the request data block.

[0072] Among them, the second data processing device may refer to a device that has a communication relationship with the first data processing device; in a feasible implementation, when the request data block refers to a DHCP request message, the second data processing device may refer to a device having a service corresponding to the DHCP request message, that is, the second data processing device may refer to a DHCP server; when the request data block refers to a DNS request message, the second data processing device may refer to a device having a service corresponding to the DNS request message, that is, the second data processing device may refer to a DNS server.

[0073] In an embodiment of the present application, the first data processing device may send the target data block to the second data processing device in real time through a virtual private cloud (VPC) network.

[0074] Step 104: Receive a response data block sent by the second data processing device for implementing dynamic configuration of the host, and send the response data block to the user based on the address information.

[0075] The response data block is determined by the second data processing device based on the request data block.

[0076] In an embodiment of the present application, the response data block may refer to a response message; the first data processing device may receive the response data block sent by the second data processing device in real time, and send the response data block to the user corresponding to the address information in real time; the host dynamic configuration may refer to the DHCP function and the DNS function.

[0077] The data processing method provided in the embodiment of the present application distinguishes users by encapsulating the unique address information of each user in a request data block, rather than distinguishing users by NameSpace. Therefore, there is no need to create a DHCP / DNS / DHCPv6 process for each user. Instead, only one DHCP / DNS / DHCPv6 process needs to be created for all users. This can implement the DHCP function and DNS function for each user, which not only reduces the consumption of CPU resources, but also reduces the memory usage.

[0078] Based on the above embodiments, the embodiments of the present application provide a data processing method, which is applied to a second data processing device, referring to Figure 2 As shown, the method comprises the following steps:

[0079] Step 201: Receive a target data block sent by a first data processing device.

[0080] In the embodiment of the present application, the second data processing device can receive the target data block sent by the first data processing device in real time through the VPC network.

[0081] Step 202: Decapsulate the target data block to obtain a request data block for implementing dynamic configuration of the host and address information allocated to the user.

[0082] Each user has unique address information.

[0083] In an embodiment of the present application, decapsulation is the reverse process of encapsulation. Decapsulation of a target data block may refer to disassembling the target data block and processing the information in the multiple data packets after disassembly to obtain a request data block and address information. It should be noted that when decapsulating the target data block, it is necessary to use a decapsulation method that matches the type of the data block when encapsulated.

[0084] Step 203: Based on the request data block, obtain a response data block corresponding to the request data block and used to implement dynamic configuration of the host.

[0085] In the embodiment of the present application, the second data processing device can obtain the response data block corresponding to the request data block in real time according to the request data block.

[0086] Step 204: Send a response data block to the first data processing device based on the address information.

[0087] The response data block is used by the first data processing device to forward to the user.

[0088] In the embodiment of the present application, the second data processing device may send a response data block to the first data processing device corresponding to the address information through the VPC network.

[0089] The data processing method provided in the embodiment of the present application first receives a target data block sent by a first data processing device, then decapsulates the target data block to obtain a request data block for implementing dynamic configuration of the host and address information allocated to the user, wherein each user has unique address information; then, based on the request data block, obtains a response data block for implementing dynamic configuration of the host corresponding to the request data block, and then sends the response data block to the first data processing device based on the address information; wherein the response data block is used by the first data processing device to forward to the user, so that the request data blocks and address information of multiple users can be obtained by only decapsulating the target data block generated in a DHCP / DNS / DHCPv6 process created for all users, without the need to decapsulate the target data block generated in the DHCP / DNS / DHCPv6 process corresponding to each of the multiple users, thereby reducing the consumption of CPU resources and reducing the memory usage.

[0090] Based on the above embodiments, the present application provides a data processing method. Figure 3 As shown, the method comprises the following steps:

[0091] Step 301: A first data processing device receives a request data block sent by a user for implementing dynamic configuration of a host, and allocates address information to the user.

[0092] Each user has unique address information.

[0093] Step 302: The first data processing device creates a target data packet at a target location of the requested data block.

[0094] The target position may refer to the position between data packets in the request data block, or may refer to the position before the first data packet in the request data block; the target data packet may refer to the target header file, and the target data packet may be regarded as a data stream.

[0095] In the embodiment of the present application, the target data packet may be added at different target locations in the request data block; it should be noted that the location where the target data packet is added in the request data block is different depending on the type of the target data packet.

[0096] In other embodiments of the present application, step 302 may be implemented by step 302a1 or step 302a2:

[0097] Step 302a1: The first data processing device creates a first sub-target data packet at the first sub-target position of the requested data block.

[0098] The target data packet includes a first sub-target data packet.

[0099] In the embodiment of the present application, the first sub-target data packet may refer to a Multi-Protocol Label Switching (MPLS) header file, and the MPLS header file may be regarded as an MPLS flow. At this time, the first data processing device may create the first sub-target data packet at the first sub-target position of the request data block through the Open Virtual Switching Standard (Open VSwitch, OVS).

[0100] In a feasible implementation, when the request data block is a DHCP request data block, refer to Figure 4 As shown, the DHCP request data block includes an Ethernet Header file, an Internet Protocol Header (IP Header) file, a User Datagram Protocol Header (UDP Header) file and DHCP in sequence, then the first sub-target position may refer to the position after the Ethernet Header file and before the IP Header, that is, adding an MPLS header file between the Ethernet Header file and the IP Header.

[0101] Step 302a2: The first data processing device creates a second sub-target data packet at the second sub-target position of the requested data block, and creates a third sub-target data packet at the third sub-target position of the requested data block.

[0102] The target data packet includes a second sub-target data packet and a third sub-target data packet.

[0103] In an embodiment of the present application, the second sub-target data packet may refer to a Network Service Header (NSH) file, and the NSH file may be regarded as an NSH stream; the third sub-target data packet may refer to an Ethernet Header file; the OVS in the first data processing device may create a second sub-target data packet at the second sub-target position of the requested data block, and create a third sub-target data packet at the third sub-target position of the requested data block.

[0104] In a feasible implementation, when the request data block is a DHCP request data block, refer to Figure 4As shown, the second sub-target position may refer to the previous position of the Ethernet Header file, that is, the NSH file is added to the previous position of the Ethernet Header file; the third sub-target position may refer to the previous position of the NSH file, that is, the Ethernet Header file is added to the previous position of the NSH file.

[0105] It should be noted that the MPLS header file has only 32 bytes and can carry limited information, while the NSH file can carry more information so that users can process the information in the NSH file more flexibly.

[0106] Step 303: The first data processing device adds address information to the target data packet to obtain a target data block.

[0107] It should be noted that, when step 302 is implemented through step 302a1, step 303 can be implemented through step 303b1; when step 302 is implemented through step 302a2, step 303 can be implemented through step 303b2:

[0108] It should be noted that in the existing scheme of using NameSpace to distinguish users to realize dynamic host configuration, for 1500 users, each user needs to create a DHCP / DNS / DHCPv6 process, that is, 1500 users need to create 1500 processes, and each process occupies 880 kilobytes (KB) of memory, then the total memory occupied by 1500 processes is 880KB*1500=1.25 gigabytes (GB); however, in the scheme provided by the present application, the users are distinguished by encapsulating the unique address information of each user in the request data block, so for 1500 users, Only one DHCP / DNS / DHCPv6 process needs to be created, and the memory occupied by the process is 86.1 megabytes (MB), so the total memory occupied by 1500 users is 86.1MB. This not only reduces the memory usage rate, but also improves the process efficiency. In addition, in the existing solution, the NameSpace of 1500 users needs to be reported to the controller, so the query efficiency when performing host dynamic configuration query in the controller based on the NameSpace is low. However, in the solution provided in the present application, only one DHCP / DNS / DHCPv6 process needs to be created, which improves the query efficiency when the host dynamic configuration query is performed.

[0109] When the solution provided by the present application is used to distinguish users, the percentage of the central processing unit (CPU) occupied by the user space is 0.2%, and the percentage of the CPU occupied by the kernel space is 22.8%. In this way, the overhead of process scheduling is reduced, thereby reducing the consumption of CPU resources. It should be noted that the CPU used in the solution provided by the present application is a 4-core CPU, that is, the CPU has 4 processor cores with the same functions, among which the utilization rate of one core is 94.04%, and the utilization rates of the other three cores are 0.80%, 0.58% and 0.46% respectively, so the percentage of the CPU occupied by the 4 kernel spaces is 22.8%.

[0110] Step 303b1: The first data processing device adds address information to the first sub-target data packet to obtain a target data block.

[0111] In the embodiment of the present application, when the first sub-target data packet is an MPLS header file, the address information can be added to the MPLS header file to obtain Figure 5 The target data block shown in the figure includes an Ethernet Header file, an MPLS header file, an IP Header file, a UDP Header file and DHCP in sequence, wherein the MPLS header file carries address information.

[0112] Step 303b2: The first data processing device adds the address information to the second sub-target data packet to obtain the target data block.

[0113] In the embodiment of the present application, when the first sub-target data packet is an NSH file, the address information can be added to the NSH file to obtain the following: Figure 6 The target data block shown in FIG. 1 includes an Ethernet Header file, an NSH file, an Ethernet Header file, an IP Header file, a UDP Header file and a DHCP file in sequence, wherein the NSH file carries address information. Step 304: The first data processing device analyzes the target data block to determine the target port number of the target data block.

[0114] In a feasible implementation, the target data block can be analyzed. If it is determined that the target data block contains a User Datagram Protocol Header (UDP Header) file, that is, the target data block uses the User Datagram Protocol (UDP) at the transport layer (Transport Layer), then the target port number can be determined to be 67 or 68.

[0115] Step 305: The first data processing device sends the target data block to the second data processing device based on the target port number.

[0116] In an embodiment of the present application, the first data processing device can determine the second data processing device according to the target port number, and then send the target data block to the second data processing device; in a feasible implementation method, the first data processing device determines that the second device is a DHCP server when determining that the target port number is 67 or 68, and then sends the target data block to the DHCP server.

[0117] Step 306: The second data processing device receives the target data block sent by the first data processing device.

[0118] Step 307: When the target data block includes the first sub-target data packet, the second data processing device decapsulates the target data block using a first decapsulation method corresponding to the type of the first sub-target data packet to obtain the request data block and address information.

[0119] In an embodiment of the present application, the second data processing device can analyze the target data block, and when it is determined that the type of the first sub-target data packet included in the target data block is a type corresponding to MPLS, the target data block is decapsulated using a decapsulation method corresponding to the type corresponding to MPLS (that is, the method of encapsulating the request data block matches the method of decapsulating the target data block) to obtain the request data block and address information; it should be noted that the request data block may refer to a request message before encapsulation.

[0120] Step 308: When the target data block includes a second sub-target data packet and a third sub-target data packet, the second data processing device decapsulates the target data block using a second decapsulation method corresponding to the type of the second sub-target data packet to obtain the requested data block and address information.

[0121] In an embodiment of the present application, the second data processing device can analyze the target data block, and when it is determined that the type of the second sub-target data packet included in the target data block is the type corresponding to the NSH, the target data block is decapsulated using the decapsulation method corresponding to the type corresponding to the NSH (that is, the method of encapsulating the request data block matches the method of decapsulating the target data block) to obtain the request data block and address information.

[0122] Step 309: The second data processing device obtains a response data block corresponding to the request data block and used to implement dynamic configuration of the host based on the request data block.

[0123] Step 310: The second data processing device sends a response data block to the first data processing device based on the address information.

[0124] The response data block is used by the first data processing device to forward to the user.

[0125] Step 311: The first data processing device receives a response data block sent by the second data processing device for implementing dynamic configuration of the host, and sends the response data block to the user based on the address information.

[0126] The response data block is determined by the second data processing device based on the request data block.

[0127] It should be noted that if the response data block is obtained based on the target data block containing the MPLS data packet, then when the second data processing device sends the response data block to the first data processing device, the MPLS data packet needs to be added to the response data block and then sent back to the first data processing device; and after the first data processing device receives the response data block, it is still necessary to use a decapsulation method that matches the type corresponding to MPLS to decapsulate the response data block; if the response data block is obtained based on the target data block containing the NSH data packet, then when the second data processing device sends the response data block to the first data processing device, the NSH data packet needs to be added to the response data block and then sent back to the first data processing device according to normal processing logic; and after the first data processing device receives the response data block, it is still necessary to use a decapsulation method that matches the type corresponding to NSH to decapsulate the response data block.

[0128] In the data processing method provided in the embodiment of the present application, the first data processing device encapsulates the unique address information of each user among multiple users in the request data block corresponding to each user to obtain the target data block of each user, and sends the target data block to the second data processing device, so that only one DHCP / DNS / DHCPv6 process needs to be created for multiple users to realize the DHCP function and DNS function of each user. Afterwards, the second data processing device uses a decapsulation method consistent with the encapsulation type to decapsulate the target data block generated in the DHCPD / DNS / DHCPv6 process to obtain the request data block and address information of each user, without the need to decapsulate the target data block generated in the DHCP / DNS / DHCPv6 process corresponding to each user. In this way, not only the consumption of CPU resources is reduced, but also the memory usage rate is reduced.

[0129] Based on the above embodiments, the embodiments of the present application provide a first data processing device, which can be applied to Figure 1 and 3In the data processing method provided in the corresponding embodiment, refer to Figure 7 As shown, the first data processing device 4 may include: an allocating unit 41, a first processing unit 42, a first sending unit 43 and a first receiving unit 44, wherein:

[0130] The allocation unit 41 is used to receive a request data block sent by a user for realizing dynamic configuration of a host, and allocate address information to the user; wherein each user has unique address information;

[0131] A first processing unit 42, configured to add address information to the request data block to obtain a target data block;

[0132] A first sending unit 43, configured to send the target data block to a second data processing device corresponding to the request data block;

[0133] The first receiving unit 44 is used to receive a response data block sent by the second data processing device for implementing dynamic configuration of the host, and send the response data block to the user based on the address information; wherein the response data block is determined by the second data processing device based on the request data block.

[0134] In the embodiment of the present application, the first processing unit 42 is further configured to perform the following steps:

[0135] Creating a target data packet at the target location of the requested data block;

[0136] Add the address information to the target data packet to obtain the target data block.

[0137] In the embodiment of the present application, the first processing unit 42 is further configured to perform the following steps:

[0138] Creating a first sub-target data packet at a first sub-target position of the requested data block; wherein the target data packet includes the first sub-target data packet;

[0139] In the embodiment of the present application, the first processing unit 42 is further configured to perform the following steps:

[0140] Add the address information to the first sub-target data packet to obtain the target data block.

[0141] In the embodiment of the present application, the first processing unit 42 is further configured to perform the following steps:

[0142] Creating a second sub-target data packet at the second sub-target position of the requested data block, and creating a third sub-target data packet at the third sub-target position of the requested data block; wherein the target data packet includes the second sub-target data packet and the third sub-target data packet;

[0143] In the embodiment of the present application, the first processing unit 42 is further configured to perform the following steps:

[0144] Add the address information to the second sub-target data packet to obtain the target data block.

[0145] In the embodiment of the present application, the first sending unit 43 is further configured to perform the following steps:

[0146] Analyze the target data block and determine the target port number of the target data block;

[0147] The target data block is sent to the second data processing device based on the target port number.

[0148] It should be noted that the specific implementation process of the steps performed by each unit in this embodiment can be referred to Figure 1 and 3 The implementation process of the data processing method provided in the corresponding embodiment will not be repeated here.

[0149] The first data processing device provided in the embodiment of the present application distinguishes users by encapsulating the unique address information of each user in a request data block, rather than distinguishing users by NameSpace. Therefore, there is no need to create a DHCP / DNS / DHCPv6 process for each user. Instead, only one DHCP / DNS / DHCPv6 process needs to be created for all users. This can implement the DHCP function and DNS function for each user, which not only reduces the consumption of CPU resources, but also reduces the memory usage.

[0150] Based on the above embodiments, the embodiments of the present application provide a second data processing device, which can be applied to Figure 2 and 3 In the data processing method provided in the corresponding embodiment, refer to Figure 8 As shown, the second data processing device 5 may include: a second receiving unit 51, a second processing unit 52, an acquiring unit 53 and a second sending unit 54, wherein:

[0151] The second receiving unit 51 is used to receive the target data block sent by the first data processing device;

[0152] The second processing unit 52 is used to decapsulate the target data block to obtain the request data block for realizing the dynamic configuration of the host and the address information allocated to the user; wherein each user has unique address information;

[0153] An acquiring unit 53 is used to acquire, based on the request data block, a response data block corresponding to the request data block and used to implement dynamic configuration of the host;

[0154] The second sending unit 54 is used to send a response data block to the first data processing device based on the address information; wherein the response data block is used by the first data processing device to forward to the user.

[0155] In the embodiment of the present application, the second processing unit 52 is further configured to perform the following steps:

[0156] In the case where the target data block includes the first sub-target data packet, the target data block is decapsulated using a first decapsulation method corresponding to the type of the first sub-target data packet to obtain the request data block and the address information;

[0157] In the case where the target data block includes the second sub-target data packet and the third sub-target data packet, the target data block is decapsulated using a second decapsulation method corresponding to the type of the second sub-target data packet to obtain the request data block and address information.

[0158] It should be noted that the specific implementation process of the steps performed by each unit in this embodiment can be referred to Figure 2 and 3 The implementation process of the data processing method provided in the corresponding embodiment will not be repeated here.

[0159] The second data processing device provided in the embodiment of the present application only needs to decapsulate the target data block generated in a DHCP / DNS / DHCPv6 process created for all users to obtain the request data blocks and address information of multiple users, without having to decapsulate the target data block generated in the DHCP / DNS / DHCPv6 process corresponding to each user, thereby reducing the consumption of CPU resources and reducing the usage rate of memory.

[0160] Based on the above embodiments, the embodiments of the present application provide a first data processing device, which can be applied to Figure 1 and 3 The data processing method provided in the corresponding embodiment is referred to Fig. 9 As shown, the first data processing device 6 may include: a first processor 61, a first memory 62 and a first communication bus 63, wherein:

[0161] The first communication bus 63 is used to realize the communication connection between the first processor 61 and the first memory 62;

[0162] The first processor 61 is used to execute the data processing program stored in the first memory 62 to implement the following steps:

[0163] Receive a request data block sent by a user for realizing dynamic configuration of a host, and allocate address information to the user; wherein each user has unique address information;

[0164] Add address information to the request data block to obtain the target data block;

[0165] sending the target data block to a second data processing device corresponding to the request data block;

[0166] A response data block for implementing dynamic configuration of the host sent by the second data processing device is received, and the response data block is sent to the user based on the address information; wherein the response data block is determined by the second data processing device based on the request data block.

[0167] In other embodiments of the present application, the first processor 61 is used to execute the addition of address information in the first memory 62 to the request data block to obtain the target data block, so as to implement the following steps:

[0168] Creating a target data packet at the target location of the requested data block;

[0169] Add the address information to the target data packet to obtain the target data block.

[0170] In other embodiments of the present application, the first processor 61 is used to execute the creation of a target data packet at a target location of the requested data block in the first memory 62 to implement the following steps:

[0171] Creating a first sub-target data packet at a first sub-target position of the requested data block; wherein the target data packet includes the first sub-target data packet;

[0172] In other embodiments of the present application, the first processor 61 is used to execute the adding address information in the first memory 62 to the target data packet to obtain the target data block, so as to implement the following steps:

[0173] Add the address information to the first sub-target data packet to obtain the target data block.

[0174] In other embodiments of the present application, the first processor 61 is used to execute the creation of a target data packet at a target location of the requested data block in the first memory 62 to implement the following steps:

[0175] Creating a second sub-target data packet at the second sub-target position of the requested data block, and creating a third sub-target data packet at the third sub-target position of the requested data block; wherein the target data packet includes the second sub-target data packet and the third sub-target data packet;

[0176] In other embodiments of the present application, the first processor 61 is used to execute the adding address information in the first memory 62 to the target data packet to obtain the target data block, so as to implement the following steps:

[0177] Add the address information to the second sub-target data packet to obtain the target data block.

[0178] In other embodiments of the present application, the first processor 61 is used to execute the sending of the target data block to the second data processing device corresponding to the request data block in the first memory 62 to implement the following steps:

[0179] Analyze the target data block and determine the target port number of the target data block;

[0180] The target data block is sent to the second data processing device based on the target port number.

[0181] It should be noted that the specific implementation process of the steps executed by the first processor in this embodiment can refer to Figure 1 and 3 The implementation process of the data processing method provided in the corresponding embodiment will not be repeated here.

[0182] The first data processing device provided in the embodiment of the present application distinguishes users by encapsulating the unique address information of each user in a request data block, rather than distinguishing users by NameSpace. Therefore, there is no need to create a DHCP / DNS / DHCPv6 process for each user. Instead, only one DHCP / DNS / DHCPv6 process needs to be created for all users, so that the DHCP function and DNS function of each user can be realized, which not only reduces the consumption of CPU resources, but also reduces the memory usage.

[0183] Based on the above embodiments, the embodiments of the present application provide a second data processing device, which is applied to Figure 2 and 3 In the data processing method provided in the corresponding embodiment, refer to Fig.10 As shown, the second data processing device 7 may include: a second processor 71, a second memory 72 and a second communication bus 73, wherein:

[0184] The second communication bus 73 is used to realize the communication connection between the second processor 71 and the second memory 72;

[0185] The second processor 71 is used to execute the data processing program in the second memory 72 to implement the following steps:

[0186] receiving a target data block sent by a first data processing device;

[0187] Decapsulating the target data block to obtain a request data block for realizing dynamic configuration of the host and address information allocated to the user; wherein each user has unique address information;

[0188] Based on the request data block, obtaining a response data block corresponding to the request data block for implementing dynamic configuration of the host;

[0189] A response data block is sent to the first data processing device based on the address information; wherein the response data block is used by the first data processing device to forward to the user.

[0190] In other embodiments of the present application, the second processor 71 is used to execute the decapsulation processing of the target data block in the second memory 72 to obtain the request data block for implementing the dynamic configuration of the host and the address information allocated to the user, so as to implement the following steps:

[0191] In the case where the target data block includes the first sub-target data packet, the target data block is decapsulated using a first decapsulation method corresponding to the type of the first sub-target data packet to obtain the request data block and the address information;

[0192] In the case where the target data block includes the second sub-target data packet and the third sub-target data packet, the target data block is decapsulated using a second decapsulation method corresponding to the type of the second sub-target data packet to obtain the request data block and address information.

[0193] It should be noted that the specific implementation process of the steps executed by the second processor in this embodiment can refer to Figure 2 and 3 The implementation process of the data processing method provided in the corresponding embodiment will not be repeated here.

[0194] The second data processing device provided in the embodiment of the present application only needs to decapsulate the target data block generated in a DHCP / DNS / DHCPv6 process created for all users to obtain the request data blocks and address information of multiple users, without having to decapsulate the target data block generated in the DHCP / DNS / DHCPv6 process corresponding to each of the multiple users, thereby reducing the consumption of CPU resources and reducing the usage rate of memory.

[0195] Based on the foregoing embodiments, the embodiments of the present application provide a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement Figure 1 , 2and 3 corresponding to the steps in the data processing method provided in the embodiment. It should be noted that the above-mentioned computer-readable storage medium can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and other memories; it can also be various electronic devices including one or any combination of the above memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0196] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

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

[0198] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0199] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0200] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0201] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0202] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data processing method, characterized in that: Applied to a first data processing device, the method comprises: Receiving a request data block sent by a user for realizing dynamic configuration of a host, and allocating address information to the user; wherein each user has unique address information; Adding the address information to the request data block to obtain a target data block; Sending the target data block to a second data processing device corresponding to the request data block; receiving a response data block sent by the second data processing device for implementing dynamic configuration of the host, and sending the response data block to the user based on the address information; wherein the response data block is determined by the second data processing device based on the request data block; The adding the address information to the request data block to obtain the target data block includes: Creating a target data packet at a target location of the requested data block; The address information is added to the target data packet to obtain the target data block; the type of the target data packet is different, and the position of adding in the request data block is also different.

2. The method according to claim 1, characterized in that The step of creating a target data packet at a target location of the requested data block comprises: Creating a first sub-target data packet at a first sub-target position of the requested data block; wherein the target data packet includes the first sub-target data packet; Correspondingly, the adding the address information to the target data packet to obtain the target data block includes: The address information is added to the first sub-target data packet to obtain the target data block.

3. The method according to claim 1, characterized in that The step of creating a target data packet at a target location of the requested data block comprises: Creating a second sub-target data packet at the second sub-target position of the request data block, and creating a third sub-target data packet at the third sub-target position of the request data block; wherein the target data packet includes the second sub-target data packet and the third sub-target data packet; Correspondingly, the adding the address information to the target data packet to obtain the target data block includes: Add the address information to the second sub-target data packet to obtain the target data block.

4. The method according to claim 1, characterized in that: The sending the target data block to the second data processing device corresponding to the request data block includes: Analyze the target data block to determine the target port number of the target data block; The target data block is sent to the second data processing device based on the target port number.

5. A data processing method, characterized in that: Applied to a second data processing device, the method comprises: receiving a target data block sent by a first data processing device; wherein the target data block is obtained by the first data processing device adding address information allocated to a user to a target data packet at a target position of a request data block sent by the user, and different types of the target data packets have different positions in the request data block; Decapsulating the target data block to obtain a request data block for realizing dynamic configuration of the host and address information allocated to the user; wherein each user has unique address information; Based on the request data block, obtaining a response data block corresponding to the request data block for implementing dynamic configuration of the host; The response data block is sent to the first data processing device based on the address information; wherein the response data block is used by the first data processing device to forward to the user.

6. The method according to claim 5, characterized in that The decapsulating the target data block to obtain a request data block for implementing dynamic configuration of the host and address information allocated to the user includes: In the case where the target data block includes a first sub-target data packet, the target data block is decapsulated using a first decapsulation method corresponding to the type of the first sub-target data packet to obtain the request data block and the address information; In the case where the target data block includes a second sub-target data packet and a third sub-target data packet, the target data block is decapsulated using a second decapsulation method corresponding to the type of the second sub-target data packet to obtain the request data block and the address information.

7. A first data processing device, characterized in that: The device comprises: An allocation unit, used for receiving a request data block sent by a user for realizing dynamic configuration of a host, and allocating address information to the user; wherein each user has unique address information; A first processing unit, configured to add the address information to the request data block to obtain a target data block; A first sending unit, configured to send the target data block to a second data processing device corresponding to the request data block; a first receiving unit, configured to receive a response data block sent by the second data processing device for implementing dynamic configuration of the host, and send the response data block to the user based on the address information; wherein the response data block is determined by the second data processing device based on the request data block; The adding the address information to the request data block to obtain the target data block includes: Creating a target data packet at a target location of the requested data block; The address information is added to the target data packet to obtain the target data block; the type of the target data packet is different, and the position of adding in the request data block is also different.

8. A second data processing device, characterized in that: The device comprises: A second receiving unit is used to receive a target data block sent by the first data processing device; wherein the target data block is obtained by the first data processing device adding address information allocated to the user to a target data packet at a target position of a request data block sent by the user, and the type of the target data packet is different and the position where the target data packet is added in the request data block is also different; A second processing unit is used to decapsulate the target data block to obtain a request data block for realizing dynamic configuration of the host and address information allocated to the user; wherein each user has unique address information; An acquiring unit, configured to acquire, based on the request data block, a response data block corresponding to the request data block and used to implement dynamic configuration of the host; The second sending unit is used to send the response data block to the first data processing device based on the address information; wherein the response data block is used by the first data processing device to forward it to the user.

9. A first data processing device, characterized in that: The first data processing device comprises: a first processor, a first memory and a first communication bus; The first communication bus is used to realize the communication connection between the first processor and the first memory; The first processor is used to execute the data processing program stored in the first memory to implement the steps of the data processing method according to any one of claims 1 to 4.

10. A second data processing device, characterized in that: The second data processing device comprises: a second processor, a second memory, and a second communication bus; The second communication bus is used to realize the communication connection between the second processor and the second memory; The second processor is used to execute the data processing program stored in the second memory to implement the steps of the data processing method according to any one of claims 5 to 6.

11. A computer-readable storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the data processing method according to any one of claims 1 to 4 or 5 to 6.

Citation Information

Patent Citations

  • Method and device for sharing DHCP (Dynamic Host Configuration Protocol) service process

    CN106878480A