Container operation method, device, computer equipment and computer readable storage medium

CN117499406BActive Publication Date: 2026-10-23TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210886893.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-26
Publication Date
2026-10-23
Estimated Expiration
2042-07-26

AI Technical Summary

Technical Problem

[0004]综上,目前云原生存在对请求的处理效率较低和容器的操作效率较低的问题

Benefits of technology

[0032]本申请实施例能够通过容器操作系统中的请求获取层获取针对容器的操作请求,以及获取操作请求的请求特征信息;通过容器操作系统中的请求处理层根据请求特征信息,识别操作请求的请求类型;通过请求处理层根据请求类型,确定操作请求的处理时序;通过请求处理层根据处理时序,获取操作请求针对容器的操作策略;通过容器操作系统的操作层根据操作策略,对容器进行操作处理;由于本申请实施例能够通过容器操作系统中的请求获取层识别出操作请求的请求类型,以及基于请求类型确定出操作请求的处理时序,如此能够按照处理时序获取操作请求针对容器的操作策略,如此能够提高对操作请求的处理效率,进而能够通过容器操作系统的操作层快速对容器进行操作处理,提高对容器的操作效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117499406B_ABST
    Figure CN117499406B_ABST
Patent Text Reader

Abstract

The container operation method and device, the computer device and the computer readable storage medium provided in the embodiments of the present application can be applied to a container. The embodiments of the present application can acquire an operation request for the container through a request acquisition layer in a container operating system, and acquire request characteristic information of the operation request. The embodiments of the present application can identify a request type of the operation request according to the request characteristic information through a request processing layer in the container operating system. The embodiments of the present application can determine a processing time sequence of the operation request according to the request type through the request processing layer. The embodiments of the present application can acquire an operation strategy of the operation request for the container according to the processing time sequence through the request processing layer. The embodiments of the present application can perform operation processing on the container according to the operation strategy through an operation layer of the container operating system. The embodiments of the present application can acquire the operation strategy of the operation request for the container according to the processing time sequence, thereby improving the processing efficiency of the operation request. Furthermore, the embodiments of the present application can quickly perform operation processing on the container through the operation layer of the container operating system, thereby improving the operation efficiency of the container.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, specifically to a container operation method, apparatus, computer device, and computer-readable storage medium. Background Technology

[0002] With the development of cloud computing, cloud-native container cluster management systems, such as Kubernetes, have made operating containers a way to process and run resource environments in cloud computing. Cloud-native refers to a software development application approach based on cloud computing; Kubernetes, or K8s for short, is an open-source application used to manage containerized applications across multiple hosts on a cloud platform.

[0003] Currently, during container operations, the container cluster management system needs to handle not only its own requests but also requests from outside the system. Too many requests can overload the central control manager, leading to performance degradation and increased latency. This performance degradation and latency in the central control manager also result in low container operation efficiency. Examples of container operations include updating and creating containers.

[0004] In summary, cloud-native technologies currently suffer from low efficiency in request processing and container operation. Summary of the Invention

[0005] This application provides a container operation method, apparatus, computer device, and computer-readable storage medium, which can improve the processing efficiency of operation requests and the operation efficiency of containers.

[0006] A container operation method, comprising:

[0007] Obtain operation requests for containers through the request retrieval layer in the container operating system, as well as the request characteristic information of the operation requests;

[0008] The request processing layer in the container operating system identifies the request type of the operation request based on request characteristic information;

[0009] The request processing layer determines the processing sequence of operation requests based on the request type.

[0010] The request processing layer obtains the operation strategy for the container based on the processing sequence of the operation request;

[0011] The container operating system's operation layer performs operations on the container according to the operation policy.

[0012] This application also provides a container operating device, including:

[0013] The first acquisition unit can be used to acquire operation requests for the container through the request acquisition layer in the container operating system, and to acquire request feature information of the operation requests.

[0014] The identification unit can be used to identify the request type of an operation request based on request characteristic information through the request processing layer in the container operating system.

[0015] The determination unit can be used to determine the processing sequence of operation requests based on the request type through the request processing layer;

[0016] The second acquisition unit can be used to acquire the operation strategy of the operation request for the container according to the processing sequence through the request processing layer;

[0017] The processing unit can be used to perform operations on the container according to the operation policy through the operation layer of the container operating system.

[0018] In some application embodiments, the operation layer includes a main control layer and a request processing layer; when the operation request is a first operation request corresponding to a first request type, the operation strategy includes a first operation strategy; the processing unit can be specifically used to send the first operation request to the main control layer through the request processing layer of the container operating system according to the first operation strategy, the first operation request carrying first operation data; and the main control layer performs a write operation on the container according to the first operation data.

[0019] In some application embodiments, when the operation request is a second operation request corresponding to a second request type, the operation strategy includes a second operation strategy; the processing unit can be specifically used to determine the load of the operation layer through the operation layer of the container operating system according to the second operation strategy; and to perform operation processing on the container through the operation layer according to the load of the operation layer.

[0020] In some application embodiments, the processing unit may be specifically used to determine whether the first operation request corresponding to the first request type has been processed if the load of the operation layer is greater than or equal to a preset threshold; if the first operation request has been processed, the operation layer shall perform a read operation on the container according to the second operation request.

[0021] In some application embodiments, the operation layer includes a request processing layer; a processing unit, specifically used to perform a read operation on the container in a preset storage space according to a second operation request through the request processing layer if the load is less than a preset threshold, wherein the preset storage space is the storage space used by the request processing layer for container operation.

[0022] Correspondingly, after the request processing layer performs a read operation on the container in the preset storage space according to the second operation request, the processing unit can also be used to: if the second operation data corresponding to the second operation request is read in the preset storage space, then send the second operation data to the request object that initiated the second operation request through the request processing layer.

[0023] In some embodiments, the operation layer includes a request processing layer and a main control layer; the processing unit can also be used to send the second operation request to the main control layer through the request processing layer if the second operation data corresponding to the second operation request is not read in the preset storage space; and the main control layer performs a read operation on the container in the database corresponding to the main control layer according to the second operation request to read the second candidate operation data corresponding to the second operation request.

[0024] In some embodiments, the processing unit may further be used to send the second candidate operation data to the request processing layer through the main control layer; send the second candidate operation data to the request object that initiated the second operation request through the request processing layer; and store the second candidate operation data in a preset storage space through the request processing layer.

[0025] In some embodiments, the operation layer includes a main control layer and a request processing layer; when the operation request is a third operation request corresponding to a third request type, the operation strategy includes a third operation strategy and a second operation strategy; before the operation layer of the container operating system performs operation processing on the container according to the operation strategy, the processing unit may also be used to send the third operation request to the main control layer according to the third operation strategy through the request processing layer; according to the third operation request, the main control layer performs data query in the database corresponding to the main control layer to obtain the third operation data corresponding to the third operation request; and the request processing layer updates the third operation data in the preset storage space.

[0026] Correspondingly, the processing unit can also be used to perform read operations on the container in the updated preset storage space according to the second operation strategy through the operation layer.

[0027] In some application embodiments, the processing unit may be specifically used to perform hierarchical processing of operation requests according to the request type through the request processing layer to obtain the request processing level of the operation request; and determine the processing sequence of the operation request according to the request processing level.

[0028] Furthermore, embodiments of this application also provide a computer device, including a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any of the container operation methods provided in embodiments of this application.

[0029] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer program adapted for loading by a processor to execute any of the container operation methods provided in embodiments of this application.

[0030] Furthermore, this application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the container operation methods provided in this application.

[0031] Furthermore, this application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the container operation methods provided in this application.

[0032] This embodiment of the application can obtain operation requests for containers and their request feature information through the request acquisition layer in the container operating system; identify the request type of the operation request based on the request feature information through the request processing layer in the container operating system; determine the processing sequence of the operation request based on the request type through the request processing layer; obtain the operation strategy for the container based on the processing sequence through the request processing layer; and perform operation processing on the container based on the operation strategy through the operation layer of the container operating system. Because this embodiment of the application can identify the request type of the operation request through the request acquisition layer in the container operating system and determine the processing sequence of the operation request based on the request type, it can obtain the operation strategy for the container according to the processing sequence, thus improving the processing efficiency of the operation request. This allows for rapid operation processing of the container through the operation layer of the container operating system, thereby improving the efficiency of container operation. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a schematic diagram of a scenario illustrating the container operation method provided in an embodiment of this application;

[0035] Figure 2 This is a flowchart illustrating the container operation method provided in an embodiment of this application;

[0036] Figure 3 These are two schematic flowcharts illustrating the container operation method provided in this application embodiment;

[0037] Figure 4This is a schematic diagram of the structure of the container operating system provided in an embodiment of this application;

[0038] Figure 5 These are three schematic flowcharts illustrating the container operation method provided in this application embodiment;

[0039] Figure 6 This is a schematic diagram of the structure of the container operating device provided in the embodiments of this application;

[0040] Figure 7 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation

[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0042] This application provides a container operation method, apparatus, computer device, and computer-readable storage medium. The container operation apparatus can be integrated into a computer device, which may be a server or a terminal, etc.

[0043] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein.

[0044] This application relates to cloud computing, which refers to the delivery and usage model of IT infrastructure, specifically obtaining necessary resources through a network in an on-demand and easily scalable manner. In a broader sense, cloud computing refers to the delivery and usage model of services, specifically obtaining necessary services through a network in an on-demand and easily scalable manner. These services can be IT and software-related, internet-related, or other services. Cloud computing is a product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing.

[0045] With the development of the internet, real-time data streams, and the diversification of connected devices, as well as the demands for search services, social networks, mobile commerce, and open collaboration, cloud computing has rapidly developed. Unlike previous parallel distributed computing, cloud computing will fundamentally revolutionize the entire internet model and enterprise management model.

[0046] For example, see Figure 1 Taking the integration of container operating devices into computer devices as an example, the computer device can obtain operation requests for containers and the request feature information of operation requests through the request acquisition layer in the container operating system; the request processing layer in the container operating system can identify the request type of operation requests based on the request feature information; the request processing layer can determine the processing sequence of operation requests based on the request type; the request processing layer can obtain the operation policy of operation requests for containers based on the processing sequence; and the operation layer of the container operating system can perform operation processing on containers according to the operation policy.

[0047] Here, a container can refer to the framework for running code.

[0048] Among them, request feature information can refer to information that characterizes the type of operation request.

[0049] The operation request can include at least one request type. Each request type of operation request can have a corresponding processing order; specifically, each request type of operation request can correspond to a different processing order.

[0050] The operation strategy can refer to the strategy for processing operations on the container based on the operation request.

[0051] The operations performed on containers can include container creation operations, container update operations, and so on.

[0052] In this context, a container operating system can refer to a system used to operate on containers based on operation requests.

[0053] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.

[0054] This embodiment will be described from the perspective of a container operating device, which can be integrated into a computer device, such as a server or a terminal. The terminal can include tablet computers, laptops, personal computers (PCs), wearable devices, virtual reality devices, or other smart devices that can acquire data.

[0055] like Figure 2 As shown, the specific flow of this container operation method is as follows: steps S101 to S105:

[0056] S101. Obtain the operation request for the container through the request retrieval layer in the container operating system, and obtain the request characteristic information of the operation request.

[0057] The operation request can refer to a request for performing an operation on the container. In this embodiment of the application, the operation request includes operation requests that are strongly related to the container operation and operation requests that are weakly related to the container operation.

[0058] The request retrieval layer can be a layer used to retrieve operation requests for the container.

[0059] Specifically, operation requests strongly related to container operations can include write requests and update requests. A write request can refer to a request to write the operation data corresponding to the container operation to the database corresponding to the container operation. An update request can refer to a request to update the operation data corresponding to the container operation in the storage space corresponding to the container operation.

[0060] Operation requests weakly related to container operations can include read requests for lists and read requests for non-list data. A read request for a list can refer to a request to read list data from the database or storage space associated with the container operation. A read request for a non-list data can refer to a request to read non-list data from the database or storage space associated with the container operation.

[0061] In the embodiments of this application, the operation data may include first operation data, second operation data, and third operation data.

[0062] In this embodiment, container operations can be performed based on a container operating system used for container operations. In this embodiment, operation requests can include operation requests automatically sent from within the container operating system and operation requests from outside the container operating system.

[0063] In this context, the operation request outside the container operating system can refer to an operation request triggered by a target object, which can be a user. In this embodiment, the operation request can be a request triggered based on the target object's operation on an operation page. The operation page can refer to a page displayed on the screen of a computer device, or a page displayed on the screen of another device connected to the computer device.

[0064] In this embodiment of the application, the request feature information may be feature information carried in the operation request. The request feature information may be represented in the form of characters.

[0065] In this embodiment, the request feature information can also be feature information obtained by extracting features from the request data carried in the operation request using a feature extraction model. The feature extraction model can be a neural network model in existing related technologies, such as a CNN model or a self-attention model. The request data carried in the operation request can be voice data, text data, image data, etc.

[0066] S102. The request processing layer in the container operating system identifies the request type of the operation request based on the request characteristic information.

[0067] The request processing layer can be at least a layer used for determining the request type of the operation request, determining the processing sequence of the operation request, and obtaining the operation strategy of the operation request for the container.

[0068] The method by which the request processing layer in the container operating system identifies the request type of an operation request based on request feature information in this embodiment can be as follows: obtaining at least one preset request feature information through the request processing layer in the container operating system; determining a target preset request feature information that matches the request feature information from the preset request feature information based on the request feature information; extracting the preset request type corresponding to the target preset request feature information; and using the preset request type as the request type of the operation request.

[0069] Specifically, when the target preset request feature information is the same as the request feature information, this situation can be called target preset request feature information matching request feature information; when the similarity between the target preset feature information and the request feature information is greater than or equal to the preset similarity threshold, this situation can be called target preset feature information matching request feature information.

[0070] In this embodiment of the application, the method by which the request processing layer in the container operating system identifies the request type of an operation request based on request feature information can also be as follows: Based on the request feature information, a classification model is used to perform classification prediction to obtain the request type of the operation request. The classification model can be a neural network model in existing related technologies; specifically, the classification model can be an RNN neural network model, a CNN neural network model, etc.

[0071] Specifically, the request type can include write request type, update request type, and read request type. In this embodiment, write request type can refer to the request type for writing requests. Update request type can refer to the request type for updating requests. Read request type can specifically include read request type for lists and read request type for non-lists, where read request type for lists refers to the request type for reading requests of lists; and read request type for non-lists refers to the request type for reading requests of non-lists.

[0072] S103. The request processing layer determines the processing sequence of the operation request based on the request type.

[0073] Since a large number of operation requests in this embodiment can lead to low processing efficiency, this embodiment of the application implements a tiered processing method for operation requests.

[0074] Based on this, the method by which the request processing layer determines the processing sequence of operation requests according to the request type in the embodiments of this application can be as follows: the request processing layer performs hierarchical processing on the operation requests according to the request type to obtain the request processing level of the operation requests; and determines the processing sequence of the operation requests according to the request processing level.

[0075] In some embodiments, the request processing layer can classify operation requests according to request type to obtain the request processing level of the operation request. This can be achieved by: obtaining a set of level mapping relationships through the request processing layer, which includes the mapping relationship between preset request types and preset request processing levels; determining the target preset request type corresponding to the request type from the preset request types in the set of level mapping relationships; determining the target preset request processing level corresponding to the target preset request type based on the obtained set of level mapping relationships; and determining the request processing level of the operation request based on the preset request processing level.

[0076] In this embodiment of the application, a preset request processing level can be used as the request processing level of the operation request.

[0077] Specifically, each request type can have a corresponding request processing level. Different request types can have different request processing levels. For example, request types can include a first request type, a second request type, and a third request type. Request processing levels can include a first request processing level, a second request processing level, and a third request processing level. An operation request of the first request type can have a first request processing level, an operation request of the second request type can have a second request processing level, and an operation request of the third request type can have a third request processing level.

[0078] Operation requests of different types can have the same request processing level. Request types can include a first request type, a second request type, and a third request type. Request processing levels can include a first request processing level and a second request processing level. Operation requests of the first and second request types can both have the first request processing level, while operation requests of the third request type can have the second request processing level.

[0079] In this embodiment of the application, the method for determining the processing sequence of an operation request based on the request processing level can be as follows: obtaining a set of timing mapping relationships, which includes the mapping relationship between a preset request processing level and a preset processing sequence; determining a target preset request processing level corresponding to the request processing level from the preset request processing levels in the timing mapping relationship set; determining a target preset processing sequence corresponding to the target preset request processing level based on the timing mapping relationship set; and using the target preset processing sequence as the processing sequence of the operation request.

[0080] In this embodiment, operation requests with different processing levels can have different processing sequences. Specifically, each operation request level can correspond to a different processing sequence. For example, in this embodiment, the processing sequence includes a first processing sequence, a second processing sequence, and a third processing sequence, where the first processing sequence takes precedence over the second processing sequence, and the second processing sequence takes precedence over the third processing sequence. The request processing levels include a first request processing level, a second request processing level, and a third request processing level. The processing sequence of an operation request at the first request processing level can be the first processing sequence, the processing sequence of an operation request at the second request processing level can be the second processing sequence, and the processing sequence of an operation request at the third request processing level can be the third processing sequence.

[0081] Operation requests with different processing levels can correspond to the same processing sequence. For example, in this embodiment, the processing sequence includes a first processing sequence and a second processing sequence, with the first processing sequence taking precedence over the second processing sequence. The request processing levels include a first request processing level, a second request processing level, and a third request processing level. The processing sequence of operation requests at the first and second request processing levels can be the first processing sequence, and the processing sequence of operation requests at the third request processing level can be the second processing sequence.

[0082] In some application embodiments, the method of determining the processing sequence of operation requests based on the request type by the request processing layer can also be as follows: the request processing layer determines the processing sequence corresponding to the request type based on the request type; and the processing sequence corresponding to the request type is determined as the processing sequence of the operation requests.

[0083] S104. The request processing layer obtains the operation strategy for the container based on the processing sequence.

[0084] Each request type can have a corresponding operation strategy, which can be a pre-defined strategy. In this embodiment, the request type of the operation request can be associated with an operation strategy.

[0085] This application embodiment can obtain the operation strategy corresponding to the operation request based on the association between the request type and the operation strategy according to the processing sequence. For example, when the processing sequence of the operation request is the first processing sequence and the request type is a write request type, this application embodiment can obtain the operation strategy corresponding to the write request type according to the first processing sequence.

[0086] S105. The container is processed by the operation layer of the container operating system according to the operation policy.

[0087] In this embodiment of the application, the operation layer can be a layer used for operating and processing the container.

[0088] This application embodiment utilizes various methods to process containers according to operational policies through the container operating system's operational layer, as detailed below:

[0089] Method 1: The operation layer includes a main control layer and a request processing layer; when the operation request is a first operation request corresponding to a first request type, the operation strategy includes a first operation strategy. In this case, the way the operation layer of the container operating system performs operation processing on the container according to the operation strategy in this embodiment of the application can be as follows: the request processing layer of the container operating system sends the first operation request to the main control layer according to the first operation strategy, and the first operation request carries the first operation data; the main control layer performs a write operation on the container according to the first operation data.

[0090] In this embodiment, the first operation request can be a write request, and the first request type can be a write request type. In this embodiment, the first operation strategy can be a strategy whereby the computer device at least executes a strategy whereby the request processing layer of the container operating system sends a first operation request to the main control layer according to the first operation strategy, the first operation request carrying first operation data; and the main control layer performs a write operation on the container based on the first operation data.

[0091] In this embodiment of the application, the first operation data can be written to a database or storage space through a write operation. The database is a database for container operation, and the storage space is a storage space for container operation.

[0092] In this embodiment, the main control layer can be used as a cluster control node, responsible for the management and control of the cluster. Specifically, the main control layer can be used to manage and control the operation process of the containers in this embodiment.

[0093] Method 2: When the operation request is the second operation request corresponding to the second request type, the operation strategy includes the second operation strategy; in this case, the method by which the operation layer of the container operating system performs operation processing on the container according to the operation strategy in this embodiment of the application can also be: the operation layer of the container operating system determines the load of the operation layer according to the second operation strategy; and the operation layer performs operation processing on the container according to the load of the operation layer.

[0094] The second operation request can include read requests for lists and read requests for non-lists. When the second operation request is a read request for a list, the second request type can be the type for read requests for lists; when the second operation request is a read request for a non-list, the second request type can be the type for read requests for non-lists.

[0095] The second operation strategy can be a strategy that causes the computer device to at least perform the steps of determining the load of the operation layer and then performing operation processing on the container based on the load of the operation layer.

[0096] Here, load can refer to the amount of resources currently being used by the container operating system's operational layer.

[0097] In some application embodiments, the way the operation layer processes the container according to the load of the operation layer can be as follows: if the load of the operation layer is greater than or equal to a preset threshold, the operation layer determines whether the first operation request corresponding to the first request type has been processed; if the first operation request has been processed, the operation layer performs a read operation on the container according to the second operation request.

[0098] When the load is greater than or equal to a preset threshold, it indicates that the amount of remaining runnable resources in the operation layer of the container operating system is limited. Since the second operation request in this embodiment is a request weakly related to container operation and the first operation request is a request strongly related to container operation, this embodiment needs to process the first operation request first, and then process the second operation request after the first operation request is created and processed.

[0099] In one embodiment of the application, the operation layer includes a request processing layer. Based on this, the specific method of the operation layer to process the container according to the load of the operation layer in this embodiment of the application can be as follows: if the load is less than a preset threshold, the request processing layer performs a read operation on the container in a preset storage space according to the second operation request. The preset storage space is the storage space used by the request processing layer for container operation.

[0100] Accordingly, if the second operation data corresponding to the second operation request is read from the preset storage space in the embodiments of this application, the second operation data is sent to the request object that initiated the second operation request through the request processing layer.

[0101] In this embodiment of the application, the request object may refer to a user or a program in the container operating system that initiates the second operation request.

[0102] In this embodiment of the application, a read operation can be performed in a preset storage space according to the second operation request, which can improve the efficiency of finding the second operation data.

[0103] In some embodiments, the operation layer includes a request processing layer and a master control layer. After the request processing layer performs a read operation on the container in a preset storage space according to the second operation request, the method further includes: if the second operation data corresponding to the second operation request is not read in the preset storage space, the request processing layer sends the second operation request to the master control layer; the master control layer performs a read operation on the container in the database corresponding to the master control layer according to the second operation request to read the second candidate operation data corresponding to the second operation request.

[0104] Based on the above, in some application embodiments, after the main control layer performs a read operation on the container in the database corresponding to the main control layer according to the second operation request to read the second candidate operation data corresponding to the second operation request, it further includes: sending the second candidate operation data to the request processing layer through the main control layer; sending the second candidate operation data to the request object that initiated the second operation request through the request processing layer; and storing the second candidate operation data in a preset storage space through the request processing layer.

[0105] To facilitate subsequent retrieval of the second operation data and improve container creation efficiency, this embodiment stores the second candidate operation data in a preset storage space. Specifically, the second candidate operation data can be the same data as the second operation data.

[0106] Method 3: The operation layer includes a main control layer and a request processing layer; when the operation request is a third operation request corresponding to a third request type, the operation strategy includes a third operation strategy and a second operation strategy; in this case, the operation layer of the container operating system can update the data in the preset storage space before performing operation processing on the container according to the operation strategy. Specifically, the request processing layer sends the third operation request to the main control layer according to the third operation strategy; according to the third operation request, the main control layer queries the database corresponding to the main control layer to obtain the third operation data corresponding to the third operation request; the request processing layer updates the third operation data in the preset storage space.

[0107] The third operation request can be an update request, and the third request type can be an update request type.

[0108] The third operation strategy can refer to a strategy in which the computer device performs at least the following steps: sending a third operation request to the main control layer; querying the database corresponding to the main control layer based on the third operation request to obtain the third operation data corresponding to the third operation request; and updating the third operation data in a preset storage space through the request processing layer.

[0109] In this embodiment, the third operation data is synchronized with the main control layer's database in a preset storage space. This facilitates searching for the third operation data in the preset storage space, improving search efficiency. In this embodiment, the third operation data may be the same as the second operation data.

[0110] Based on the above, the specific method by which the operation layer of the container operating system performs operation processing on the container according to the operation strategy in this embodiment of the application can be: the operation layer performs a read operation on the container in the updated preset storage space according to the second operation strategy.

[0111] This embodiment of the application can obtain operation requests for containers and their request feature information through the request acquisition layer in the container operating system; identify the request type of the operation request based on the request feature information through the request processing layer in the container operating system; determine the processing sequence of the operation request based on the request type through the request processing layer; obtain the operation strategy for the container based on the processing sequence through the request processing layer; and perform operation processing on the container based on the operation strategy through the operation layer of the container operating system. Because this embodiment of the application can identify the request type of the operation request through the request acquisition layer in the container operating system and determine the processing sequence of the operation request based on the request type, it can obtain the operation strategy for the container according to the processing sequence, thus improving the processing efficiency of the operation request. This allows for rapid operation processing of the container through the operation layer of the container operating system, thereby improving the efficiency of container operation.

[0112] Based on the method described in the above embodiments, the following examples will provide further detailed explanations.

[0113] In this embodiment, the container operating device is specifically integrated into a computer device, which is a server.

[0114] First, it's important to note that currently, during container operations, the container cluster management system not only needs to handle its own requests but also requests from outside the system. If there are too many requests, especially read requests for lists, it can overload the central control manager of the container cluster management system, leading to decreased performance and increased latency. When the central control manager experiences decreased performance and increased latency, particularly when it cannot promptly handle write requests strongly related to container operations, the overall efficiency of container operations will be low. Therefore, if... Figure 3 As shown, this application embodiment provides a container operation method, the specific process of which is as follows: steps S201 to S207:

[0115] It should be noted that the embodiments of this application use the creation of a container as an example for illustration.

[0116] S201. The computer device obtains operation requests for the container through the request retrieval layer in the container operating system.

[0117] The container operating system can be a system used to create containers. Specifically, the container operating system can be Kubernetes, or a system that improves upon Kubernetes.

[0118] This application uses a container operating system as an example of a system that improves upon Kubernetes. For instance... Figure 4 As shown, the container operating system of this application includes a request acquisition layer, a request processing layer, and a main control layer.

[0119] The request retrieval layer can be used to retrieve operation requests, send operation requests to the request processing layer, receive operation data returned from the request processing layer, and send operation data to the request object that initiated the operation request.

[0120] The request processing layer can at least be used to receive operation requests sent by the request acquisition layer, send operation requests to the main control layer, process operation requests, communicate with the main control layer to complete the operation on the container, store operation data in the preset storage space corresponding to the request processing layer, and retrieve operation data from the preset storage space corresponding to the request processing layer. The processing of operation requests by the request processing layer can at least include: obtaining request feature information of the operation request; identifying the request type of the operation request based on the request feature information; classifying the operation request according to the request type to obtain the request processing level; determining the processing sequence of the operation request based on the request processing level; obtaining the operation strategy corresponding to the operation request based on the processing sequence; and performing operation processing on the container according to the operation strategy.

[0121] The request processing layer has a corresponding preset storage space for storing operation data. This preset storage space primarily serves read requests for the list, and the operation data stored in the preset storage space can be synchronized with the read request operation data for the list stored in the main control layer's database.

[0122] In this embodiment, the container operating system adds a request processing layer to the critical path of the Kubernetes architecture as a logic for relaying operation requests. While relaying operation requests, the request processing layer also employs tiered protection for these requests. Since most of the load on the container operating system is due to read requests to lists, this embodiment sets a preset storage space in the request processing layer and employs tiered protection for operation requests. This ensures that the container operating system can quickly reduce its load under high load, thereby guaranteeing and restoring its stability.

[0123] The master control layer is the cluster control node, responsible for managing and controlling the cluster. In addition, the master control layer can also receive operation requests from the request processing layer, retrieve operation data from its corresponding database and send it to the request processing layer, store operation data in its corresponding database, and so on.

[0124] The main control layer includes an API Server component, a Controller component, a Scheduler component, and a database (etcd). The API Server component handles API operations. The Controller component, also known as the aforementioned central control manager, manages the cluster. The Scheduler component performs scheduling operations. The database stores operation data. In this embodiment, when the main control layer receives an operation request, it can read or write the corresponding operation data from the database (etcd) through the API Server component.

[0125] An operation request can refer to a request used to perform operations on the container. Operation requests can include those strongly associated with container operations and those weakly associated with them. Specifically, operation requests strongly associated with container operations can include write requests and update requests. Requests weakly associated with container operations can include read requests for lists and read requests for non-list operations.

[0126] In the embodiments of this application, such as Figure 4 As shown, operation requests can include operation requests within the container operating system and operation requests outside the container operating system.

[0127] Specifically, operation requests within a container operating system can be automatically sent by the container operating system itself, or they can be requests sent by components within the container operating system. These components can be cloud-native service components that need to support container creation; therefore, they need to initiate operation requests. Components within a container operating system include resource management components (pods).

[0128] In this embodiment of the application, when the container operating system receives an operation request such as a read request for a list, the purpose is to synchronize the operation data in the database corresponding to the main control layer of the container operating system with the operation data in the preset storage space corresponding to the request processing layer.

[0129] Operation requests outside the container operating system include operation requests triggered by the target object and operation requests triggered by the platform. For example, when the operation request outside the container operating system is triggered by the target object, the operation request may be a request triggered based on the creation operation of the target object on an operation page. The operation page may refer to a page displayed on the display screen of a computer device. This operation page is associated with the container operating system of this application embodiment. Based on this, the container operating system can receive the operation request triggered by the target object. For example, when the target object triggers an operation request through the operation page to request resource load balancing services, the resource load balancing services may refer to a service that reads the resources of the container in the container operating system. The container operating system can read the container's resources based on the operation request.

[0130] In this embodiment of the application, when the container operating system receives an operation request triggered by the target object, such as a read request for a list, it returns the operation data corresponding to the operation request to the target object and then displays the operation data on the display screen.

[0131] For example, when an operation request outside the container operating system is triggered by the platform, the operation request can be triggered by a business operations platform system connected to the container operating system. For instance, when the business operations platform system initiates an operation request to display the container operating system's load data, the container operating system can read the load data from the database based on the operation request.

[0132] S202. The computer device obtains the request characteristic information of the operation request through the request retrieval layer in the container operating system.

[0133] In this embodiment of the application, the request feature information may also be feature information obtained by the request processing layer using a feature extraction model to extract features from the request data carried in the operation request.

[0134] S203. The computer device identifies the request type of the operation request based on the request characteristic information through the request processing layer in the container operating system.

[0135] In this embodiment of the application, the computer device can obtain at least one preset request feature information through the request processing layer in the container operating system; determine the target preset request feature information that matches the request feature information from the preset request feature information based on the request feature information; extract the preset request type corresponding to the target preset request feature information; and use the preset request type as the request type of the operation request.

[0136] Specifically, request types can include write request types, update request types, and read request types. Read request types can further include read request types for lists and read request types for non-lists. For example... Figure 4 As shown in the embodiments of this application, the operation requests identified by the request processing layer based on request feature information may include read requests, update requests, and write requests.

[0137] S204. The computer device, through the request retrieval layer in the container operating system, performs hierarchical processing of operation requests according to the request type to obtain the request processing level of the operation request.

[0138] In this embodiment of the application, the computer device can obtain a set of level mapping relationships through the request processing layer. The set of level mapping relationships includes the mapping relationship between preset request types and preset request processing levels. The target preset request type corresponding to the request type is determined from the preset request types in the set of level mapping relationships. Based on the obtained set of level mapping relationships, the target preset request processing level corresponding to the target preset request type is determined, and based on the preset request processing level, the request processing level of the operation request is determined.

[0139] Because a large number of operation requests in this embodiment can lead to low processing efficiency, this embodiment implements a tiered processing approach for operation requests. The request processing levels corresponding to different request types in this embodiment are shown in Table 1.

[0140]

[0141] Table 1

[0142] The priority order for request processing levels in Table 1 can be: First request processing level = Second request processing level > Third request processing level = Fourth request processing level. The priority order of request processing levels can be set according to specific needs; this is just one example.

[0143] S205. The computer device determines the processing sequence of operation requests based on the request processing level through the request processing layer of the container operating system.

[0144] Specifically, the computer device can obtain a set of timing mapping relationships through the request processing layer of the container operating system. The set of timing mapping relationships includes the mapping relationship between preset request processing levels and preset processing times. The target preset request processing level corresponding to the request processing level is determined from the preset request processing levels in the set of timing mapping relationships. The target preset processing time corresponding to the target preset request processing level is determined according to the set of timing mapping relationships. The target preset processing time is used as the processing time of the operation request.

[0145] In the embodiments of this application, the processing timing of write request type operation requests can be a first processing timing, the processing timing of update request type operation requests can be a second processing timing, the processing timing of non-list read request type operation requests can be a third processing timing, and the processing timing of list read request type operation requests can be a fourth processing timing.

[0146] Specifically, based on Table 1, it can be seen that the processing sequence of the operation request in the embodiments of this application can be: the first processing sequence is equal to the second processing sequence, the second processing sequence takes precedence over the third processing sequence, and the third processing sequence is equal to the fourth processing sequence.

[0147] S206. The computer device obtains the operation policy for the container based on the processing sequence through the request processing layer.

[0148] In this embodiment of the application, the computer device can obtain the operation policy corresponding to the request processing level by the request processing layer of the container operating system according to the processing sequence and based on the association between the request type of the operation request and the operation policy.

[0149] In this embodiment, different request types have different operation strategies. See step S207 for details.

[0150] S207. Computer devices perform operations on containers according to operation policies through the operation layer of the container operating system.

[0151] Specifically, such as Figure 5 As shown, in this embodiment of the application, after the request acquisition layer of the container operating system obtains the operation request, it sends the operation request to the request processing layer, which then processes it. Specifically:

[0152] For example, the operation layer includes a main control layer and a request processing layer. When the operation request is a third operation request corresponding to a third request type, the operation strategy includes a third operation strategy and a second operation strategy. In this case, the embodiments of this application can send the third operation request to the main control layer according to the third operation strategy through the request processing layer. According to the third operation request, the main control layer performs a data query in the database corresponding to the main control layer to obtain the third operation data corresponding to the third operation request. The request processing layer updates the third operation data in a preset storage space. It can be understood here that updating the third operation data in the preset storage space through the request processing layer can specifically mean storing the third operation data in the preset storage space through the request processing layer.

[0153] In this embodiment, the third operation data is synchronized with the database of the main control layer in a preset storage space. This allows the request retrieval layer to easily search for the third operation data in the preset storage space when it receives a second operation request, thus improving search efficiency. In this embodiment, the third operation data may be the same as the second operation data.

[0154] In this embodiment, the request processing layer can periodically obtain update requests from the request acquisition layer to update the third operation data in the preset storage space, so as to ensure that the third data in the preset storage space is synchronized with the third operation data in the database of the main control layer, and to ensure the accuracy of the third operation data in the preset storage space.

[0155] Then, as Figure 5 As shown, when the request processing layer determines that the operation request is not a read request of the read request type, that is, when the operation request is the first operation request corresponding to the first request type, the operation strategy includes the first operation strategy. That is, when the request type is a write request type and the first operation request is a write request, the write request corresponding to the write request type can be processed first. For example, the request processing layer of the container operating system sends the first operation request to the main control layer according to the first operation strategy. The first operation request carries the first operation data. The main control layer performs a write operation on the container according to the first operation data.

[0156] That is, such as Figure 5 As shown, when the operation request is a write request of type write request, this embodiment of the application directly transmits the write request through the request processing layer to the main control layer for processing, completes the write operation on the first operation data carried by the write request, and then returns the message of completion of the write operation to the request processing layer through the main control layer.

[0157] When the request processing layer determines that the operation request is a read request of type read request, such as an operation request for a non-list read request type or an operation request for a list read request type, the processing can be as follows: the operation layer of the container operating system determines the load of the operation layer according to the second operation strategy; the operation layer performs operation processing on the container according to the load of the operation layer.

[0158] Specifically, the operation layer includes a request processing layer and a control layer; such as Figure 5As shown, the request processing layer determines the load of the container operating system's request processing layer and the main control layer according to the second operation strategy. If the load of the request processing layer is greater than or equal to the first preset threshold, and the load of the main control layer is greater than or equal to the second preset threshold, it indicates that the remaining runnable resources of the request processing layer and the main control layer are limited. Based on this, it determines whether the first operation request corresponding to the first request type has been processed, so as to ensure that the container operating system prioritizes processing the first operation request and completes the creation of the container. If the first operation request has been processed, the operation layer performs a read operation on the container according to the second operation request.

[0159] Here, if the load of the request processing layer is greater than or equal to the first preset threshold, and the load of the main control layer is greater than or equal to the second preset threshold, this embodiment of the application may also not process the read request, so as to ensure that the container operating system can prioritize processing the first operation request.

[0160] If the load of the request processing layer is less than the first preset threshold and the load of the main control layer is less than the second preset threshold, this embodiment of the application can, based on the second operation request, such as a read request for a list, perform a read operation on the container in a preset storage space according to the second operation request. The preset storage space is the storage space used by the request processing layer for container operations. If the second operation data corresponding to the second operation request is read in the preset storage space, the second operation data is sent to the request object that initiated the second operation request through the request processing layer.

[0161] In this embodiment of the application, data can be searched in a preset storage space according to the second operation request, which can improve the efficiency of searching for the second operation data.

[0162] If the second operation data corresponding to the second operation request is not found in the preset storage space, the read request for the list is passed through the request processing layer of the container operating system to the master control layer in the container operating system. The master control layer performs a read operation on the container in its corresponding database according to the read request for the list to read the second candidate operation data corresponding to the read request for the list. The master control layer sends the second candidate operation data to the request processing layer. The request processing layer sends the second candidate operation data to the request object that initiated the second operation request. The request processing layer stores the second candidate operation data in the preset storage space.

[0163] In this embodiment of the application, in order to facilitate the retrieval of operation data for the next read request for the list and improve the efficiency of container creation, the second candidate operation data will be stored in a preset storage space.

[0164] Based on the above, it is clear that with the development of cloud computing, cloud-native resource operation models have become mainstream. However, cloud-native container operating systems handle massive amounts of request data. Therefore, this application proposes a tiered approach to operation requests to strengthen the stability of the container operating system's central control manager. This application avoids the method of scaling up the central control manager found in existing related technologies. This application improves the overall stability of the cloud-native container operating system and is conducive to reducing resource costs, especially in large-scale cloud-native systems, significantly reducing costs.

[0165] This application further illustrates that, compared to existing related technologies for expanding the central control manager, the advantages of this application's embodiments are as follows:

[0166] (1) This application embodiment starts from the request type of the operation request and sorts out the operation strategies corresponding to different request types of operation requests, avoiding the use of the central control manager expansion method in the existing related technologies, and improving the overall stability of the container operating system. (2) This application embodiment is conducive to reducing resource costs. This application embodiment can limit the expansion of the central control manager replicas, thereby reducing the loss of large-scale central control equipment in cloud-native computing. (3) This application embodiment can effectively control sudden risks. For example, when there is an abnormal number of abnormal sudden read requests for the main control layer, and the number of abnormal sudden requests is much greater than the number that the central control manager replicas can serve, thus leading to high risks in the container operating system, this application embodiment can process operation requests in a hierarchical manner and can read operation data in a preset storage space, thereby controlling risks. (4) This application embodiment is conducive to saving operational manpower. When the central control manager expansion method is used, it will increase operational manpower, while this application embodiment can save this part of operational manpower. (5) The embodiments of this application are beneficial to improving the efficiency of container operation, which can effectively increase the resource scale of Kubernetes cluster. The embodiments of this application process operation requests in a hierarchical manner, which can ensure that operation requests that are strongly related to container operation, such as write operation, are processed, greatly improving the quality of container operation and effectively increasing the resource scale of Kubernetes cluster.

[0167] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0168] This embodiment of the application can obtain operation requests for containers and their request feature information through the request acquisition layer in the container operating system; identify the request type of the operation request based on the request feature information through the request processing layer in the container operating system; determine the processing sequence of the operation request based on the request type through the request processing layer; obtain the operation strategy for the container based on the processing sequence through the request processing layer; and perform operation processing on the container based on the operation strategy through the operation layer of the container operating system. Because this embodiment of the application can identify the request type of the operation request through the request acquisition layer in the container operating system and determine the processing sequence of the operation request based on the request type, it can obtain the operation strategy for the container according to the processing sequence, thus improving the processing efficiency of the operation request. This allows for rapid operation processing of the container through the operation layer of the container operating system, thereby improving the efficiency of container operation.

[0169] To better implement the above methods, this application also provides a container operation device, which can be integrated into a computer device, such as a server or terminal. The terminal may include a tablet computer, a laptop computer, and / or a personal computer.

[0170] For example, such as Figure 6 As shown, the container operation device may include a first acquisition unit 301, an identification unit 302, a determination unit 303, a second acquisition unit 304, and a processing unit 305, as follows:

[0171] (1) First acquisition unit 301;

[0172] The first acquisition unit 301 can be used to acquire operation requests for the container through the request acquisition layer in the container operating system, and to acquire request feature information of the operation requests.

[0173] (2) Identification unit 302;

[0174] The identification unit 302 can be used to identify the request type of the operation request based on the request feature information through the request processing layer in the container operating system.

[0175] (3) Determine unit 303;

[0176] The determining unit 303 can be used to determine the processing sequence of operation requests based on the request type through the request processing layer.

[0177] In some embodiments, the determining unit 303 may be used to perform hierarchical processing of operation requests according to the request type by the request processing layer to obtain the request processing level of the operation request; and determine the processing sequence of the operation request according to the request processing level.

[0178] (4) Second acquisition unit 304;

[0179] The second acquisition unit 304 can be used to acquire the operation strategy of the operation request for the container according to the processing sequence through the request processing layer.

[0180] (5) Processing unit 305;

[0181] The processing unit 305 can be used to perform operation processing on the container through the operation layer of the container operating system according to the operation policy.

[0182] In some embodiments, the operation layer includes a main control layer and a request processing layer; when the operation request is a first operation request corresponding to a first request type, the operation strategy includes a first operation strategy; the processing unit 305 can be specifically used to send the first operation request to the main control layer through the request processing layer of the container operating system according to the first operation strategy, the first operation request carrying first operation data; and the main control layer performs a write operation on the container according to the first operation data.

[0183] In some application embodiments, when the operation request is a second operation request corresponding to a second request type, the operation strategy includes a second operation strategy; the processing unit 305 can be specifically used to determine the load of the operation layer through the operation layer of the container operating system according to the second operation strategy; and to perform operation processing on the container through the operation layer according to the load of the operation layer.

[0184] In some application embodiments, the processing unit 305 can be specifically used to determine whether the first operation request corresponding to the first request type has been processed if the load of the operation layer is greater than or equal to a preset threshold; if the first operation request has been processed, the operation layer performs a read operation on the container according to the second operation request.

[0185] In some embodiments, the operation layer includes a request processing layer; the processing unit 305 can specifically be used to, if the load is less than a preset threshold, perform a read operation on the container in a preset storage space according to the second operation request through the request processing layer, where the preset storage space is the storage space used by the request processing layer for container operations. Correspondingly, after the container is read from the preset storage space according to the second operation request through the request processing layer, the processing unit 305 can also be used to, if the second operation data corresponding to the second operation request is read from the preset storage space, send the second operation data to the request object that initiated the second operation request through the request processing layer.

[0186] In some embodiments, the operation layer includes a request processing layer and a master control layer. After the request processing layer performs a read operation on the container in the preset storage space according to the second operation request, the processing unit 305 can also be used to send the second operation request to the master control layer if the second operation data corresponding to the second operation request is not read in the preset storage space. The master control layer then performs a read operation on the container in the database corresponding to the master control layer according to the second operation request to read the second candidate operation data corresponding to the second operation request.

[0187] In some embodiments, the processing unit 305 can also be used to send the second candidate operation data to the request processing layer through the main control layer; send the second candidate operation data to the request object that initiated the second operation request through the request processing layer; and store the second candidate operation data in a preset storage space through the request processing layer.

[0188] In some embodiments, the operation layer includes a master control layer and a request processing layer; when the operation request is a third operation request corresponding to a third request type, the operation strategy includes a third operation strategy and a second operation strategy; before the operation layer of the container operating system performs operation processing on the container according to the operation strategy, the processing unit 305 can also be used to send the third operation request to the master control layer according to the third operation strategy through the request processing layer; according to the third operation request, the master control layer performs data query in the database corresponding to the master control layer to obtain the third operation data corresponding to the third operation request; the request processing layer updates the third operation data in the preset storage space; correspondingly, the processing unit 305 can also be used to perform read operations on the container in the updated preset storage space according to the second operation strategy through the operation layer.

[0189] As can be seen from the above, the first acquisition unit 301 of this application embodiment can be used to acquire operation requests for containers through the request acquisition layer in the container operating system, and to acquire request feature information of the operation requests; the identification unit 302 can be used to identify the request type of the operation request based on the request feature information through the request processing layer in the container operating system; the determination unit 303 can be used to determine the processing sequence of the operation request based on the request type through the request processing layer; the second acquisition unit 304 can be used to acquire the operation strategy of the operation request for containers based on the processing sequence through the request processing layer; the processing unit 305 can be used to perform operation processing on the containers based on the operation strategy through the operation layer of the container operating system. Since this application embodiment can identify the request type of the operation request through the request acquisition layer in the container operating system, and determine the processing sequence of the operation request based on the request type, the operation strategy of the operation request for containers can be acquired according to the processing sequence, which can improve the processing efficiency of the operation request, and thus enable the container to be quickly processed through the operation layer of the container operating system, thereby improving the operation efficiency of the containers.

[0190] This application also provides a computer device, such as... Figure 7 As shown, it illustrates a structural schematic diagram of the computer device involved in the embodiments of this application, specifically:

[0191] The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 7 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0192] The processor 401 is the control center of the computer device, connecting various parts of the computer device through various interfaces and lines. It performs various functions and processes data by running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and computer programs, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.

[0193] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, computer programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0194] The computer device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0195] The computer device may also include an input unit 404, which can be used to receive input digital or character information communication, and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0196] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the computer device loads the executable files corresponding to the processes of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 runs the computer programs stored in the memory 402 to realize various functions, as follows:

[0197] The process involves: acquiring operation requests for containers through the request retrieval layer in the container operating system, along with the request characteristic information of the operation requests; identifying the request type of the operation requests based on the request characteristic information through the request processing layer in the container operating system; determining the processing sequence of the operation requests based on the request type through the request processing layer; acquiring the operation policy for the operation requests for containers based on the processing sequence through the request processing layer; and performing operation processing on the containers based on the operation policy through the operation layer in the container operating system.

[0198] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0199] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0200] Therefore, embodiments of this application provide a computer-readable storage medium storing a computer program that can be loaded by a processor to execute any of the container operation methods provided in embodiments of this application.

[0201] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0202] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0203] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the container operation methods provided in the embodiments of this application, the beneficial effects that any of the container operation methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0204] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the above embodiments.

[0205] The above provides a detailed description of a container operation method, apparatus, computer device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for operating a container, characterized in that, include: The system obtains operation requests for containers through the request retrieval layer in the container operating system, as well as the request characteristic information of the operation requests. The request processing layer in the container operating system identifies the request type of the operation request based on the request feature information. The request processing layer determines the processing sequence of the operation request based on the request type. The request processing layer obtains the operation strategy for the container based on the processing sequence. The container is operated and processed by the operation layer of the container operating system according to the operation strategy; Wherein, when the operation request is a second operation request corresponding to a second request type, the operation strategy includes a second operation strategy; the operation processing of the container by the operation layer of the container operating system according to the operation strategy includes: The container operating system's operation layer determines the load of the operation layer according to the second operation strategy. The load of the operation layer refers to the amount of resources currently being used by the operation layer. If the load of the operation layer is greater than or equal to a preset threshold, the operation layer determines whether the first operation request corresponding to the first request type has been processed. If the first operation request is completed, then the operation layer performs a read operation on the container according to the second operation request. The first operation request includes a write request, and the second operation request includes a read request for a list and a read request for a non-list. Furthermore, the operation layer includes a main control layer and the request processing layer; when the operation request is a third operation request corresponding to a third request type, the operation strategy includes a third operation strategy and a second operation strategy; before the operation layer of the container operating system performs operation processing on the container according to the operation strategy, it includes: The request processing layer sends the third operation request to the main control layer according to the third operation strategy, wherein the third operation request includes an update request; Based on the third operation request, the main control layer performs a data query in the database corresponding to the main control layer to obtain the third operation data corresponding to the third operation request. The request processing layer updates the third operation data in a preset storage space, which is the storage space used by the request processing layer for container operations. The operation of the container operating system through the operation layer according to the operation strategy includes: performing a read operation on the container in the updated preset storage space through the operation layer according to the second operation strategy.

2. The container operation method according to claim 1, characterized in that, The operation layer includes a main control layer and the request processing layer; when the operation request is a first operation request corresponding to a first request type, the operation strategy includes a first operation strategy; the operation layer of the container operating system performs operation processing on the container according to the operation strategy, including: The container operating system's request processing layer sends the first operation request to the main control layer according to the first operation strategy, and the first operation request carries the first operation data. The main control layer performs a write operation on the container based on the first operation data.

3. The container operation method according to claim 1, characterized in that, The operation layer includes the request processing layer; after the operation layer of the container operating system determines the load of the operation layer according to the second operation strategy, it includes: If the load is less than a preset threshold, the request processing layer performs a read operation on the container in a preset storage space according to the second operation request. The preset storage space is the storage space used by the request processing layer for container operations. After the request processing layer performs a read operation on the container in the preset storage space according to the second operation request, the method further includes: if the second operation data corresponding to the second operation request is read in the preset storage space, then the request processing layer sends the second operation data to the request object that initiated the second operation request.

4. The container operation method according to claim 3, characterized in that, The operation layer includes the request processing layer and the main control layer; after the request processing layer performs a read operation on the container in the preset storage space according to the second operation request, the method further includes: If the second operation data corresponding to the second operation request is not read in the preset storage space, the second operation request is sent to the main control layer through the request processing layer. According to the second operation request, the main control layer performs a read operation on the container in the database corresponding to the main control layer to read the second candidate operation data corresponding to the second operation request.

5. The container operation method according to claim 4, characterized in that, The step of reading the container from the database corresponding to the main control layer according to the second operation request, and then reading the second candidate operation data corresponding to the second operation request, includes: The main control layer sends the second candidate operation data to the request processing layer. The request processing layer sends the second candidate operation data to the request object that initiated the second operation request. The request processing layer stores the second candidate operation data into the preset storage space.

6. The container operation method according to claim 1, characterized in that, The step of determining the processing sequence of the operation request based on the request type through the request processing layer includes: The request processing layer performs hierarchical processing on the operation request according to the request type to obtain the request processing level of the operation request; The processing sequence of the operation request is determined based on the request processing level.

7. A container operating device, characterized in that, include: The first acquisition unit is used to acquire operation requests for the container through the request acquisition layer in the container operating system, and to acquire request feature information of the operation requests. The identification unit is used to identify the request type of the operation request based on the request feature information through the request processing layer in the container operating system; The determining unit is used to determine the processing sequence of the operation request based on the request type through the request processing layer; The second acquisition unit is used to acquire the operation strategy of the operation request for the container through the request processing layer according to the processing sequence; The processing unit is configured to perform operation processing on the container through the operation layer of the container operating system according to the operation strategy; Wherein, when the operation request is a second operation request corresponding to a second request type, the operation strategy includes a second operation strategy; the operation processing of the container by the operation layer of the container operating system according to the operation strategy includes: The container operating system's operation layer determines the load of the operation layer according to the second operation strategy. The load of the operation layer refers to the amount of resources currently being used by the operation layer. If the load of the operation layer is greater than or equal to a preset threshold, the operation layer determines whether the first operation request corresponding to the first request type has been processed. If the first operation request is completed, then the operation layer performs a read operation on the container according to the second operation request. The first operation request includes a write request, and the second operation request includes a read request for a list and a read request for a non-list. Furthermore, the operation layer includes a main control layer and the request processing layer; when the operation request is a third operation request corresponding to a third request type, the operation strategy includes a third operation strategy and a second operation strategy; before the operation layer of the container operating system performs operation processing on the container according to the operation strategy, the processing unit is further configured to: The request processing layer sends the third operation request to the main control layer according to the third operation strategy, wherein the third operation request includes an update request; Based on the third operation request, the main control layer performs a data query in the database corresponding to the main control layer to obtain the third operation data corresponding to the third operation request. The request processing layer updates the third operation data in a preset storage space, which is the storage space used by the request processing layer for container operations. The operation of the container operating system through the operation layer according to the operation strategy includes: performing a read operation on the container in the updated preset storage space through the operation layer according to the second operation strategy.

8. A computer device, characterized in that, It includes a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to perform the container operation method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the container operation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method, device and equipment for realizing container cluster management

    CN107704310A

  • Request information grading processing method and device

    CN111638946A

  • Distributed system and management method thereof

    CN113014408A

  • Container operation method and system, storage medium and server

    CN113590266A