CN-121996408-A - Container processing method and device and electronic equipment
Abstract
The embodiment of the application provides a container processing method and device and electronic equipment. The method comprises the steps of determining target load indexes of target containers deployed on a physical machine, determining the number of the copy containers to be newly added according to task information of tasks to be processed, available resource information of the physical machine and resource upper limit parameters of the target containers, and deploying the copy containers of the target containers with the number of the copy containers on the physical machine according to micro-service boundaries of the target containers and the target load indexes. The target load index is the load index of the target container with the resource bottleneck. The method is used for achieving the technical effects of improving the accuracy of the data processing process and leading-in processing efficiency.
Inventors
- GAO WEI
- ZHAO HAIYING
- HUO HAITAO
- LI HONGYU
- QI WEI
- HUANG HE
- WANG HUA
- LIU YUCUI
Assignees
- 昆仑数智科技有限责任公司
- 中国石油天然气集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20251226
Claims (10)
- 1. A method of processing a container, comprising: Determining a target load index of a target container deployed on a physical machine, wherein the target load index is a load index of a target container with a resource bottleneck; Determining the number of the copy containers to be newly added according to task information of the task to be processed, available resource information of the physical machine and resource upper limit parameters of the target container; and deploying the copy containers of the target container in the number of copy containers on the physical machine according to the micro service boundary of the target container and the target load index.
- 2. The method of claim 1, wherein the available resource information of the physical machine comprises a remaining allocatable amount of resources of the physical machine on the target load indicator, wherein the resource upper limit parameter of the target container comprises a maximum amount of resources the target container is allowed to use on the target load indicator, and wherein the task information comprises a current amount of data to be processed.
- 3. The method according to claim 2, wherein determining the number of duplicate containers to be added according to the task information of the task to be processed, the available resource information of the physical machine, and the resource upper limit parameter of the target container includes: calculating a first number of replica containers based on the maximum amount of resources and the remaining amount of allocable resources; Calculating a second number of secondary containers based on the current amount of data to be processed, the data processing capacity of the target container, and an expected resource overhead of processing unit data on the target load index; and determining the number of copy containers according to the first number of copy containers and the second number of copy containers.
- 4. A method according to any of claims 1-3, wherein said deploying, on the physical machine, the replica containers of the target container for the number of replica containers according to the target container's micro-service boundaries and the target load metrics, comprises: determining a service splitting boundary of the target container according to the micro service boundary of the target container; configuring resource parameters for each copy container according to the target load index and the resource upper limit parameters of the target container; instantiating the number of replica containers based on the configured resource parameters and the service split boundary.
- 5. A method according to any one of claims 1-3, wherein the method further comprises: when the target container meets a preset shrinkage triggering condition, determining the number of duplicate containers to be destroyed of the target container; determining the target duplicate containers of the duplicate container number to be destroyed from duplicate containers corresponding to the target container; Destroying the target copy container.
- 6. The method of claim 5, wherein the preset shrinkage trigger condition comprises at least one of: the average value of any load index of the target container and the corresponding copy container is smaller than a preset low load threshold; The number of containers with the value of any load index smaller than a preset low load threshold value in the target container and the corresponding copy container is larger than a preset number threshold value; The current moment is in a preset non-service peak period; And receiving a destroying operation input by a user aiming at the target container.
- 7. The method of claim 5, wherein said destroying the target replica container comprises: removing the target copy container from the load balancer, and starting timing to acquire accumulated duration; Waiting for the target replica container to complete a currently processing request; and when the target copy container finishes processing the currently processed request or the accumulated time length exceeds a preset time length, releasing the computing resources, the memory resources and the network resources occupied by the target copy container.
- 8. The method of any of claims 3, 6, or 7, wherein the determining the number of duplicate containers from the first number of duplicate containers and the second number of duplicate containers comprises: predicting a load trend of the target container over a future time period based on historical load data of the target container; Determining the number of spare containers according to the load trend and the resource upper limit parameter of the target container; and determining the number of the copy containers according to the number of the first copy containers, the number of the second copy containers and the number of the standby containers.
- 9. A container handling apparatus, comprising: the first determining module comprises a target load index of a target container deployed on a physical machine, wherein the target load index is a load index of a target container with a resource bottleneck; The second determining module is used for determining the number of the duplicate containers to be added according to the task information of the task to be processed, the available resource information of the physical machine and the resource upper limit parameter of the target container; And the deployment module comprises a copy container of the target container, of which the number is equal to that of the copy containers, deployed on the physical machine according to the micro-service boundary of the target container and the target load index.
- 10. An electronic device is characterized by comprising a memory and a processor; The memory stores computer-executable instructions; The processor executing computer-executable instructions stored in the memory, causing the processor to perform the method of any one of claims 1-8.
Description
Container processing method and device and electronic equipment Technical Field The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a container, and an electronic device. Background New generation enterprise resource planning (ENTERPRISE RESOURCE PLANNING, ERP) products increasingly employ a server architecture, splitting a single physical or virtual application node in the past into multiple smaller containerized nodes, resulting in a limited quota of resources (multi-core central processing units (Central Processing Unit, CPU), memory, etc.) for each node, making it difficult for a single containerized node to carry large-scale data import tasks as in the traditional way. In the conventional solution, in order to avoid the system risk caused by the overlarge data volume of single import, an operator usually needs to adopt a manual preprocessing strategy, namely, manually dividing a huge source data file into a plurality of subfiles with smaller capacity, and then completing the division in batches through multiple independent import operations. Therefore, the existing batch data importing and processing method for the containerized ERP system has the technical problems of low accuracy of a data processing process and low importing and processing efficiency. Disclosure of Invention The embodiment of the application provides a container processing method, a container processing device and electronic equipment, which are used for achieving the technical effects of improving the accuracy of a data processing process and leading-in processing efficiency. In a first aspect, an embodiment of the present application provides a container processing method, including: Determining a target load index of a target container deployed on a physical machine, wherein the target load index is a load index of a target container with a resource bottleneck; Determining the number of the copy containers to be newly added according to task information of the task to be processed, available resource information of the physical machine and resource upper limit parameters of the target container; and deploying the copy containers of the target container in the number of copy containers on the physical machine according to the micro service boundary of the target container and the target load index. In one possible implementation, the available resource information of the physical machine includes the remaining allocable resource amount of the physical machine on the target load index, the resource upper limit parameter of the target container includes the maximum resource amount allowed to be used by the target container on the target load index, and the task information includes the current data to be processed. In one possible implementation manner, the determining the number of the copy containers to be added according to the task information of the task to be processed, the available resource information of the physical machine, and the resource upper limit parameter of the target container includes: calculating a first number of replica containers based on the maximum amount of resources and the remaining amount of allocable resources; Calculating a second number of secondary containers based on the current amount of data to be processed, the data processing capacity of the target container, and an expected resource overhead of processing unit data on the target load index; and determining the number of copy containers according to the first number of copy containers and the second number of copy containers. In one possible implementation manner, the deploying, on the physical machine, the replica containers of the target container by the replica container number according to the micro service boundary of the target container and the target load index includes: determining a service splitting boundary of the target container according to the micro service boundary of the target container; configuring resource parameters for each copy container according to the target load index and the resource upper limit parameters of the target container; instantiating the number of replica containers based on the configured resource parameters and the service split boundary. In one possible embodiment, the method further comprises: when the target container meets a preset shrinkage triggering condition, determining the number of duplicate containers to be destroyed of the target container; determining the target duplicate containers of the duplicate container number to be destroyed from duplicate containers corresponding to the target container; Destroying the target copy container. In one possible embodiment, the preset volume reduction triggering condition includes at least one of the following: the average value of any load index of the target container and the corresponding copy container is smaller than a preset low load threshold; The number of contain