Multi-agent service encapsulation communication and resource optimization method for edge cloud

Through multi-agent service packaging communication and resource optimization methods for edge cloud, the challenges of industrial equipment collaboration and information sharing in edge clouds are solved, efficient deployment of intelligent services and resource optimization of systems are achieved, and the intelligence level and resource utilization of the system are improved, and production costs are reduced.

CN120050721AActive Publication Date: 2025-05-27WUXI HUIHANG INTELLIGENT TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510234654.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-05-27
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

In edge cloud architecture, collaboration and information sharing between industrial equipment face challenges. Traditional network communication methods are difficult to adapt to the dynamic environment of 5G edge networks and the real-time requirements of multi-agent systems. Existing resource scheduling algorithms are prone to fall into local optimal solutions and it is difficult to balance the optimality of solution speed and solution.

Method used

A multi-agent service packaging communication and resource optimization method for edge cloud is proposed. Through efficient service packaging strategies, flexible deployment methods, 5G edge communication technology and improved SSEA resource optimization algorithm, an efficient edge cloud system for multi-agents is built.

Benefits of technology

It realizes the rapid deployment and efficient operation and maintenance of intelligent services, improves resource utilization and the intelligence level of the system, ensures the security of equipment data and the normal communication between the agent and the external system, significantly reduces production costs, and improves production efficiency and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050721A_ABST
    Figure CN120050721A_ABST
Patent Text Reader

Abstract

The invention discloses an edge cloud-oriented multi-agent service encapsulation communication and resource optimization method, which designs an edge cloud resource optimization algorithm of agent service, solves the problem of agent service resource optimization by using an SSEA algorithm, and realizes resource optimization of the agent service through cloud edge agent service encapsulation and containerization deployment technologies. The intelligent agent can be effectively operated independent of the host system, and rapid deployment and efficient operation and maintenance of the intelligent agent service are achieved. The containerization technology not only improves the resource utilization rate, but also ensures portability in different environments, reduces dependency and conflicts among systems, and improves the deployment efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the fields of edge computing and intelligent optimization, and particularly relates to a multi-agent service encapsulation communication and resource optimization method for an edge cloud. Background Art

[0002] With the rapid development of Industry 4.0 and intelligent manufacturing, the digital and intelligent levels of industrial equipment have been continuously improved. To meet diverse industrial production requirements, more and more agents are deployed in the edge cloud architecture to achieve flexible scheduling and efficient collaboration of devices. In traditional industrial systems, industrial equipment usually operates through local control systems. Limited by the proprietariness of controllers and the diversity of communication protocols, the collaboration and information sharing between devices face challenges.

[0003] The introduction of edge computing provides new possibilities for the intelligent upgrade of industrial systems. By deploying agents on the edge side, devices can be managed modularly and deployed flexibly in a containerized manner. However, the complexity of the industrial environment and the diversity of devices make it difficult for a single encapsulation and deployment method to meet the changing production requirements. Therefore, how to achieve efficient agent encapsulation and flexible deployment solutions has become a key issue. In terms of device access and communication, the high speed, low latency, and large connection advantages of 5G networks are significant, but how to ensure device access under the 5G edge network and efficient communication between agents remains a technical problem to be solved urgently. Traditional network communication methods are difficult to adapt to the dynamic environment of the 5G edge network and the real-time requirements of multi-agent systems.

[0004] In addition, the computing resources of the edge cloud are limited. How to achieve efficient resource allocation and optimized scheduling of edge nodes on the premise of meeting the service quality requirements of agents is also a key factor affecting system performance. Existing resource scheduling algorithms tend to fall into local optimal solutions when facing the dynamic environment of multi-agents and multi-tasks, and it is difficult to balance the solution speed and the optimality of the solution. Therefore, designing an efficient resource optimization algorithm to balance resource utilization and scheduling efficiency has become a research hotspot in academia and industry.

[0005] Based on the above technical background, the present invention proposes a multi-agent service encapsulation communication and resource optimization method for an edge cloud, aiming to construct an efficient edge cloud system for multi-agents through an efficient service encapsulation strategy, a flexible deployment method, an agent communication technology for the 5G edge, and an improved SSEA resource optimization algorithm, so as to improve the intelligent level and resource utilization rate of the system. Summary of the Invention

[0006] In view of the deficiencies of the above-mentioned existing technologies, an efficient multi-agent service encapsulation communication and resource optimization method is proposed to improve the access efficiency of industrial devices, communication stability, and resource utilization rate of the edge cloud.

[0007] To achieve the above object, the technical solution adopted by the present invention is as follows:

[0008] The present invention is a multi-agent service encapsulation communication and resource optimization method for an edge cloud, including the following steps:

[0009] S1 Encapsulate the cloud-edge agent service:

[0010] Step 101: Select a container base image to provide an independent running container environment for the agent service;

[0011] Step 102: Add a working directory to the container, and the working directory includes an agent running program, a dependent environment installation package, and a configuration file;

[0012] Step 103: Write an agent running script to define the interaction logic between the agent and the device and the external system;

[0013] Step 104: Grant the script execution permission, expose the agent communication port, and specify the script as the container entry;

[0014] S2 Deploy the cloud-edge agent service:

[0015] Step 201: Build a mapping relationship between production resources and the cloud-edge agent, and design a general agent model;

[0016] Step 202: Select a general agent model according to the user's process requirements;

[0017] Step 203: Generate a customized agent based on the differential parameters, optimize the cloud-edge node resource allocation through an improved SSEA algorithm, and publish the deployment plan to the edge cluster after determining it;

[0018] S3 Implement communication between the cloud-edge agent services based on the 5G edge communication network:

[0019] Step 301: Deploy an embedded computer on the industrial device side to achieve secure data access through DMZ mapping ports;

[0020] Step 302: Adopt a network structure with explicit services and implicit services allocated at intervals. The explicit services expose fixed ports, and the implicit services initiate connection requests actively.

[0021] Further, the specific content of step 203 is as follows:

[0022] Step 2031: Initialize the parameters of the SSEA algorithm and randomly generate an initial snake population;

[0023] Step 2032: Evaluate the fitness of the snake population and update the individual optimal and global optimal;

[0024] Step 2033: Dynamically switch the evolutionary mode according to the population maturity, including the following mode during the exploration and development period and the combat and mating modes during the adult period;

[0025] Step 2034: Map the agent deployment strategy through discrete coding and output the optimal resource allocation scheme that meets the constraint conditions.

[0026] Furthermore, the specific content of S3 is as follows:

[0027] Add an embedded computer on the device side for data packet forwarding. Use this embedded computer to replace the industrial device for data packet forwarding and expose it with the address of this embedded computer on the external network;

[0028] Design the network structure between the industrial device and the 5G CPE so that the industrial device can access the edge computing platform in a secure manner;

[0029] According to the communication method, the agent services are divided into two roles. One is the explicit service, which provides services by exposing stable ports externally. The other is the implicit service, which requests services by accessing external fixed IPs. The roles are allocated using the interval method according to different requirements of network functions. The Host container and the external devices of the agent system are used as explicit services, and the device agent, workpiece agent, and order agent are used as implicit services to initiate connection requests actively.

[0030] Furthermore, for the explicit service, give the exact IP address to the computing scheduling system, and it does not change with the movement of the container. Configure the Service to expose the services inside the container in the form of a fixed IP and port through the ExternalIP to provide services externally stably;

[0031] For the implicit service, its access to the external IP address is achieved by introducing the external IP address in the Endpoint corresponding to the Service; by configuring the EndpointAddress of the Endpoint, associate the external IP address with the service, so that the container can access the external service.

[0032] Even further, the specific calculation process of Step 203 is as follows:

[0033] S41 Initialize the parameters of the SSEA algorithm, including the inertia coefficient c i , the individual following coefficient c p and the global following coefficient inertia coefficient cg ;

[0034] S42 Randomly generate an initial snake population P 0 = {A 0 , A 1 , …, A m ,}, A 0 , A 1 , …, A m all represent individuals;

[0035] S43 Evaluate each individual and sort them according to the fitness value;

[0036] S44 Calculate the population maturity and update the individual optimal X i,pbest and the global optimal X food ;

[0037] S45 Select appropriate actions according to the population maturity and population status to pairwise update the positions and velocities of individuals, including pairing, following, competing, mating, laying eggs;

[0038] S46 Evaluate the updated individuals to determine whether the constraint conditions are met; if the constraint conditions are met, perform the same operation as S45 on the next pair of individuals in sequence until the population is fully traversed; if the constraint conditions are not met, process the individual positions into legal positions;

[0039] S47 Determine whether the condition for stopping iteration is met; if so, output the current optimal solution, otherwise return to step S46.

[0040] Furthermore, the model of the SSEA algorithm is:

[0041] Simplify the representation of the agent task processing time as:

[0042]

[0043] where Data i refers to the amount of data required for the edge node to complete the task, P CPU refers to the clock frequency of the server CPU, and S j refers to the computing resources owned by the edge node;

[0044] Take minimizing the task completion time of the cluster as the goal of resource optimization in the cluster, and establish the time model as follows:

[0045]

[0046] where the first constraint condition stipulates that each task runs on one and only one edge node, and the second constraint stipulates that the running resources do not exceed the maximum load of the edge node, aj where \(i\) refers to the element of the task allocation strategy vector, \(j\) refers to the agent task, \(S\) refers to the edge computing system composed of multiple edge nodes through a network, and \(C\) CPU refers to the CPU usage rate, and \(C\) mem refers to the memory usage rate.

[0047] Furthermore, the population maturity (\(Q\)) is defined as:

[0048]

[0049] where \(t\) is the current iteration number, \(T\) is the total iteration number, and \(c\) 1 is a constant in the maturity calculation formula.

[0050] Furthermore, the specific content of \(S43\) is as follows:

[0051] During the population exploration and development period, that is, when the maturity is \(< 0.2\),

[0052] When \(Q < Threshold\), the snake swarm searches for food, which is divided into two cases:

[0053] ① The difference between the optimal fitness and the most adaptable fitness \(> 0.2\times\) the optimal fitness,

[0054] The snake swarm randomly selects a position to search for food through the following formula to improve the population richness;

[0055] \(X\) i,m (t + 1)=X rand,m (t)\(\pm c\) 2 \(\times A\) m \(\times(x\) min ) + rand\times(X max -X min ))

[0056] \(X\) i,f (t + 1)=X rand,f (t)\(\pm c\) 2 \(\times A\) f \(\times(x\) min +rand\times(X max -X min ));

[0057] where \(X\) i,m and \(X\) i,f are the positions of the \(i\)-th male individual and the \(i\)-th female individual respectively, \(X\) rand,m and \(X\), rand,f are the positions of a random male individual and a random female individual respectively, rand is a random number between 0 and 1, and \(A\) m and \(A\) f represent the abilities of male and female to search for food respectively;

[0058] A m and A f is calculated as follows:

[0059]

[0060] where f rand,m , f i,m , f rand,f , f i,f are the fitnesses of X rand,m , X i,m , X rand,f , X i,f respectively;

[0061] ② Optimal fitness - worst fitness difference ≤ optimal fitness × 0.2,

[0062] The velocity direction and position change are as follows:

[0063] v i (t + 1) = c i × v i (t) + c p × r 1 (t)[X i,pbest (t) - x i (t)] + c g × r 2 (t) × [X food (t) - X i (t)]

[0064] X i (t + 1) = X i (t) + v i (t + 1);

[0065] where X i,pbest (t) is the historical optimal position of the i-th individual, and X food (t) represents the global optimal snake position. c i , c p , c g are the inertia coefficient, individual following coefficient, and global following coefficient respectively;

[0066] Adult stage, i.e., maturity ≥ 0.2,

[0067] When Q ≥ Threshold, the snake swarm is in combat mode or mating mode, as follows:

[0068] ① Combat mode:

[0069] X i,m (t + 1) = X i,m (t) + c 3 × F m×rand×(X best,f -X i,m (t))

[0070] X i,f (t + 1) = X i,f (t) + c 3 ×F f ×rand×(X best,M -X i,f (t));

[0071] where X best,f and X best,M are the optimal individuals in the female and male populations respectively, and F f and F m represent the fighting abilities of males and females respectively:

[0072]

[0073] where f best,f and f best,m are the fitnesses of the optimal individuals of females and males respectively, and f i is the fitness of the current individual;

[0074] ② Mating pattern:

[0075]

[0076] If eggs are laid, the worst male and female individuals X worst,f and X worst,m ;

[0077]

[0078] Advantages of the present invention:

[0079] 1. Through the cloud-edge agent service encapsulation and containerized deployment technology, the present invention can effectively run the agent independently of the host system, realizing the rapid deployment and efficient operation and maintenance of the agent service. The containerized technology not only improves the resource utilization rate but also ensures the portability in different environments, reduces the dependencies and conflicts between systems, and improves the deployment efficiency.

[0080] 2. By dynamically selecting a suitable general model of the agent and adjusting the configuration according to the actual production requirements, the platform can achieve flexible configuration and automatic adaptation of the agent service. This flexibility ensures that in different production environments, the agent service can meet the requirements of different devices and processes, and improves the scalability of the system through adaptive adjustment.

[0081] 3. By adding an embedded computer on the device side and combining with DMZ (Demilitarized Zone) technology to map ports, the present invention enables the external network to securely access the internal network devices, ensuring both the security of device data and the normal communication between the agents and external systems, and effectively avoiding potential network security risks.

[0082] 4. The present invention can flexibly schedule between different agent services according to the differentiated parameters and production requirements provided by users to meet different process requirements. This highly customized agent deployment method ensures that the system can quickly respond and make appropriate adjustments when facing complex and changeable production tasks to meet the needs of different production tasks.

[0083] 5. By improving resource utilization, optimizing task scheduling, and agent service deployment, the system can significantly reduce production costs. In addition, the capabilities of real-time monitoring, data analysis, and fault prediction make the system have higher production efficiency and stability, thus enhancing the competitiveness of enterprises in the field of intelligent manufacturing. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 It is a flowchart for constructing the device agent container image;

[0085] Figure 2 It is a schematic diagram of the working mechanism of the cloud-edge agent service system;

[0086] Figure 3 It is an industrial device access edge topology structure diagram under different access methods;

[0087] Figure 4 It is an agent service role assignment diagram;

[0088] Figure 5 It is a schematic diagram of the deployment code of the agent at the edge node;

[0089] Figure 6 It is a flowchart of the SSEA algorithm. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0090] For the convenience of understanding by those skilled in the art, the present invention will be further described below in conjunction with embodiments and the accompanying drawings. The content mentioned in the embodiments does not limit the present invention.

[0091] The present invention provides a standardized encapsulation method for the general model of an agent in the form of a service to ensure that the agent can be deployed and run consistently and efficiently in different environments. Encapsulating the general model of the agent includes processes such as defining a container, network configuration, parameter configuration, and access configuration. When defining a container, a configuration file is used to specify the operating system environment and related development packages on which the agent depends, and the agent release program and related files are written into the container. If the agent needs to communicate with other containers or external systems, appropriate network settings need to be configured at runtime. On the one hand, it is necessary to ensure communication between agents and expose the required container ports; on the other hand, the connection between the agent and the external system needs to be considered. For example, if the IP information of a device object is unknown, relevant interfaces need to be reserved. In addition, it is also necessary to set the access entry and runtime parameter list of the agent program.

[0092] As Figure 1 , it shows the service image building process of an agent container. First, select a suitable base image. It contains a minimized operating system and the basic software, libraries, and settings required to run the container. Common container base images include Alpine Linux, Ubuntu, CentOS, etc. Since most industrial dynamic link library files are developed based on the Windows platform and cannot run on the Linux system, and Kubernetes currently only supports Windows Server nodes to join the cluster, the present invention selects the microsoft / windowsservercore:1803 image. The container base image provides the basis for the running environment of the container, enabling the container to run independently of the host system.

[0093] Next, add the required working directories, including the running program directory and the installation packages of the required dependent environments. For example, the agent program built using JADE in the analysis layer runs based on the Java Runtime Environment (JRE), and the machine tool device adaptation program written in C# in the adaptation layer is based on the.NET framework. Therefore, the corresponding versions of the JRE and.NET environments need to be added, and the required environment variables need to be configured.

[0094] Secondly, write the agent running script to arrange the runtime logic of the agent. For example, a MA includes an adaptation layer and an analysis layer. First, run the Socket server connecting the two, and on this basis, run the adaptation layer. When running the adaptation layer, read the external connection parameters it needs (such as the IP of industrial equipment, etc.) from the environment variables to establish the mapping between the agent and the hardware. Secondly, still in the way of environment variables, obtain the IP of the main container of the agent and inject it into the reserved position in the remaining agent analysis layer.

[0095] Finally, assign the executable file of the agent running script, expose the ports required for the agent's external communication, and specify the script file in step 3 as the container's entry point. According to the above steps, a general agent model for integrated real-time resource scheduling and control can be constructed. The reserved parameter interfaces and communication interfaces can all be specified during the subsequent deployment of the agent, facilitating flexible changes and reconstructions.

[0096] To meet the flexibility and scalability of cloud-edge agent services, the present invention designs an agent service publishing platform, uses Kubernetes technology to host the deployment of agent service computing tasks in the edge server cluster, and establishes a Harbor image repository management system. The schematic diagram of the working mechanism of the cloud-edge agent service system is as Figure 2 shown.

[0097] Firstly, it is the general agent model design stage. The general agent model is equivalent to the concept of "class" in object-oriented software programming, having the common behaviors of the same type of production equipment but shielding individual differences such as IP and ports. The actually running agents are all its implementation instances. According to the corresponding behaviors and state parameters of various types of machine tools, the mapping relationship between production resources and agents is constructed, and the corresponding general agent model is designed. By reserving the parameter interfaces in the general agent model, the agent design for multiple homogeneous production equipment can be covered.

[0098] Secondly, it is the agent model customization stage. According to the process requirements submitted by the user, the platform selects a suitable general agent model from the image repository. In terms of device connection itself, the corresponding device IP and protocol need to be configured; in terms of agent operation, parameters adapted to the entire multi-agent system (mainly including Host IP, Agent ID, etc.) will be configured based on user requirements; at the application level of the multi-agent system, the user can set the corresponding decision-making goals and corresponding algorithms (such as whether to use contract net or reinforcement learning for scheduling, etc.).

[0099] Finally, it is the agent model operation stage. After the user submits the agent model customization information, the system injects the differentiated parameters provided by the user into the corresponding attribute positions in the code to form a device agent that meets the actual production requirements. Then, before creating a new agent service, the system optimizes the resources of the edge nodes according to the current cluster situation, and solves the optimal solution for the selection of agent deployment locations through a resource optimization algorithm. Use the client-go SDK to publish several agent services according to the optimal deployment plan, and thus the agent services start to operate. In addition, the system periodically collects the running status of the agent software service, regularly detects the health status of the edge nodes, Kubernetes feedbacks the agents that need to be redeployed to the system, resubmits the agent deployment configuration, and produces new agents.

[0100] Refer toFigures 1 to 6 As shown in the figure, the implementation process of this application specifically includes:

[0101] (1) Encapsulation of cloud-edge intelligent agent service

[0102] Step 101), select a suitable base image, which provides the basis for the running environment of the container, enabling the container to run independently of the host system.

[0103] Step 102), add the required working directories, including the running program directory and the installation packages of the required dependency environments.

[0104] Step 103), write the intelligent agent running script and arrange the logic when the intelligent agent runs.

[0105] Step 104), grant the intelligent agent running script as an executable file, expose the ports required for the intelligent agent's external communication, and specify the script file in Step 103 as the entry of the container.

[0106] (2) Deployment of cloud-edge intelligent agent service

[0107] Step 201), according to the corresponding behaviors and status parameters of various types of machine tools, construct the mapping relationship between production resources and intelligent agents, and design the corresponding general intelligent agent model.

[0108] Step 202), according to the process requirements submitted by the user, the platform selects a suitable general intelligent agent model from the image repository.

[0109] Step 203), according to the differentiated parameters provided by the user, form device intelligent agents that meet the actual production requirements. Before creating a new intelligent agent service, optimize the edge node resources according to the current cluster situation, solve the optimal solution for the selection of intelligent agent deployment locations through resource optimization algorithms, and publish them using the client-go SDK. Thus, the intelligent agent service starts to operate.

[0110] (3) Intelligent agent communication method based on 5G edge communication network

[0111] Step 301), design an edge cloud 5G access method for industrial equipment. Select the integrated access method, add an embedded computer on the device side, and at the same time map ports through the DMZ (Demilitarized Zone) to achieve data access while ensuring the security of the internal network devices.

[0112] Step 302), design the network structure between industrial equipment and 5G CPE, and use the interval method to allocate roles. Take the Host container and the external devices of the intelligent agent system as explicit services, and expose the ports available for connection and access; take device intelligent agents, workpiece intelligent agents, order intelligent agents, etc. as implicit services, and actively initiate connection requests.

[0113] (4) Edge Cloud Resource Optimization Method for Agent Services

[0114] The present invention proposes an improved snake optimization algorithm (Snake Swarm Evolutionary Algorithm, SSEA), which absorbs the advantages of the particle swarm algorithm and adds the combat mode and mating mode in the snake optimization algorithm in the later stage of iteration. While maintaining the convergence speed, it can effectively avoid falling into local optima and take into account both the depth and breadth of the exploration space.

[0115] Step 401), initialize the parameters of the SSEA algorithm, including the inertia coefficient c i , the individual following coefficient c p and the global following coefficient inertia coefficient c g etc.

[0116] Step 402), according to the initialized parameters and the solution space, randomly generate the initial snake swarm P 0 ={A 0 ,A 1 ,…,A m ,}, A 0 , A 1 ,…,A m all represent individuals.

[0117] Step 403), evaluate each individual and sort them according to the fitness value.

[0118] Step 404), calculate the population maturity, and update the individual best X i,pbest and the global best X food .

[0119] Step 405), according to the population maturity and population state, select appropriate actions to update the position and speed of individuals in pairs, including pairing, following, competing, mating, laying eggs.

[0120] Step 406), evaluate the updated individuals and judge whether the constraint conditions are met. If the constraint conditions are met, perform the same operation as in step 305 on the next pair of individuals in sequence until the population is traversed completely; if the constraint conditions are not met, process the individual positions into legal positions.

[0121] Step 407), judge whether the condition for stopping iteration is met. If it is met, output the current optimal solution; otherwise, return to step 406.

[0122] The edge-side agent refers to an agent deployed near a manufacturing workshop or production site. Utilizing the capabilities of edge computing, it can process and analyze data from devices in real time, make task decisions, and issue control instructions. The edge-side agent is mainly responsible for functions such as device status monitoring, data transmission, task scheduling, fault diagnosis, and real-time control. It realizes the autonomous cooperation, scheduling, and optimization of devices through real-time communication with the devices, thereby improving production efficiency and device availability.

[0123] The mapping means abstracting each production resource or a group of similar production units into an agent and endowing the agent with corresponding physical attributes, behaviors, and intelligence. In a 5G cloud-edge environment, when mapping agents, in addition to considering their action behaviors, it is also necessary to consider the attributes and states of the production factors themselves. Among them, a part of the data is obtained through the data acquisition and monitoring control system technology to obtain real-time production operation data; another part needs to read the corresponding configuration files to understand the differences between different devices, and generate corresponding agents according to the configuration information. In the present invention, an agent is considered to be an aggregate of its attribute states and action behaviors.

[0124] The edge cloud resource optimization process refers to allocating agent tasks to an edge node cluster to improve the working efficiency of the edge nodes. Among them, an edge node refers to an edge server with computing capabilities, and different edge nodes have different types and quantities of computing resources. An edge node cluster is an edge computing system composed of multiple edge nodes through a network.

[0125] The particle swarm optimization algorithm (PSO) is a nature-inspired intelligent framework that simulates the behavior of a group of birds searching for food sources. It has a fast convergence speed but weak fine-tuning ability. Integrating a local search operator into the search process of PSO is an effective method for fine-tuning the PSO scheduling results. The snake optimization algorithm (SO) is a metaheuristic algorithm. Only when the temperature is low and there is food, will snakes fight, mate, and lay eggs; otherwise, they will only search for food or eat the existing food. This method has good optimization results, but has a large randomness in the early stage, lacks guidance for the initial direction, and cannot make full use of the operation time.

[0126] Since the operator network with 5G as the core and the industrial Internet of Things are still in the stage of network collaboration with clear division of labor, it is necessary to establish a deeper compatibility between the network air interface and industrial protocols, and through designing a reasonable and effective 5G edge computing network topology, collect and use industrial data more efficiently.

[0127] First, design an edge cloud 5G access method for industrial devices. Such as Figure 3As shown in the figure, the separated access method means that the analysis layer and the adaptation layer of the intelligent agent are separated. In this way, the edge server sends control instructions and obtains all data by accessing an industrial control computer under the 5G CPE. The acquisition and control signals are processed and forwarded by the industrial control computer, and then routed to the industrial equipment. Taking the FANUC milling machine as an example, a computer responsible for terminal access is arranged under the CPE for forwarding, and the connection is initiated by this industrial control computer. The industrial control computer and the milling machine are both inside the private network, belonging to the transmission form of internal access to external in the NAT, and can be directly addressed through the internal IP. Since the communication between the industrial control computer and the server is initiated by the internal network device, the CPE with NAT function will automatically assign a temporary public IP address to the internal device for accessing the external network, without the need for manual setting.

[0128] The integrated access method means that the analysis layer and the adaptation layer of the intelligent agent are closely integrated on the edge cloud side. The edge server directly connects to the corresponding industrial device by accessing the fixed port of the 5G CPE. In this way, the edge server can directly operate on the ports exposed by the device and directly control the industrial device through the adaptation program. Still taking the FANUC milling machine accessing the edge server through the 5G network as an example, if it is a direct access, the connection is initiated by the edge server, belonging to the transmission form of external access to internal in the NAT. Therefore, port mapping (Port Forwarding) needs to be done on the 5G CPE for the milling machine, that is, the NAT device converts the private IP address and port information of the internal device into its own public IP address and a new port number. Map the 8193 port of the FANUC milling machine to the 8193 port of the 5G CPE, then the server can connect to the milling machine by accessing the 8193 port of the CPE, that is, it is externally exposed as 192.168.1.107:8193. When the data sent by the external network passes through the 5G CPE, the CPE will look up the conversion table recording the mapping relationship between the internal port and the external port and forward the data to the corresponding internal device. As Figure 3 shown in (b) of the figure.

[0129] Obviously, in order to achieve the integration of real-time resource scheduling and control of the edge controller, the agents on the edge side need to couple the adaptation layer and the analysis layer at the edge. Therefore, the present invention selects an integrated access method. However, in actual operation, due to the limitations of industrial equipment system protection, industrial controllers of some manufacturers (such as Siemens) cannot be discovered by external network devices and do not support this connection method. Therefore, in order to actually access device data, an embedded computer needs to be added on the device side for data packet forwarding, that is, this embedded computer is used to forward data packets instead of the machine tool device, and the address of this embedded computer is exposed in the external network. Therefore, this embedded computer needs to be added to the DMZ (Demilitarized Zone) to protect the security of the internal network devices while exposing the corresponding mapped ports.

[0130] Secondly, the network structure between industrial equipment and 5G CPE is designed so that industrial equipment can access the edge computing platform in a secure manner. As Figure 4 shown, according to the container roles, the agent service network is configured. Agent services are divided into two roles according to the communication method. One is the explicit service, which provides services by exposing stable ports externally, and the other is the implicit service, which requests services by accessing external fixed IPs. The Host container needs to connect to all agents, and the adaptation layers of the remaining agent containers all need to adapt to the device controller interface. Therefore, according to the different requirements of network functions, the present invention uses the interval method to allocate roles, taking the Host container and the external devices of the agent system as explicit services and exposing ports for connection and access, while the device agent, workpiece agent, order agent, etc. are used as implicit services to initiate connection requests actively.

[0131] In the Kubernetes container orchestration framework, the IP addresses of Pods are usually dynamically managed by the Kubernetes cluster and may change when they are rescheduled or restarted. For explicit services, an exact IP address needs to be given to the computing scheduling system and should not change with the movement of the container. Therefore, not only the ports need to be exposed in the container, but also a Service needs to be configured to expose the internal services of the container in the form of a fixed IP and port through ExternalIP to provide services externally stably. In particular, since the AMS of JADE needs to specify the local IP, that is, the IP of the Pod, the local IP value (the IP of the Pod) needs to be obtained through a bash script after the Pod runs and injected into the Host container as an environment variable to ensure the normal startup of the AMS; while other services access the AMS through the exposed ExternalIP and the corresponding ports for connection.

[0132] For implicit services, their access to external IP addresses is achieved by introducing external IP addresses in the Endpoint corresponding to the Service. By configuring the EndpointAddress of the Endpoint, the external IP address is associated with the service, enabling the container to access external services. If it accesses an explicit service, such as a Host container, the ExternalIP of the explicit service needs to be added as the EndpointAddress to the Endpoint. In this way, necessary communication links are established between agent services, and necessary interactions with the external environment (such as the order placement platform and industrial equipment) are ensured. Through the interval deployment of the above two service configurations, the network connection between different functional agent modules is ensured, enabling agent services to communicate with each other in the edge layer and maintain necessary communication with the external environment.

[0133] The reasonable allocation of edge resources directly affects the operation performance of the multi-agent manufacturing system. The present invention further proposes an optimization method for agent service resources. First, an edge cloud resource optimization model for agent services is established. By analyzing the deficiencies of the particle swarm algorithm and the snake optimization algorithm, an improved agent service resource optimization algorithm is designed to effectively control the resource allocation between agents and improve the global performance of the multi-agent manufacturing system.

[0134] First, an edge cloud resource optimization model for agent services is established. Heterogeneity is a significant feature in the edge computing scenario. There are differences in the computing power resources and occupancy status required by different agents, and there are also significant differences in the execution time of different agent services on different nodes. Therefore, to solve the problem of multi-agent service resource optimization, it is necessary to fully consider the heterogeneity of edge nodes and agent services. In this scenario, the multi-agent service resource optimization scenario is abstracted into the following components: agent services, multi-agent systems, edge node resources, edge nodes, and edge node clusters.

[0135] The present invention assumes that the amount of computation for each agent task is determined by the agent itself; since the local image repository is located in the regional computer room and the manufacturing equipment is connected to the network via 5G with a maximum latency of less than 10 ms, which is much less than the task processing time, the time to download the image compared to the task processing time can be ignored. Therefore, in the case where the server has no other load, the agent task processing time of the present invention can be simplified as:

[0136]

[0137] where Data i refers to the amount of data required for the edge node to complete the task, and P CPURefers to the clock frequency of the server CPU, S j Refers to the computing resources owned by the edge node.

[0138] Taking the task completion time of minimizing the cluster as the goal of resource optimization in the cluster, the time model proposed in this invention is established as follows:

[0139]

[0140] Among them, the first constraint stipulates that each task runs on one and only one edge node, and the second constraint stipulates that the running resources do not exceed the maximum load of the edge node, a j Refers to the element of the task allocation strategy vector, j refers to the agent task, S refers to the edge computing system composed of multiple edge nodes through the network, C CPU Refers to the CPU utilization rate, C mem Refers to the memory utilization rate.

[0141] Secondly, an improved snake optimization algorithm (Snake Swarm Evolutionary Algorithm, SSEA) is proposed. This algorithm absorbs the advantages of the particle swarm algorithm and adds the combat mode and mating mode in the snake optimization algorithm in the later stage of iteration. While maintaining the convergence speed, it can effectively avoid falling into local optimum and take into account the depth and breadth of the exploration space.

[0142] In the SSEA algorithm, the population maturity (Q) can be defined as:

[0143]

[0144] Among them, t is the current iteration number, T is the total iteration number, c 1 Is the constant of the maturity calculation formula.

[0145] The specific algorithm process is as follows:

[0146] (1) Exploration and development period (maturity < 0.2)

[0147] When Q < Threshold, the snake swarm looks for food, in two cases

[0148] ① Optimal fitness - worst fitness difference > optimal fitness × 0.2

[0149] At this time, it is in the initial stage of evolution, the fitness is highly polarized, the differentiation direction of the snake swarm is uncertain, and the snake swarm randomly selects a position through the following formula to look for food to improve the population richness;

[0150] X i,m (t + 1) = X rand,m (t) ± c 2 × A m × (Xmin +rand×(X max -X min ))

[0151] X i,f (t + 1)=X rand,f (t)±c 2 ×A f ×(X min +rand×(X max -X min ))

[0152] where X i,m and X i,f are the positions of the i-th male individual and the i-th female individual respectively, X rand,m and, X rand,f are the positions of a random male individual and a random female individual respectively, rand is a random number between 0 and 1, A m and A f represent the abilities of the male and female to search for food respectively. A m and A f can be calculated as follows:

[0153]

[0154] where f rand,m , f i,m , f rand,f , f i,f are the fitnesses of X rand,m , X i,m , X rand,f , X i,f respectively.

[0155] ②Optimal fitness - worst fitness difference ≤ optimal fitness × 0.2

[0156] At this time, the snake group moves towards a similar target, indicating that it has entered the evolutionary stable period. Then all snakes follow the optimal individual to improve the overall fitness. The speed direction and position change are as follows:

[0157] v i (t + 1)=c i ×v i (t)+c p ×r 1 (t)[X i,pbest (t)-x i (t)]+c g ×r 2 (t)×[X food (t)-X i (t)]

[0158] Xi (t + 1)= X i (t)+ v i (t + 1)

[0159] Where, X i,pbest (t) is the historical best position of the i-th individual, and X food (t) represents the global best snake position. c i 、c p 、c g are the inertia coefficient, the individual following coefficient, and the global following coefficient respectively.

[0160] (2) Adult stage (maturity ≥ 0.2)

[0161] When Q ≥ Threshold, the snake will be in combat mode or mating mode, as shown in the following formula:

[0162] ① Combat mode:

[0163] X i,m (t + 1)= X i,m (t)+ c 3 × F m × rand × (X best,f - X i,m (t))

[0164] X i,f (t + 1)= X i,f (t)+ c 3 × F f × rand × (X best,m - X i,f (t))

[0165] Where, X best,f and X best,m are the best individuals in the female and male populations respectively, and F f and F m represent the combat capabilities of males and females respectively:

[0166]

[0167] Where, f best,f and f best,m are the fitnesses of the best female and male individuals respectively, and f i is the fitness of the current individual.

[0168] ② Mating mode:

[0169]

[0170] If eggs are laid, replace the worst male and female individuals X worst,f and Xworst,m .

[0171] X worst,m = X min + rand × (X max - X min )

[0172] X worst,f = X min + rand × (X max - X min )

[0173] Regard the resource optimization strategy vector A of each agent as the position X of a snake i , which is an m-dimensional vector, as Figure 3 shown. From the corresponding mapping relationship, the optimization of the present invention belongs to a discrete problem. Therefore, the position of the snake is processed as follows: (1) When calculating the position vector, the edge node numbers are discretely encoded bit by bit; (2) When updating the position, the final result is rounded to ensure that the edge node numbers are integers; (3) When updating the position, if the snake crawls out of the boundary, the position component of this dimension is equal to the corresponding boundary value.

[0174] Through the above processing, the SSEA can be used to solve the resource optimization problem of agent services, as Figure 4 shown, and the specific steps are as follows:

[0175] (1) Initialize the parameters of the SSEA algorithm, including the inertia coefficient c i , the individual following coefficient c p and the global following coefficient inertia coefficient c g , etc.

[0176] (2) According to the initialized parameters and the solution space, randomly generate the initial snake population P 0 = {A 0 , A 1 , …, A m ,}

[0177] (3) Evaluate each individual and sort them according to the fitness value.

[0178] (4) Calculate the population maturity and update the individual optimal X i,pbest and the global optimal X food .

[0179] (5) According to the population maturity and the population state, select appropriate actions to pair and update the position and speed of the individual, including pairing, following, competing, mating, and laying eggs.

[0180] (6) Evaluate the updated individuals to determine whether the constraint conditions are met. If the constraint conditions are met, perform the same operation as in step (5) on the next pair of individuals in sequence until the population is fully traversed; if the constraint conditions are not met, process the individual positions into legal positions.

[0181] (7) Determine whether the condition for stopping iteration is met. If it is met, output the current optimal solution; otherwise, return to step (6).

[0182] The specific application scenarios of the present invention are numerous. The above description is only the preferred implementation mode of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements can be made, and these improvements should also be regarded as the protection scope of the present invention.

Claims

1. A multi-agent service encapsulation communication and resource optimization method for edge cloud, characterized in that: The following steps are involved: S1 encapsulates cloud-edge intelligent agent services: Step 101: Select a container base image to provide an independently running container environment for the agent service; Step 102: Add a working directory in the container, wherein the working directory includes the agent running program, the dependent environment installation package and the configuration file; Step 103: Write the agent operation script to define the interaction logic between the agent and the device and the external system; Step 104: grant the script execution permission, expose the agent communication port, and specify the script as the container entry; S2 deploys the cloud-edge agent service: Step 201: construct a mapping relationship between production resources and the cloud-edge agent, and design a general agent model; Step 202: Selecting a general agent model according to user process requirements; Step 203: Generate a customized agent based on differentiated parameters, optimize cloud edge node resource allocation through the improved SSEA algorithm, and publish it to the edge cluster after determining the deployment plan; S3 realizes the communication between the cloud-edge intelligent services based on the 5G edge communication network: Step 301: deploy an embedded computer on the industrial equipment side and implement secure data access through a DMZ mapping port; Step 302: adopt a network structure in which explicit services and implicit services are allocated at intervals, explicit services expose fixed ports, and implicit services actively initiate connection requests.

2. The method according to claim 1, characterized in that The step 203 is specifically as follows: Step 2031: Initialize SSEA algorithm parameters and randomly generate an initial snake group; Step 2032: Evaluate the fitness of the snake group and update the individual optimum and the global optimum; Step 2033: Dynamically switch the evolutionary mode according to the maturity of the population, including exploring the following mode in the developmental stage and the fighting and mating mode in the adult stage; Step 2034: Output the optimal resource allocation plan that meets the constraints through discrete coding mapping intelligent agent deployment strategy.

3. The method according to claim 1, characterized in that The S3 is specifically: Add an embedded computer on the device side to forward data packets. This embedded computer replaces the industrial device to forward data packets and is exposed on the external network with the address of the embedded computer. Design the network structure between industrial equipment and 5G CPE so that industrial equipment can access the edge computing platform in a secure manner; According to the described intelligent agent service, it is divided into two roles according to the communication method. One is explicit service, which provides services by exposing a stable port to the outside, and the other is implicit service, which requests services by accessing an external fixed IP. According to the different needs of network functions, the interval method is used to allocate roles, and the Host container and the external devices of the intelligent agent system are used as explicit services, and the device agent, workpiece agent and order agent are used as implicit services to actively initiate connection requests.

4. The method according to claim 2, characterized in that: For explicit services, give the computing scheduling system an exact IP address that does not change with the movement of the container. Configure the Service and expose the service inside the container in the form of a fixed IP and port through ExternalIP to provide stable services to the outside world. For implicit services, their access to external IP addresses is achieved by introducing external IP addresses in the Endpoint corresponding to the Service; by configuring the EndpointAddress of the Endpoint, the external IP address is associated with the service, enabling the container to access the external service.

5. The method according to claim 1, characterized in that The specific calculation process of step 203 is as follows: S41 initializes the parameters of the SSEA algorithm, including the inertia coefficient c i , individual following coefficient c p and the global following coefficient of inertia c g ; S42 randomly generates an initial snake group P0={A0,A1,…,A m ,},A0,A1,…,A m All represent individuals; S43 evaluates each individual and sorts them according to the fitness value; S44 calculates population maturity and updates individual optimal X i,pbest and the global optimal X food ; S45 selects appropriate actions to pair and update the position and velocity of the individuals according to the population maturity and population state, including pairing, following, competing, mating, and laying eggs; S46 evaluates the updated individuals to determine whether the constraint conditions are met; if the constraint conditions are met, the same operation as S45 is performed on the next pair of individuals in sequence until the population is fully traversed; if the constraint conditions are not met, the individual position is processed into a legal position; S47 determines whether the condition for stopping iteration is met; if it is met, the current optimal solution is output, otherwise, it returns to step S46.

6. The method according to claim 1, characterized in that The model of the SSEA algorithm is as follows: The intelligent agent task processing time is simplified and represented as: Among them, Data i Refers to the amount of data required by edge nodes to complete tasks, P CPU Refers to the clock frequency of the server CPU, S j Refers to the computing resources owned by edge nodes; Taking the minimization of the task completion time of the cluster as the goal of resource optimization in the cluster, the time model is established as follows: The first constraint stipulates that each task runs on and only on one edge node, and the second constraint stipulates that the running resources do not exceed the maximum load of the edge node. j refers to the element of the task allocation strategy vector, j refers to the agent task, S refers to the edge computing system composed of multiple edge nodes through the network, and C CPU Refers to CPU usage, C mem Refers to memory usage.

7. The method according to claim 6, characterized in that The population maturity (Q) is defined as: where t is the current iteration number, T is the total iteration number, and c1 is a constant in the maturity calculation formula.

8. The method according to claim 6, characterized in that The specific content of S43 is as follows: During the population exploration and development period, that is, the maturity < 0.2, When Q < Threshold, the snake population searches for food, divided into two cases: ① The difference between the optimal fitness and the most fitness > 0.2 × the optimal fitness, The snake population randomly selects a position to search for food through the following formula to improve the population richness; X i,m (t+1)=X rand,m (t)±c2×A m ×(X min +rand×(X max -X min )) X i,f (t+1)=X rand,f (t)±c2×A f ×(X min +rand×(X max -X min )); Among them, X i,m and X i,f are the positions of the ith male and ith female, respectively, and X rand,m and,X rand,f are the positions of a random male and a random female, respectively, and rand is a random number A between 0 and 1. m and A f Represents the ability of males and females to find food, respectively; A m and A f The calculation is as follows: Among them, f rand,m 、f i,m 、f rand,f 、f i,f They are X rand,m , X i,m , X rand,f , X i,f Adaptability; ② The difference between the optimal fitness and the most fitness ≤ 0.2 × the optimal fitness, The velocity direction and position change are as follows: v i (t+1)=c i ×v i (t)+c p ×r1(t)[X i,pbest (t)-x i (t)]+c g ×r2(t)×[X food (t)-X i (t)] X i (t+1)=X i (t)+v i (t+1); Among them, X i,pbest (t) The best historical position of the i-th individual, X food (t) represents the global optimal snake position. c i 、c p 、c g They are inertia coefficient, individual following coefficient and global following coefficient respectively; Adult period, that is, the maturity ≥ 0.2, When Q ≥ Threshold, the snake population is in combat mode or mating mode, as follows: ① Combat mode: X i,m (t+1)=X i,m (t)+c3×F m ×rand×(X best,f -X i,m (t)) X i,f (t+1)=X i,f (t)+c3×F f ×rand×(X best,m -X i,f (t)); Among them, X best,f and X best,m are the best individuals in the female and male populations, respectively, and F f and F m Represents the fighting ability of males and females respectively: Among them, f best,f and f best,m are the optimal individual fitness of females and males, respectively, and f i is the fitness of the current individual; ② Mating mode: If laying eggs, replace the worst male and female individuals X with the following formula worst,f and X worst,m ;

Citation Information

Patent Citations

  • Heterogeneous container cloud platform and edge manufacturing service subscription implementation method thereof

    CN115426370A

  • Antenna sparse array design method based on binary snake optimization algorithm

    CN116882351A

  • Large-scale agent simulation confrontation system in container cloud environment

    CN118132198A

  • Dynamic economic dispatching method for power system

    CN118690913A

  • Artificial intelligence empowered industrial internet of things

    US20220171371A1