Message processing method and corresponding apparatus
By integrating multiple simple operators onto the switch chip and using indication information to specify the execution order and combination, the problem of limited switch chip area is solved, enabling support for various service functions and resource optimization.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2026-01-21
- Publication Date
- 2026-07-30
AI Technical Summary
Existing switch chips have limited area, making it difficult to meet the needs of various service functions, which leads to the need to customize large-area chips and waste resources.
By integrating multiple simple operators onto the switch chip and combining these operators to achieve complex business functions, and by using indication information to indicate the execution order and combination of operators, a variety of business functions can be supported.
Multiple business functions are implemented on a chip with a limited area, which improves operator utilization, reduces chip area overhead, and enhances development flexibility.
Smart Images

Figure CN2026073976_30072026_PF_FP_ABST
Abstract
Description
A message processing method and corresponding apparatus
[0001] This application claims priority to Chinese Patent Application No. 202510125102.4, filed with the State Intellectual Property Office of China on January 26, 2025, entitled "A Message Processing Method and Corresponding Apparatus", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of communication technology, specifically to a message processing method and corresponding apparatus. Background Technology
[0003] In communication systems, different worker nodes (such as read nodes, write nodes, or storage nodes) are typically connected via switches. Switches can assist worker nodes in performing various business functions, such as data fragment ownership and read / write locking.
[0004] Currently, the functions performed by switches are usually customized. For example, by customizing the ownership lookup function on the switch chip, the ownership lookup of the storage node where the data resides can be realized and the routing can be guided. Alternatively, by customizing the read-write lock function on the switch chip, the switch can implement read-write lock authorization as needed in concurrent read-write scenarios of databases and distributed systems.
[0005] Currently, the functions on switches are mostly implemented through customization. Different customization requirements necessitate different circuits on the chip. If multiple functions are customized on a chip, it results in an excessively large chip area. Since chip area is typically limited, this means that a chip with a limited area cannot meet the needs of multiple business functions. If a database requires multiple functions, a large-area chip needs to be customized. Summary of the Invention
[0006] This application provides a message processing method for meeting various service requirements with a chip of limited area. This application also provides corresponding apparatus, computer-readable storage media, and computer program products.
[0007] This application provides a message processing method. The method is applied to a first device, which can be a network device or a component within a network device in a communication system. The network device can connect to one or more computer devices in the communication system and process messages from the computer devices. The network device can be a switch, router, gateway, or network interface card (NIC) capable of processing messages. The component within the network device can be a processor, circuit, chip, or chip system, or it can be a logic module or software capable of implementing all or part of the functions of the first device, such as a virtual switch or virtual router. The method includes: receiving a first message; wherein the first message includes first indication information, the first indication information indicating at least two operators (OPs) corresponding to a first service; wherein the at least two operators are included in multiple operators, and the multiple services include the first service; and invoking the at least two operators to process the first message.
[0008] In this application, the communication system can be a database system, a file system, or a cloud system. The computer device in the communication system can be a physical machine or a virtual machine (VM).
[0009] In this application, the first business can be a business function, or it can also be referred to as the first business function. A business function can be a subdivision of a business, such as a database business that may include multiple business functions, such as data query, data modification, data insertion, data deletion, read-write lock acquisition, data sorting, heartbeat maintenance, global transaction manager (GTM), data sharding ownership, etc. Of course, in some scenarios, these business functions may also be referred to as businesses, sub-businesses, services, or sub-services, etc., and this application does not limit this.
[0010] In this application, the first business or the first business function can be a function item under a certain business, such as any of the business functions listed in the above database business.
[0011] In this application, if the first device is a processor, circuit, chip, or chip system, multiple operators will be integrated on the processor, circuit, chip, or chip system. If the first device is the device itself, multiple operators will also be integrated on the processor, circuit, chip, or chip system in the first device. These multiple operators can be basic operators, each with a relatively simple circuit that can implement some basic functions. For example, multiple operators may include parsing operators, fetch and add (FA) operators, compare and swap (CAS) operators, read-modify-write (RMW) operators, sharding operators, or mirror operators, etc. Of course, the types of operators in this application are not limited to those listed here; they can also be various types of operators that implement addition, subtraction, multiplication, division, normalization, or other functions.
[0012] In this application, each of the multiple services or each service function can correspond to at least two of the multiple operators. The at least two operators corresponding to different services or different service functions, as well as the execution order of the at least two operators, are usually different.
[0013] In this application, multiple operators can support multiple business operations or business functions. Specifically, different combinations of at least two operators can support different business functions. The combination of at least two operators can include the operators and their execution order. Even if two operator combinations contain the same at least two operators, different execution orders indicate different operator combinations. For example, operator combination 1 includes {operator A, operator B}, and operator combination 2 includes {operator B, operator A}; therefore, operator combination 1 and operator combination 2 represent different operator combinations.
[0014] Because a single operator can implement relatively simple business functions, and a combination of at least two operators can implement more complex business functions. Thus, through operator combinations, the aforementioned finite number of operators can support multiple business functions. For example, with operators A, B, and C, there are 12 possible operator combinations: {A, B}, {A, C}, {B, A}, {B, C}, {C, A}, {C, B}, {A, B, C}, {A, C, B}, {B, A, C}, {B, C, A}, {C, A, B}, and {C, B, A}, supporting 12 different business functions. Different business functions can correspond to different operator combinations.
[0015] In this application, the first message can be either a data message or a control message. A data message typically refers to a message related to data processing, while a control message typically refers to a message used to control data messages, such as a message used to control the flow of data messages.
[0016] In this application, the first device schedules at least two operators to process the first message, which means that at least two operators can complete the corresponding business functions according to the requirements of the first message.
[0017] In this application, the first indication information is used to indicate at least two operators corresponding to the first business function. It can be a direct indication of at least two operators or an indirect indication of at least two operators. The first indication information can be in the form of binary bit values or other information that can indicate at least two operators.
[0018] In the first aspect described above, the first device or its chip is equipped with multiple operators. Each operator has a relatively simple circuit, capable of implementing basic functions and supporting simple business functions. Combinations of different operators can support more complex business functions. Thus, on a chip with a limited area, a finite number of operators can form far more operator combinations than the number of operators themselves, supporting different business functions and improving operator utilization. Furthermore, implementing business functions through operator combinations is beneficial for the development of subsequent incremental services. Conversely, compared to requiring a custom chip for each business function, the solution described in the first aspect can significantly reduce chip area overhead when satisfying the same number of business functions.
[0019] In one possible implementation, the first indication information is also used to indicate the execution order of at least two operators;
[0020] Calling at least two operators to process the first message includes: calling at least two operators sequentially to process the first message according to the execution order.
[0021] In this application, the execution order of at least two operators refers to the order in which the first message is processed by at least two operators.
[0022] In this possible implementation, the execution order of at least two operators is indicated by the first indication information, which eliminates the need for the first device to determine the execution order of at least two operators after determining the first device, thereby improving message processing efficiency.
[0023] In one possible implementation, the first indication information is the indication information of a first service; the method further includes: determining at least two operators corresponding to the first service from the correspondence between services and operators based on the indication information of the first service, wherein the correspondence between services and operators includes the correspondence between the first service and at least two operators.
[0024] In this application, the correspondence between services and operators can include the correspondence between each service and at least two corresponding operators (operator combinations). For example: the correspondence between service 1 and operator combination 1, service 2 and operator combination 2, ..., the correspondence between service X and operator combination X, where service 1, service 2, ..., service X belong to different services or different service functions. Operator combination 1, operator combination 2, ..., operator combination X are different operator combinations.
[0025] In this application, the indication information of the first service can be located in the bit of the service function identifier (FunctionID). It can be the identifier of the first service or a binary bit value representing the first service. For example, various services or service functions can be represented by multiple bits. Taking 3 bits as an example, the bit value "000" can represent one service or service function, the bit value "001" can represent another service or service function, and so on. Different bit values represent different services or service functions.
[0026] In this possible implementation, if the first indication information is the indication information of the first service, the first device needs to determine at least two operators corresponding to the first service from the correspondence between services and operators based on the indication information of the first service. This method of indirectly indicating at least two operators through the indication information of the first service can reduce the number of bytes of the first indication information and reduce the transmission overhead of the first message.
[0027] In one possible implementation, the first indication information is the indication information of at least two operators.
[0028] In this application, the instruction information for at least two operators may include the identifiers of at least two operators, and the instruction information for at least two operators may also include the execution order of at least two operators.
[0029] In this possible implementation, at least two operators are directly indicated through the instruction information of at least two operators, eliminating the need for the first device to determine the at least two operators, thus reducing the computational overhead of the first device. Furthermore, this instruction method can enhance the flexibility of operator combinations and improve operator utilization.
[0030] In one possible implementation, the first message further includes second instruction information, which is used to indicate the execution order of at least two operators.
[0031] In this application, the second instruction information may be located in the service flag bit and may indicate the execution order of at least two operators in various forms, such as: the execution order of at least two operators may be listed by means of operator flags, or the execution order of at least two operators may be determined by means of numerical values in conjunction with the first instruction information.
[0032] In this possible implementation, the execution order of at least two operators is indicated by the second instruction information, which can improve the flexibility of operator invocation and facilitate the subsequent incremental development of other business or business functions.
[0033] In one possible implementation, the second indication information includes at least two numerical values corresponding to at least two operators, the at least two numerical values being used to indicate the execution order of the at least two operators.
[0034] In this application, at least two operators and at least two numerical values can have a one-to-one correspondence, meaning each operator corresponds to one numerical value, which can be a binary bit value. Each operator's corresponding numerical value can be represented by multiple bits. Taking two bits as an example, if there are two operators and their corresponding numerical values are "01" and "10", they can be executed in ascending order: first, the operator corresponding to value "01" is called to execute the first message, then the operator corresponding to value "10" is called to execute the first message. If the execution is in descending order, the reverse is true: first, the operator corresponding to value "10" is called to execute the first message, then the operator corresponding to value "01" is called to execute the first message. Of course, this application does not limit the number of bits used to represent the numerical value; the number of bits in the first message can be set or adjusted as needed.
[0035] In this possible implementation, the execution order of at least two operators can be indicated numerically, which can reduce the indication overhead.
[0036] In one possible implementation, calling at least two operators to process the first message includes: calling an operator whose value is equal to a first value among at least two values to process the first message; and subtracting a second value from a value that is not less than the first value among at least two values.
[0037] The process can be executed in one round or multiple rounds, and the number of rounds depends on the value corresponding to the operator.
[0038] If, after one round of execution, at least two values are greater than the first value, the call operation of the operator whose value is equal to the first value is repeated until at least two values are less than the first value.
[0039] In this application, taking the first value as "01" and the second value as 1 as an example, the above-mentioned calling at least two operators to process the first message can be described as follows: after recognizing the value "01", the operator corresponding to "01" is called to process the first message. Then, at least two values are subtracted by 1 respectively until the values are both reduced to "00", and the processing flow of the first message is completed.
[0040] This section uses subtraction as an example to illustrate the triggering process of operators. In fact, this application does not limit the calling mechanism of operator execution order.
[0041] In this possible implementation, calling the operator by making the value corresponding to the operator equal to the first value can improve the accuracy and flexibility of operator calling.
[0042] In one possible implementation, the first message further includes at least one of the format information of at least two operators or the attribute information of at least two operators; wherein, the format information of at least two operators is used to indicate the format of the data corresponding to the first message processed by at least two operators, and the attribute information of at least two operators is used to indicate the operation information of the data corresponding to the first message processed by at least two operators, and at least one of the format information or attribute information corresponds to the first service.
[0043] In this application, the format information of at least two operators may include the format information of each operator individually, or it may include the format information of some operators among the at least two operators. For example, taking two operators as an example, it may include at least one of the format information of operator 1 or operator 2. The format information of operator 1 is used to instruct operator 1 to process the data corresponding to the first message using the format indicated by the format information. Similarly, the format information of operator 2 is used to instruct operator 2 to process the data corresponding to the first message using the format indicated by the format information.
[0044] In this application, the attribute information of at least two operators may include the attribute information of each operator individually, or it may include the attribute information of some operators among the at least two operators. For example, taking two operators as an example, it may include at least one of the attribute information of operator 1 or operator 2. The attribute information of operator 1 is used to instruct operator 1 to process the data corresponding to the first message using the operation information indicated by the attribute information. The operation information may include the operation frequency, number of operations, operation position, etc. Of course, this is only an example of operation frequency, number of operations, and operation position; the attribute information may also include other operation-related information. Similarly, the attribute information of operator 2 is used to instruct operator 2 to process the data corresponding to the first message using the operation information indicated by the attribute information.
[0045] In this application, the format or attribute information corresponding to different business functions is usually different. For example, the format information of the fragmented search function can be the spacing and arrangement of the returned data, which are related to the data presentation; the attribute information of the fragmented search function can be the search range of the data, such as the time range, spatial range, etc. The format information of the read-write lock function can be the type of lock acquired, and the attribute information of the read-write lock function can be the duration of lock holding, etc.
[0046] In this possible implementation, at least one of the format information of at least two operators or the attribute information of at least two operators is used to instruct the operators to process the data corresponding to the first message, which provides a clearer instruction for at least two operators to process the first message and can improve the accuracy of data processing.
[0047] In one possible implementation, before receiving the first message, the method further includes: receiving a second message, the second message including third indication information, the third indication information being used to indicate entries corresponding to at least two operators, the entries being used to store data corresponding to at least two operators.
[0048] In this application, the second message can be a configuration message, which can be used for initial configuration or configuration update. Here, a configuration message refers to a message used to configure the table entries corresponding to the operators.
[0049] In this application, the third instruction information may include the table ID of the table entry. Of course, the third instruction information may also indicate the type of operation performed on the table entry, such as insert, update, or delete operations. The second message may also contain a key and value corresponding to the operation type.
[0050] In this application, table entries can be associated with operators, and an operator can be associated with one or more table entries. Operators can operate on the corresponding table entries based on the table ID. Of course, some operators may not be associated with table entries, and this application does not impose any restrictions on this.
[0051] In this possible implementation, the speed of processing subsequent first messages can be improved by pre-configuring the table entries indicated by the third indication information in the second message.
[0052] In one possible implementation, at least one of the first instruction information or the second instruction information is located in the header of the first message.
[0053] In one possible implementation, the first device includes a production line and an engine module, the engine module being integrated into or mounted on the production line, and the engine module integrating some or all of a plurality of operators.
[0054] In one possible implementation, the first device may further include a processor, which may also integrate some of the operators from a plurality of operators.
[0055] A second aspect of this application provides a message processing method. This method is applied to a second device, which can be a computer device or a component within a communication system. The computer device can be connected to a network device in the communication system and send messages to the network device. The computer device can be a physical machine or a virtual machine. The method includes: generating a first message; wherein the first message includes first indication information, which indicates at least two operators corresponding to a first service; wherein the at least two operators are included in a plurality of operators supporting multiple service functions, the multiple services including the first service; sending the first message to a first device; wherein the first message is processed by at least two operators in the first device.
[0056] In this second aspect, the second device carries first indication information in the first message to indicate at least two operators corresponding to the first service. Thus, upon receiving the first message, the first device can schedule at least two operators to process the first message based on the first indication information. This is because the first device, on a chip with a limited area, can form far more operator combinations than the number of operators needed to meet the diverse service function requirements of the second device, improving operator utilization. Furthermore, implementing service functions through operator combinations is beneficial for the development of subsequent incremental services. Conversely, compared to requiring customized chips for each service function, this approach significantly reduces chip area overhead while satisfying the same number of service functions. Moreover, this correspondence between service functions and operator combinations increases development flexibility, allowing the second device to load applications with more service functions.
[0057] In one possible implementation, the first instruction information is also used to indicate the execution order of at least two operators.
[0058] In one possible implementation, the first indication information is the indication information of a first service. The indication information of the first service is used to instruct the first device to determine at least two operators corresponding to the first service from the correspondence between services and operators. The correspondence between services and operators includes the correspondence between the first service and at least two operators.
[0059] In one possible implementation, the first indication information is the indication information of at least two operators.
[0060] In one possible implementation, the first message further includes second instruction information, which is used to indicate the execution order of at least two operators.
[0061] In one possible implementation, the second indication information includes at least two numerical values corresponding to at least two operators, the at least two numerical values being used to indicate the execution order of the at least two operators.
[0062] In one possible implementation, the first message further includes at least one of the format information of at least two operators or the attribute information of at least two operators; wherein, the format information of at least two operators is used to indicate the format of the data corresponding to the first message processed by at least two operators, and the attribute information of at least two operators is used to indicate the operation information of the data corresponding to the first message processed by at least two operators, and at least one of the format information or attribute information corresponds to the first service.
[0063] In one possible implementation, before generating the first message, the method further includes: sending a second message to the first device, the second message including third indication information, the third indication information being used to indicate entries corresponding to at least two operators, the entries being used to store data corresponding to at least two operators.
[0064] In one possible implementation, generating the first message includes: determining information of at least two operators corresponding to the first service based on an operator library, and using the information of the at least two operators to generate the first message.
[0065] In this application, the operator library includes various types of operators. The operators in the operator library are usually software logic. The parameters corresponding to at least two operators may include the operator's identifier, operator format information, operator attribute information, etc.
[0066] In this possible implementation, information corresponding to at least two operators can be obtained through an operator library, which can reduce the overhead of the second device maintaining the information of the aforementioned operators.
[0067] A third aspect of this application provides a message processing apparatus, comprising: a transceiver unit and a processing unit; wherein:
[0068] A transceiver unit is used to receive a first message; wherein the first message includes first indication information, which is used to indicate at least two operators corresponding to a first service; wherein the at least two operators are included in multiple operators, and the multiple services include the first service;
[0069] The processing unit is used to invoke at least two operators to process the first message.
[0070] In one possible implementation, the processing unit is specifically used to, if the first indication information is also used to indicate the execution order of at least two operators, sequentially call at least two operators to process the first message according to the execution order.
[0071] In one possible implementation, the processing unit is further configured to, if the first indication information is the indication information of a first service, determine at least two operators corresponding to the first service from the correspondence between services and operators based on the indication information of the first service, wherein the correspondence between services and operators includes the correspondence between the first service and at least two operators.
[0072] In one possible implementation, the first indication information is the indication information of at least two operators.
[0073] In one possible implementation, the first message further includes second instruction information, which is used to indicate the execution order of at least two operators.
[0074] In one possible implementation, the second indication information includes at least two numerical values corresponding to at least two operators, the at least two numerical values being used to indicate the execution order of the at least two operators.
[0075] In one possible implementation, the processing unit is specifically used to call at least two operators to process the first message, including: calling an operator whose value is equal to a first value among at least two values to process the first message; and subtracting a second value from a value that is not less than the first value among at least two values.
[0076] In one possible implementation, the first message further includes at least one of the format information of at least two operators or the attribute information of at least two operators; wherein, the format information of at least two operators is used to indicate the format of the data corresponding to the first message processed by at least two operators, and the attribute information of at least two operators is used to indicate the operation information of the data corresponding to the first message processed by at least two operators, and at least one of the format information or attribute information corresponds to the first service.
[0077] In one possible implementation, the transceiver unit is further configured to receive a second message before receiving the first message. The second message includes third indication information, which is used to indicate entries corresponding to at least two operators. The entries are used to store data corresponding to at least two operators.
[0078] In one possible implementation, at least one of the first instruction information or the second instruction information is located in the header of the first message.
[0079] In one possible implementation, the first device includes a production line and an engine module, the engine module being integrated into or mounted on the production line, and the engine module integrating some or all of a plurality of operators.
[0080] In one possible implementation, the first device may further include a processor, which may also integrate some of the operators from a plurality of operators.
[0081] A fourth aspect of this application provides a message processing apparatus, comprising: a transceiver unit and a processing unit; wherein:
[0082] A processing unit is configured to generate a first message; wherein the first message includes first indication information, the first indication information being used to indicate at least two operators corresponding to a first service; wherein the at least two operators are included in multiple operators supporting multiple service functions, the multiple services including the first service;
[0083] A transceiver unit is used to send a first message to a first device; wherein the first message is processed by at least two operators in the first device.
[0084] In one possible implementation, the first instruction information is also used to indicate the execution order of at least two operators.
[0085] In one possible implementation, the first indication information is the indication information of a first service. The indication information of the first service is used to instruct the first device to determine at least two operators corresponding to the first service from the correspondence between services and operators. The correspondence between services and operators includes the correspondence between the first service and at least two operators.
[0086] In one possible implementation, the first indication information is the indication information of at least two operators.
[0087] In one possible implementation, the first message further includes second instruction information, which is used to indicate the execution order of at least two operators.
[0088] In one possible implementation, the second indication information includes at least two numerical values corresponding to at least two operators, the at least two numerical values being used to indicate the execution order of the at least two operators.
[0089] In one possible implementation, the first message further includes at least one of the format information of at least two operators or the attribute information of at least two operators; wherein, the format information of at least two operators is used to indicate the format of the data corresponding to the first message processed by at least two operators, and the attribute information of at least two operators is used to indicate the operation information of the data corresponding to the first message processed by at least two operators, and at least one of the format information or attribute information corresponds to the first service.
[0090] In one possible implementation, the transceiver unit is further configured to send a second message to the first device before generating the first message. The second message includes third indication information, which is used to indicate entries corresponding to at least two operators. The entries are used to store data corresponding to at least two operators.
[0091] In one possible implementation, the processing unit is specifically used to determine information of at least two operators corresponding to the first service based on the operator library, and the information of the at least two operators is used to generate the first message.
[0092] The fifth aspect of this application provides a chip system for executing the first aspect or any implementation thereof.
[0093] The sixth aspect of this application provides a message processing apparatus for performing the first aspect or any implementation thereof.
[0094] A seventh aspect of this application provides a message processing apparatus, which includes a processor. The processor is configured to call and run a computer program stored in a memory, such that the processor implements the first aspect or any implementation thereof, or implements the second aspect or any implementation thereof.
[0095] Optionally, the message processing device further includes a communication interface; the processor is also used to control the communication interface to send and receive messages or data.
[0096] Optionally, the message processing device includes a memory in which a computer program is stored.
[0097] The message processing apparatus in the seventh aspect mentioned above can be a device or a chip (system) in a device.
[0098] The eighth aspect of this application provides a message processing apparatus, which may be a first apparatus or a module or unit (e.g., a chip, a chip system, or a circuit) within the first apparatus that performs one-to-one the methods / operations / steps / actions described in the first aspect or any implementation thereof. The message processing apparatus may also be a second apparatus or a module or unit (e.g., a chip, a chip system, or a circuit) within the second apparatus that performs one-to-one the methods / operations / steps / actions described in the second aspect or any implementation thereof.
[0099] The ninth aspect of this application provides a computer-readable storage medium including computer instructions that, when executed on a computer, cause the computer to perform either the first aspect or any implementation thereof, or the second aspect or any implementation thereof.
[0100] The tenth aspect of this application provides a computer program product including instructions that, when run on a computer, cause the computer to perform as described in the first aspect or any implementation thereof, or to perform as described in the second aspect or any implementation thereof.
[0101] The eleventh aspect of this application provides a communication system, which includes a first device and a second device. The first device is used to execute the first aspect or any one of the implementations of the first aspect, and the second device is used to execute the second aspect or any one of the implementations of the second aspect.
[0102] The technical effects of the second, third, or fourth aspects, or any possible implementation of the second, third, or fourth aspects, as well as the fifth to eleventh aspects, can be found in the first aspect or the technical effects of different possible implementations of the first aspect, and will not be repeated here. Attached Figure Description
[0103] Figures 1A to 1C are schematic diagrams of several possible architectures of the communication system provided in the embodiments of this application;
[0104] Figure 1D is a schematic diagram of the architecture of a distributed database system provided in an embodiment of this application;
[0105] Figure 2A is a structural schematic diagram of the first device provided in an embodiment of this application;
[0106] Figure 2B is a schematic diagram of a chip system provided in an embodiment of this application;
[0107] Figure 2C is a structural schematic diagram of a network device provided in an embodiment of this application;
[0108] Figure 3 is a schematic diagram of an embodiment of the message processing method provided in this application;
[0109] Figures 4A to 4J are schematic diagrams of several structures related to message headers provided in the embodiments of this application;
[0110] Figure 5 is a schematic diagram of another embodiment of the message processing method provided in this application;
[0111] Figure 6 is a schematic diagram of an embodiment of the data fragment attribution lookup scenario provided in this application;
[0112] Figure 7 is a schematic diagram of an embodiment of the network lock scenario provided in this application;
[0113] Figure 8 is a schematic diagram of an embodiment of a network multiple copy scenario provided in this application;
[0114] Figure 9 is a schematic diagram of an embodiment of the network GTM scenario provided in this application;
[0115] Figures 10 to 12 are schematic diagrams of the message data device provided in the embodiments of this application;
[0116] Figure 13 is a schematic diagram of the communication system provided in an embodiment of this application. Detailed Implementation
[0117] The embodiments of this application are described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. As those skilled in the art will understand, with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0118] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0119] This application provides a message processing method for meeting various service function requirements with a chip of limited area. This application also provides corresponding apparatus, computer-readable storage media, and computer program products. These are described in detail below.
[0120] Figure 1A is a schematic diagram of the architecture of a communication system provided in an embodiment of this application. As shown in Figure 1A, the communication system includes: one or more first devices and one or more second devices, wherein the first devices and the second devices are communicatively connected.
[0121] The second device is used to generate messages according to the business functions and send the messages to the first device.
[0122] The first device is used to receive and process messages.
[0123] The function of the first device can be implemented in hardware or software. The function of the second device can be implemented in software, or of course, in hardware.
[0124] The first device can be a network device or a component of a network device in a communication system. The network device can connect to one or more computer devices in the communication system and process messages from the computer devices. The network device can be a switch, router, gateway, or network interface card (NIC) capable of processing messages. The component of the network device can be a processor, circuit, chip, or chip system, or it can be a logic module or software capable of implementing all or part of the functions of the first device, such as a virtual switch, virtual router, virtual gateway, or virtual NIC.
[0125] The second device can be a computer device or a component of a computer device in a communication system. This computer device can connect to network devices in the communication system and send messages to the network devices. The computer device can be a physical machine or a virtual machine. The physical machine can include servers, data storage devices, or global data management devices (such as a Global Transaction Manager (GTM), etc.) that can connect to switches, routers, gateways, or network interface cards (NICs).
[0126] Taking the first device as a switch and the second device as a computer device as an example, the communication system can be understood with reference to Figure 1B. As shown in Figure 1B, the communication system includes multiple computer devices and switches, where the multiple computer devices can be computer device 1, ..., computer device n, and computer device 1 and computer device n are connected through a switch. Of course, although only one switch is shown in Figure 1B, the communication system can actually include multiple switches. The types of switches can also be different, including access switches, aggregation switches, and core switches. As shown in Figure 1C, computer devices can first be connected through access switches, then the access switches can be connected to different aggregation switches, and the aggregation switches can be connected to different core switches, thus enabling communication between different computer devices in the communication system. The message processing method provided in this application embodiment can be applied to any of the above-mentioned types of switches.
[0127] In the aforementioned communication system, the communication process between the computer equipment and the switch can be triggered by the computer equipment based on business needs, or by a user-side terminal device sending a request to the communication system, which is then triggered by a computer device within the system. Taking the distributed database system shown in Figure 1D as an example, this distributed database system includes one or more coordinator nodes (CNs) and multiple data nodes (DNs). Both CNs and DNs can be the computer equipment described above.
[0128] It should be noted that the distributed database system may also include one or more GTMs (as shown in Figure 1D: the first GTM and the second GTM). The first GTM acts as the master GTM, and the second GTM is used to back up the data of the first GTM and take over the work of the first GTM when it fails, thus ensuring the high reliability of DDBS. CNs and DNs communicate through a network channel. Each DN has its own dedicated hardware resources (such as data storage), operating system, and database. CNs, DNs, the first GTM, or the second GTM communicate through a network channel. In one embodiment, this network channel can be composed of network devices such as switches, routers, and gateways. CNs, DNs, and GTMs jointly implement the functions of the database management system, providing clients with database query (retrieval), insertion, modification, and deletion services. In one embodiment, a database management system is deployed on each CN, DN, and GTM. In this distributed database system, data is distributed to various DNs according to the database model and application characteristics. Query tasks are divided into several parts by the CN and executed in parallel on multiple DNs, coordinating computation to provide database services as a whole. All communication functions can be implemented on a high-bandwidth network interconnection system.
[0129] In a distributed database system, the CN, DN, first GTM, or second GTM can be a physical machine, such as a database server, or a virtual machine (VM) or container running on abstract hardware resources. In one embodiment, the CN, DN, first GTM, or second GTM is a VM or container, and the network channel is a virtual switching network, which includes virtual switches. The database management system deployed in the CN, DN, first GTM, or second GTM is a DBMS instance, which can be a process or a thread. These DBMSs work together to complete the functions of the database relational system. In another embodiment, the CN, DN, first GTM, or second GTM is a physical machine, and the network channel includes one or more switches, which can be a storage area network (SAN) switch, an Ethernet switch, a fiber optic switch, or other physical switching equipment.
[0130] In addition, the communication system of this application can also be a file system or a cloud system. The connection relationship between computer devices and switches in the file system or cloud system, as well as the communication principle between computer devices, can be understood by referring to the introduction of the distributed database system in Figure 1D.
[0131] The first device in the aforementioned communication system can integrate multiple operators (OPs). The structure of this first device can be understood with reference to Figure 2A. As shown in Figure 2A, the first device includes multiple operators, such as: operator 1, operator 2, ..., operator 8. Operator 1 is connected to operator 2, operator 2 is connected to operator 3 and operator 7, operator 3 is connected to operator 4, operator 5 is connected to operator 6, operator 6 is connected to operator 7 and operator 3, and operator 7 is connected to operator 8. Of course, Figure 2A uses eight operators as an example for illustration. In fact, this application does not limit the number of operators, nor does it limit the connection relationships between operators.
[0132] In this application, the operators in the first device can be basic operators, each with a relatively simple circuit that can implement some basic functions. For example, multiple operators may include parsing operators, fetch and add (FA) operators, compare and swap (CAS) operators, read-modify-write (RMW) operators, sharding operators, or mirror operators, etc. Of course, the types of operators in this application are not limited to those listed here, and can also be various types of operators that implement addition, subtraction, multiplication, division, normalization, etc., or operators that implement other functions.
[0133] If the first device is a chip system, multiple operators can be integrated on the chip system. The chip system may include a processor, a pipeline, and an engine module. The engine module and processor are integrated or mounted on the pipeline. Multiple operators are integrated on the engine module and processor. The engine module can be a data consistency engine (DCE), and the pipeline can include an ingress pipeline (IPP) and an egress pipeline (EPP). The processor can be a service coprocessor (SCOP), or other processors such as a central processing unit (CPU), a data processing unit (DPU), a graphics processing unit (GPU), or a neural network processing unit (NPU).
[0134] Figure 2B shows a possible structure of the chip system. As shown in Figure 2B, the chip system includes inlet pipelines 201-202, outlet pipelines 203-204, a coprocessor 205, and engine modules 206-209. The coprocessor 205 is connected to inlet pipelines 201-202 and outlet pipelines 203-204; engine module 206 is integrated or mounted on inlet pipeline 201, engine module 207 is integrated or mounted on inlet pipeline 202, engine module 208 is integrated or mounted on outlet pipeline 203, and engine module 209 is integrated or mounted on outlet pipeline 204.
[0135] In fact, the coprocessor 205 can also be integrated or mounted on the inlet pipeline 201-202, or the outlet pipeline 203-204. This application does not limit the relationship between the coprocessor 205 and the inlet pipeline 201-202, or the outlet pipeline 203-204.
[0136] The coprocessor 205 and engine modules 206-209 can each integrate one or more operators. For example, in Figure 2B, we illustrate this by showing coprocessor 205 and engine modules 206-209 each integrating two operators: operator 1 and operator 2 are integrated in engine module 206, operator 3 and operator 4 are integrated in engine module 208, operator 5 and operator 6 are integrated in engine module 207, operator 7 and operator 8 are integrated in engine module 209, and operator 9 and operator 10 are integrated in coprocessor 205. In reality, coprocessor 205 and engine modules 206-209 can each integrate one or more operators, not just the two operators shown in Figure 2B.
[0137] The chip system shown in Figure 2B also includes a switch buffer (SWB). The inlet pipelines 201-202 and the outlet pipelines 203-204 can communicate or transmit signals through the switch buffer. Of course, the engine modules 206-209 integrated or mounted on the inlet pipelines 201-202 and the outlet pipelines 203-204, as well as the coprocessor 205 connected to the inlet pipelines 201-202 and the outlet pipelines 203-204, can also communicate or transmit signals through the switch buffer.
[0138] If the first device is a network device, as shown in Figure 2C, the network device may include a communication interface 220 and a chip system. The chip system can be understood by referring to the chip system shown in Figure 2B. The communication interface 220 can be connected to the input pipelines 201-202 in the chip system. Of course, the network device may also include other components, such as a memory.
[0139] The following describes the message processing method provided in the embodiments of this application, based on the interaction process between the first device and the second device.
[0140] As shown in Figure 3, the message processing method provided in this application embodiment includes:
[0141] S301. The second device generates a first message; wherein the first message includes first indication information, which is used to indicate at least two operators corresponding to the first service.
[0142] Among them, at least two operators are included in the multiple operators of the first device, and the multiple operators support multiple services, including the first service.
[0143] In this application, the first device can be understood with reference to the chip system shown in FIG2B or the network device shown in FIG2C.
[0144] In this application, the first message can be either a data message or a control message. A data message typically refers to a message related to data processing, while a control message typically refers to a message used to control data messages, such as a message used to control the flow of data messages.
[0145] In this application, the first business can be a business function, or it can also be referred to as the first business function. A business function can be a subdivision of a business, such as a database business that may include multiple business functions, such as data query, data modification, data insertion, data deletion, read-write lock acquisition, data sorting, heartbeat maintenance, global transaction manager (GTM), data sharding ownership, etc. Of course, in some scenarios, these business functions may also be referred to as businesses, sub-businesses, services, or sub-services, etc., and this application does not limit this.
[0146] In this application, the first business or the first business function can be a function item under a certain business, such as any of the business functions listed in the above database business.
[0147] In this application, each of the multiple services or each service function can correspond to at least two of the multiple operators. The at least two operators corresponding to different services or different service functions, as well as the execution order of the at least two operators, are usually different.
[0148] In this application, the multiple operators of the first device can support various business functions. Specifically, different combinations of at least two operators can support different businesses or business functions. The combination of at least two operators can include the operators and their execution order. Even if two operator combinations contain the same at least two operators, different execution orders indicate different operator combinations. For example, operator combination 1 includes {operator A, operator B}, and operator combination 2 includes {operator B, operator A}; therefore, operator combination 1 and operator combination 2 represent different operator combinations.
[0149] Because a single operator can implement relatively simple business functions, and a combination of at least two operators can implement more complex business functions. Thus, through operator combinations, the aforementioned finite number of operators can support multiple business functions. For example, with operators A, B, and C, there are 12 possible operator combinations: {A, B}, {A, C}, {B, A}, {B, C}, {C, A}, {C, B}, {A, B, C}, {A, C, B}, {B, A, C}, {B, C, A}, {C, A, B}, and {C, B, A}, supporting 12 different business functions. Different business functions can correspond to different operator combinations.
[0150] In this application, the operator combination includes at least two operators, which can be any combination of two operators on the first device, regardless of whether they are located in the same coprocessor or engine module. For example, operator 1 in Figure 2B above can form an operator combination with operator 2, operator 1 can also form an operator combination with operator 3 or operator 4, and operator 1 can also form an operator combination with operator 7 or operator 8. This application does not limit the position of the operators in the operator combination, as long as the operator combination can realize the corresponding business or business function. In the following tables, business functions are used for description. It can be understood that business function can also be replaced with business, only the name is different, and the relationship with operator combination is the same.
[0151] The correspondence between business functions and operator combinations can be understood by referring to Table 1. As shown in Table 1:
[0152] Table 1:
[0153] The business functions in this application can be set according to requirements. Taking the business functions in the database as an example, the business functions may include data fragmentation ownership, network lock, network multiple replicas, network GTM, network barrier, etc. Of course, it may also include the functions in the database business listed above. Please refer to the previous introduction for understanding.
[0154] In database scenarios, some examples of combinations of business functions and operators can be found in Table 2 for understanding. As shown in Table 2:
[0155] Table 2:
[0156] Table 2 only lists some business functions in the database scenario and their corresponding operator combinations. If other business functions need to be added to the database scenario, simply expand Table 2 and add the business function and its corresponding operator combination. Similarly, in other distributed scenarios, the corresponding business functions and operator combinations can be configured in the same way as in distributed database systems to execute the corresponding message processing procedures.
[0157] Additionally, it should be noted that the table is only one way to represent the correspondence between business functions and operator combinations. This application does not limit the representation of the correspondence between business functions and operator combinations to a table, and other methods can also be used to give the correspondence between business functions and operator combinations.
[0158] In this application, both the first device and the second device can store the correspondence between the above-mentioned business functions and operator combinations.
[0159] S302. The second device sends a first message to the first device. Correspondingly, the first device receives the first message.
[0160] S303. The first device invokes at least two operators to process the first message.
[0161] In this application, the first device schedules at least two operators to process the first message, which means that at least two operators can complete the corresponding business functions according to the requirements of the first message.
[0162] The solution provided in this application embodiment has multiple operators configured on the first device or the chip of the first device. Each operator has a relatively simple circuit, capable of implementing some basic functions and supporting some simple business functions. Combinations of different operators can support more complex business functions. Thus, on a chip with a limited area, a finite number of operators can form far more operator combinations than the number of operators themselves, supporting different business functions, improving operator utilization. Furthermore, implementing business functions through operator combinations is beneficial for the development of subsequent incremental services. Conversely, compared to requiring a custom chip for each business function, this solution can significantly reduce chip area overhead when satisfying the same number of business functions.
[0163] Optionally, the aforementioned first indication information can not only indicate at least two operators, but also the execution order of the at least two operators. In this way, the first device can sequentially invoke at least two operators to process the first message according to the execution order. This eliminates the need for the first device to determine at least two operators and then further determine the execution order of at least two of them, thus improving message processing efficiency.
[0164] Regarding the execution order of at least two operators in the operator combinations corresponding to each business function, taking the correspondence between business functions and operator combinations in Table 1 as an example, the execution order of operators in different business function operator combinations can be understood by referring to Table 3. As shown in Table 3:
[0165] Table 3:
[0166] Taking the correspondence between business functions and operator combinations in Table 2 as an example, the execution order of operators in different business function operator combinations can be understood by referring to Table 4. As shown in Table 4:
[0167] Table 4:
[0168] Optionally, after receiving the first message, the first device, regardless of the operator combination, will first call the parsing operator to parse the message, and then determine the other operators in the operator combination. If the parsing operator is treated as a common operator and not included in the operator combination, then the business function corresponds to at least one operator. Each engine module of the pipeline described in Figure 2B or Figure 2C above integrates one or more parsing operators.
[0169] Optionally, the first indication information is located in the header of the first message. As shown in FIG4A, the header of the first message may include a header identifier (Hdr), which is used to indicate the start position of the header. The header may include a DCE Header and / or an OP Header, wherein the first indication information may be located in the DCE Header or the OP Header. Of course, the DCE Header or the OP Header may also include other information, which is not limited in this application.
[0170] In this application, the first instruction information is used to indicate at least two operators corresponding to the first service (first service function, hereinafter referred to as first service function to represent the first service). This can be a direct indication of at least two operators or an indirect indication of at least two operators. These will be described separately below:
[0171] 1. Indirect instruction;
[0172] The first instruction information is the instruction information for the first business function;
[0173] The indication information for the first service function can be located in the bit of the service function identifier (FunctionID) in the DCE Header, as shown in Figure 4B. The indication information for the first service function can be the identifier of the first service function, as shown in Function x in Figure 4B.
[0174] The indication information for the first service function can also be represented by binary bit values. For example, various service functions can be represented by multiple bits. Taking 3 bits as an example, the bit value "000" can represent one service function, the bit value "001" can represent another service function, and so on. Different bit values represent different service functions. As shown in Figure 4B, the bit value "000" corresponding to the FunctionID bit can represent the first service function.
[0175] In this application, the first indication information is the indication information for a first service function, which indirectly indicates at least two operators. The first device needs to determine at least two operators corresponding to the first service from the correspondence between services and operators based on the indication information of the first service function. The correspondence between services and operators includes the correspondence between the first service and at least two operators.
[0176] In this application, the correspondence between services and operators can include the correspondence between each service and at least two corresponding operators (operator combinations). For example: the correspondence between service 1 and operator combination 1, service 2 and operator combination 2, ..., the correspondence between service X and operator combination X, where service 1, service 2, ..., service X belong to different services or different service functions. Operator combination 1, operator combination 2, ..., operator combination X are different operator combinations.
[0177] The process by which the first device determines at least two operators based on the instruction information of the first business function can be understood by referring to the correspondence between business functions and operator combinations listed in Tables 1 to 4 above.
[0178] Taking Table 4 as an example, if the business function indicated by the first business function instruction information is "data allocation ownership", then the parsing operator in the first device parses the first message and identifies the "data allocation ownership" business function from the first message. Then, the operator combination can be determined as {parse operator → sharding operator → mirror operator}. Of course, the first device has already used the parse operator. In the subsequent processing of the first message, it can start from the sharding operator.
[0179] The method provided in this application, which indirectly indicates at least two operators through the indication information of the first service function, can reduce the number of bytes of the first indication information and reduce the transmission overhead of the first message.
[0180] 2. Direct instruction;
[0181] The first instruction information is the instruction information of at least two operators.
[0182] In this application, the instruction information for at least two operators may include the identifiers of at least two operators, and the instruction information for at least two operators may also include the execution order of at least two operators.
[0183] This case takes two operators as an example. The indication information of these two operators can be understood by referring to the example shown in Figure 4C. As shown in Figure 4C, the DCE Header can include OPx and OPy. Of course, OPx and OPy can also be configured in the OP Header.
[0184] The embodiments of this application provide direct indication of at least two operators through indication information of at least two operators, eliminating the need for the first device to determine the at least two operators, thus reducing the computational overhead of the first device. Furthermore, this indication method also enhances the flexibility of operator combinations and improves operator utilization.
[0185] Optionally, the first message may also include second instruction information, which is used to indicate the execution order of at least two operators.
[0186] In this application, the second instruction information may be located in the service flag bit and may indicate the execution order of at least two operators in various forms, such as: the execution order of at least two operators may be listed by means of operator flags, or the execution order of at least two operators may be determined by means of numerical values in conjunction with the first instruction information.
[0187] As shown in Figure 4D, the DCE Header of the first message may include FunctionID and serviceflag. This application uses second indication information to indicate the execution order of at least two operators, which can improve the flexibility of operator invocation and facilitate the subsequent incremental development of other business functions.
[0188] Optionally, in this application, the second instruction information includes at least two numerical values corresponding to at least two operators, and the at least two numerical values are used to indicate the execution order of at least two operators.
[0189] In this application, at least two operators and at least two numerical values can have a one-to-one correspondence, meaning each operator corresponds to a numerical value, which can be a binary bit value. Each operator's numerical value can be represented by multiple bits. Taking two bits as an example, if there are two operators and their corresponding numerical values are "01" and "10", they can be executed in ascending order: first, the operator corresponding to value "01" is called to execute the first message, then the operator corresponding to value "10" is called to execute the first message. If the execution order is descending, the reverse is true: first, the operator corresponding to value "10" is called to execute the first message, then the operator corresponding to value "01" is called to execute the first message. Of course, this application does not limit the number of bits used to represent the numerical values; the number of bits in the first message can be set or adjusted as needed. This method of indicating the execution order of at least two operators using numerical values can reduce indication overhead.
[0190] In this application, the execution order of at least two operators indicated in the serviceflag can be understood with reference to Figure 4E. The first indication information is FunctionID. The first device can determine, through FunctionID, that the operators used to process the first message, excluding the parsing operator, include OP3→OP2; because the arrangement order of these two operators in the first device is OP2→OP3, which is the reverse of the order determined by FunctionID. The bit values in the serviceflag are usually given according to the execution order of the operators in the first device. If every two bits in the serviceflag indicate one operator, it can be determined that the first two bits "10" indicate OP2 and the last two bits "01" indicate OP3, then OP3 will be executed first and then OP2.
[0191] In this embodiment of the application, the serviceflag can also be represented in the form shown in Figure 4F. The serviceflag can contain multiple bits, which can be used to indicate the execution status of all operators integrated on the first device. In Figure 4F, taking two bits for each operator as an example, the multiple bits of the serviceflag are allocated to the six operators OP1, OP2, OP3, OP4, OP5 and OP6 in a manner that two bits are allocated to each operator from front to back. Of course, the scenario shown in Figure 4F is based on the first device integrating six operators. If there are more or fewer than six operators on the first device, it can be achieved by expanding the serviceflag bits. In addition, the number of bits occupied by each operator is not limited to the two shown in Figure 4E, and can be configured according to requirements.
[0192] If FunctionID still indicates OP3→OP2, then the representation of OP3→OP2 in the serviceflag shown in Figure 4F can be understood by referring to Figure 4G. As shown in Figure 4G, the bit value of the bit corresponding to OP2 is "10", the bit value of the bit corresponding to OP3 is "01", and the bit values of the bits of other operators are all "00".
[0193] Based on the indication method of the execution order in the second indication information in the serviceflag mentioned above, the process of calling at least two operators to process the first message in this embodiment of the application may include:
[0194] Calling at least two operators to process the first message includes: calling at least two operators whose values are equal to the first value to process the first message; and subtracting the second value from the value that is not less than the first value among the at least two values.
[0195] The process can be executed in one round or multiple rounds, and the number of rounds depends on the value corresponding to the operator.
[0196] If, after one round of execution, at least two values are greater than the first value, the triggering operation of the operator whose value is equal to the first value is repeated until at least two values are less than the first value.
[0197] In this application, taking the first value as "01" and the second value as 1 as an example, the above-mentioned calling at least two operators to process the first message can be described as follows: after recognizing the value "01", the operator corresponding to "01" is called to process the first message. Then, at least two values are subtracted by 1 respectively until the values are both reduced to "00", and the processing flow of the first message is completed.
[0198] This process can be understood by referring to Figure 4H. As shown in Figure 4H, taking the example of FunctionID indicating OP3→OP2, it uses 12 bits to represent the service flag. From bit 0 to bit 11, every two bits correspond to one operator from OP1 to OP6. In the 12 bits, the bit value of OP2 is "10" and the bit value of OP3 is "01". Then, OP3 with the bit value of "01" is called to process the first message. This process can be called the first pipeline. The first pipeline process may include: "After the first message is parsed by the parsing operator, when it flows through OP1, the value of the bit in OP1 is "00", so OP1 will not be called. When the first message flows through OP2, the value of the bit in OP2 is "10", which is not equal to the first value "01", so it will not be called. The first message continues to OP3, and the value of the bit in OP3 is "01", which is equal to the first value "01", so OP3 will be called. In addition, each value not less than "01" will be subtracted by the second value 1. That is, the "10" corresponding to OP2 and the "01" corresponding to OP3 will be subtracted by 1, and then it enters the second pipeline."
[0199] The second pipeline is shown in Figure 4I. After the first pipeline, the bit value of OP2 is "01", and the bit value of OP is "00". The second pipeline process includes: After the first message is parsed by the parsing operator, when it flows through OP1, the bit value of OP1 is "00", so OP1 will not be invoked. When the first message flows through OP2, the bit value of OP2 is "01", which equals the first value "01", so OP2 will be invoked. The first message continues to OP3, and the bit value of OP3 is "00", so it will not be invoked. After the second pipeline, all 12 bits of serviceflag become 0, thus ending the processing of the first message.
[0200] This section uses subtraction as an example to illustrate the operator calling process. In fact, this application does not restrict the calling mechanism of operator execution order.
[0201] In the solution provided in this application embodiment, the operator is scheduled by calling the method where the value is equal to the first value, which can improve the accuracy and flexibility of operator scheduling.
[0202] Optionally, the first message may also include at least one of the format information of at least two operators or the attribute information of at least two operators; wherein, the format information of at least two operators is used to indicate the format of the data corresponding to the first message processed by at least two operators, and the attribute information of at least two operators is used to indicate the operation information of the data corresponding to the first message processed by at least two operators, and at least one of the format information or attribute information corresponds to the first service function.
[0203] In this application, the format information of at least two operators may include the format information of each operator individually, or it may include the format information of some operators among the at least two operators. For example, taking two operators as an example, it may include at least one of the format information of operator 1 or operator 2. The format information of operator 1 is used to instruct operator 1 to process the data corresponding to the first message using the format indicated by the format information. Similarly, the format information of operator 2 is used to instruct operator 2 to process the data corresponding to the first message using the format indicated by the format information.
[0204] In this application, the attribute information of at least two operators may include the attribute information of each operator individually, or it may include the attribute information of some operators among the at least two operators. For example, taking two operators as an example, it may include at least one of the attribute information of operator 1 or operator 2. The attribute information of operator 1 is used to instruct operator 1 to process the data corresponding to the first message using the operation information indicated by the attribute information. The operation information may include the operation frequency, number of operations, operation position, etc. Of course, this is only an example of operation frequency, number of operations, and operation position; the attribute information may also include other operation-related information. Similarly, the attribute information of operator 2 is used to instruct operator 2 to process the data corresponding to the first message using the operation information indicated by the attribute information.
[0205] In this application, the format or attribute information corresponding to different business functions is usually different. For example, the format information of the fragmented search function can be the spacing and arrangement of the returned data, which are related to the data presentation; the attribute information of the fragmented search function can be the search range of the data, such as the time range, spatial range, etc. The format information of the read-write lock function can be the type of lock acquired, and the attribute information of the read-write lock function can be the duration of lock holding, etc.
[0206] In this application, at least one of the format information of at least two operators or the attribute information of at least two operators is used to instruct the operators to process the data corresponding to the first message, which provides a clearer instruction for at least two operators to process the first message and can improve the accuracy of data processing.
[0207] The format information and / or attribute information of the aforementioned operators can be located in the OP header of the first message, as shown in Figure 4J. The OP header includes the OP hdr of each operator in the first device, such as: OP 1hdr, OP 2hdr, ..., where each OP hdr may include the format information and attribute information of the operator, used to indicate the format and / or attributes of the data corresponding to the first message processed by the operator.
[0208] Optionally, before S301 above, S300 may also be included:
[0209] S300. The second device sends a second message. Correspondingly, the first device receives the second message, which includes third indication information. The third indication information is used to indicate entries corresponding to at least two operators, and the entries are used to store data corresponding to at least two operators.
[0210] In this application, the second message can be a configuration message, which can be used for initial configuration or configuration update. Here, a configuration message refers to a message used to configure the table entries corresponding to the operators.
[0211] In this application, the third instruction information may include the table ID of the table entry. Of course, the third instruction information may also indicate the type of operation performed on the table entry, such as insert, update, or delete operations. The second message may also contain a key and value corresponding to the operation type.
[0212] In this application, table entries can be associated with operators, and an operator can be associated with one or more table entries. Operators can operate on the corresponding table entries based on the table ID. Of course, some operators may not be associated with table entries, and this application does not impose any restrictions on this.
[0213] In this embodiment of the application, by pre-configuring the table entries indicated by the third indication information in the second message, the processing speed of the subsequent first message can be improved.
[0214] Optionally, in S301 above, the second device generates the first message by: determining information of at least two operators corresponding to the first service function according to the operator library, and the information of the at least two operators is used to generate the first message.
[0215] In this application, the operator library includes various types of operators. The operators in the operator library are usually software logic. The parameters corresponding to at least two operators may include the operator's identifier, operator format information, operator attribute information, etc.
[0216] In this application, information corresponding to at least two operators can be obtained through an operator library, which can reduce the overhead of the second device maintaining the information of the aforementioned operators.
[0217] The following section, with reference to Figure 5, uses the first device as a switch in the distributed system and the second device as a computer device in the distributed system as an example to describe the above message processing process.
[0218] As shown in Figure 5, this distributed system includes computer devices 501 and 502, storage devices 503 and 504, and a switch 505. The communication process between computer device 501 and storage device 504 via switch 505 will be illustrated as an example. Computer device 501 includes several functional modules: application, DCE plugin, DCE data plane, and DCE control plane.
[0219] Among them, the application is related to the business function, and the request initiated by the corresponding application is the message corresponding to the business function.
[0220] DCE Plugin: As a plugin, it connects to upper-layer applications and provides programming interfaces for upper-layer applications to call.
[0221] DCE control plane: Before service startup, configuration messages (second messages) can be generated according to the requirements of upper-layer applications to configure the DCE engine of switch 505, such as adding and deleting table entries.
[0222] The DCE data plane transforms upper-layer business function calls into operator combinations containing at least two operators. It calls the interface of the corresponding operator library, sets the parameter information of the corresponding operator, and thus generates data packets / control packets (the first packet). The operator library can be configured on a computer device or on other devices.
[0223] The 505 switch includes an IPP, an EPP, an SWB, and a coprocessor (SCOP). Both the IPP and EPP have integrated or mounted DCE engines. The IPP and EPP exchange data or signals via the SWB, and the SCOP connects to both the IPP and EPP. Both the DCE engine and the SCOP integrate operators; their specific relationships can be understood by referring to the descriptions in Figures 2B and 2C above.
[0224] After the upper-layer application of computer device 501 initiates a service request, the DCE data plane of computer device 501 will determine at least two operators based on the service function of the application, and then call the operator library to determine the information of at least two operators, such as at least one of the operator's representation, format information or attribute information. Then, based on the identifier of the service function and the information of at least two operators, a first message is generated, and then the first message is sent to switch 505 through the communication interface.
[0225] After receiving the first packet, the switch will pass it to the DCE engine of the IPP. After being parsed by the parsing operator on the DCE engine, the switch will call at least two operators other than the parsing operator to process the first packet. The processing of the first packet can be understood by referring to the examples of the first pipeline and the second pipeline in Figure 4H and Figure 4I above.
[0226] After the first message is output via EPP, it is passed to storage device 504. If the first message is a data query message, storage device 504 can return the corresponding query data.
[0227] The message processing procedure provided in this application can be applied to different business scenarios. The following are some examples of these scenarios:
[0228] As shown in Figure 6, in a scenario where a switch implements the data fragment ownership lookup function, the data fragment ownership lookup process includes:
[0229] S601. Applications on computer device 60 call the functional modules of the DCE data plane through the DCE plugin.
[0230] S602. The DCE data plane functional module on computer device 60 splits the data fragmentation attribution lookup function into a parse operator + a sharding operator + a mirror operator, and assembles them into the first message.
[0231] That is, the combination of operators corresponding to the data sharding attribution lookup function includes the parse operator, the sharding operator, and the mirror operator.
[0232] S603. The DCE data plane functional module on computer device 60 sends a first message through the communication interface. Correspondingly, the switch receives the first message.
[0233] S604. The switch parses the first packet.
[0234] The switch calls the parse operator to parse the first packet, which determines that the first packet still needs to be processed by the sharding operator and the mirror operator, and then the sharding operator and the mirror operator are triggered in sequence.
[0235] The S605.sharding operator obtains the home node information by looking up a table; the mirror operator: copies a request and sends it to the actual home node of the data, such as storage node 3.
[0236] S606. After receiving the request, storage node 3 replies with data to computer device 60.
[0237] For an understanding of the processing of the first message in the switch, please refer to the principles in Figures 4H and 4I above.
[0238] The data fragment ownership lookup scheme provided in this application embodiment can directly locate the storage node where the data is located through a switch, without having to search each storage node individually, thus improving data retrieval efficiency.
[0239] As shown in Figure 7, in a scenario where a network lock is implemented on a switch, the process of computer device 70 acquiring the lock on the switch as a data read / write node 1 is illustrated as an example. The implementation process of this network lock includes:
[0240] Applications on computer device 70 (S701) call the functional modules of the DCE data plane through the DCE plugin.
[0241] The DCE data plane functional module on the S702 computer device 70 splits the network lock function into a parse operator, a CAS operator, and an RMW operator, and assembles them into the first message.
[0242] That is, the operator combination corresponding to the network lock function includes the parse operator, the CAS operator, and the RMW operator.
[0243] S703. The DCE data plane functional module on the computer device 70 sends a first message through the communication interface. Correspondingly, the switch receives the first message.
[0244] S704. The switch parses the first packet.
[0245] The switch calls the parse operator to parse the first packet, and can determine that the first packet still needs to be processed by the CAS operator + RMW operator, and then the CAS operator + RMW operator are triggered in sequence.
[0246] The CAS operator compares the table entry content with the message content and modifies the message. The RMW operator reads and modifies the message and then writes the new content into the table entry.
[0247] S705. The switch returns a lock to computer device 70.
[0248] S706. After obtaining lock access, computer device 70 directly reads and writes the corresponding data in data node 1.
[0249] As described in S701 to S706 above, during the network lock processing, locks for reading and writing can be obtained directly from the switch, which can speed up the lock acquisition process and thus improve data reading and writing efficiency.
[0250] If all locks on the switch are occupied and the computer device cannot acquire a lock from the switch, the computer device can still execute the rollback procedures of S707 and S708, which include:
[0251] After parsing the first message in S704, if it is determined that there are no available locks on the switch, then S707 is executed.
[0252] The S707 switch sends a lock acquisition request to the Distributed Lock Manager (DLM).
[0253] The S708.DLM returns a lock to the switch.
[0254] Then execute S705 and S706.
[0255] As shown in Figure 8, in a scenario where a switch implements multiple network replicas, the implementation process includes:
[0256] Applications on computer device 80 (S801) call the functional modules of the DCE data plane through the DCE plugin.
[0257] The DCE data plane functional module on the S802 computer device 80 splits the network multiple copy function into a parse operator, an FA operator, and a mirror operator, and assembles them into the first message.
[0258] That is, the operator combination corresponding to the network's multi-replica function includes the parse operator, the FA operator, and the mirror operator.
[0259] S803. The DCE data plane functional module on computer device 80 sends a first message through the communication interface. Correspondingly, the switch receives the first message.
[0260] S804. The switch parses the first packet.
[0261] The switch calls the parse operator to parse the first packet, and can determine that the first packet still needs to be processed by the FA operator + mirror operator, and then the FA operator and mirror operator are triggered in sequence.
[0262] The S805.FA operator obtains memory address information by identifying the address length carried in the first message.
[0263] The memory address information is addr = addr + length.
[0264] The S806.mirror operator copies the message three times and modifies the destination address of the first message in each of the three copies.
[0265] The S807 switch sends the first packets of three different destination addresses to replica node 1, replica node 2 and replica node 3 respectively.
[0266] After receiving the first message, replica node 1, replica node 2 and replica node 3 store the first message.
[0267] The network multi-replica scheme provided in this application embodiment can quickly determine replica nodes through a switch, thereby achieving fast storage of multiple replicas.
[0268] As shown in Figure 9, in the scenario where a switch implements a network GTM, the implementation process of the network GTM includes:
[0269] Applications on computer device 90 (S901) call the functional modules of the DCE data plane through the DCE plugin.
[0270] The DCE data plane functional module on the S902 computer device 90 splits the network multiple copy function into a parse operator + an FA operator, and then forms the first message.
[0271] That is, the operator combination corresponding to the network's multi-replica function includes the parse operator and the FA operator.
[0272] S903. The DCE data plane functional module on computer device 90 sends a first message through the communication interface. Correspondingly, the switch receives the first message.
[0273] S904. The switch parses the first packet.
[0274] The switch calls the parse operator to parse the first packet, which determines that the first packet still needs to be processed by the FA operator, and then the FA operator is triggered.
[0275] The S905.FA operator maintains a global sequence number and increments the sequence number of the first received message by 1.
[0276] S906. The switch returns the global sequence number of the first message to computer device 90.
[0277] S907. Computer device 90 initiates a transaction operation to data node 2 using a global sequence number.
[0278] If the switch malfunctions when computer device 90 initiates a global sequence number request, the following procedure can be followed:
[0279] S908. Computer device 90 sends a global sequence number request to GTM.
[0280] S909.GTM returns the global serial number to computer device 90.
[0281] Then computer device 90 can execute S907.
[0282] In the above-mentioned network GTM scenario, if the switch is operating normally, the global sequence number can be quickly obtained through the switch. If the switch malfunctions, it can revert to the existing process, and the computer device 90 can obtain the global sequence number from the GTM, effectively compatibility with the existing global sequence number acquisition process.
[0283] The above embodiments describe message processing methods. The following describes the message processing apparatus 1000 provided in the embodiments of this application with reference to the accompanying drawings.
[0284] As shown in Figure 10, the message processing device 1000 provided in this application embodiment can be the first device in the embodiment corresponding to Figure 3 above, or it can be the switch in the embodiments corresponding to Figures 5 to 9. The message processing device 1000 includes:
[0285] The transceiver unit 1001 is used to receive a first message; wherein the first message includes first indication information and indication information of at least two operators;
[0286] Processing unit 1002 is used to call at least two operators to process the first message.
[0287] Optionally, the processing unit 1002 is specifically used to, if the first indication information is also used to indicate the execution order of at least two operators, sequentially call at least two operators to process the first message according to the execution order.
[0288] Optionally, the processing unit 1002 is further configured to, if the first indication information is the indication information of the first service, determine at least two operators corresponding to the first service from the correspondence between services and operators based on the indication information of the first service, wherein the correspondence between services and operators includes the correspondence between the first service and at least two operators.
[0289] Optionally, if the first message further includes second instruction information, the second instruction information is used to indicate the execution order of at least two operators.
[0290] Optionally, the second indication information includes at least two numerical values corresponding to at least two operators, the at least two numerical values being used to indicate the execution order of the at least two operators.
[0291] Optionally, the processing unit 1002 is specifically used to call at least two operators to process the first message, including: calling an operator whose value is equal to a first value among at least two values to process the first message; and subtracting a second value from a value that is not less than the first value among at least two values.
[0292] Optionally, the first message may also include at least one of the format information of at least two operators or the attribute information of at least two operators; wherein, the format information of at least two operators is used to indicate the format of the data corresponding to the first message processed by at least two operators, and the attribute information of at least two operators is used to indicate the operation information of the data corresponding to the first message processed by at least two operators, and at least one of the format information or attribute information corresponds to the first service function.
[0293] Optionally, the transceiver unit 1001 is further configured to receive a second message before receiving the first message. The second message includes third indication information, which is used to indicate entries corresponding to at least two operators. The entries are used to store data corresponding to at least two operators.
[0294] Optionally, at least one of the first instruction information or the second instruction information is located in the header of the first message.
[0295] As shown in Figure 11, the message processing device 1100 provided in this application embodiment can be the second device described in the embodiment corresponding to Figure 3 above, or it can be the computer device in the embodiments corresponding to Figures 5 to 9. The message processing device 1100 includes:
[0296] Processing unit 1101 is used to generate a first message; wherein the first message includes first indication information, the first indication information is used to indicate at least two operators corresponding to a first service; wherein the at least two operators are included in multiple operators supporting multiple service functions, and the multiple services include the first service;
[0297] The transceiver unit 1102 is used to send a first message to the first device; wherein the first message is processed by at least two operators in the first device.
[0298] Optionally, the first indication information is also used to indicate the execution order of at least two operators.
[0299] Optionally, the first indication information is the indication information of a first service. The indication information of the first service is used to instruct the first device to determine at least two operators corresponding to the first service from the correspondence between services and operators. The correspondence between services and operators includes the correspondence between the first service and at least two operators.
[0300] Optionally, the first indication information is the indication information of at least two operators.
[0301] Optionally, if the first message further includes second instruction information, the second instruction information is used to indicate the execution order of at least two operators.
[0302] Optionally, the second indication information includes at least two numerical values corresponding to at least two operators, the at least two numerical values being used to indicate the execution order of the at least two operators.
[0303] Optionally, the first message may also include at least one of the format information of at least two operators or the attribute information of at least two operators; wherein, the format information of at least two operators is used to indicate the format of the data corresponding to the first message processed by at least two operators, and the attribute information of at least two operators is used to indicate the operation information of the data corresponding to the first message processed by at least two operators, and at least one of the format information or attribute information corresponds to the first service function.
[0304] Optionally, the transceiver unit 1102 is also used to send a second message to the first device before generating the first message. The second message includes third indication information, which is used to indicate entries corresponding to at least two operators. The entries are used to store data corresponding to at least two operators.
[0305] Optionally, the processing unit 1101 is specifically used to determine the information of at least two operators corresponding to the first service based on the operator library, and the information of the at least two operators is used to generate the first message.
[0306] The above-described contents of the transceiver unit 1001 and processing unit 1002 of the message processing apparatus 1000 can be understood by referring to the relevant contents of the first apparatus in the foregoing method embodiments, and will not be repeated here. The relevant contents of the processing unit 1101 and transceiver unit 1102 of the message processing apparatus 1100 can be understood by referring to the relevant contents of the second apparatus or computer device in the foregoing method embodiments, and will not be repeated here.
[0307] Figure 12 shows a possible logical structure diagram of the message processing device 1200 involved in the above embodiments provided by the present application. The message processing device can be the first device or switch described above, or it can be the second device or computer equipment. The message processing device 1200 includes: a processor 1201, a communication interface 1202, a memory 1203, and a bus 1204. The processor 1201, communication interface 1202, and memory 1203 are interconnected via the bus 1204. In the embodiments of the present application, the processor 1201 is used to control and manage the operation of the message processing device 1200. For example, the processor 1201 is used to execute the processing-related steps in Figures 3 to 9, such as processing steps S301, S303, etc. The communication interface 1202 is used to support the message processing device 1200 in communication. For example, the communication interface 1202 can execute the receiving or sending-related steps in the above method embodiments. The communication interface 1202 can perform the functions of the transceiver unit 1001 in Figure 10 or the transceiver unit 1102 in Figure 11. The memory 1203 is used to store the program code and data of the distributed system.
[0308] The processor 1201 can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, etc. The bus 1204 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one thick line is used in Figure 12, but this does not indicate that there is only one bus or one type of bus.
[0309] Referring to Figure 13, this application embodiment also provides a communication system, including: a hardware layer 1307 and a virtual machine monitor (VMM) 1301 running on the hardware layer 1307, and multiple virtual machines 1302. A virtual machine can serve as a read node or a write node in a distributed system. Optionally, a virtual machine can also be designated as a coordinating node.
[0310] Specifically, Virtual Machine 1302 is a virtual computer simulated on public hardware resources using virtual machine software. Operating systems and applications can be installed on the virtual machine, and it can also access network resources. For applications running in the virtual machine, it's as if they are working on a real computer.
[0311] Hardware Layer 1307: The hardware platform for running the virtualized environment, which can be abstracted from the hardware resources of one or more physical hosts. The hardware layer may include various hardware components, such as a processor 1304 (e.g., CPU) and memory 1305, as well as a network interface card 1303 (e.g., RDMA network card), high-speed / low-speed input / output (I / O) devices, and other devices with specific processing functions.
[0312] Virtual machine 1302, based on the VMM and the hardware resources provided by hardware layer 1307, runs an executable program to implement some or all of the functions of the first device or switch in the embodiments related to Figures 3 to 9. For the sake of brevity, further details are omitted here.
[0313] Furthermore, the distributed system may also include a host: acting as a management layer to manage and allocate hardware resources; presenting a virtual hardware platform for virtual machines; and implementing virtual machine scheduling and isolation. The host may be a Virtual Machine Controller (VMM); or it may be a combination of a VMM and a privileged virtual machine. The virtual hardware platform provides various hardware resources to the virtual machines running on it, such as virtual processors (e.g., VCPUs), virtual memory, virtual disks, virtual network cards, etc. The virtual disk may correspond to a file or a logical block device on the host. Virtual machines run on the virtual hardware platform prepared for them by the host, and one or more virtual machines run on the host. The VCPU of virtual machine 1302 executes an executable program stored in its corresponding virtual memory to implement or perform the method steps described in the above-described method embodiments of this application. For example, it implements some or all of the functions of the coordination node in the embodiments related to Figures 3 to 9.
[0314] In another embodiment of this application, a computer-readable storage medium is also provided, which stores computer-executable instructions. When at least one processor of the device executes the computer-executable instructions, the device executes the message processing method described in the embodiments of Figures 3 to 9 above.
[0315] In another embodiment of this application, a computer program product is also provided, which includes computer execution instructions stored in a computer-readable storage medium; at least one processor of the device can read the computer execution instructions from the computer-readable storage medium, and the at least one processor executes the computer execution instructions to cause the device to perform the message processing method described in the embodiments of Figures 3 to 9 above.
[0316] In another embodiment of this application, a chip system is also provided, which includes a processor for supporting the coordinating node in implementing the message processing methods described in the embodiments of Figures 3 to 9. In one possible design, the chip system may further include a memory for storing necessary program instructions and data for the coordinating node. This chip system may be composed of chips or may include chips and other discrete devices.
[0317] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.
[0318] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0319] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0320] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0321] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0322] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this application, essentially, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
A message processing method, characterized in that, The method is applied to a first device, and the method includes: Receive a first message; wherein the first message includes first indication information, the first indication information being used to indicate at least two operators corresponding to a first service; wherein the at least two operators are included in a plurality of operators supporting multiple services, the plurality of services including the first service; The first message is processed by invoking at least two operators. The method of claim 1, wherein The first indication information is also used to indicate the execution order of the at least two operators; The invocation of the at least two operators to process the first message includes: According to the execution order, the at least two operators are called sequentially to process the first message. The method according to claim 1 or 2, characterized in that The first indication information is the indication information for the first service; the method further includes: Based on the instruction information of the first service, the at least two operators corresponding to the first service are determined from the correspondence between services and operators, wherein the correspondence between services and operators includes the correspondence between the first service and the at least two operators. The method according to claim 1 or 2, characterized in that The first indication information is the indication information of the at least two operators. The method of claim 1, wherein The first message also includes second indication information, which is used to indicate the execution order of the at least two operators. The method according to claim 5, characterized in that The second indication information includes at least two numerical values corresponding to the at least two operators, and the at least two numerical values are used to indicate the execution order of the at least two operators. The method according to claim 6, characterized in that The invocation of the at least two operators to process the first message includes: The first message is processed by invoking an operator whose value is equal to the first value among the at least two values. Subtract the second value from the value that is not less than the first value among the at least two values. The method according to any one of claims 1 to 7, characterized in that The first message further includes at least one of the format information of the at least two operators or the attribute information of the at least two operators; wherein, the format information of the at least two operators is used to indicate the format of the data corresponding to the first message processed by the at least two operators, and the attribute information of the at least two operators is used to indicate the operation information of the at least two operators processing the data corresponding to the first message, and at least one of the format information or the attribute information corresponds to the first service. The method according to any one of claims 1 to 8, characterized in that Before receiving the first message, the method further includes: A second message is received, the second message including third indication information, the third indication information being used to indicate the table entries corresponding to the at least two operators, the table entries being used to store the data corresponding to the at least two operators. The method according to any one of claims 5-7, characterized in that At least one of the first indication information or the second indication information is located in the header of the first message. The method according to any one of claims 1 to 10, characterized in that The first device includes a production line and an engine module, wherein the engine module is integrated into or mounted on the production line, and some or all of the plurality of operators are integrated on the engine module. The method according to any one of claims 1 to 11, characterized in that The plurality of operators include some or all of the following: parsing operators, get and increment operators, compare and exchange operators, read-modify-write operators, slice operators, mirror operators, subtraction operators, multiplication operators, division operators, or normalization operators. The method according to any one of claims 1 to 12, characterized in that The first service is a business function. A message processing method, characterized in that, The method is applied to a second device, and the method includes: Generate a first message; wherein the first message includes first indication information, the first indication information being used to indicate at least two operators corresponding to a first service; wherein the at least two operators are included in a plurality of operators supporting multiple services, the plurality of services including the first service; The first message is sent to the first device; wherein the first message is processed by the at least two operators in the first device. The method of claim 14, wherein The first indication information is also used to indicate the execution order of the at least two operators. The method according to claim 14 or 15, characterized in that The first indication information is the indication information of the first service. The indication information of the first service is used to instruct the first device to determine the at least two operators corresponding to the first service from the correspondence between services and operators. The correspondence between services and operators includes the correspondence between the first service and the at least two operators. The method according to claim 14 or 15, characterized in that The first indication information is the indication information of the at least two operators. The method of claim 14, wherein The first message also includes second indication information, which is used to indicate the execution order of the at least two operators. The method of claim 18, wherein The second indication information includes at least two numerical values corresponding to the at least two operators, and the at least two numerical values are used to indicate the execution order of the at least two operators. The method according to any one of claims 14-19, characterized in that The first message further includes at least one of the format information of the at least two operators or the attribute information of the at least two operators; wherein, the format information of the at least two operators is used to indicate the format of the data corresponding to the first message processed by the at least two operators, and the attribute information of the at least two operators is used to indicate the operation information of the at least two operators processing the data corresponding to the first message, and at least one of the format information or the attribute information corresponds to the first service. The method according to any one of claims 14-20, characterized in that Before generating the first message, the method further includes: A second message is sent to the first device. The second message includes third indication information, which is used to indicate the table entries corresponding to the at least two operators. The table entries are used to store the data corresponding to the at least two operators. The method according to any one of claims 14-21, characterized in that The generation of the first message includes: The information of at least two operators corresponding to the first service is determined based on the operator library, and the information of the at least two operators is used to generate the first message. A chip system, characterized by The chip system is used to perform the method described in any one of claims 1-13. A packet processing device characterized by comprising: The message processing device is used to perform the method described in any one of claims 1-13. A computer-readable storage medium, characterized by, The computer-readable storage medium stores instructions that, when executed on a computer device, cause the computer device to perform the method as described in any one of claims 1 to 13, or to perform the method as described in any one of claims 14 to 22. A computer program product, characterized in that The computer program product includes computer program code that, when run on a computer device, causes the computer device to perform the method as described in any one of claims 1 to 13, or to perform the method as described in any one of claims 14 to 22. A communication system characterized by include: A first device and a second device, wherein the first device is configured to perform the method according to any one of claims 1 to 13 and the second device is configured to perform the method according to any one of claims 14 to 22.