Lightweight deployment method of intelligent agents and elastic allocation of computing power
By building a plug-in container packaging tool and a multi-architecture compilation engine, combined with static analysis and dynamic tailoring technology, the problems of hardware heterogeneity and resource constraints in edge nodes are solved, efficient deployment of edge intelligent agents and elastic allocation of computing power are achieved, resource utilization and model accuracy are improved, data leakage is avoided, and the system adapts to the dynamic working conditions of the well site.
Patent Information
- Application Number
- CN202510912684.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-07-03
AI Technical Summary
The heterogeneous hardware architecture and resource constraints of edge nodes make traditional container deployment difficult. Redundant AI model dependencies increase startup latency. Computing power allocation lacks dynamic perception, resulting in low resource utilization. Cloud-based collaborative training poses a risk of privacy leakage, and strategy optimization efficiency is insufficient.
Build a container packaging tool based on a plug-in architecture, achieve one-time development and multi-platform deployment through a multi-architecture compilation engine, design a lightweight runtime environment, integrate secure sandbox container technology, use static analysis tools to remove redundant dependencies, and dynamically trim models; build a 12-dimensional dynamic state space, use filtering algorithms to reduce noise, introduce a three-dimensional weighted reward model, and design an edge-cloud collaborative training framework to protect data privacy.
It achieves efficient and lightweight deployment of edge nodes, optimizes container startup latency, improves resource utilization, ensures model accuracy, avoids data leakage, adapts to dynamic working conditions, and improves the convergence speed of computing power allocation strategies.
Smart Images

Figure CN120407044B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of digital monitoring technology, and specifically relates to a lightweight deployment method for intelligent bodies and a flexible allocation method for computing power. Background Art
[0002] In the field of electronic digital data processing and resource allocation technology, edge computing scenarios, such as intelligent agent deployment and computing power management in oil and gas well sites, face multiple challenges.
[0003] In existing technologies, edge nodes have heterogeneous hardware architectures and strictly limited resources, making it difficult for traditional container deployment methods to achieve one-time development and multi-platform deployment. In addition, AI models have redundant dependencies and untrimmed non-critical layers, which increases container startup latency and causes the model size to exceed the hardware carrying capacity.
[0004] In addition, the existing computing power allocation strategy lacks a dynamic perception mechanism and cannot be flexibly adjusted according to the real-time resource status and task priority of edge nodes, resulting in low resource utilization; uploading raw data during cloud-based collaborative training poses a risk of privacy leakage, and the traditional experience replay mechanism leads to insufficient strategy optimization efficiency due to random sampling; the above problems restrict the efficient deployment of edge intelligent agents and the refined management of computing power resources.
[0005] To this end, the present invention provides a lightweight deployment method for intelligent agents and a flexible allocation method for computing power. Summary of the Invention
[0006] In order to make up for the deficiencies of the prior art, at least one technical problem raised in the background technology is solved.
[0007] The technical solution adopted by the present invention to solve its technical problem is:
[0008] In a first aspect, the present invention provides a lightweight deployment method for an intelligent agent, comprising:
[0009] S1: Build container packaging tools based on a plug-in architecture, develop a multi-architecture compilation engine, achieve one-time development and multi-platform deployment through underlying virtual machine dynamic compilation technology, design a lightweight runtime environment, integrate hybrid containers with container runtime tools and secure sandbox container technology, and optimize container startup time;
[0010] S2: Use static analysis tools to parse the AI model's computational graph, identify critical paths and non-critical components, automatically remove irrelevant development dependencies through semantic analysis technology, use a tree-structured dependency analysis algorithm to reduce redundant library files, and dynamically trim non-critical layers of the model based on edge node resource profile data, reducing the model size while ensuring accuracy.
[0011] S3: Develop an intelligent resource description language to generate container resource constraint configurations based on the real-time resource status of edge nodes. Integrate control group version 2 with extended Berkeley packet filtering technology to monitor and limit container-level fine-grained resources, ensuring that fluctuations in single-container resource usage are less than the fluctuation threshold.
[0012] As a further improvement of the present invention, the specific process of constructing the container encapsulation tool based on the plug-in architecture is as follows:
[0013] Design standardized plug-in interfaces, including hardware adaptation, dependency analysis, and image generation modules, to achieve decoupling of various functions. Develop hardware detection plug-ins to automatically identify the CPU architecture, memory capacity, and storage type of edge nodes. Integrate dependency parsing plug-ins to scan the running dependencies of AI models and generate a minimum dependency list.
[0014] As a further improvement of the present invention, the specific process of developing a multi-architecture compilation engine and realizing one-time development and multi-platform deployment through underlying virtual machine dynamic compilation technology is as follows:
[0015] Based on the underlying virtual machine dynamic compilation technology, a multi-architecture compilation engine is developed. The AI model code is converted into an intermediate representation using the underlying virtual machine dynamic compilation technology front end to achieve architecture independence. The IR is optimized through the underlying virtual machine dynamic compilation technology optimizer to perform instruction scheduling and loop unrolling optimization. The underlying virtual machine dynamic compilation technology back end is used to generate machine code for the target architecture to support cross-compilation.
[0016] As a further improvement of the present invention, the specific process of designing a lightweight runtime environment and integrating a hybrid container with container runtime tools and secure sandbox container technology is as follows:
[0017] The container runtime tool is used as the container runtime to create and manage container processes, integrate secure sandbox container technology, enhance container security through kernel-level isolation, streamline the container startup process, remove the initialization system, and run applications directly.
[0018] As a further improvement of the present invention, the specific process of using static analysis tools to analyze the calculation graph of the AI model and identify critical paths and non-critical components is as follows:
[0019] Importing AI models into static analysis tools to extract the node connections, operation types, and tensor dimensions of the computational graph; the AI models include, but are not limited to, fault detection CNN models, production prediction LSTM models, and other related AI models deployed in oil and gas well sites; the static analysis tools include, but are not limited to, the TensorFlow Computational Graph Explorer and the Open Neural Network Interchange Format Model Simplifier;
[0020] Define the critical path rules: the longest computational path from the input layer to the output layer, and the core computing nodes that the output layer depends on; traverse the computational graph using a depth-first search algorithm, mark the critical nodes, and the remaining non-critical components; non-critical components include: redundant debugging layers and repeated feature fusion modules.
[0021] As a further improvement of the present invention, the specific process of automatically stripping irrelevant development dependencies by semantic analysis technology and reducing redundant library files by adopting a tree dependency analysis algorithm is as follows:
[0022] The model code is parsed through the abstract syntax tree (AST) to identify development dependencies unrelated to reasoning, such as logs and visualization libraries. A dependency tree is constructed, and code import statements are recursively scanned to build a tree structure from model scripts to libraries to submodules. The dependency tree is traversed to remove libraries that have no call association with the reasoning function and identify development dependencies unrelated to reasoning.
[0023] In a second aspect, the present invention provides a method for elastically allocating computing power, comprising:
[0024] A1: Builds a 12-dimensional dynamic state space that integrates edge node status, task characteristics, and network environment. Lightweight probes deployed on edge nodes collect data in real time, and filtering algorithms are used to reduce data noise and optimize state perception accuracy.
[0025] A2: Use static analysis tools to analyze the AI model's computational graph structure and introduce a three-dimensional weighted reward model to quantitatively link the AI model's computational characteristics with computing power allocation benefits.
[0026] A3: Design an edge-cloud collaborative training framework. Edge nodes are responsible for local policy execution and experience collection, while the cloud centrally trains the Q network. Federated learning technology is used to protect data privacy. Policy collaboration is achieved through a parameter server architecture. A priority experience replay mechanism is introduced to improve the sampling probability of decision samples.
[0027] As a further improvement of the present invention, the specific process of constructing a 12-dimensional dynamic state space integrating edge node status, task characteristics, and network environment is as follows:
[0028] Integrate three core data dimensions to form a complete basis for computing power allocation decision-making:
[0029] Edge node status: CPU utilization, remaining memory capacity, energy consumption status, remaining storage space, and hardware fault history;
[0030] Task characteristics: computational effort, delay sensitivity, task priority, and number of model parameters;
[0031] Network environment: current bandwidth, packet loss rate, and end-to-end latency.
[0032] As a further improvement of the present invention: the specific process of optimizing the state perception accuracy is as follows:
[0033] Deploy non-intrusive probes at edge nodes. These probes, based on extended Berkeley packet filtering technology, acquire 12-dimensional data, avoiding the extra computing power consumption caused by high-frequency data collection.
[0034] The probe adopts a plug-in design, supports hardware status reading of edge nodes with different architectures, and is compatible with the heterogeneous equipment environment of oil and gas well sites.
[0035] A 60-second sliding time window is used to smooth the original data. The specific steps are as follows: remove the extreme values of the data in the window, calculate the mean value in the window as the state value at the current moment, slide the window over time, discard the earliest 1 second of data each time it is updated, and add the latest 1 second of data.
[0036] As a further improvement of the present invention, the specific process of introducing a three-dimensional weighted reward model to quantitatively associate the AI model computing characteristics with the computing power distribution benefits is as follows:
[0037] Based on the model characteristics analyzed from the computational graph, a three-dimensional reward system based on latency, cost, and reliability is constructed to transform the abstract computing power allocation target into calculable numerical benefits.
[0038] Specifically, a three-dimensional weighted reward model is constructed, and the delay sensitivity coefficient is set according to the task type. ,For highly sensitive tasks such as fault detection, setting , for the delay deviation, that is: Give higher penalties for regular tasks , allowing larger delay fluctuations;
[0039] Design reward calculation: , when the actual delay ≤ target delay, the reward value approaches , otherwise it decays exponentially;
[0040] Perform cost-incentive calculations;
[0041] For cloud computing power fees, according to the call duration and unit price calculate, ;
[0042] The edge energy consumption cost is dynamically adjusted in combination with the energy type. ;
[0043] Cost Reward Calculation: , the lower the cost, the closer the reward value is to 1;
[0044] Reliability reward design based on the number of edge node downtimes in the past 24 hours , calculate the trust , The maximum number of downtimes in history; Node stability reward mapping: ;
[0045] Perform weighted fusion to obtain the total reward, , where the weight , which means that latency takes precedence over cost and reliability, and is automatically adjusted through a meta-learning framework based on the execution effect of historical allocation strategies. ratio to adapt to changes in well site working conditions.
[0046] The beneficial effects of the present invention are as follows:
[0047] 1. Through plug-in container packaging tools and a multi-architecture compilation engine, one-time development and multi-platform deployment are achieved, solving the problem of heterogeneous edge node hardware and adapting to heterogeneous equipment environments in scenarios such as oil and gas well sites. The lightweight runtime environment combines resource isolation technology to optimize the container startup process, removing the initialization system and running applications directly, reducing startup latency compared to traditional solutions. Through computational graph analysis, dependency stripping, and dynamic pruning, the model size is reduced with an accuracy loss of ≤3%, adapting to the resource constraint of ≤2GB of memory on edge nodes.
[0048] 2. This integration extends the second version of the Berkeley Packet Filtering and Control Group, collecting resource data at a 100ms cycle to achieve fine-grained control of CPU time slices and memory limits, ensuring resource fluctuations within a single container are ≤5%. An intelligent resource description language dynamically adjusts based on real-time node status and task priority, improving resource utilization. A 12-dimensional dynamic state space combined with a three-dimensional weighted reward model quantifies computing power distribution and prioritizes latency-sensitive tasks.
[0049] 3. Edge nodes only upload Q network gradients instead of raw data, and the cloud aggregates and updates the global model, technically preventing wellsite data leakage. The priority experience replay mechanism increases the probability of high-value experience sampling. Combined with the edge-cloud collaborative training framework, it accelerates the convergence of computing power allocation strategies to adapt to the dynamic working conditions of the wellsite. The lightweight probe uses non-intrusive collection and filtering algorithms to optimize state perception accuracy. The 60-second sliding window smoothing process reduces data noise and provides a reliable basis for decision-making. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The present invention will be further described below with reference to the accompanying drawings.
[0051] Figure 1 It is a flowchart of the steps of the lightweight deployment method of the intelligent agent of the present invention;
[0052] Figure 2 It is a flowchart of the steps of the computing power elastic allocation method of the present invention. DETAILED DESCRIPTION
[0053] In order to make the technical means, creative features, objectives and effects achieved by the present invention easier to understand, the present invention is further described below in conjunction with specific implementation methods.
[0054] Example 1
[0055] like Figure 1 As shown, the lightweight deployment method of the intelligent agent according to the embodiment of the present invention includes:
[0056] S1: Build container packaging tools based on a plug-in architecture, develop a multi-architecture compilation engine, achieve one-time development and multi-platform deployment through underlying virtual machine dynamic compilation technology, design a lightweight runtime environment, integrate hybrid containers with container runtime tools and secure sandbox container technology, and optimize container startup time;
[0057] The specific process of building a container encapsulation tool based on a plug-in architecture is as follows:
[0058] It adopts a modular design, dynamically loads plug-ins through configuration files, and supports user-defined extended hardware adaptation rules to ensure that the packaging tool is compatible with different edge nodes;
[0059] Specifically, we designed standardized plug-in interfaces, including hardware adaptation, dependency analysis, and image generation modules, to achieve functional decoupling. We also developed hardware detection plug-ins to automatically identify the CPU architecture, memory capacity, and storage type of edge nodes. We also integrated dependency parsing plug-ins to scan the running dependencies of AI models and generate a minimum dependency list.
[0060] However, the code for the agent within the container must break through the hardware architecture barriers to truly achieve one-time packaging and multi-platform deployment through the container. Therefore, it is necessary to rely on multi-architecture compilation engine technology to convert the agent code into executable files that are compatible with heterogeneous hardware.
[0061] The specific process of developing a multi-architecture compilation engine and achieving one-time development and multi-platform deployment through underlying virtual machine dynamic compilation technology is as follows:
[0062] Specifically, based on the underlying virtual machine dynamic compilation technology, a multi-architecture compilation engine is developed. The underlying virtual machine dynamic compilation technology front-end is used to convert the AI model code into an intermediate representation (IR) to achieve architecture independence. The underlying virtual machine dynamic compilation technology optimizer is used to perform instruction scheduling and loop unrolling optimization on the IR. The underlying virtual machine dynamic compilation technology back-end is used to generate machine code for the target architecture to support cross-compilation.
[0063] The compiled multi-architecture machine code must run efficiently within the resource constraints and security requirements of edge nodes at oil and gas well sites. Therefore, a lightweight container runtime environment must be designed and built to isolate resources, enable rapid startup, and securely encapsulate the compiled agent code.
[0064] The specific process of designing a lightweight runtime environment and integrating a hybrid container with container runtime tools and secure sandbox container technology is as follows:
[0065] Implement resource isolation through Linux namespaces and control groups, pre-allocate CPU and memory resources, and reduce system call overhead during startup;
[0066] Specifically, the container runtime tool is used as the container runtime to create and manage container processes. It integrates secure sandbox container technology, enhances container security through kernel-level isolation, streamlines the container startup process, removes the initialization system, and runs applications directly.
[0067] Through plug-in container packaging tools to adapt to heterogeneous edge nodes, the multi-architecture compilation engine relies on LLVM to break through hardware barriers and achieve cross-platform deployment. The lightweight runtime integrator runtime tool and secure sandbox container technology and resource isolation technology ensure efficiency and security. The three work together to solve the problems of edge hardware adaptation, cross-architecture code compatibility and resource constraints, achieve one-time development and multi-terminal deployment of intelligent bodies, optimize container startup and operation performance, and lay the foundation for efficient deployment of edge intelligent bodies in oil and gas well sites.
[0068] S2: Use static analysis tools to parse the AI model's computational graph, identify critical paths and non-critical components, automatically remove irrelevant development dependencies through semantic analysis technology, use a tree-structured dependency analysis algorithm to reduce redundant library files, and dynamically trim non-critical layers of the model based on edge node resource profile data, reducing the model size while ensuring accuracy.
[0069] Specifically, the specific process of using static analysis tools to parse the AI model's computational graph and identify critical paths and non-critical components is as follows:
[0070] Importing AI models into static analysis tools to extract the node connections, operation types, and tensor dimensions of the computational graph; the AI models include, but are not limited to, fault detection CNN models, production prediction LSTM models, and other related AI models deployed in oil and gas well sites; the static analysis tools include, but are not limited to, the TensorFlow Computational Graph Explorer and the Open Neural Network Interchange Format Model Simplifier;
[0071] Define the critical path rule: the longest computational path from the input layer to the output layer, and the core computational nodes that the output layer depends on; traverse the computational graph using a depth-first search algorithm, marking the critical nodes and the remaining non-critical components; non-critical components include: redundant debugging layers and repeated feature fusion modules;
[0072] For example, the node set of the design graph is N, the edge is the dependency relationship E, the node computation amount is, and the critical path P satisfies: ,Filter the paths with the highest computational cost to ensure the core of inference performance is retained;
[0073] Lightweighting the computational graph structure only addresses internal computational redundancy within the model. Development dependencies loaded during runtime, such as logging libraries and model visualization modules, still occupy edge node resources. Edge nodes at oil and gas well sites typically have a memory capacity of ≤2GB. Redundant dependencies can increase container startup latency by over 30%. Therefore, it is necessary to further strip out library files unrelated to reasoning from the code dependency level to build a lightweight runtime environment for the intelligent agent.
[0074] The specific process of automatically stripping irrelevant development dependencies through semantic analysis technology and reducing redundant library files using a tree dependency analysis algorithm is as follows:
[0075] Parse the model code through the abstract syntax tree (AST) to identify development dependencies unrelated to reasoning, such as logs and visualization libraries. Build a dependency tree, recursively scan code import statements, and construct a tree structure from model scripts to libraries to submodules. Traverse the dependency tree, remove libraries that are not associated with inference functions, and identify development dependencies unrelated to reasoning.
[0076] For example, let the total number of nodes in the dependency tree be , the number of effective dependent nodes , redundancy ratio : , set the redundancy ratio Greater than or equal to 0.5, which means stripping away at least 50% of development dependencies not related to reasoning;
[0077] Dependency stripping reduces redundancy at the code level, but the structural complexity and resource consumption during model inference are still limited by the hardware capabilities of edge nodes, such as memory ≤ 1GB and CPU power fluctuations. Therefore, it is necessary to dynamically trim non-critical layers of the model based on resource profile data collected in real time by edge nodes. This allows the model to be further compressed while ensuring accuracy is maintained to adapt to edge resource constraints.
[0078] The specific process of dynamically trimming non-critical layers of the model based on edge node resource profile data to reduce the model size while ensuring accuracy is as follows:
[0079] Specifically, by extending Berkeley packet filtering technology, we obtain real-time resources of edge nodes, including CPU utilization and remaining memory. We dynamically trim non-critical layers of the model and, in combination with the computational graph, mark and remove layers whose inference result changes are less than or equal to a threshold. This allows us to reduce the model size while ensuring accuracy. We compress the model size based on resource constraints while monitoring accuracy loss. Model size constraints: ;Monitoring accuracy loss: ;
[0080] This lightweight system is built, using computational graph analysis to identify the inference core, semantic analysis to remove over 50% of redundant dependencies, and a dynamic trimming model based on edge resources to compress the volume while maintaining accuracy loss of ≤3%. This adapts to the resource constraints of edge nodes at oil and gas well sites, laying a solid foundation for efficient deployment of intelligent agents and flexible allocation of computing power.
[0081] S3: Develop an intelligent resource description language to generate container resource constraint configurations based on the real-time resource status of edge nodes. Integrate control group version 2 with extended Berkeley packet filtering technology to monitor and limit container-level fine-grained resources, ensuring that fluctuations in single-container resource usage are less than the fluctuation threshold.
[0082] Specifically, the specific process of developing an intelligent resource description language and generating container resource constraint configuration according to the real-time resource status of edge nodes is as follows:
[0083] Declarative rules are used to define the mapping logic between edge node resources and container constraints. The mapping logic is as follows:
[0084] First, set the basic mapping logic rules. The basic mapping logic directly associates the idle resources of edge nodes with the container quota. Mapping logic 1 is: , mapping logic 2 is: ; In the present invention, the distribution coefficient is 0.8 and the restriction coefficient is 0.7;
[0085] Set resource thresholds to trigger adjustments. When the node CPU usage exceeds 80%, the container CPU quota is automatically reduced by 10%, giving priority to node resource allocation.
[0086] Set task priority rules, that is, tasks involving fault detection are given priority in allocating resources;
[0087] The second version of the integrated control group and the extended Berkeley packet filtering technology monitor and limit container-level fine-grained resources to ensure that the fluctuation of single container resource usage is less than the fluctuation threshold. The specific process is as follows:
[0088] Using extended Berkeley packet filtering technology, core resource profile data is collected at a 100ms cycle. The resource profile data includes: CPU idle rate, number of CPU cores, instantaneous CPU usage, remaining memory capacity, memory page cache ratio, remaining storage space, and storage I / O read and write throughput.
[0089] Extended Berkeley packet filtering technology uses kernel-level non-intrusive data collection. Compared with traditional tools, it optimizes the collection accuracy of resource profile data and adapts to performance-sensitive edge node scenarios.
[0090] The edge node resource description language engine is used to load predefined grammatical rules and substitute the collected real-time resource profile data into the calculation. When the basic mapping logic, resource threshold trigger adjustment rules, and task level priority rules conflict, the resource requirements of key tasks are met first, and then the remaining resources are dispatched.
[0091] Key mission resource requirements include: equipment fault detection, which uses AI models to identify oil well equipment anomalies in real time and avoid downtime accidents; dynamic production forecasting, which uses AI models to analyze oil well production trends and guide production scheduling;
[0092] The calculation results are converted into the control group version 2 standard configuration format and injected into the container during the container runtime to achieve: fine-grained CPU control, rigid memory constraints, and resource isolation optimization;
[0093] Fine-grained control includes limiting the container's CPU time slice percentage, rigid memory constraints include setting an upper limit on memory usage, and resource isolation optimization includes binding specific CPU cores to CPU core sets and optimizing memory access through non-uniform memory access policies to reduce resource competition between containers.
[0094] The extended Berkeley packet filtering technology collects container resource profile data with 1ms accuracy and calculates resource fluctuation within a 60-second sliding window. The resource fluctuation is: If the volatility is greater than or equal to the volatility threshold, the edge node resource description language reparses the rules and triggers the following parsing rules:
[0095] If memory fluctuates, the memory high watermark mechanism is enabled to trigger page reclaim, and the memory leak process is located in conjunction with the extended Berkeley packet filtering technology.
[0096] If the CPU fluctuates, lower the upper threshold of the CPU time slice;
[0097] It should be noted that the memory high-water mark mechanism is a dynamic memory control capability built into Linux Control Group Version 2. When the container's memory usage approaches this threshold, the system asynchronously reclaims idle memory pages to prevent sudden spikes in memory usage, smooth out fluctuations in memory usage, and prevent container service interruptions caused by memory usage fluctuations.
[0098] The CPU time slice cap is a quantitative constraint on container CPU resources in Linux Control Group Version 2. It limits the proportion of CPU time available to a container per unit time, forcing it to reduce instantaneous peak CPU usage. This prevents multiple containers from competing for CPU cores, effectively reducing fluctuations in CPU scheduling and ensuring more stable resource usage.
[0099] Ultimately, ensure that the fluctuation of single-container resource usage is less than or equal to the fluctuation threshold, providing a stable operating environment for the agent;
[0100] The fluctuation threshold is 5% in the present invention;
[0101] Example 2
[0102] like Figure 2 As shown, based on Example 1, the computing power elastic allocation method according to the embodiment of the present invention includes:
[0103] A1: Builds a 12-dimensional dynamic state space that integrates edge node status, task characteristics, and network environment. Lightweight probes deployed on edge nodes collect data in real time, and filtering algorithms are used to reduce data noise and optimize state perception accuracy.
[0104] To provide accurate and reliable decision-making basis for flexible computing power allocation, it is necessary to build a dynamic perception system covering resource supply, computing power demand, and transmission constraints. Through multi-dimensional state definition and lightweight data collection and purification, it is possible to achieve real-time depiction of complex working conditions at the well site.
[0105] The specific process of constructing a 12-dimensional dynamic state space that integrates edge node status, task characteristics, and network environment is as follows:
[0106] Integrate three core data dimensions to form a complete basis for computing power allocation decision-making:
[0107] Edge node status: CPU utilization, remaining memory capacity, energy consumption status, remaining storage space, and hardware fault history;
[0108] Task characteristics: computational effort, delay sensitivity, task priority, and number of model parameters;
[0109] Network environment: current bandwidth, packet loss rate, and end-to-end latency;
[0110] To achieve accurate decision-making for flexible computing power allocation, a dynamic perception system covering resource supply, task requirements, and network constraints must be built. This system is specifically divided into two collaborative links: data collection and data purification.
[0111] The specific process of real-time data collection by lightweight probes deployed on edge nodes and using filtering algorithms to reduce noise interference and optimize state perception accuracy is as follows:
[0112] Deploy non-intrusive probes at edge nodes. These probes, based on extended Berkeley packet filtering technology, collect the aforementioned 12-dimensional data in real time at a 100ms cycle, avoiding the extra computing power consumption caused by high-frequency collection.
[0113] The probe adopts a plug-in design, supports hardware status reading of edge nodes with different architectures, and is compatible with the heterogeneous equipment environment of oil and gas well sites.
[0114] A 60-second sliding time window is used to smooth the original data. The specific steps are as follows: remove the extreme values of the data in the window, calculate the mean value in the window as the state value at the current moment, slide the window over time, discard the earliest 1 second of data at each update, and add the latest 1 second of data;
[0115] A 12-dimensional dynamic state space is constructed, integrating three types of data: node, task, and network. After lightweight probe collection and purification by filtering algorithms, the well site operating conditions are accurately portrayed, laying a solid data foundation for the flexible allocation of computing power.
[0116] A2: Use static analysis tools to analyze the AI model's computational graph structure and introduce a three-dimensional weighted reward model to quantitatively link the AI model's computational characteristics with computing power allocation benefits.
[0117] To ensure that computing power allocation strategies accurately match AI model requirements, it is necessary to first analyze the model's computing characteristics and then build a revenue quantification system to link model requirements, allocation strategies, and revenue feedback. This is done through two collaborative steps: computational graph analysis and three-dimensional reward modeling.
[0118] Specifically, the specific process of using static analysis tools to parse the computational graph structure of the AI model is as follows:
[0119] To clarify the computing power consumption patterns of the AI model at the oil and gas well site, a static analysis tool was used to disassemble the model structure:
[0120] Use the TensorFlow Computational Graph Explorer model simplifier to import the oil and gas well site AI model and extract the node connection relationship, operation type and tensor dimension information of the computational graph;
[0121] Through analysis, the key paths of computing power consumption of the model are identified, providing demand anchors for subsequent reward models;
[0122] The specific process of introducing the three-dimensional weighted reward model to quantitatively link the AI model's computing characteristics with the computing power distribution benefits is as follows:
[0123] Based on the model characteristics analyzed from the computational graph, a three-dimensional reward system based on latency, cost, and reliability is constructed to transform the abstract computing power allocation target into calculable numerical benefits.
[0124] Specifically, a three-dimensional weighted reward model is constructed, and the delay sensitivity coefficient is set according to the task type. ,For highly sensitive tasks such as fault detection, setting , for the delay deviation, that is: Give higher penalties for regular tasks , allowing larger delay fluctuations;
[0125] Design reward calculation: , when the actual delay ≤ target delay, the reward value approaches , otherwise it decays exponentially;
[0126] Perform cost-incentive calculations;
[0127] For cloud computing power fees, according to the call duration and unit price calculate, ;
[0128] The edge energy consumption cost is dynamically adjusted in combination with the energy type. ;
[0129] Cost Reward Calculation: , the lower the cost, the closer the reward value is to 1;
[0130] Reliability reward design based on the number of edge node downtimes in the past 24 hours , calculate the trust , The maximum number of downtimes in history; Node stability reward mapping: ;
[0131] Perform weighted fusion to obtain the total reward, , where the weight , which means that latency takes precedence over cost and reliability, and is automatically adjusted through a meta-learning framework based on the execution effect of historical allocation strategies. ratio to adapt to changes in well site working conditions;
[0132] First, use static tools to analyze the AI model calculation graph and identify the key paths of computing power consumption. Then, build a three-dimensional reward system based on latency, cost, and reliability, quantify the distribution of benefits, and realize the correlation between model characteristics and strategic benefits. Use meta-learning to adjust weights and adapt to well site conditions to provide precise guidance for computing power allocation.
[0133] A3: Design an edge-cloud collaborative training framework. Edge nodes are responsible for local policy execution and experience collection, while the cloud centrally trains the Q network. Federated learning technology is used to protect data privacy. A parameter server architecture is used to achieve policy collaboration. A prioritized experience replay mechanism is introduced to improve the probability of decision sample sampling.
[0134] To ensure that computing power allocation strategies continuously adapt to the dynamic operating conditions of well sites, a collaborative framework combining edge execution feedback and cloud-based training optimization is required. Specifically, edge nodes are responsible for policy implementation and experience collection, while the cloud focuses on privacy-preserving training and policy iteration. Through federated learning combined with prioritized replay and parameter synchronization, intelligent evolution of computing power allocation strategies is achieved. This collaborative framework is divided into three specific steps:
[0135] The edge nodes are responsible for local policy execution and experience collection. The specific process of centralized training of the Q network in the cloud is as follows:
[0136] The edge node receives the Q network policy issued by the cloud, which is the value network in reinforcement learning. It calls the second version of the control group and the extended Berkeley packet filtering tool to convert the policy into container resource constraints to drive AI model reasoning.
[0137] The edge computing node collects experience and records the collected content as state (s): 12-dimensional dynamic state space data, action (a): the actual computing power allocation strategy, reward (r): the total reward obtained through weighted fusion, and the next state : After executing the policy, the resource status and task results of the edge node;
[0138] The edge node establishes a local ring buffer to cache the latest 1,000 experience data to avoid memory overflow. At the same time, it marks high-value experience, that is, samples with a reward value r greater than the threshold and uploads them to the cloud first.
[0139] The specific process of using federated learning technology to protect data privacy, achieving strategy collaboration through a parameter server architecture, and introducing a priority experience replay mechanism to improve the sampling probability of decision samples is as follows:
[0140] Edge nodes only upload model parameter gradients, i.e., the weight updates of the Q network, rather than the original well site data. The cloud aggregates multi-node gradients and updates the global Q network, thus preventing data leakage from a technical perspective.
[0141] Let the local gradient of edge node i be , the cloud aggregates by weighted average ,in, is the node data volume;
[0142] A parameter server cluster is deployed in the cloud to store global Q network parameters, receive edge node gradients, and issue updated policies.
[0143] The collaborative mechanism uses asynchronous updates and version control. Edge nodes can independently pull policies, avoiding waiting for global training to complete. Version verification also ensures that the executed policies are not expired.
[0144] The method for determining whether a policy has not expired is as follows: if the difference in version numbers is greater than 3, it is considered an expired policy and synchronization is forced;
[0145] Prioritized experience replay accelerates convergence. Traditional experience replay uses random sampling, which results in high-value experiences, i.e., strategies that successfully reduce latency, being buried. After introducing prioritized experience replay, the priority p of the calculated experience is positively correlated with the reward value r, i.e., p = exp(r).
[0146] Sampling is done by probability based on priority, with the sampling probability of high-value experiences increased by 3 times, allowing the Q network to prioritize learning effective strategies and optimize convergence speed.
[0147] Build an edge-cloud collaborative training framework, allowing edge nodes to accurately implement strategies and collect feedback experience; the cloud uses federated learning to protect privacy, parameter servers efficiently synchronize strategies, and prioritize experience replay to accelerate convergence, forming a closed loop of perception, decision-making, optimization, and feedback, allowing strategies to dynamically adapt to well site conditions and enhance the response capabilities of intelligent agents.
[0148] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the foregoing embodiments. The foregoing embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.
Claims
1. A lightweight deployment method for intelligent agents, characterized by: include: S1: Build container packaging tools based on a plug-in architecture, develop a multi-architecture compilation engine, achieve one-time development and multi-platform deployment through underlying virtual machine dynamic compilation technology, design a lightweight runtime environment, integrate hybrid containers with container runtime tools and secure sandbox container technology, and optimize container startup time; S2: Use static analysis tools to parse the AI model's computational graph, identify critical paths and non-critical components, automatically remove irrelevant development dependencies through semantic analysis technology, use a tree-structured dependency analysis algorithm to reduce redundant library files, and dynamically trim non-critical layers of the model based on edge node resource profile data, reducing the model size while ensuring accuracy. S3: Develop an intelligent resource description language to generate container resource constraint configurations based on the real-time resource status of edge nodes. This language integrates Control Group Version 2 with extended Berkeley packet filtering technology to monitor and restrict container-level resources in a fine-grained manner, ensuring that fluctuations in resource usage of a single container are below the fluctuation threshold. The specific process of developing an intelligent resource description language and generating container resource constraint configuration based on the real-time resource status of edge nodes is as follows: Declarative rules are used to define the mapping logic between edge node resources and container constraints. The mapping logic is as follows: Set the basic mapping logic rules. The basic mapping logic directly associates the idle resources of edge nodes with the container quota. Mapping logic 1 is: , mapping logic 2 is: ;The distribution coefficient is 0.8 and the restriction coefficient is 0.7; Set resource thresholds to trigger adjustments. When the node CPU usage exceeds 80%, the container CPU quota is automatically reduced by 10%, giving priority to node resource allocation. Set task priority rules, that is, tasks involving fault detection are given priority in allocating resources; The second version of the integrated control group and the extended Berkeley packet filtering technology monitor and limit container-level fine-grained resources to ensure that the fluctuation of single container resource usage is less than the fluctuation threshold. The specific process is as follows: Using extended Berkeley packet filtering technology, core resource profile data is collected at a 100ms cycle. The resource profile data includes: CPU idle rate, number of CPU cores, instantaneous CPU usage, remaining memory capacity, memory page cache ratio, remaining storage space, and storage I / O read and write throughput. The edge node resource description language engine is used to load predefined grammatical rules, and the collected real-time resource portrait data is substituted into the calculation. When the basic mapping logic, resource threshold trigger adjustment rules, and task level priority rules conflict, the resource requirements of key tasks are met first, and then the remaining resources are scheduled.
2. The lightweight deployment method of intelligent agents according to claim 1, characterized in that: The specific process of building a container encapsulation tool based on a plug-in architecture is as follows: Design standardized plug-in interfaces, including hardware adaptation, dependency analysis, and image generation modules, to achieve decoupling of various functions. Develop hardware detection plug-ins to automatically identify the CPU architecture, memory capacity, and storage type of edge nodes. Integrate dependency parsing plug-ins to scan the running dependencies of AI models and generate a minimum dependency list.
3. The lightweight deployment method of intelligent agents according to claim 1, characterized in that: The specific process of developing a multi-architecture compilation engine and achieving one-time development and multi-platform deployment through underlying virtual machine dynamic compilation technology is as follows: Based on the underlying virtual machine dynamic compilation technology, a multi-architecture compilation engine is developed. The AI model code is converted into an intermediate representation using the underlying virtual machine dynamic compilation technology front end to achieve architecture independence. The IR is optimized through the underlying virtual machine dynamic compilation technology optimizer to perform instruction scheduling and loop unrolling optimization. The underlying virtual machine dynamic compilation technology back end is used to generate machine code for the target architecture to support cross-compilation.
4. The lightweight deployment method of intelligent agents according to claim 1, characterized in that: The specific process of designing a lightweight runtime environment and integrating a hybrid container with container runtime tools and secure sandbox container technology is as follows: The container runtime tool is used as the container runtime to create and manage container processes, integrate secure sandbox container technology, enhance container security through kernel-level isolation, streamline the container startup process, remove the initialization system, and run applications directly.
5. The lightweight deployment method of intelligent agents according to claim 1, characterized in that: The specific process of using static analysis tools to parse the AI model's computational graph and identify critical paths and non-critical components is as follows: Importing AI models into static analysis tools to extract the node connections, operation types, and tensor dimensions of the computational graph; the AI models include but are not limited to: fault detection CNN models, production prediction LSTM models, and related AI models deployed in oil and gas well sites; the static analysis tools include but are not limited to: TensorFlow Computational Graph Explorer and Open Neural Network Interchange Format Model Simplifier; Define the critical path rules: the longest computational path from the input layer to the output layer, and the core computing nodes that the output layer depends on; The computational graph is traversed using a depth-first search algorithm, key nodes are marked, and the remaining are non-critical components; non-critical components include: redundant debugging layer and repeated feature fusion module.
6. The lightweight deployment method of intelligent agents according to claim 1, characterized in that: The specific process of automatically stripping irrelevant development dependencies through semantic analysis technology and reducing redundant library files using a tree dependency analysis algorithm is as follows: Parse model code through the abstract syntax tree (AST) to identify development dependencies unrelated to reasoning, logs, and visualization libraries; build a dependency tree, recursively scan code import statements, and build a tree structure from model scripts to libraries to submodules; Traverse the dependency tree, remove libraries that have no call association with the inference function, and identify development dependencies that are not related to inference.
7. A method for elastically allocating computing power, characterized by: include: A1: Builds a 12-dimensional dynamic state space that integrates edge node status, task characteristics, and network environment. Lightweight probes deployed on edge nodes collect data in real time, and filtering algorithms are used to reduce data noise and optimize state perception accuracy. A2: Use static analysis tools to analyze the AI model's computational graph structure and introduce a three-dimensional weighted reward model to quantitatively link the AI model's computational characteristics with computing power allocation benefits. The specific process of introducing the three-dimensional weighted reward model to quantitatively link the AI model's computing characteristics with the computing power distribution benefits is as follows: Based on the model characteristics analyzed from the computational graph, a three-dimensional reward system based on latency, cost, and reliability is constructed to transform the abstract computing power allocation target into calculable numerical benefits. Construct a three-dimensional weighted reward model and set the delay sensitivity coefficient according to the task type ; Design reward calculation: , when the actual delay ≤ target delay, the reward value approaches , otherwise it decays exponentially; Perform cost-incentive calculations; For cloud computing power fees, according to the call duration and unit price calculate, ; The edge energy consumption cost is dynamically adjusted in combination with the energy type. ; Cost Reward Calculation: , the lower the cost, the closer the reward value is to 1; Reliability reward design based on the number of edge node downtimes in the past 24 hours , calculate the trust , The maximum number of downtimes in history; Node stability reward mapping: ; Perform weighted fusion to obtain the total reward, , where the weight , which means that latency takes precedence over cost and reliability, and is automatically adjusted through a meta-learning framework based on the execution effect of historical allocation strategies. ratio to adapt to changes in well site working conditions; A3: Design an edge-cloud collaborative training framework. Edge nodes are responsible for local policy execution and experience collection, while the cloud centrally trains the Q network. Federated learning technology is used to protect data privacy. Policy collaboration is achieved through a parameter server architecture. A priority experience replay mechanism is introduced to improve the sampling probability of decision samples.
8. The method for elastically allocating computing power according to claim 7, wherein: The specific process of constructing a 12-dimensional dynamic state space that integrates edge node status, task characteristics, and network environment is as follows: Integrate three core data dimensions to form a complete basis for computing power allocation decision-making: Edge node status: CPU utilization, remaining memory capacity, energy consumption status, remaining storage space, and hardware fault history; Task characteristics: computational effort, delay sensitivity, task priority, and number of model parameters; Network environment: current bandwidth, packet loss rate, and end-to-end latency.
9. The method for elastically allocating computing power according to claim 7, wherein: The specific process of optimizing the state perception accuracy is as follows: Deploy non-intrusive probes at edge nodes. These probes, based on extended Berkeley packet filtering technology, acquire 12-dimensional data, avoiding the extra computing power consumption caused by high-frequency data collection. The probe adopts a plug-in design, supports hardware status reading of edge nodes with different architectures, and is compatible with the heterogeneous equipment environment of oil and gas well sites. A 60-second sliding time window is used to smooth the original data. The specific steps are as follows: remove the extreme values of the data in the window, calculate the mean value in the window as the state value at the current moment, slide the window over time, discard the earliest 1 second of data each time it is updated, and add the latest 1 second of data.
Citation Information
Patent Citations
AI model acceleration method and acceleration system applied to ultra-high-definition 8k video
CN118823654A
AI-based big data distributed computing task automatic optimization method and system
CN119576507A