Request processing method and device, container operating system and computer equipment

By converting container operation requests into container operation messages with preset message format and using Cap'n Proto format communication between the container engine and container gasket, the problem of high memory consumption in container technology is solved and more efficient resource utilization is achieved.

CN119557122APending Publication Date: 2025-03-04CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411772597.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In container technology, frequent memory copying and data encoding and decoding operations lead to higher system memory consumption during communication between container engine and container gasket.

Method used

Memory copy and data encoding and decoding operations are avoided by converting container operation requests into container operation messages in a preset message format and communicating directly between the container engine and container shims.

Benefits of technology

It reduces memory consumption during the communication process of container engine and container gaskets, and improves system performance and resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557122A_ABST
    Figure CN119557122A_ABST
Patent Text Reader

Abstract

The invention relates to a request processing method and device, a container operating system and computer equipment. The method comprises the following steps: in response to a container operation request sent by a user side, converting the container operation request into a container operation message in a preset message format; sending the container operation message to a container gasket to indicate the container gasket to perform data processing according to the container operation message, and generating and sending a processing result message conforming to the message format; performing format conversion on the processing result message sent by the container gasket, and generating a container operation response corresponding to the container operation request; and sending the container operation response to the user side. By adopting the method, memory consumption can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of container technology, and in particular to a request processing method, apparatus, container operating system, and computer equipment. Background Art

[0002] Container technology is a lightweight virtualization technology that creates isolated groups (i.e., containers) on the physical host operating system and divides the resources on the physical host operating system into each group to balance the conflicting resource usage requirements between the groups.

[0003] In related container technologies, when the container engine and the container shim communicate, memory copy and data encoding and decoding operations are frequently involved, resulting in high memory consumption of the system. Summary of the invention

[0004] Based on this, it is necessary to provide a request processing method, device, container operating system and computer equipment that can reduce memory consumption in response to the above technical problems.

[0005] In a first aspect, the present application provides a request processing method, which is applied to a container engine, and the method includes:

[0006] In response to a container operation request sent by a user terminal, convert the container operation request into a container operation message in a preset message format;

[0007] Sending the container operation message to the container shim to instruct the container shim to perform data processing according to the container operation message, and generate and send a processing result message that complies with the message format;

[0008] Performing format conversion on the processing result message sent by the container shim to generate a container operation response corresponding to the container operation request;

[0009] The container operation response is sent to the user terminal.

[0010] In one of the embodiments, converting the container operation request into a container operation message in a preset message format includes:

[0011] Decapsulate the container operation request to obtain multiple first fields;

[0012] According to a preset field relationship library, second fields of a preset message format corresponding to each of the first fields are respectively determined; wherein the field relationship library includes a plurality of field relationships, at least some of the field relationships are used to represent an association relationship between a first field and a second field, and the formats of the first field and the second field are different;

[0013] Each of the second fields is encapsulated to generate the container operation message.

[0014] In one embodiment, the format conversion of the processing result message sent by the container shim to generate a container operation response corresponding to the container operation request includes:

[0015] Decapsulating the processing result message to obtain multiple third fields;

[0016] According to a preset field relationship library, the fourth fields corresponding to the third fields are respectively determined; wherein the field relationship library includes a plurality of field relationships, at least some of the field relationships are used to represent the association relationship between the third field and the fourth field, and the third field and the fourth field have different formats;

[0017] Each of the fourth fields is encapsulated to generate the container operation response.

[0018] In one embodiment, the message format includes Cap'n Proto format.

[0019] In a second aspect, the present application further provides a request processing method, which is applied to a container gasket, and the method comprises:

[0020] In response to the container operation message sent by the container engine, control the container instance to process data, and receive the container operation result fed back by the container instance;

[0021] Converting the container operation result into a processing result message in a preset message format;

[0022] The processing result message is sent to the container engine to instruct the container engine to convert the format of the processing result message, generate a container operation response and feed it back to the user end.

[0023] In one embodiment, converting the container operation result into a processing result message in a preset message format includes:

[0024] Decapsulate the container operation result to obtain multiple fifth fields;

[0025] According to a preset field relationship library, respectively determine the third field of the preset message format corresponding to each of the fifth fields; wherein the field relationship library includes a plurality of field relationships, at least some of the field relationships are used to represent the association relationship between the fifth field and the third field, and the fifth field and the third field have different formats;

[0026] Each of the third fields is encapsulated to generate the processing result message.

[0027] In a third aspect, the present application provides a request processing device, applied to a container engine, the device comprising:

[0028] A first execution module, configured to respond to a container operation request sent by a user terminal and convert the container operation request into a container operation message in a preset message format;

[0029] A first sending module, used for sending the container operation message to the container gasket to instruct the container gasket to perform data processing according to the container operation message, and generate and send a processing result message conforming to the message format;

[0030] A second execution module, configured to perform format conversion on the processing result message sent by the container shim, and generate a container operation response corresponding to the container operation request;

[0031] The second sending module is used to send the container operation response to the user terminal.

[0032] In a fourth aspect, the present application provides a request processing device, applied to a container gasket, the device comprising:

[0033] A third execution module is used to control the container instance to perform data processing in response to the container operation message sent by the container engine, and receive the container operation result fed back by the container instance;

[0034] A fourth execution module, used for converting the container operation result into a processing result message in a preset message format;

[0035] The third sending module is used to send the processing result message to the container engine to instruct the container engine to convert the format of the processing result message, generate a container operation response and feed it back to the user end.

[0036] In a fifth aspect, the present application provides a container operating system, characterized in that the system includes a container engine and a container shim;

[0037] The container engine is used to respond to a container operation request sent by the user end, convert the container operation request into a container operation message in a preset message format, and send the container operation message to the container shim;

[0038] The container shim is used to perform data processing according to the container operation message, generate a processing result message that conforms to the message format, and send the processing result message to the container engine;

[0039] The container engine is further used to perform format conversion on the processing result message sent by the container shim, generate a container operation response corresponding to the container operation request, and send the container operation response to the user end.

[0040] In a sixth aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements any of the steps of the above-mentioned request processing method applied to the container engine, and / or implements any of the steps of the above-mentioned request processing method applied to the container gasket.

[0041] The above-mentioned request processing method, device, container operating system and computer equipment, when the container engine receives a container operation request sent by the user end, can convert the received container operation request into a container operation message of a preset message format, and send the container operation message to the container gasket, the container gasket can directly read the container operation message without performing memory copy operations and data encoding and decoding operations, and directly perform data processing according to the container operation message, generate and send a processing result message that conforms to the message format to the container engine, after receiving the processing result message, the container engine can directly read the processing result message and convert the format of the processing result information, and also without performing memory copy operations and data encoding and decoding operations, and finally generate a container operation response corresponding to the container operation request and send the container operation response to the user end. It can be seen that by converting the container operation request into a container operation message of a preset message format, the request processing method of the present application can avoid memory copy and data encoding and decoding operations in the communication process between the container engine and the container gasket, thereby avoiding memory consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0043] FIG1 is an application flow chart of the communication between the container engine and the container shim in the related art;

[0044] FIG2 is a schematic diagram of a process flow of a request processing method applied to a container engine in one embodiment of the present application;

[0045] FIG3 is a schematic diagram of a flow chart of step S201 in one embodiment of the present application;

[0046] FIG4 is a schematic diagram of a flow chart of step S203 in one embodiment of the present application;

[0047] FIG5 is a flow chart of a request processing method applied to a container gasket in one embodiment of the present application;

[0048] FIG6 is a flow chart of step S502 in one embodiment of the present application;

[0049] FIG7 is an application flow chart of the communication between the container engine and the container shim in the related art;

[0050] FIG8 is a structural block diagram of a request processing device applied to a container engine in one embodiment;

[0051] FIG9 is a block diagram of a request processing device applied to a container gasket in one embodiment;

[0052] FIG. 10 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0054] As described in the background technology section, in the related technology, the container engine Containerd and the container shim containerd-shim-runc usually communicate using gRPC+Protobuf. Please refer to Figure 1. Figure 1 is a flow chart of the container engine Containerd and the container shim containerd-shim-runc using gRPC+Protobuf communication in the related technology. It can be seen that first, the user sends a request to the container engine Containerd, requesting the operation to be processed; after receiving the request, the container engine Containerd serializes the request object into a Protobuf byte stream, and then sends it to the corresponding Container shim containerd-shim-runc; after receiving the request, container shim containerd-shim-runc needs to deserialize the received Protobuf byte stream into a data object for subsequent processing; after processing the request, container shim containerd-shim-runc needs to serialize the processing result into a byte stream in Protobuf format and transmit it back to the container engine Containerd through Socket; after receiving the response data, the container engine Containerd needs to deserialize the byte stream in Protobuf format into the corresponding data object for subsequent operations or return the request result to the user.

[0055] In the related technology, there are the following technical problems: First, high CPU usage: Since the serialization and deserialization process of gRPC and Protobuf involves frequent memory copying and data encoding and decoding operations, it leads to high CPU usage. Especially in large-scale containerized applications, this problem is more significant when the number of container instances and container shims containerd-shim-runc increases. Second, high memory consumption: Each data serialization and deserialization will generate additional memory overhead, especially when the amount of data is large, which will lead to high memory consumption.

[0056] Based on the above technical problem, in an exemplary embodiment, please refer to Figure 2, the present application provides a request processing method, which is applied to a container engine. The request processing method includes steps S201 to S204.

[0057] S201: In response to a container operation request sent by a user terminal, convert the container operation request into a container operation message in a preset message format.

[0058] It can be understood that the user end sends a container operation request to the container engine Containerd, requesting the operation that needs to be processed. After receiving the container operation request, the container engine Containerd can directly convert the container operation request into a container operation message in a preset message format without the need for additional memory copying in the container engine, where the message format can be Cap'n Proto format.

[0059] S202: Send a container operation message to the container shim to instruct the container shim to process data according to the container operation message, and generate and send a processing result message that complies with the message format.

[0060] Next, the container engine Containerd sends the container operation message in the Cap'n Proto format to the container shim containerd-shim-runc. After receiving the container operation message, the container shim containerd-shim-runc can directly read the data from the container operation message without the need for memory copy operations and data encoding and decoding operations, thereby reducing the use of CPU and memory. After the container shim containerd-shim-runc controls the container instance to process the request, it directly maps the processing result to the processing result message in the Cap'n Proto format, without the need for additional memory copying, and directly returns it to the container engine Containerd.

[0061] S203: Convert the format of the processing result message sent by the container shim to generate a container operation response corresponding to the container operation request.

[0062] Afterwards, after receiving the response, the container engine Containerd directly converts the processing result message in the Cap'n Proto format into the container operation response corresponding to the container operation request without performing additional memory copy operations.

[0063] S204: Send a container operation response to the user end.

[0064] Finally, the container engine Containerd can send the container operation response to the user end, or perform other subsequent operations.

[0065] The above-mentioned request processing method includes that when the container engine receives a container operation request sent by the user end, the received container operation request can be converted into a container operation message in a preset message format, and the container operation message is sent to the container gasket. The container gasket can directly read the container operation message without performing memory copy operations and data encoding and decoding operations, and directly perform data processing according to the container operation message, generate and send a processing result message that conforms to the message format to the container engine. After receiving the processing result message, the container engine can directly read the processing result message and convert the processing result information into a format, without performing memory copy operations and data encoding and decoding operations, and finally generate a container operation response corresponding to the container operation request and send the container operation response to the user end. It can be seen that by converting the container operation request into a container operation message in a preset message format, the request processing method of the present application can avoid memory copy and data encoding and decoding operations in the communication process between the container engine and the container gasket, thereby avoiding memory consumption.

[0066] In an exemplary embodiment, please refer to FIG. 3 , step S201 , converting a container operation request into a container operation message in a preset message format, includes steps S301 to S302 .

[0067] S301: Decapsulate the container operation request to obtain multiple first fields.

[0068] It can be understood that the container operation request sent by the user end to the container engine Containerd includes multiple first fields. When the container engine Containerd receives the container operation request, it can parse the container operation request to obtain the first field contained therein.

[0069] S302: According to a preset field relationship library, second fields of a preset message format corresponding to each first field are determined respectively.

[0070] In this embodiment, the container engine Containerd has a first memory bank, and the first memory bank stores multiple second fields. The container engine Containerd can use a preset field relationship library to determine the second fields in the first memory bank corresponding to each first field according to the field relationship library. The field relationship library includes multiple field relationships, at least some of which are used to represent the association relationship between the first field and the second field, and the formats of the first field and the second field are different.

[0071] S303: Encapsulate each second field to generate a container operation message.

[0072] Afterwards, the container engine Containerd can encapsulate the second field corresponding to each first field in the first memory library found, generate a container operation message, and send it to the container shim containerd-shim-runc. The container shim containerd-shim-runc has a second memory library, and the second memory library stores multiple third fields. The data format of the third field and the second field is the same. Therefore, when the container shim containerd-shim-runc receives the container operation message, it can directly understand the container operation message and directly control the container instance to complete the corresponding operation according to the container operation message, without the need for memory copy operations and data encoding and decoding operations.

[0073] In an exemplary embodiment, please refer to FIG. 4 , step S203 , format conversion is performed on the processing result message sent by the container shim to generate a container operation response corresponding to the container operation request, including steps S401 to S403 .

[0074] S401: Decapsulate the processing result message to obtain multiple third fields.

[0075] Similarly, since the data format of each second field stored in the first memory library of the container engine Containerd is the same as the data format of the third field stored in the second memory library of the container shim containerd-shim-runc, when the container engine Containerd receives the processing result message fed back by the container shim containerd-shim-runc, it can directly decapsulate the processing result message and read the third field therein without performing memory copy operations and data encoding and decoding operations.

[0076] S402: Determine the fourth fields corresponding to the third fields respectively according to a preset field relationship library.

[0077] In order to feed back the processing result to the user end, the container engine Containerd can again map the third field to a fourth field that can be read and processed by the user end according to the field relationship library. The field relationship library includes multiple field relationships, at least some of which are used to represent the association relationship between the third field and the fourth field, and the formats of the third field and the fourth field are different.

[0078] S403: Encapsulate each fourth field to generate a container operation response.

[0079] Afterwards, the container engine Containerd can encapsulate the fourth fields found, generate a container operation response and feed it back to the user end, so that the user end can understand the processing results in time.

[0080] In an exemplary embodiment, please refer to FIG. 5 , the present application also provides a request processing method applied to a container gasket, the request processing method comprising steps S501 to S503 .

[0081] S501: In response to a container operation message sent by a container engine, control a container instance to process data, and receive a container operation result fed back by the container instance.

[0082] After receiving the container operation message, the container shim containerd-shim-runc can directly read the data from the container operation message without memory copying and data encoding and decoding operations. The container shim containerd-shim-runc directly controls the container instance to complete the corresponding operation according to the container operation message, and receives the container operation result fed back by the container instance.

[0083] S502: Convert the container operation result into a processing result message in a preset message format.

[0084] In order for the container engine Containerd to directly read the processing results, the container shim containerd-shim-runc needs to convert the container operation results into the processing result message in Cap'n Proto format.

[0085] S503: Send a processing result message to the container engine to instruct the container engine to convert the format of the processing result message, generate a container operation response and feed it back to the user end.

[0086] After receiving the response, the container engine Containerd can directly read the data in the processing result message without performing additional memory copy operations, and directly convert the processing result message in Cap'n Proto format into a container operation response corresponding to the container operation request.

[0087] In an exemplary embodiment, please refer to FIG. 6 , step S502 , converting the container operation result into a processing result message in a preset message format, includes steps S601 to S603 .

[0088] S601: Decapsulate the container operation result to obtain multiple fifth fields.

[0089] After the container instance completes the corresponding operation, it will feedback a container operation result. The container shim containerd-shim-runc can decapsulate the container operation result and obtain the fifth field.

[0090] S602: According to a preset field relationship library, determine the third field of the preset message format corresponding to each fifth field.

[0091] The container shim containerd-shim-runc has a second memory bank, and the second memory bank stores a plurality of third fields. The container shim containerd-shim-runc can use a preset field relationship library to determine the third fields in the second memory bank corresponding to each fifth field according to the field relationship library. The field relationship library includes a plurality of field relationships, and at least some of the field relationships are used to represent the association relationship between the fifth field and the third field, and the fifth field and the third field have different formats.

[0092] S603: perform encapsulation processing on each third field and generate a processing result message.

[0093] Afterwards, the container shim containerd-shim-runc can encapsulate the third field corresponding to each fifth field in the found second memory library, generate a container operation message, and send it to the container engine Containerd. Since the data format of each second field stored in the first memory library of the container engine Containerd is the same as the data format of the third field stored in the second memory library of the container shim containerd-shim-runc, when the container engine Containerd receives the processing result message fed back by the container shim containerd-shim-runc, it can directly decapsulate the processing result message and read the third field therein without performing memory copy operations and data encoding and decoding operations.

[0094] In a detailed embodiment, please refer to Figure 7, which is a flow chart of the container engine Containerd and the container shim containerd-shim-runc in this application using Cap'n Proto RPC communication. It can be seen that, first, the user terminal sends a container operation request to the container engine Containerd, requesting the operation to be processed; after the container engine Containerd receives the container operation request, it maps the container operation request to a container operation message in Cap'n Proto format according to the preset field relationship library. In this process, no additional memory copy is required, and the container operation message in Cap'n Proto format is directly sent to the corresponding container shim containerd-shim-runc; after receiving the container operation message in Cap'n Proto format, the container shim containerd-shim-runc directly reads data from the container operation message in Cap'n Proto format without performing memory copy operations and data encoding and decoding operations; after controlling the container instance to complete the corresponding operation, the container shim containerd-shim-runc directly maps the container operation result to Cap'n Proto format processing result message, and directly return it to the container engine Containerd; after receiving the response, the container engine Containerd directly reads the data from the processing result message in Cap'n Proto format, converts it into a container operation response, and returns the container operation response to the user end.

[0095] In summary, this application introduces Cap'n Proto RPC as a communication protocol to replace the traditional gRPC + Protobuf solution. Since Cap'n Proto RPC uses zero-copy technology, that is, no additional memory copy is required during the transmission of messages, frequent memory copy and data encoding and decoding operations in related technologies can be avoided, thereby significantly reducing the CPU and memory usage, and improving the system's performance and resource utilization efficiency. In addition, Cap'n Proto RPC optimizes the data deserialization process, directly reading data from the message without data encoding and decoding operations. Compared with the Protobuf deserialization operation in the related technology, the optimized processing method avoids additional data encoding and decoding overhead, reduces CPU usage, and improves the system's response speed.

[0096] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0097] Based on the same inventive concept, the embodiments of the present application also provide a request processing device for implementing the request processing method applied to the container engine involved above, and a request processing device for implementing the request processing method applied to the container gasket involved above. The implementation solutions provided by these devices to solve the problems are similar to the implementation solutions recorded in the above methods, so the specific limitations in one or more request processing device embodiments provided below can refer to the limitations on the request processing method above, and will not be repeated here.

[0098] In an exemplary embodiment, referring to FIG. 8 , the present application provides a request processing device, which is applied to a container engine. The request processing device includes:

[0099] The first execution module 801 is configured to respond to a container operation request sent by a user terminal and convert the container operation request into a container operation message in a preset message format.

[0100] The first sending module 802 is used to send a container operation message to the container shim to instruct the container shim to perform data processing according to the container operation message, and generate and send a processing result message that complies with the message format.

[0101] The second execution module 803 is used to convert the format of the processing result message sent by the container shim, and generate a container operation response corresponding to the container operation request.

[0102] The second sending module 804 is configured to send a container operation response to the user end.

[0103] In an exemplary embodiment, the first execution module 801 includes: a first execution submodule, a first determination submodule and a second execution submodule.

[0104] The first execution submodule is used to decapsulate the container operation request and obtain multiple first fields.

[0105] The first determination submodule is used to determine the second field of the preset message format corresponding to each first field according to a preset field relationship library; wherein the field relationship library includes multiple field relationships, at least some of the field relationships are used to represent the association relationship between the first field and the second field, and the formats of the first field and the second field are different.

[0106] The second execution submodule is used to encapsulate each second field and generate a container operation message.

[0107] In an exemplary embodiment, the second execution module 803 includes a third execution submodule, a second determination submodule, and a fourth execution submodule.

[0108] The third execution submodule is used to decapsulate the processing result message and obtain multiple third fields.

[0109] The second determination submodule is used to determine the fourth field corresponding to each third field according to a preset field relationship library; wherein the field relationship library includes multiple field relationships, at least some of the field relationships are used to represent the association relationship between the third field and the fourth field, and the formats of the third field and the fourth field are different.

[0110] The fourth execution submodule is used to encapsulate each fourth field and generate a container operation response.

[0111] In an exemplary embodiment, the preset message format includes a Cap'n Proto format.

[0112] In an exemplary embodiment, referring to FIG. 9 , the present application provides a request processing device, which is applied to a container gasket, and the request processing device includes:

[0113] The third execution module 901 is used to control the container instance to perform data processing in response to the container operation message sent by the container engine, and receive the container operation result fed back by the container instance;

[0114] A fourth execution module 902, configured to convert the container operation result into a processing result message in a preset message format;

[0115] The third sending module 903 is used to send a processing result message to the container engine to instruct the container engine to convert the format of the processing result message, generate a container operation response and feed it back to the user end.

[0116] In an exemplary embodiment, the fourth execution module 902 includes: a fifth execution submodule, a third determination submodule, and a sixth execution submodule.

[0117] The fifth execution submodule is used to decapsulate the container operation result and obtain multiple fifth fields.

[0118] The third determination submodule is used to determine the third field of the preset message format corresponding to each fifth field according to a preset field relationship library; wherein the field relationship library includes multiple field relationships, at least some of the field relationships are used to represent the association relationship between the fifth field and the third field, and the formats of the fifth field and the third field are different.

[0119] The sixth execution submodule is used to encapsulate each third field and generate a processing result message.

[0120] Each module in the above request processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0121] In an exemplary embodiment, the present application provides a container operating system, which includes a container engine and a container shim.

[0122] The container engine is used to respond to the container operation request sent by the user end, convert the container operation request into a container operation message in a preset message format, and send the container operation message to the container shim;

[0123] The container shim is used to process data according to the container operation message, generate a processing result message that conforms to the message format, and send the processing result message to the container engine;

[0124] The container engine is also used to convert the format of the processing result message sent by the container shim, generate a container operation response corresponding to the container operation request, and send the container operation response to the user end.

[0125] In an exemplary embodiment, the present application provides a computer device including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements any of the steps of the above-mentioned request processing method applied to the container engine, and / or implements any of the steps of the above-mentioned request processing method applied to the container gasket.

[0126] The computer device may be a terminal, and its internal structure diagram may be shown in FIG10. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a request processing method applied to a container engine and / or a request processing method applied to a container gasket is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0127] Those skilled in the art will understand that the structure shown in FIG. 10 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0128] In an exemplary embodiment, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the steps of the above-mentioned request processing method applied to a container engine, and / or implements any of the steps of the above-mentioned request processing method applied to a container gasket.

[0129] In an exemplary embodiment, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the steps of the above-mentioned request processing method applied to the container engine, and / or implements any of the steps of the above-mentioned request processing method applied to the container gasket.

[0130] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0131] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0132] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0133] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A request processing method, characterized in that: Applied to a container engine, the method includes: In response to a container operation request sent by a user terminal, convert the container operation request into a container operation message in a preset message format; Sending the container operation message to the container shim to instruct the container shim to perform data processing according to the container operation message, and generate and send a processing result message that complies with the message format; Performing format conversion on the processing result message sent by the container shim to generate a container operation response corresponding to the container operation request; The container operation response is sent to the user terminal.

2. The request processing method according to claim 1, characterized in that: The converting the container operation request into a container operation message in a preset message format includes: Decapsulate the container operation request to obtain multiple first fields; According to a preset field relationship library, second fields of a preset message format corresponding to each of the first fields are respectively determined; wherein the field relationship library includes a plurality of field relationships, at least some of the field relationships are used to represent an association relationship between a first field and a second field, and the formats of the first field and the second field are different; Each of the second fields is encapsulated to generate the container operation message.

3. The request processing method according to claim 1, characterized in that: The format conversion of the processing result message sent by the container shim to generate a container operation response corresponding to the container operation request includes: Decapsulating the processing result message to obtain multiple third fields; According to a preset field relationship library, the fourth fields corresponding to the third fields are respectively determined; wherein the field relationship library includes a plurality of field relationships, at least some of the field relationships are used to represent the association relationship between the third field and the fourth field, and the third field and the fourth field have different formats; Each of the fourth fields is encapsulated to generate the container operation response.

4. The request processing method according to claim 1, characterized in that: The message format includes the Cap'n Proto format.

5. A request processing method, characterized in that: Applied to a container gasket, the method comprises: In response to the container operation message sent by the container engine, control the container instance to process data, and receive the container operation result fed back by the container instance; Converting the container operation result into a processing result message in a preset message format; The processing result message is sent to the container engine to instruct the container engine to convert the format of the processing result message, generate a container operation response and feed it back to the user end.

6. The request processing method according to claim 5, characterized in that: The step of converting the container operation result into a processing result message in a preset message format includes: Decapsulate the container operation result to obtain multiple fifth fields; According to a preset field relationship library, respectively determine the third field of the preset message format corresponding to each of the fifth fields; wherein the field relationship library includes a plurality of field relationships, at least some of the field relationships are used to represent the association relationship between the fifth field and the third field, and the fifth field and the third field have different formats; Each of the third fields is encapsulated to generate the processing result message.

7. A request processing device, characterized in that: Applied to a container engine, the device comprises: A first execution module, configured to respond to a container operation request sent by a user terminal and convert the container operation request into a container operation message in a preset message format; A first sending module, used for sending the container operation message to the container gasket to instruct the container gasket to perform data processing according to the container operation message, and generate and send a processing result message conforming to the message format; A second execution module, configured to perform format conversion on the processing result message sent by the container shim, and generate a container operation response corresponding to the container operation request; The second sending module is used to send the container operation response to the user terminal.

8. A request processing device, characterized in that: Applied to container gaskets, the device comprises: A third execution module is used to control the container instance to perform data processing in response to the container operation message sent by the container engine, and receive the container operation result fed back by the container instance; A fourth execution module, used for converting the container operation result into a processing result message in a preset message format; The third sending module is used to send the processing result message to the container engine to instruct the container engine to convert the format of the processing result message, generate a container operation response and feed it back to the user end.

9. A container operating system, characterized in that: The system includes a container engine and a container gasket; The container engine is used to respond to a container operation request sent by the user end, convert the container operation request into a container operation message in a preset message format, and send the container operation message to the container shim; The container shim is used to perform data processing according to the container operation message, generate a processing result message that conforms to the message format, and send the processing result message to the container engine; The container engine is further used to perform format conversion on the processing result message sent by the container shim, generate a container operation response corresponding to the container operation request, and send the container operation response to the user end.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the request processing method applied to the container engine as described in any one of claims 1 to 4, and / or implements the steps of the request processing method applied to the container gasket as described in any one of claims 5 or 6.