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

By optimizing resource allocation through containerization technology and an improved SSEA algorithm, the communication and resource scheduling problems of intelligent agent systems in 5G edge networks are solved, enabling efficient deployment and secure communication of intelligent agent services, improving system flexibility and resource utilization, and reducing production costs.

CN120050721BActive Publication Date: 2025-10-21WUXI HUIHANG INTELLIGENT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In industrial systems, 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, resulting in difficulties in inter-device collaboration and information sharing. Resource scheduling algorithms also struggle to achieve a balance between solution speed and optimality, thus affecting system performance.

Method used

We adopt a multi-agent service encapsulation communication and resource optimization method for edge cloud, run agent services independently through containerization technology, optimize resource allocation by combining an improved SSEA algorithm, design a network structure with explicit and implicit service interval allocation, use embedded computers to achieve secure data access, and use Kubernetes technology to manage the deployment and scheduling of agent services.

Benefits of technology

It enables rapid deployment and efficient operation and maintenance of intelligent agent services, improves resource utilization and system flexibility, ensures secure communication between devices and flexible response to production tasks, reduces production costs, and improves system stability and production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050721B_ABST
    Figure CN120050721B_ABST
Patent Text Reader

Abstract

The application discloses a multi-agent service encapsulation communication and resource optimization method for an edge cloud, designs an edge cloud resource optimization algorithm for an agent service, solves an agent service resource optimization problem by using an SSEA algorithm, and can effectively run the agent independently of a host system by means of cloud-edge agent service encapsulation and containerization deployment technology, so that the fast deployment and efficient operation and maintenance of the agent service are realized. The containerization technology not only improves the resource utilization rate, but also guarantees the portability in different environments, reduces the dependence and conflict between 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 field of edge computing and intelligent optimization, and specifically relates to a multi-agent service encapsulation communication and resource optimization method for edge cloud. Background Art

[0002] With the rapid development of Industry 4.0 and smart manufacturing, the digitalization and intelligence of industrial equipment are constantly improving. To meet the diverse needs of industrial production, more and more intelligent agents are being deployed in edge cloud architectures to achieve flexible device scheduling and efficient collaboration. In traditional industrial systems, industrial equipment typically operates through local control systems. Limited by proprietary controllers and the diversity of communication protocols, collaboration and information sharing between devices face challenges.

[0003] The introduction of edge computing offers new possibilities for the intelligent upgrade of industrial systems. By deploying intelligent agents at the edge, devices can be modularly managed and flexibly deployed in a containerized manner. However, the complexity of the industrial environment and the diversity of devices make it difficult for a single packaging and deployment method to meet the changing production needs. Therefore, how to achieve efficient intelligent agent packaging 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 and efficient communication between intelligent agents in 5G edge networks remains a technical challenge that needs to be solved urgently. 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.

[0004] Furthermore, edge cloud computing resources are limited. Efficiently allocating and optimizing resource scheduling at edge nodes while meeting the quality of service requirements of intelligent agents is a key factor influencing system performance. Existing resource scheduling algorithms often fall into local optimal solutions when faced with dynamic multi-agent, multi-task environments, making it difficult to strike a balance between solution speed and optimality. Therefore, designing an efficient resource optimization algorithm that balances resource utilization and scheduling efficiency has become a research hotspot in both 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 edge cloud, aiming to build an efficient edge cloud system for multi-agents through efficient service encapsulation strategy, flexible deployment method, 5G edge-oriented agent communication technology and improved SSEA resource optimization algorithm, so as to improve the intelligence level and resource utilization of the system. Summary of the Invention

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

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

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

[0009] S1 encapsulates cloud-edge intelligent services:

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

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

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

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

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

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

[0016] Step 202: Selecting a general agent model based on user process requirements;

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

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

[0019] Step 301: Deploy an embedded computer on the industrial equipment side and implement secure data access through a DMZ mapping port;

[0020] Step 302: adopting a network structure in which explicit services and implicit services are distributed at intervals, explicit services expose fixed ports, and implicit services actively initiate connection requests.

[0021] Furthermore, the step 203 is specifically as follows:

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

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

[0024] Step 2033: Dynamically switch the evolutionary mode according to the maturity of the population, including exploring the following mode during the developmental stage and the fighting and mating mode during the adult stage;

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

[0026] Furthermore, the S3 is specifically:

[0027] Add an embedded computer on the device side to forward data packets. This embedded computer replaces the industrial device to forward data packets, and the address of the embedded computer is exposed on the external network.

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

[0029] 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 world; the other is implicit service, which requests services by accessing an external fixed IP. According to the different requirements of network functions, the interval method is used to allocate roles. The host container and the external devices of the intelligent agent system are used as explicit services, and the device intelligent agent, workpiece intelligent agent and order intelligent agent are used as implicit services to actively initiate connection requests.

[0030] Furthermore, for explicit services, an exact IP address is given to the computing scheduling system, and it 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 external services.

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

[0032] Furthermore, the specific calculation process of step 203 is:

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

[0034] S42 randomly generates the initial snake group P0={A0,A1,…,A m ,},A0,A1,…,A m All represent individuals;

[0035] S43 evaluates each individual and ranks them according to their fitness value;

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

[0037] S45 selects appropriate actions to update the position and speed of individuals in pairs according to the population maturity and population status, including pairing, following, competing, mating, and laying eggs;

[0038] S46 evaluates the updated individuals to determine whether the constraints are met; if the constraints are met, the same operation as S45 is performed on the next pair of individuals in sequence until the population is completely traversed; if the constraints are not met, the individual position is processed as a legal position;

[0039] S47 determines whether the condition for stopping iteration is met. If so, the current optimal solution is output; otherwise, the process returns to step S46.

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

[0041] The agent task processing time is simplified as:

[0042]

[0043] 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;

[0044] Minimizing the task completion time of the cluster is taken as the goal of resource optimization in the cluster, and the time model is established as follows:

[0045]

[0046] 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 elements 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 CPURefers to the CPU usage rate, 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 number of iterations, and c1 is a constant in the maturity calculation formula.

[0050] Furthermore, the specific content of S43 is:

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

[0052] When Q < Threshold, the snake population searches for food, in two cases:

[0053] ① The optimal fitness - the difference in fitness > optimal fitness × 0.2,

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

[0055] X i,m (t + 1) = X rand,m (t) ± c2 × A m ×(x min ) + rand × (X max - X min ))

[0056] X i,f (t + 1) = X rand,f (t) ± c2 × A f ×(x min + rand × (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, A m and A f represent the abilities of males and females to search for food respectively;

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

[0059]

[0060] 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;

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

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

[0063] 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)]

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

[0065] Among them, X i,pbest (t) The historical optimal position of the i-th individual, 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] Adulthood, i.e. maturity ≥ 0.2,

[0067] When Q ≥ Threshold, the snake group is in fighting mode or mating mode, as shown below:

[0068] ①Battle Mode:

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

[0070] X i,f (t+1)=X i,f (t)+c3×F f ×rand×(Xbest,M -X i,f (t));

[0071] Among them, X best,f and X best,M are the best individuals in the female and male populations, respectively, F f and F m Represents the fighting ability of males and females respectively:

[0072]

[0073] Among them, f best,f and f best,m are the optimal individual fitness of females and males, f i is the current individual’s fitness;

[0074] ②Mating mode:

[0075]

[0076] If laying eggs, replace the worst male and female individuals X with the following formula worst,f and X worst,m ;

[0077]

[0078] Beneficial effects of the present invention:

[0079] 1. This invention utilizes cloud-edge agent service encapsulation and containerized deployment technology to effectively run agents independently of the host system, enabling rapid deployment and efficient operation and maintenance of agent services. Containerization not only improves resource utilization but also ensures portability across diverse environments, reduces inter-system dependencies and conflicts, and enhances deployment efficiency.

[0080] 2. By dynamically selecting appropriate general agent models and adjusting configurations based on actual production needs, the platform enables flexible configuration and automatic adaptation of agent services. This flexibility ensures that agent services can meet the needs of different equipment and processes in different production environments, and enhances the system's scalability through adaptive adjustments.

[0081] 3. The present invention adds an embedded computer on the device side and combines the DMZ (demilitarized zone) technology to map the port, so that the external network can safely access the internal network device, which not only ensures the security of the device data, but also guarantees the normal communication between the intelligent body and the external system, effectively avoiding possible network security risks.

[0082] 4. This invention enables flexible scheduling between different agent services based on user-provided differentiated parameters and production requirements to meet diverse process requirements. This highly customized agent deployment approach ensures that the system can rapidly respond and make appropriate adjustments to meet the needs of complex and ever-changing production tasks.

[0083] 5. By improving resource utilization, optimizing task scheduling, and deploying intelligent services, the system can significantly reduce production costs. Furthermore, real-time monitoring, data analysis, and fault prediction capabilities enable the system to achieve higher production efficiency and stability, thereby enhancing the company's competitiveness in the field of intelligent manufacturing. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 Build a flow chart for the device agent container image;

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

[0086] Figure 3 Provide edge topology diagrams for industrial equipment access under different access methods;

[0087] Figure 4 Assigning graphs to agent service roles;

[0088] Figure 5 Schematic diagram of the deployment coding of intelligent agents on edge nodes;

[0089] Figure 6 This is the flow chart of the SSEA algorithm. DETAILED DESCRIPTION

[0090] In order to facilitate understanding by those skilled in the art, the present invention will be further described below with reference to embodiments and drawings. The contents mentioned in the embodiments are not intended to limit the present invention.

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

[0092] like Figure 1 , showing the service image building process of an intelligent 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 be run on Linux systems, 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 foundation of the operating environment for the container, allowing the container to run independently of the host system.

[0093] Next, add the required working directories, including the directory for running programs and the required dependency environment installation packages. For example, the intelligent agent program built using JADE in the analysis layer runs on the Java Runtime Environment (JRE), and the machine tool device adapter program written in C# in the adaptation layer runs on the .NET framework. Therefore, you need to add the corresponding versions of JRE and .NET environment and configure the required environment variables.

[0094] Next, write the agent execution script and orchestrate the agent's runtime logic. For example, a MA consists of an adaptation layer and an analysis layer. First, run the socket server connecting the two. Then, run the adaptation layer. When running the adaptation layer, read the required external connection parameters (such as the IP address of the industrial equipment) from the environment variables to establish a mapping between the agent and the hardware. Next, obtain the IP address of the agent's main container, still using the environment variable, and inject it into the reserved location in the analysis layer of the remaining agents.

[0095] Finally, grant the agent the ability to run the script executable, expose the ports required for external communication, and specify the script file from step 3 as the container entry point. Following these steps, a general agent model integrating real-time resource scheduling and control can be constructed. The reserved parameter and communication interfaces can be specified during subsequent agent deployment, facilitating flexible changes and reconfiguration.

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

[0097] The first stage involves designing a general agent model. This general agent model is equivalent to the concept of a "class" in object-oriented software programming. It shares common behaviors across similar production equipment, but shields individual differences such as IP addresses and ports. Actual agents are simply instances of this model. Based on the corresponding behaviors and status parameters of various machine tool types, a mapping relationship between production resources and agents is constructed, and a corresponding general agent model is designed. By reserving parameter interfaces within the general agent model, the design of agents covering multiple homogeneous production equipment can be achieved.

[0098] The next stage is agent model customization. Based on the user's submitted process requirements, the platform selects an appropriate general agent model from the image repository. For device connectivity, the corresponding device IP and protocol must be configured. For agent operation, parameters appropriate for the entire multi-agent system (primarily host IP, agent ID, etc.) are configured based on user requirements. At the multi-agent system application level, users can set appropriate decision-making objectives and algorithms (e.g., whether scheduling uses contract networks or reinforcement learning).

[0099] Finally, the intelligent agent model operation phase begins. After the user submits the customized information for the intelligent agent model, the system injects the differentiated parameters provided by the user into the corresponding attribute locations in the code to form an intelligent device agent that meets actual production needs. Then, before creating a new intelligent agent service, the system optimizes edge node resources based on the current cluster situation and uses a resource optimization algorithm to solve the optimal solution for selecting the intelligent agent deployment location. Use the client-go SDK to publish several intelligent agent services according to the optimal deployment plan, and the intelligent agent service begins to operate. In addition, the system periodically collects the operating status of the intelligent agent software service and regularly checks the health of the edge nodes. Kubernetes then provides feedback to the system on the intelligent agents that need to be redeployed, resubmits the intelligent agent deployment configuration, and produces new intelligent agents.

[0100] Reference Figures 1 to 6 As shown, the implementation process of this application specifically includes:

[0101] (1) Cloud-edge intelligent agent service encapsulation

[0102] Step 101) selects a suitable base image to provide a foundation for the container's operating environment, allowing the container to run independently of the host system.

[0103] Step 102) Add the required working directory, including the running program directory and the required dependent environment installation package.

[0104] Step 103) Write the agent running script and arrange the logic of the agent during operation.

[0105] In step 104), the agent is given the ability to run the script executable file, the port required for the agent to communicate externally is exposed, and the script file in step 103 is designated as the entry point of the container.

[0106] (2) Cloud-edge intelligent agent service deployment

[0107] Step 201) Based on the corresponding behaviors and state parameters of various types of machine tools, a mapping relationship between production resources and intelligent agents is constructed, and a corresponding intelligent agent general model is designed.

[0108] Step 202), based on the process requirements submitted by the user, the platform selects a suitable general model of the intelligent agent from the image warehouse.

[0109] In step 203, a device agent is constructed based on the differentiated parameters provided by the user to meet actual production needs. Before creating a new agent service, edge node resources are optimized based on the current cluster situation. The optimal solution for agent deployment location is determined using a resource optimization algorithm and published using the client-go SDK, thus starting the agent service operation.

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

[0111] Step 301) Design an edge cloud 5G access method for industrial equipment. Use integrated access, add an embedded computer to the device, and map ports in the DMZ (demilitarized zone) to enable data access while ensuring the security of intranet devices.

[0112] In step 302, the network structure between industrial equipment and 5G CPE is designed, using the interval method to assign roles. The host container and external devices in the agent system are treated as explicit services, exposing ports for connection and access. The device agent, workpiece agent, and order agent are treated as implicit services, actively initiating connection requests.

[0113] (4) Edge cloud resource optimization method for intelligent agent services

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

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

[0116] Step 402), based on the initialized parameters and solution space, randomly generate the initial snake group P0 = {A0, A1, ..., A m ,},A0,A1,…,A m All represent individuals.

[0117] Step 403), each individual is evaluated and sorted according to the fitness value.

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

[0119] Step 405) selects appropriate actions to update the position and speed of individuals in pairs according to the maturity and status of the population, including companionship, following, competition, mating, and laying eggs.

[0120] In step 406, the updated individuals are evaluated to determine whether they meet the constraints. If they do, the same process as in step 305 is repeated for the next pair of individuals until the population is completely traversed. If they do not meet the constraints, the individual positions are treated as legal.

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

[0122] Edge-side agents are deployed near manufacturing workshops or production sites. Leveraging edge computing capabilities, they process and analyze data from devices in real time, making task decisions and issuing control instructions. Edge-side agents are primarily responsible for equipment status monitoring, data transmission, task scheduling, fault diagnosis, and real-time control. Through real-time communication with devices, they enable autonomous collaboration, scheduling, and optimization, improving production efficiency and equipment availability.

[0123] The mapping is to abstract each production resource or a group of similar production units into an intelligent agent, and give the intelligent agent corresponding physical attributes, behaviors and intelligence. In the 5G cloud-edge environment, in addition to considering its action behavior, the mapped intelligent agent also needs to consider the attributes and state (State) of the production factors themselves. Among them, part of the data is obtained through data acquisition and monitoring control system technology to obtain real-time production operation data; the other part needs to understand the differences between different devices by reading the corresponding configuration files, and generate the corresponding intelligent agent according to the configuration information. In the present invention, the intelligent agent is considered to be a collection of its attribute state and action behavior.

[0124] The edge cloud resource optimization process involves allocating agent tasks to edge node clusters to improve their efficiency. Edge nodes are edge servers with computing power, and different edge nodes possess varying types and quantities of computing resources. An edge node cluster is an edge computing system composed of multiple edge nodes connected through a network.

[0125] The particle swarm optimization (PSO) algorithm is a nature-inspired intelligent framework that simulates the behavior of a flock of birds searching for food. It converges quickly but has limited fine-tuning capabilities. Integrating a local search operator into the PSO search process is an effective method for fine-tuning PSO scheduling results. The snake optimization algorithm (SO) is a metaheuristic algorithm that predicts that snakes will only fight, mate, and lay eggs when the temperature is low and food is available. Otherwise, they will only search for food or consume existing food. This method has good optimization results, but it is subject to high initial randomness and lacks initial direction guidance, which does not fully utilize the computing time.

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

[0127] The first step is to design an edge cloud 5G access method for industrial equipment. Figure 3 As shown, the split access method separates the analysis and adaptation layers of the intelligent agent. In this approach, the edge server accesses an industrial control computer within the 5G CPE to send control commands and obtain all data. The acquisition and control signals are processed and forwarded by the industrial control computer before being routed to the industrial equipment. For example, a FANUC milling machine is deployed within the CPE to forward terminal access, with the connection initiated by this industrial control computer. The industrial control computer and milling machine are located within the same private network, which is a form of internal access to external networks within NAT. They can be directly addressed using an internal IP address. Since communication between the industrial control computer and the server is initiated by an intranet device, the NAT-enabled CPE automatically assigns a temporary public IP address to the internal device, enabling external network access without manual configuration.

[0128] The integrated access method tightly integrates the intelligent agent's analysis and adaptation layers on the edge cloud side. The edge server directly connects to the corresponding industrial equipment by accessing the fixed port of the 5G CPE. In this way, the edge server can directly operate on the device's exposed ports and control the industrial equipment directly through the adapter program. For example, if a FANUC milling machine connects to the edge server via a 5G network, direct access, initiated by the edge server, is a form of external access to internal transmission within NAT. Therefore, port forwarding is required for the milling machine on the 5G CPE. This involves the NAT device translating the private IP address and port information of the internal device into its own public IP address and a new port number. By mapping port 8193 of the FANUC milling machine to port 8193 of the 5G CPE, the server can connect to the milling machine by accessing port 8193 on the CPE, exposing it as 192.168.1.107:8193. When data sent from the external network passes through the 5G CPE, the CPE will look up the translation table that records the mapping relationship between internal ports and external ports, and forward the data to the corresponding internal device. Figure 3 As shown in (b).

[0129] Obviously, in order to realize the integration of real-time resource scheduling and control of the edge controller, the intelligent body on the edge side needs to couple the adaptation layer and the analysis layer at the edge, so the present invention uses an integrated access method. However, in actual operation, due to the limitations of industrial equipment system protection, the industrial controllers of some manufacturers (such as Siemens) cannot be discovered by external network devices and do not support this method of connection. Therefore, in order to be able to actually access the device data, it is necessary to add an embedded computer on the device side to forward data packets, that is, to use this embedded computer instead of the machine tool equipment to forward data packets, and expose the address of the embedded computer on the external network. Therefore, it is necessary to add the embedded computer to the DMZ (Demilitarized Zone) to protect the security of the intranet equipment while exposing the corresponding mapped port.

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

[0131] In the Kubernetes container orchestration framework, the IP addresses of Pods are usually dynamically managed by the Kubernetes cluster, and they may change when they are rescheduled or restarted. For explicit services, the exact IP address needs to be given to the computing scheduling system, and it does not change with the movement of the container. Therefore, not only do you need to expose the port in the container, but you also need to configure the Service to expose the service inside the container in the form of a fixed IP and port through ExternalIP in order to provide services stably to the outside world. In particular, since JADE's AMS needs to specify the local IP, that is, the IP of the Pod, it is necessary to use a bash script to obtain the local IP value (the IP of the Pod) after the Pod is run, and inject this specified IP into the Host container as an environment variable to ensure the normal startup of AMS; other services access AMS through the exposed ExternalIP and the corresponding port.

[0132] For implicit services, 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, so that the container can access the external service. If it accesses an explicit service, such as a Host container, the ExternalIP of the explicit service needs to be added to the EndpointAddress as the EndpointAddress. In this way, the necessary communication links are established between the intelligent agent services, and the necessary interaction with the external environment (ordering platform and industrial equipment, etc.) is ensured. Through the interval deployment of the above two service configurations, the network connection between the intelligent agent modules with different functions is ensured, so that the intelligent agent services can communicate with each other in the edge layer and maintain necessary communication with the external environment.

[0133] The rational allocation of edge resources directly impacts the operational performance of multi-agent manufacturing systems. This paper further proposes an agent service resource optimization method. First, an edge cloud resource optimization model for agent services is established. By analyzing the shortcomings of the particle swarm optimization algorithm and the snake optimization algorithm, an improved agent service resource optimization algorithm is designed to effectively control resource allocation between agents and improve the overall performance of the multi-agent manufacturing system.

[0134] First, we established an edge cloud resource optimization model for agent services. Heterogeneity is a prominent feature of edge computing scenarios. Different agents require different computing resources and occupancy levels, and different agent services have significantly different execution times 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 computational load of each agent task is determined by the agent itself; since the local image warehouse is located in the regional computer room, and the manufacturing equipment is connected to the network via 5G, the maximum latency is less than 10ms, which is much less than the task processing time. Therefore, the image download time is Compared to task processing time Therefore, when there is no other load on the server, the agent task processing time of the present invention can be simplified as:

[0136]

[0137] 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.

[0138] Minimizing the task completion time of the cluster is taken as the goal of resource optimization in the cluster. Therefore, the time model proposed in this invention is established as follows:

[0139]

[0140] 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 elements 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 CPU usage, C mem Refers to memory usage.

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

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

[0143]

[0144] where t is the current iteration number, T is the total iteration number, and c1 is a constant in the maturity calculation formula.

[0145] The specific algorithm process is as follows:

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

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

[0148] ① The difference between the optimal fitness and the best fitness > 0.2 × the optimal fitness

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

[0150] X i,m (t + 1) = X rand,m (t) ± c2 × A m × (X min + rand × (X max - X min ))<x

[0151] X i,f (t + 1) = X rand,f (t) ± c2 × 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 Af Represents the ability of males and females to find food. m and A f It can be calculated as follows:

[0153]

[0154] 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 's adaptability.

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

[0156] At this point, the snakes are moving towards a similar target, indicating that they have entered a stable evolutionary period. All snakes then follow the optimal individual, improving their overall fitness. The speed, direction, and position changes are as follows:

[0157] 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)]

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

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

[0160] (2) Adulthood (maturity ≥ 0.2)

[0161] When Q ≥ Threshold, the snake will be in fighting mode or mating mode, as follows:

[0162] ①Battle Mode:

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

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

[0165] Among them, X best,f and X best,m are the best individuals in the female and male populations, respectively, F f and F m Represents the fighting ability of males and females respectively:

[0166]

[0167] Among them, f best,f and f best,m are the optimal individual fitness of females and males, f i is the current individual’s fitness.

[0168] ②Mating mode:

[0169]

[0170] If laying eggs, replace the worst male and female individuals X with the following formula worst,f and X worst,m .

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

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

[0173] Consider each agent's resource optimization strategy vector A as the position X of a snake i , which is an m-dimensional vector, such as Figure 3As shown in the figure, the optimization of the present invention belongs to a discrete problem. Therefore, the snake position is processed as follows: (1) when calculating the position vector, the edge node number is discretely encoded bit by bit; (2) when updating the position, the final result is rounded to ensure that the edge node number is an integer; (3) when updating the position, if the snake crawls out of the boundary, the position component of that dimension is equal to the corresponding boundary value.

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

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

[0176] (2) According to the initialization parameters and solution space, the initial snake group P0 = {A0, A1, ..., A m ,}.

[0177] (3) Each individual is evaluated and ranked according to fitness value.

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

[0179] (5) According to the maturity and status of the population, appropriate actions are selected to update the position and speed of individuals in pairs, including companionship, following, competition, mating, and laying eggs.

[0180] (6) Evaluate the updated individuals to determine whether they meet the constraints. If they do, perform the same operation as step (5) on the next pair of individuals in sequence until the population is completely traversed. If they do not meet the constraints, treat the individual positions as legal positions.

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

[0182] The present invention has many specific application paths. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements can be made without departing from the principles of the present invention. These improvements should also be considered as the scope of protection 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 services: Step 101: Select a container base image to provide an independent container environment for the agent service; Step 102: Add a working directory in the container, the working directory including the agent running program, dependent environment installation package and configuration file; Step 103: Write the agent operation script to define the interaction logic between the agent and the device and external system; Step 104: Grant the script execution permission, expose the agent communication port, and designate 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 based on user process requirements; Step 203: Generate a customized agent based on differentiated parameters, optimize cloud-edge node resource allocation using the improved SSEA algorithm, and publish the deployment plan to the edge cluster after determining the deployment plan. 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 during the developmental stage and the fighting and mating mode during the adult stage; Step 2034: Mapping the agent deployment strategy through discrete coding to output the optimal resource allocation solution that meets the constraints; S3 implements 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: adopting a network structure in which explicit services and implicit services are distributed 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 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 the address of the embedded computer is exposed on the external network. 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 world; the other is implicit service, which requests services by accessing an external fixed IP. According to the different requirements of network functions, the interval method is used to allocate roles. The host container and the external devices of the intelligent agent system are used as explicit services, and the device intelligent agent, workpiece intelligent agent and order intelligent agent are used as implicit services to actively initiate connection requests.

3. The method according to claim 2, characterized in that For explicit services, provide the computing scheduling system with an exact IP address that does not change with the movement of the container. Configure the Service and expose the service inside the container through ExternalIP in the form of a fixed IP and port to provide stable external services. 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.

4. The method according to claim 1, wherein 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 inertia coefficient c g ; S42 randomly generates the 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-update the position and speed of 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.

5. The method according to claim 4, 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 elements 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 CPU usage, C mem Refers to memory usage.

6. The method according to claim 5, 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.

7. The method according to claim 5, 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 group searches for food, and there are two cases: ① The difference between the optimal fitness and the most fitness > 0.2 × the optimal fitness, The snake group 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, 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 speed 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 historical optimal position of the i-th individual, 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; Adult period, that is, the maturity ≥ 0.2, When Q ≥ Threshold, the snake group 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, 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, f i is the current individual’s fitness; ② 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