Data transmission, data transmission control method, device and system
By configuring hardware transmission channels in the transmission chip of the service mesh, the problem of low data transmission efficiency between microservices and agents is solved, and more efficient data transmission and resource utilization is achieved.
Patent Information
- Application Number
- CN202010784880.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-06
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2040-08-06
AI Technical Summary
The data transmission paths between microservices and their corresponding agents in the existing service grid are long and long, resulting in low transmission efficiency, low resource utilization, complex management and operation and maintenance, and low business performance.
In the transmission chip, a hardware transmission channel is configured between the microservice and its corresponding agent, replacing the traditional data transmission process from user state to kernel state and then to user state.
Data transmission through hardware transmission channels is shortened, and data transmission path and transmission time are improved, data transmission efficiency, system resource utilization, management operation and maintenance convenience, and business performance are improved.
Smart Images

Figure CN114095352B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and in particular to a data transmission, data transmission control method, device and system. Background Art
[0002] With the continuous development of cloud computing, software development and technical maintenance, enterprises need to quickly develop and launch different businesses (also called applications, or applications, or services) to meet the ever-changing market needs. Microservice architecture has become a research hotspot for business development because it can build portable applications for multi-cloud and hybrid cloud platforms, making the business development process simple, convenient and efficient.
[0003] Service mesh is the mainstream service communication infrastructure layer in the current microservice architecture. It decouples the business logic and control logic of microservices and provides a reliable network transmission environment for building complex cloud-native applications. Figure 1 The following is a diagram showing the structure of a service grid: Figure 1 As shown, the service grid may include one or more data plane devices, and control plane devices. The control plane device is used to manage the control logic between microservices, for example, to manage routing, information configuration, monitoring and other functions. The data plane device mainly includes multiple microservices and agents corresponding to each microservice (also called sidecars). The microservice is used to implement the functional logic included in the microservice; the agent is used to implement the control logic included in the microservice corresponding to it. When microservice a sends data to microservice b, microservice a transmits the data to the agent c corresponding to it. Agent c receives the data transmitted by microservice a and sends the data to the agent d corresponding to microservice b. Agent d receives the data and transmits it to the microservice b corresponding to it.
[0004] In the current service grid, the data transmission process between a microservice and its corresponding agent is as follows: the microservice sends data to the user state of the operating system in its server (also called a computer) through a container. After receiving the data, the user state sends the data to the kernel state of the operating system in the server. After receiving the data, the kernel state analyzes whether the data meets the diversion rules. If the data meets the diversion rules, the kernel state forwards the data back to the user state. After receiving the data, the user state sends the data to the container of the agent corresponding to the microservice. It can be seen that data transmission in the service grid needs to pass through the kernel state and the user state, with a long transmission path, a long time, and low transmission efficiency; long-term transmission leads to long occupation time of system resources, low utilization of system resources, complex management and operation, and low business performance. Summary of the invention
[0005] The present application provides a data transmission, data transmission control method, device and system, which shortens the data transmission path and transmission time, improves data transmission efficiency, system resource utilization, management and operation convenience, and business performance.
[0006] In order to achieve the above purpose, this application adopts the following technical solutions:
[0007] In a first aspect, the present application provides a data transmission method, which can be applied to a service grid. The service grid may include multiple computers, each computer including a processor, a memory and a transmission chip; the processor runs the code in the memory, runs one or more microservices, and one or more agents, each microservice corresponds to an agent; the method may include: obtaining data to be transmitted generated by a first microservice; sending the data to be transmitted to a first transmission chip; the first transmission chip is a transmission chip included in the computer where the first microservice is located; the first transmission chip sends the data to be transmitted to a first agent corresponding to the first microservice through a first transmission channel associated with the first microservice, and the first transmission channel is a hardware transmission channel in the first transmission chip that sends transmission data to the first agent through the first microservice.
[0008] By applying for a data transmission method, a hardware transmission channel for transmitting data is configured in the transmission chip between the microservice and its corresponding agent. The microservice and its corresponding agent exchange data through the hardware transmission channel to replace the data transmission process of transferring data from user state to kernel state and then from kernel state to user state. Obviously, transmitting data through the hardware transmission channel shortens the data transmission path and transmission time, and improves data transmission efficiency, system resource utilization, convenience of management and operation, and business performance.
[0009] The first microservice is any microservice run by any computer included in the service grid.
[0010] In combination with the first aspect, in a possible implementation, the data to be transmitted may also include auxiliary information; the method may also include: the first transmission chip determines that the auxiliary information of the data to be transmitted satisfies the forwarding strategy of the first transmission channel; wherein the forwarding strategy is used to indicate the transmission characteristics that the data transmitted by the first transmission channel needs to meet; the first transmission chip sends the data to be transmitted to the first agent corresponding to the first microservice through the first transmission channel associated with the first microservice, which may include: the first transmission chip sends the data in the data to be transmitted that satisfies the forwarding strategy of the first transmission channel to the first agent through the first transmission channel. In this possible implementation, the data transmitted from the first microservice to the first agent can be filtered by configuring the forwarding strategy, thereby improving the data transmission efficiency, the resource utilization of the system, the convenience of management and operation, and the business performance.
[0011] In combination with the first aspect or one of the above possible implementations, in another possible implementation, the auxiliary information may include one or more of the following: a destination Internet protocol (IP) address of the data to be transmitted, a destination port number of the data to be transmitted, and a transmission protocol of the data to be transmitted. In this possible implementation, by flexibly configuring the specific content of the auxiliary information, the auxiliary information can be transmitted to meet the forwarding strategy of the data to be transmitted, thereby realizing flexible filtering and transmission of data; further improving the data transmission efficiency, system resource utilization, management and operation convenience, and service performance.
[0012] In combination with the first aspect or any of the above possible implementations, in another possible implementation, the forwarding strategy of the first transmission channel may include one or more of the following: destination IP address, destination port number, and transmission protocol. In this possible implementation, flexible filtering and transmission of data can be achieved by flexibly configuring the forwarding strategy, further improving data transmission efficiency, system resource utilization, management and operation convenience, and service performance.
[0013] In combination with the first aspect or any of the above possible implementations, in another possible implementation, the first transmission chip may include: a hardware queue chip. In this possible implementation, a transmission queue for the first microservice to transmit data to the first agent is configured in the hardware queue chip. Since the data transmission speed of the hardware queue is fast, the transmission time is further shortened, and the data transmission efficiency, system resource utilization, management and operation convenience, and business performance are improved.
[0014] In combination with the first aspect or one of the above possible implementations, in another possible implementation, the first transmission chip may include: a hardware stack chip. In this possible implementation, a transmission stack for transmitting data from the first microservice to the first agent is configured in the hardware stack chip. Since the data transmission speed of the hardware stack is fast, the transmission time is further shortened, and the data transmission efficiency, system resource utilization, management and operation convenience, and business performance are improved.
[0015] In combination with the first aspect or any of the above possible implementations, in another possible implementation, the first transmission channel may be a transmission channel configured by the control plane device of the service grid in the first transmission chip to meet the output data range of the first microservice; the control plane device of the service grid associates the first microservice with the first transmission channel when the first microservice goes online, and disassociates the first microservice from the first transmission channel when the first microservice goes offline. In this possible implementation, the control plane device of the service grid associates the first microservice with the first transmission channel when the first microservice goes online, and disassociates the first microservice from the first transmission channel when the first microservice goes offline, so as to release the channel in time, thereby improving the utilization efficiency of the transmission channel.
[0016] In a second aspect, the present application provides a data transmission control method, which can be applied to a service grid. The service grid may include multiple computers, each computer including a processor, a memory and a transmission chip; the processor runs the code in the memory, runs one or more microservices, and one or more agents; each microservice corresponds to an agent; the method may include: obtaining the output data range of each microservice; in the transmission chip included in the computer where each microservice is located, configuring a transmission channel for each microservice to send data to its corresponding agent, and a transmission channel for each agent to send data to its corresponding microservice; wherein, a transmission channel for a microservice to send data to its corresponding agent satisfies the output data range of the microservice; a transmission channel for a proxy to send data to its corresponding microservice satisfies the output data range of the microservice corresponding to the microservice; when the first microservice goes online, the first microservice is associated with the first transmission channel; the first transmission channel is a hardware transmission channel for the first microservice to transmit data to its corresponding agent.
[0017] By applying for a data transmission control method, a hardware transmission channel for transmitting data is configured in the transmission chip between the microservice and its corresponding agent, so as to realize data exchange between the microservice and its corresponding agent through the hardware transmission channel, instead of the data transmission process of transmitting data from user state to kernel state and then from kernel state to user state. Obviously, transmitting data through the hardware transmission channel shortens the data transmission path and transmission time, and improves data transmission efficiency, system resource utilization, convenience of management and operation, and business performance.
[0018] The first microservice is a microservice running on any one of the multiple computers included in the service grid.
[0019] In conjunction with the second aspect, in a possible implementation, the method may further include: disassociating the first microservice from the first transmission channel when the first microservice goes offline. In this possible implementation, the offline microservice and its associated transmission channel can be disassociated in a timely manner, and the disassociated transmission channel is in an idle state, which can be further used for data transmission between other microservices and their corresponding agents, thereby improving the utilization rate of the transmission channel, further improving the data transmission efficiency, the system resource utilization rate, the convenience of management and operation, and the business performance.
[0020] In a third aspect, the present application further provides a data plane device, which can be deployed in a service grid. The data plane device may include an operation unit, a communication unit, and a transmission unit; wherein:
[0021] The running unit is used to run one or more microservices and one or more agents; each microservice corresponds to an agent.
[0022] The communication unit is used to obtain the data to be transmitted generated by the first microservice and send the data to be transmitted to the transmission unit.
[0023] The transmission unit is used to send the data to be transmitted sent by the communication unit to the first agent corresponding to the first microservice through the first transmission channel associated with the first microservice; the first transmission channel is a hardware transmission channel for the first microservice to send transmission data to the first agent.
[0024] In conjunction with the third aspect, in a possible implementation, the transmission unit may include: a hardware transmission chip.
[0025] In combination with the third aspect and a possible implementation manner, in a possible implementation manner, the transmission unit may include: a hardware queue chip, or a hardware stack chip.
[0026] It should be noted that the data plane device provided in the third aspect is used to execute the data transmission method provided in the first aspect, and the specific implementation can refer to the specific implementation of the first aspect.
[0027] In a fourth aspect, the present application provides a control plane device, which can be deployed in a service grid, and the service grid also includes multiple data plane devices, each of which runs one or more microservices and one or more agents; each microservice corresponds to an agent; the device may include: an information management module and a channel management module. Among them:
[0028] The information management module is used to obtain the output data scope of each microservice.
[0029] The channel management module is used to configure, in a transmission unit included in the data plane device where each microservice is located, a transmission channel for each microservice to send data to its corresponding proxy, and a transmission channel for each proxy to send data to its corresponding microservice; wherein a transmission channel for a microservice to send data to its corresponding proxy satisfies an output data range of the microservice; and a transmission channel for a proxy to send data to its corresponding microservice satisfies the output data range of the corresponding microservice.
[0030] The channel management module is also used to associate the first microservice with the first transmission channel when the first microservice goes online; the first transmission channel is a hardware transmission channel for the first microservice to transmit data to its corresponding agent.
[0031] It should be noted that the control plane device provided in the fourth aspect is used to execute the data transmission control method provided in the second aspect, and the specific implementation can refer to the specific implementation of the second aspect.
[0032] In a fifth aspect, an embodiment of the present application provides a computer, which may include a processor, a memory and a transmission chip, the memory is coupled to the processor, and the transmission chip is used to configure a hardware transmission channel. When the processor executes the computer instructions stored in the memory, the computer can implement the data transmission method described in the first aspect or any possible implementation of the first aspect. The server may also include a communication interface, which is used for the computer to communicate with other devices. Exemplarily, the communication interface may be a transceiver, circuit, bus, module or other type of communication interface.
[0033] In one possible implementation, the computer may include:
[0034] Memory, used to store instructions.
[0035] The processor is used to obtain the data to be transmitted generated by the first microservice; and send the data to be transmitted to the transmission chip.
[0036] The transmission chip is used to send the data to be transmitted to the first agent corresponding to the first microservice through the first transmission channel associated with the first microservice, and the first transmission channel is a hardware transmission channel in the transmission chip that sends the transmission data to the first agent through the first microservice.
[0037] It should be noted that the instructions in the memory in the present application can be pre-stored or downloaded from the Internet and stored when the device is used. The present application does not specifically limit the source of the instructions in the memory. The coupling in the embodiments of the present application is an indirect coupling or connection between devices, units or modules, which can be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
[0038] In a sixth aspect, an embodiment of the present application provides another computer, which may include a processor for implementing the data transmission control method described in the second aspect above. The computer may also include a memory, which is coupled to the processor, and when the processor executes instructions stored in the memory, the data transmission control method described in the second aspect above may be implemented. The computer may also include a communication interface, which is used for the device to communicate with other devices. Exemplarily, the communication interface may be a transceiver, circuit, bus, module or other type of communication interface. In one possible implementation, the computer includes:
[0039] Memory, used to store instructions.
[0040] A processor is used to obtain the output data range of each microservice; in a transmission chip included in a computer where each microservice is located, a transmission channel for each microservice to send data to its corresponding agent, and a transmission channel for each agent to send data to its corresponding microservice are configured; wherein a transmission channel for a microservice to send data to its corresponding agent satisfies the output data range of a microservice; a transmission channel for an agent to send data to its corresponding microservice satisfies the output data range of its corresponding microservice; when a first microservice goes online, the first microservice is associated with a first transmission channel; the first microservice is any microservice; and the first transmission channel is a hardware transmission channel for the first microservice to transmit data to its corresponding agent.
[0041] In combination with the sixth aspect and the above-mentioned possible implementation, in another possible implementation, the computer may further include a transmission chip, and the transmission chip is used to provide a hardware transmission channel.
[0042] It should be noted that the instructions in the memory in the present application can be pre-stored or downloaded from the Internet and stored when the device is used. The present application does not specifically limit the source of the instructions in the memory. The coupling in the embodiments of the present application is an indirect coupling or connection between devices, units or modules, which can be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
[0043] In the seventh aspect, a service grid system is provided, which may include multiple data plane devices and a control plane device. The data plane device may be a device in the third aspect or any possible implementation of the third aspect, and the control plane device may be a device in the fourth aspect or any possible implementation of the fourth aspect.
[0044] In the eighth aspect, a service grid system is provided, which may include multiple first computers and a second computer. The first computer may be a computer in the fifth aspect or any possible implementation of the fifth aspect, and the second computer may be a computer in the sixth aspect or any possible implementation of the sixth aspect.
[0045] In the ninth aspect, an embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enables the computer to execute the data transmission method or data transmission control method described in any one of the above aspects or any possible implementation methods.
[0046] In the tenth aspect, a computer program product is also provided in an embodiment of the present application. When the computer is run on a computer, the computer executes the data transmission method or data transmission control method described in any one of the above aspects or any one of the possible implementation methods.
[0047] In an eleventh aspect, an embodiment of the present application provides a chip system, which includes a processor and may also include a memory, for implementing the functions performed by the data plane device in the above method. The chip system may be composed of a chip, or may include a chip and other discrete devices.
[0048] In a twelfth aspect, an embodiment of the present application provides a chip system, which includes a processor and may also include a memory, for implementing the functions performed by the control plane device in the above method. The chip system may be composed of a chip, or may include a chip and other discrete devices.
[0049] The solutions provided in the third to twelfth aspects are used to implement the data transmission method of the first aspect or the data transmission control method of the second aspect, and therefore can achieve the same beneficial effects as the first to second aspects, and will not be repeated here.
[0050] It should be noted that various possible implementation methods of any of the above aspects can be combined under the premise that the solutions are not contradictory. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of the structure of a service grid provided by the prior art;
[0052] Figure 2 A schematic diagram of the structure of a service grid provided in an embodiment of the present application;
[0053] Figure 2A A schematic diagram of the structure of a control plane device provided in an embodiment of the present application;
[0054] Figure 3A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0055] Figure 3A A schematic diagram of the structure of another server provided in an embodiment of the present application;
[0056] Figure 4 A flowchart of a data transmission control method provided in an embodiment of the present application;
[0057] Figure 5 A flowchart of a data transmission method provided in an embodiment of the present application;
[0058] Figure 6 A schematic diagram of the structure of another service grid provided in an embodiment of the present application;
[0059] Figure 7 A schematic diagram of the structure of a data plane device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects rather than to limit a specific order.
[0061] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.
[0062] In the description of this application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In addition, in the description of this application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0063] In the embodiments of the present application, at least one can also be described as one or more, and multiple can be two, three, four or more, which is not limited in the present application.
[0064] To facilitate understanding, the technical terms involved in this application are first explained.
[0065] A service may refer to an application developed based on a certain programming environment to meet one or more business requirements. Specifically, different services may be developed based on the same or different programming environments, without limitation.
[0066] Microservices refer to services developed based on a certain programming environment that can meet a single business need and provide a single business function.
[0067] A proxy (also called a sidecar) can refer to a software unit that corresponds to (or is associated with) a microservice and is used to forward and receive data from the microservice.
[0068] A transmission channel may refer to a one-way hardware channel for transmitting data between a microservice and an agent. For example, between a microservice and its corresponding agent, a transmission channel may be configured for the microservice to transmit data to the agent, or a transmission channel may be configured for the agent to transmit data to the microservice. Exemplarily, the transmission channel may be a hardware queue of a processor.
[0069] As mentioned above, in the current service grid, the data transmission process between a microservice and its corresponding agent is as follows: the microservice sends data through a container to the user state of the operating system in the server to which it belongs. After receiving the data, the user state sends it to the kernel state of the operating system in the server. After receiving the data, the kernel state analyzes whether the data meets the diversion rules. If the data meets the diversion rules, the kernel state forwards the data back to the user state. After receiving the data, the user state sends it to the agent corresponding to the microservice.
[0070] It can be seen that data transmission in the service grid requires transferring data from user state to kernel state, and then from kernel state to user state. The transmission path is long, the transmission time is long, and the transmission efficiency is low. Long-term transmission leads to long system resource occupation time, low system resource utilization, complex management and operation, and low business performance.
[0071] Based on this, the present application provides a data transmission method, in which a hardware transmission channel for transmitting data is configured between a microservice and its corresponding agent in a transmission chip. The microservice and its corresponding agent exchange data through the hardware transmission channel to replace the data transmission process of transferring data from user state to kernel state and then from kernel state to user state. Obviously, transmitting data through the hardware transmission channel shortens the data transmission path and transmission time, and improves data transmission efficiency, system resource utilization, convenience of management and operation, and business performance.
[0072] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0073] The data transmission method provided in the embodiment of the present application can be applied to Figure 2 The service grid 20 shown. Figure 2 As shown, the service grid 20 may include multiple data plane devices 201 and a control plane device 202. A data plane device 201 may include one or more microservices 2011, agents 2012 corresponding to the microservices 2011, and a transmission channel 2013 deployed between each microservice 2011 and its corresponding agent 2012.
[0074] The service grid 20 may include multiple servers. Specifically, a data plane device 201 included in the service grid 20 may be deployed on a server, and a control plane device 202 included in the service grid 20 may be deployed on a server. The control plane device 202 may be deployed on any server where the data plane device 201 is located; or, the control plane device 202 may also be deployed on a server alone. The embodiment of the present application does not specifically limit the specific deployment method.
[0075] The microservice 2011 may be used to implement the functional logic of the microservice 2011. Exemplarily, the microservice 2011 may be used to generate output data of the microservice, and send the generated output data to the corresponding agent 2012 through a transmission channel 2013 between the microservice 2011 and its corresponding agent 2012.
[0076] The proxy 2012 may be used to implement the control logic of the corresponding microservice 2011. For example, the proxy 2012 may be used to receive data sent by the corresponding microservice 2011; or, the proxy 2012 may be used to transmit data to be forwarded to the corresponding microservice 2011.
[0077] The transmission channel 2013 can be used to implement data transmission between the microservice 2011 and its corresponding agent 2012. Specifically, between a microservice 2011 and its corresponding agent, a transmission channel 2013 can be configured for the microservice 2011 to transmit data to the agent 2012, or a transmission channel 2013 can be configured for the agent 2012 to transmit data to the microservice 2011.
[0078] The transmission channel 2013 is a hardware channel for transmitting data configured on the transmission chip according to a preset rule. Specifically, the transmission channel 2013 can be a hardware queue, a hardware stack, or other hardware channels, which are not specifically limited in the embodiment of the present application.
[0079] The control plane device 202 can be used to manage the microservices 2011 and agents 2012 in the multiple data plane devices 201 included in the service grid 20. Specifically, the control plane device 202 can be used to register the microservice 2011, and allocate, associate, and disassociate the transmission channel 2013 for the microservice 2011.
[0080] The transmission channel 2013 associated with a microservice 2011 includes: a transmission channel 2013 for the microservice 2011 to transmit data to its corresponding agent 2012 , and a transmission channel 2013 for its corresponding agent 2012 to transmit data to the microservice 2011 .
[0081] The data interaction process between a microservice 2011 and its corresponding proxy 2012 in the service grid 20 is now described.
[0082] When the microservice 2011 needs to send data to its corresponding agent 2012, the data plane device 201 respectively obtains the interface addresses of the microservice 2011, the agent 2012 corresponding to the microservice, and the transmission channel 2013 through which the microservice 2011 sends data to its corresponding agent 2012, calls relevant data through these interface addresses, and transmits the data from the interface of the microservice 2011 to its corresponding agent 2012 through the transmission channel 2013.
[0083] Regarding the process of sending data to its corresponding microservice 2011 through the proxy 2012, the process of sending data from the same microservice 2011 to its corresponding proxy 2012 is similar and will not be described in detail.
[0084] like Figure 2A The control plane device 202 may include an information management module 2021 , a channel management module 2022 , and a message exchange management module 2023 .
[0085] The information management module 2021 can be used to obtain the registration information of each microservice 2011 and send the obtained registration information to the channel management module 2022. The registration information of a microservice 2011 can include: the identifier of the microservice 2011 and the identifier of its corresponding agent 2012. Optionally, the registration information of a microservice 2011 can also include: the port number of the flow information between the microservice 2011 and its corresponding agent 2012, the name of the microservice 2011, the name of its corresponding agent 2012, and the historical output data range of the microservice 2011.
[0086] The channel management module 2022 can be used to receive the registration information sent by the information management module 2021 and the status information of the transmission channel 2013 sent by the message exchange management module 2023; then manage the transmission channel 2013 according to the registration information and the status information of the transmission channel 2013, and obtain the relevant information of the allocated transmission channel 2013; the channel management module 2022 is also used to send the registration information of each microservice 2011 and the relevant information of the allocated transmission channel 2013 to the message exchange management module 2023.
[0087] Specifically, the channel management module 2022 managing the transmission channel 2013 may include: the channel management module 2022 configures and associates the transmission channel 2013 with the online microservice 2011 according to the registration information of each microservice 2011 when the microservice 2011 goes online. The channel management module 2022 is also used to disassociate the offline microservice 2011 from the transmission channel 2013.
[0088] The message exchange management module 2023 can be used to receive information sent by the channel management module 2022; according to the received registration information of each microservice 2011 and the relevant information of the allocated transmission channel 2013, each microservice 2011, its corresponding agent 2012, and the interface address of the transmission channel 2013 configured for the microservice 2011 are obtained respectively.
[0089] The message exchange management module 2023 may also be used to obtain the status information of the transmission channel 2013, and send the status information of the transmission channel 2013 to the channel management module 2022. The status information of the transmission channel 2013 may include: the total number of transmission channels 2013, the number of occupied transmission channels 2013, the number of unoccupied transmission channels 2013, the identifier and size of the occupied transmission channels 2013, and the identifier and size of the unoccupied transmission channels 2013.
[0090] Optionally, the control plane device 202 may further include a forwarding policy management module 2024 .
[0091] Among them, the channel management module 2022 can also be used to send the registration information of each microservice 2011 and the relevant information of the allocated transmission channel 2013 to the forwarding strategy management module 2024.
[0092] The forwarding strategy management module 2024 can be used to obtain one or more forwarding strategies, and associate each forwarding strategy with the corresponding transmission channel 2013 according to the information sent by the received channel management module 2022; and send the associated forwarding strategy to the message exchange management module 2023.
[0093] The message exchange management module 2023 may also be configured to receive a forwarding policy associated with the transmission channel 2013 sent by the forwarding policy management module 2024 .
[0094] The transmission channel 2013 can also be used to transmit data between the microservice 2011 and the proxy 2012 that meets the forwarding strategy.
[0095] The management process of the control plane device 202 is now described: First, the user inputs the registration information of a microservice 2011, the information management module 2021 obtains the registration information of the microservice 2011, registers the microservice 2011, and sends the registration information of the microservice to the channel management module 2022; the channel management module 2022 receives the registration information of the microservice and the status information of the transmission channel 2013 sent by the message exchange management module 2023, allocates and associates the transmission channel 2013 to the microservice 2011 according to the registration information of the microservice and the status information of the transmission channel 2013, obtains the relevant information of the allocated transmission channel 2013, and then the channel management module 2022 sends the registration information of the microservice and the relevant information of the allocated transmission channel 2013 to the message exchange management module 2023; the message exchange management module 2023 obtains the microservice 2011, its corresponding agent 2012, and the interface address of the transmission channel 2013 allocated to the microservice 2011 according to the information sent by the channel management module 2022.
[0096] The data transmission method, data transmission control method and device provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0097] On the one hand, the embodiment of the present application provides a server 30, which is used to execute the data transmission method or data transmission control method provided by the present application. The server 30 may be a computer included in the service grid. For example, the server 30 may be Figure 2 The service grid 20 includes a server where any data plane device 201 is located, or a server where the control plane device 202 is located.
[0098] like Figure 3 As shown, the server 30 may include a processor 301 , a memory 302 , and a transceiver 303 .
[0099] Combine the following Figure 3 The components of the server 30 are described in detail:
[0100] Among them, the memory 302 can be a volatile memory (volatile memory), such as a random-access memory (RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or a combination of the above types of memories, used to store program codes, microservice and agent codes, configuration files and other content that can implement the method of the present application.
[0101] The processor 301 is the control center of the server 30. For example, the processor 301 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, such as one or more microprocessors (digital singnal processors, DSPs), or one or more field programmable gate arrays (FPGAs).
[0102] The transceiver 303 is used to communicate with other devices. The transceiver 303 can be a communication port or other. Exemplarily, the transceiver 303 is used to communicate with other servers included in the service grid.
[0103] In a possible implementation, the processor 301 performs the following functions by running or executing the program stored in the memory 302, and running the microservices and agents stored in the memory 302:
[0104] Obtain the output data range of each microservice; configure, in a transmission chip included in a computer where each microservice is located, a transmission channel for each microservice to send data to its corresponding agent, and a transmission channel for each agent to send data to its corresponding microservice; wherein, a transmission channel for a microservice to send data to its corresponding agent satisfies the output data range of a microservice; a transmission channel for an agent to send data to its corresponding microservice satisfies the output data range of its corresponding microservice; when a first microservice goes online, associate the first microservice with a first transmission channel; the first transmission channel is a hardware transmission channel for the first microservice to transmit data to its corresponding agent.
[0105] In another possible implementation, Figure 3A As shown, the server 30 may further include a transmission chip 304, which is used for interactive data between the microservice and its corresponding agent; specifically, the processor 301 executes the program stored in the memory 302, and runs the microservice and agent stored in the memory 302 to perform the following functions:
[0106] Acquire the data to be transmitted generated by the first microservice; send the data to be transmitted to a first transmission chip; the first transmission chip is a transmission chip included in the computer where the first microservice is located; the first transmission chip sends the data to be transmitted to a first agent corresponding to the first microservice through a first transmission channel associated with the first microservice, and the first transmission channel is a hardware transmission channel in the first transmission chip that sends transmission data to the first agent through the first microservice.
[0107] On the other hand, an embodiment of the present application provides a data transmission control method, which is applied to a control plane device included in a service grid, and the control plane device is used to configure a transmission channel for a microservice running in a data plane device, so that the microservice and its corresponding agent can exchange data through the configured transmission channel. The control plane device can be any computer included in the service grid, or the control plane device can be deployed on any computer included in the service grid. The service grid may include multiple computers, each of which includes a processor, a memory, and a transmission chip; the processor runs the code in the memory, runs one or more microservices, and one or more agents, and each microservice corresponds to an agent. Figure 4 As shown, the method may include:
[0108] S401. The control plane device obtains the output data range of each microservice.
[0109] Each microservice may be a microservice running in each data plane device in the service grid.
[0110] In a possible implementation, S401 may be implemented as follows: the control plane device may obtain historical output data of each microservice, and use the range of the number of messages occupied by the historical output data of each microservice as the output data range of each microservice.
[0111] In another possible implementation, S401 may be implemented as follows: the control plane device may sample the historical output data of each microservice, and use the message quantity range occupied by the sampled output data as the output data range of each microservice.
[0112] Exemplarily, the output data of a microservice may range from 8 to 10 messages.
[0113] S402: The control plane device configures, in a transmission chip included in the computer where each microservice is located, a transmission channel for each microservice to send data to its corresponding agent, and a transmission channel for each agent to send data to its corresponding microservice.
[0114] Among them, the transmission channel through which a microservice sends data to its corresponding proxy meets the output data range of the microservice; the transmission channel through which a proxy sends data to its corresponding microservice meets the output data range of the corresponding microservice.
[0115] The transmission channel is a hardware channel for transmitting data in the transmission chip included in the computer where each microservice is located. The transmission channel can be composed of one or more small hardware channel modules in the transmission chip combined according to preset rules. Exemplarily, the control plane device combines the small hardware channel modules in the transmission chip into multiple groups of transmission channels of different depths (sizes) according to preset rules.
[0116] The preset rule may be a queue combination rule or a stack combination rule. The queue combination rule or the stack combination rule may be configured according to actual needs, and the embodiment of the present application does not specifically limit this.
[0117] In a possible implementation, the transmission chip is a hardware queue chip, and the transmission channel is a hardware queue in the hardware queue chip. Exemplarily, the transmission channel is a transmission queue formed by merging small hardware queue modules in the hardware queue chip according to queue combination rules.
[0118] In another possible implementation, the transmission chip is a hardware stack chip, and the transmission channel is a hardware stack in the hardware stack chip. Exemplarily, the transmission channel is a transmission stack formed by merging small hardware stack modules in the hardware stack chip according to stack combination rules.
[0119] Exemplarily, the transmission chip can be a hardware queue chip in the Kunpeng processor. Among them, the Kunpeng processor may include a central processing unit and a hardware queue chip, the central processing unit included in the Kunpeng processor is equivalent to the processor in the embodiment of the present application, and the hardware queue chip included in the Kunpeng processor is equivalent to the transmission chip in the embodiment of the present application.
[0120] S402 may be implemented as follows: the control plane device selects a transmission channel that satisfies the range of the output data of each microservice from among the multiple groups of transmission channels pre-configured in the transmission chip included in the computer where each microservice is located, according to the range of the output data of each microservice obtained in S401. The transmission channel of a microservice may include: a transmission channel for the microservice to transmit data to its corresponding agent, and a transmission channel for the corresponding agent to transmit data to the microservice.
[0121] For example, the control plane device pre-configures 30 transmission channels that can meet the transmission of 10 messages, 30 transmission channels that can meet the transmission of 50 messages, and 30 transmission channels that can meet the transmission of 100 messages. The output data ranges of each microservice obtained by the control plane device are: the output data range of microservice A is 8-10 messages, and the output data range of microservice B is 35-40 messages; the control plane device configures two transmission channels that can meet the transmission of 10 messages for microservice A, which are respectively used for the microservice A to send data to its corresponding agent, and the corresponding agent to send data to microservice A; the control plane device configures two transmission channels that can meet the transmission of 50 messages for microservice B, which are respectively used for the microservice B to send data to its corresponding agent, and the corresponding agent to send data to microservice B.
[0122] S403: When the first microservice comes online, the control plane device associates the first microservice with the first transmission channel.
[0123] It should be noted that when the control plane device detects that one or more microservices included in the service grid are online, each online microservice is associated with the transmission channel assigned to it. The process of associating each online microservice with the transmission channel assigned to it is similar, and the process of associating the first microservice with the first transmission channel is described here.
[0124] The first microservice is any microservice running in any computer included in the service grid; the first transmission channel is a hardware transmission channel for the first microservice to transmit data to its corresponding agent.
[0125] Specifically, as shown in Table 1, the status information of all microservices is stored in a fixed location of the server, where WFW plus a number is the identifier of different microservices.
[0126] Table 1
[0127] Microservices Identification WFW001 WFW002 …… WFW123 Microservice Status Go Live Offline …… Go Live
[0128] It should be noted that Table 1 only exemplarily shows a recording format of microservice status information and should not constitute the sole limitation on the recording format of microservice status information.
[0129] As shown in Table 2, the associated information of the transmission channel is stored in another fixed location of the server, where WFW plus a number is the identifier of different microservices, and CSTD plus a number is the identifier of different transmission channels.
[0130] Table 2
[0131] Microservices Identification The identifier of the transport channel associated with the microservice WFW001 CSTD001, CSTD002 WFW002 CSTD003, CSTD004 WFW003 CSTD005, CSTD006 …… ……
[0132] It should be noted that Table 2 is only an exemplary display of a recording format of the associated information of a transmission channel, and should not constitute the sole limitation on the recording format of the associated information of the transmission channel.
[0133] Exemplarily, S403 can be implemented as follows: the control plane device calls the status information of all microservices in Table 1, and when detecting that the status of the first microservice is online, adds the identifier of the first microservice (for example, WFW012) and the identifier of the first transmission channel (for example, CSTD023) to the associated information of the transmission channel, updates the associated information of the transmission channel in Table 2, and associates the first microservice with the first transmission channel. The updated associated information of the transmission channel in Table 2 is shown in Table 3.
[0134] Table 3
[0135] Microservices Identification The identifier of the transport channel associated with the microservice WFW001 CSTD001, CSTD002 WFW002 CSTD003, CSTD004 WFW003 CSTD005, CSTD006 …… …… WFW012 CSTD023
[0136] By applying for a data transmission control method, a hardware transmission channel for transmitting data is configured in the transmission chip between the microservice and its corresponding agent, so as to realize data exchange between the microservice and its corresponding agent through the hardware transmission channel, instead of the data transmission process of transmitting data from user state to kernel state and then from kernel state to user state. Obviously, transmitting data through the hardware transmission channel shortens the data transmission path and transmission time, and improves data transmission efficiency, system resource utilization, convenience of management and operation, and business performance.
[0137] Further, such as Figure 4 As shown, the data transmission control method provided in the embodiment of the present application may further include S404.
[0138] S404: The control plane device disassociates the first microservice from the first transmission channel when the first microservice goes offline.
[0139] Exemplarily, S404 can be implemented as follows: the control plane device calls the status information of all microservices in Table 1, and when it is detected that the status of the first microservice is offline, deletes the identifier of the first microservice (for example, WFW012) and the identifier of the first transmission channel (for example, CSTD023) in the associated information of the transmission channel, updates the associated information of the transmission channel in Table 3, and disassociates the first microservice from the first transmission channel. The updated associated information of the transmission channel in Table 3 is shown in Table 4.
[0140] Table 4
[0141] Microservices Identification The identifier of the transport channel associated with the microservice WFW001 CSTD001, CSTD002 WFW002 CSTD003, CSTD004 WFW003 CSTD005, CSTD006 …… ……
[0142] It should be noted that, in the embodiment of the present application, the control plane device may disassociate all offline microservices from their associated transmission channels. For the specific implementation process, refer to S404 and will not be described in detail.
[0143] Furthermore, the data transmission method provided in the embodiment of the present application may also include: before S401, the control plane device registers the microservices included in the service grid.
[0144] Exemplarily, the control plane device of the service grid receives the identifier of the microservice input by the user, the identifier of the proxy configured for the microservice, the name of the microservice, and the name of the proxy configured for the microservice, and updates the registration information according to the identifier of the microservice input by the user and the identifier of the proxy configured for the microservice; and associates the microservice with the configured proxy. The registration information may be as shown in Table 5.
[0145] Table 5
[0146] Microservices Identification The name of the microservice The ID of the corresponding agent The name of the corresponding agent WFW001 area DL001 area WFW002 weather DL002 weather …… …… …… …… WFW123 salary DL123 salary
[0147] It should be noted that Table 5 only exemplifies a recording format of registration information and should not constitute the sole limitation on the recording format of registration information.
[0148] On the other hand, an embodiment of the present application provides a data transmission method, which is applied to any data plane device included in a service grid. The service grid also includes a control plane device, and the control plane device configures the transmission channel in the data plane device. The data plane device can be any computer included in the service grid; or, the data plane device can be deployed on any computer included in the service grid. The service grid can include multiple computers, each computer includes a processor, a memory, and a transmission chip; the processor runs the code in the memory, runs one or more microservices, and one or more agents, and each microservice corresponds to an agent.
[0149] The following takes the process of the first microservice sending data to the first agent as an example to describe in detail the data transmission method provided by the present application.
[0150] The first microservice is any microservice running in any computer included in the service grid, and the first agent is an agent corresponding to the first microservice.
[0151] It should be noted that the data transmission method provided in the embodiment of the present application can be used for data interaction between any microservice running in any computer included in the service grid and its corresponding agent. The following only takes the process of the first microservice sending data to the first agent as an example to illustrate that the first agent sends data to the first microservice, and the data interaction process between other microservices and their corresponding agents is similar to this and will not be repeated.
[0152] like Figure 5 As shown, the data transmission method may include:
[0153] S501. The data plane device obtains data to be transmitted generated by the first microservice.
[0154] The first microservice is a microservice running in any one of the data plane devices; the data to be transmitted may include output data generated by the first microservice when the first microservice is running.
[0155] Optionally, the data to be transmitted by the first microservice may further include auxiliary information.
[0156] The auxiliary information is used to indicate the transmission characteristics of the data to be transmitted. The contents of the auxiliary information can be configured according to actual conditions, and the contents of the auxiliary information are not limited in the embodiments of the present application.
[0157] Exemplarily, the auxiliary information may include one or more of the following: a destination IP address of the data to be transmitted, a destination port number of the data to be transmitted, and a transmission protocol of the data to be transmitted.
[0158] In a possible implementation, S501 may be implemented as follows: the data plane device runs the first microservice, obtains output data of the first microservice, and encapsulates the output data into one or more messages as data to be transmitted by the first microservice.
[0159] In another possible implementation, when the data to be transmitted of the first microservice may also include auxiliary information, S501 may be implemented as follows: the data plane device runs the first microservice, obtains the output data of the first microservice, and encapsulates the output data and the auxiliary information into one or more messages as the data to be transmitted of the first microservice.
[0160] S502: The data plane device sends the data to be transmitted to the first transmission chip.
[0161] The first transmission chip is a transmission chip included in the computer where the first microservice is located.
[0162] Among them, S502 can be implemented as: the data plane device sends the data to be transmitted obtained in S501 to the first transmission chip through the transmission interface of the first microservice.
[0163] S503: The first transmission chip sends the data to be transmitted to the first agent corresponding to the first microservice through the first transmission channel associated with the first microservice.
[0164] The first transmission channel is a hardware transmission channel in the first transmission chip that sends transmission data to the first agent through the first microservice. Specifically, the first transmission channel is a transmission channel configured by the control plane device of the service grid in the first transmission chip that meets the output data range of the first microservice.
[0165] Specifically, the implementation of S503 may include but is not limited to the following solution 1 or solution 2.
[0166] Solution 1: The first transmission chip sends all data to be transmitted to the first agent through the first transmission channel.
[0167] Specifically, the control plane device pre-stores the interface addresses of all microservices, proxies and transmission channels. Solution 1 in S503 can be implemented as follows: the first transmission chip calls the first transmission channel exit address and the interface address of the first agent in the information storing the interface addresses of all microservices, proxies and all transmission channels, and sends all the data to be transmitted of the first microservice from the exit of the first transmission channel to the interface of the first agent in sequence.
[0168] Solution 2: The first transmission chip sends the data to be transmitted that meets the forwarding strategy of the first transmission channel to the first agent through the first transmission channel.
[0169] The forwarding strategy of the first transmission channel is used to indicate the transmission characteristics that the data transmitted by the first transmission channel needs to meet.
[0170] Specifically, the specific content of the forwarding strategy of the first transmission channel can be configured according to actual needs, and this application does not limit this. Among them, the forwarding strategy of the first transmission channel can be statically configured during the design phase of the data plane device, or the forwarding strategy of the first transmission channel can also be set as configurable content, and the configuration can be modified by the user, administrator or other personnel during the use phase of the data plane device.
[0171] Specifically, the forwarding strategy of the first transmission channel may include one or more of the following: destination IP address, destination port number, and transmission protocol.
[0172] Exemplarily, the forwarding strategy of the first transmission channel may include: IP address 192.168.0.23, port number 8000, transmission control protocol (TCP) / IP protocol.
[0173] Exemplarily, the control plane device pre-stores the interface addresses of all microservices, proxies, and transmission channels. Scheme 2 in S503 can be implemented as follows: the first transmission chip obtains the auxiliary information of all data to be transmitted, determines whether the auxiliary information of the data to be transmitted meets the forwarding strategy of the first transmission channel, and then calls the exit address of the first transmission channel and the interface address of the first agent in the information storing the interface addresses of all microservices, proxies, and transmission channels, and sends the data to be transmitted that meets the forwarding strategy in the data to be transmitted of the first microservice from the exit of the first transmission channel to the interface of the first agent in sequence. The first transmission chip discards the data to be transmitted that does not meet the forwarding strategy of the first transmission channel.
[0174] S504: The first agent receives data to be transmitted.
[0175] Specifically, S504 may be implemented as follows: the first agent receives the data to be transmitted sent through the first transmission channel from the interface.
[0176] By applying for a data transmission method, a hardware transmission channel for transmitting data is configured in the transmission chip between the microservice and its corresponding agent. The microservice and its corresponding agent exchange data through the hardware transmission channel to replace the data transmission process of transferring data from user state to kernel state and then from kernel state to user state. Obviously, transmitting data through the hardware transmission channel shortens the data transmission path and transmission time, and improves data transmission efficiency, system resource utilization, convenience of management and operation, and business performance.
[0177] The data transmission method provided by this application is described below by taking the interaction data between a microservice and its corresponding proxy in a service grid as an example.
[0178] Figure 6 The schematic diagram of the structure of a service grid is shown, and the service grid includes a control plane device, a data plane device 1 and a data plane device 2. The data plane device 1 may include a microservice A1, a proxy B1 corresponding to the microservice A1, and a transmission channel C1 and a transmission channel C2. The data plane device 2 may include a microservice A2, a proxy B2 corresponding to the microservice A2, and a transmission channel C3 and a transmission channel C4. Among them, the transmission channel C1 is used for the microservice A1 to send data to the proxy B1, the transmission channel C2 is used for the proxy B1 to send data to the microservice A1, the transmission channel C3 is used for the microservice A2 to send data to the proxy B2, and the transmission channel C4 is used for the proxy B2 to send data to the microservice A2.
[0179] When microservice A1 needs to send data to proxy B1, data plane device 1 sends the data to be transmitted of microservice A1 to the transmission chip in data plane device 1, and the transmission chip sends the data to be transmitted of microservice A1 to proxy B1 through transmission channel C1; when proxy B1 needs to send data to microservice A1, data plane device 1 sends the data to be transmitted of proxy B1 to the transmission chip in data plane device 1, and the transmission chip sends the data to be transmitted of proxy B1 to microservice A1 through transmission channel C2.
[0180] When microservice A2 needs to send data to proxy B2, data plane device 2 sends the data to be transmitted of microservice A2 to the transmission chip in data plane device 2, and the transmission chip sends the data to be transmitted of microservice A2 to proxy B2 through transmission channel C3; when proxy B2 needs to send data to microservice A2, data plane device 2 sends the data to be transmitted of proxy B2 to the transmission chip in data plane device 2, and the transmission chip sends the data to be transmitted of proxy B2 to microservice A2 through transmission channel C4.
[0181] The above mainly introduces the solution provided by the embodiment of the present invention from the perspective of the working principle of the data plane device and the control plane device in the service grid. It can be understood that in order to realize the above functions, each data transmission device, such as a server, includes a hardware structure and / or software module corresponding to each function. It should be easy for those skilled in the art to realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in this article, the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0182] The embodiment of the present invention can divide the data transmission device and the like into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0183] In the case of dividing each functional module into corresponding functional modules, Figure 7The data plane device 70 provided in the embodiment of the present application is used to implement the functions of the data plane device in the above embodiment. The data transmission device 70 can be any computer included in the service grid; or, the data transmission device 70 can be deployed on any computer included in the service grid. Figure 7 As shown, the data plane device 70 may include: an operation unit 701, a communication unit 702 and a transmission unit 703. The operation unit 701 is used to run one or more microservices and one or more agents; the communication unit 702 is used to execute Figure 5 S501 and S502 in the transmission unit 703 are used to execute Figure 5 S503 in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
[0184] Furthermore, the data plane device 70 provided in the embodiment of the present application may further include a determination unit 704 for executing Figure 5 S503. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0185] In the case of integrated units, such as Figure 3A The server 30 provided in the embodiment of the present application is shown, which is used to implement the functions of the data plane device in the above method. The server 30 includes a processor 301, which is used to implement part of the functions of the data plane device in the embodiment of the present application. For example, the processor 301 can be used to execute Figure 5 For details of processes S501 and S502, please refer to the detailed description in the method example, which will not be repeated here.
[0186] The server 30 includes a memory 302 for storing program instructions and / or data, as well as microservice and agent codes. The memory 302 is coupled to the processor 301. The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which can be electrical, mechanical or other forms, for information exchange between devices, units or modules. The processor 301 may operate in conjunction with the memory 302. The processor 301 can execute program instructions stored in the memory 302 and run the microservices and agents in the memory 302.
[0187] The transceiver 303 included in the server 30 is used to communicate with other devices via a transmission medium. Exemplarily, the transceiver 303 is used to communicate with other devices included in the service grid via a transmission medium.
[0188] The server 30 includes a transmission chip 304, which is used to send the data to be transmitted to the microservice or agent through the transmission channel. Figure 5 Process S503 in .
[0189] As mentioned above, the data plane device 70 or Figure 3A The server 30 shown can be used to implement the functions of the data plane device in the methods implemented in the above-mentioned embodiments of the present application. For the convenience of explanation, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the embodiments of the present application.
[0190] In the case of dividing each functional module into corresponding functional modules, such as Figure 2A The control plane device 202 provided in the embodiment of the present application is shown, which is used to implement the functions of the control plane device in the above embodiment. The control plane device 202 can be any computer included in the service grid; or the control plane device 202 can be deployed on any computer included in the service grid. Among them, the control plane device 202 may include: an information management module 2021 and a channel management module 2022. Among them, the information management module 2021 is used to execute Figure 4 S401 in; channel management module 2022 is used to execute Figure 4 S402, S403 and S404 in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
[0191] In the case of integrated units, such as Figure 3 The server 30 provided in the embodiment of the present application is shown, which is used to implement the functions of the control plane device in the above embodiment. The server 30 may include a processor 301, which is used to implement the functions of the control plane device in the embodiment of the present application. For details, please refer to the detailed description in the method example, which will not be repeated here. The exemplary processor 301 can be used to execute S401, S402, S403 and S404 in the process of the figure.
[0192] The server 30 includes a memory 302 for storing program instructions and / or data, as well as codes of microservices and agents. The memory 302 is coupled to the processor 301. The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which can be electrical, mechanical or other forms, for information exchange between devices, units or modules. The processor 301 may operate in conjunction with the memory 302. The processor 301 may execute program instructions stored in the memory 302, and run microservices and agents in the memory 302.
[0193] The transceiver 303 included in the server 30 is used to communicate with other devices via a transmission medium. Exemplarily, the transceiver 303 is used to communicate with other devices included in the service grid via a transmission medium.
[0194] As mentioned above, the control plane device 202 or Figure 3 The server 30 shown can be used to implement the functions of the control plane device in the above-mentioned embodiment of the present application. For the convenience of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the embodiments of the present application.
[0195] Some other embodiments of the present application provide a service grid system, which may include multiple first computers and a second computer, wherein the first computer may implement the functions of the data plane device in the above embodiment, and the second computer may implement the functions of the control plane device. For example, the first computer may be a server where the data plane device described in the embodiment of the present application is located, and the second computer may be a server where the control plane device described in the embodiment of the present application is located.
[0196] Some other embodiments of the present application provide a chip system, which includes a processor, a memory and a transmission chip, for implementing the above Figure 5 The functions of the data plane device in the illustrated embodiment. The chip system may be composed of a chip, or may include a chip and other discrete devices.
[0197] Some other embodiments of the present application provide a chip system, which includes a processor and may also include a memory, for implementing the above Figure 4 The functions of the control plane device in the illustrated embodiment. The chip system may be composed of a chip, or may include a chip and other discrete devices.
[0198] Some other embodiments of the present application further provide a computer-readable storage medium, which may include a computer program. When the computer program is run on a computer, the computer executes the above Figure 4 or Figure 5 The various steps in the embodiment are shown.
[0199] Some other embodiments of the present application further provide a computer program product, which includes a computer program. When the computer program product is run on a computer, the computer is enabled to execute the above Figure 4 or Figure 5 The various steps in the embodiment are shown.
[0200] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0201] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0202] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0203] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0204] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.
[0205] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A data transmission method, characterized in that: The method is applied to a service grid, wherein the service grid includes a plurality of computers, each of which includes a processor, a memory and a transmission chip; The processor runs the code in the memory, runs one or more microservices, and one or more agents, each microservice corresponds to an agent; The method comprises: Obtain the data to be transmitted generated by the first microservice; Sending the data to be transmitted to a first transmission chip, where the first transmission chip is a transmission chip included in the computer where the first microservice is located; The first transmission chip sends the data to be transmitted to a first agent corresponding to the first microservice through a first transmission channel associated with the first microservice, where the first transmission channel is a hardware transmission channel in the first transmission chip that sends transmission data to the first agent through the first microservice.
2. The method according to claim 1, characterized in that The data to be transmitted also includes auxiliary information; and the method further includes: The first transmission chip determines that the auxiliary information of the data to be transmitted satisfies the forwarding strategy of the first transmission channel; wherein the forwarding strategy is used to indicate the transmission characteristics that the data transmitted by the first transmission channel needs to satisfy; The first transmission chip sends the data to be transmitted to a first agent corresponding to the first microservice through a first transmission channel associated with the first microservice, including: The first transmission chip sends the data that satisfies the forwarding strategy among the data to be transmitted to the first agent through the first transmission channel.
3. The method according to claim 2, characterized in that The auxiliary information includes one or more of the following: a destination Internet Protocol (IP) address of the data to be transmitted, a destination port number of the data to be transmitted, and a transmission protocol of the data to be transmitted.
4. The method according to any one of claims 1 to 3, characterized in that: The first transmission chip includes: a hardware queue chip.
5. The method according to any one of claims 1 to 3, characterized in that: The first transmission channel is a transmission channel configured by the control plane device of the service grid in the first transmission chip to meet the output data range of the first microservice; The control plane device of the service grid associates the first microservice with the first transmission channel when the first microservice is online, and disassociates the first microservice from the first transmission channel when the first microservice is offline.
6. A data transmission control method, characterized in that: The method is applied to a service grid, wherein the service grid includes a plurality of computers, each of which includes a processor, a memory and a transmission chip; The processor runs the code in the memory, runs one or more microservices, and one or more agents; Each microservice corresponds to a proxy; The method comprises: Get the output data scope of each microservice; In the transmission chip included in the computer where each microservice is located, a transmission channel for each microservice to send data to its corresponding agent and a transmission channel for each agent to send data to its corresponding microservice are configured; wherein a transmission channel for a microservice to send data to its corresponding agent satisfies the output data range of the microservice; a transmission channel for an agent to send data to its corresponding microservice satisfies the output data range of the microservice, and the transmission channel for each microservice to send data to its corresponding agent and the transmission channel for each agent to send data to its corresponding microservice are different hardware transmission channels; When the first microservice goes online, the first microservice is associated with a first transmission channel; the first transmission channel is a hardware transmission channel for the first microservice to transmit data to its corresponding agent.
7. The method according to claim 6, characterized in that The method further comprises: When the first microservice goes offline, the first microservice is disassociated from the first transmission channel.
8. A data plane device, characterized in that: The data plane device is deployed in a service grid, and the data plane device includes an operation unit, a communication unit and a transmission unit; wherein: The operation unit is used to run one or more microservices and one or more agents; each microservice corresponds to an agent; The communication unit is used to obtain the data to be transmitted generated by the first microservice, and send the data to be transmitted to the transmission unit; The transmission unit is used to send the data to be transmitted sent by the communication unit to a first agent corresponding to the first microservice through a first transmission channel associated with the first microservice; the first transmission channel is a hardware transmission channel for the first microservice to send transmission data to the first agent.
9. The device according to claim 8, characterized in that The data to be transmitted further includes auxiliary information, and the device further includes a determining unit, wherein the determining unit is configured to: Determining that the auxiliary information of the data to be transmitted satisfies a forwarding strategy of the first transmission channel; wherein the forwarding strategy is used to indicate transmission characteristics that the data transmitted by the first transmission channel needs to satisfy; The transmission unit is specifically configured to send the data that satisfies the forwarding strategy among the data to be transmitted sent by the communication unit to the first agent through the first transmission channel.
10. The device according to claim 9, characterized in that The auxiliary information includes one or more of the following: a destination Internet Protocol (IP) address of the data to be transmitted, a destination port number of the data to be transmitted, and a transmission protocol of the data to be transmitted.
11. The device according to any one of claims 8 to 10, characterized in that: The transmission unit includes: a hardware queue chip.
12. The device according to any one of claims 8 to 10, characterized in that: The first transmission channel is a transmission channel configured by the control plane device of the service grid in the transmission unit to meet the output data range of the first microservice; The control plane device of the service grid associates the first microservice with the first transmission channel when the first microservice is online, and disassociates the first microservice from the first transmission channel when the first microservice is offline.
13. A control surface device, characterized in that: Deployed in a service grid, the service grid also includes multiple data plane devices, each of which runs one or more microservices and one or more agents; Each microservice corresponds to a proxy; The control surface device comprises: Information management module, used to obtain the output data range of each microservice; A channel management module is used to configure, in a transmission unit included in a data plane device where each microservice is located, a transmission channel for each microservice to send data to its corresponding proxy, and a transmission channel for each proxy to send data to its corresponding microservice; wherein a transmission channel for a microservice to send data to its corresponding proxy satisfies an output data range of the microservice; a transmission channel for a proxy to send data to its corresponding microservice satisfies an output data range of the microservice, and the transmission channel for each microservice to send data to its corresponding proxy and the transmission channel for each proxy to send data to its corresponding microservice are different hardware transmission channels; The channel management module is further used to associate the first microservice with a first transmission channel when the first microservice goes online; the first transmission channel is a hardware transmission channel for the first microservice to transmit data to its corresponding agent.
14. The device according to claim 13, characterized in that The channel management module is also used for: When the first microservice goes offline, the first microservice is disassociated from the first transmission channel.
15. A computer, characterized in that: The computer includes: a processor, a memory and a transmission chip; The memory is connected to the processor; the memory is used to store computer instructions, and the transmission chip is used to provide a hardware transmission channel. When the processor executes the computer instructions, the computer executes the data transmission method as described in any one of claims 1 to 5.
16. A computer, characterized in that: The computer comprises: a processor and a memory; The memory is connected to the processor; the memory is used to store computer instructions, and when the processor executes the computer instructions, the computer executes the data transmission control method as described in claim 6 or 7.
17. A service grid system, characterized in that: The method comprises a plurality of computers as claimed in claim 15 and a computer as claimed in claim 16.
18. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on a computer, enable the computer to execute the data transmission method according to any one of claims 1 to 5, or the data transmission control method according to claim 6 or 7.
19. A computer program product, characterized in that The method comprises instructions which, when executed on a computer, enable the computer to execute the data transmission method according to any one of claims 1 to 5, or the data transmission control method according to claim 6 or 7.
Citation Information
Patent Citations
Data stream processing method, system and computer readable storage medium
CN110716744A
Controlling data communication between microservices
US20200162380A1