Implementation Method and Device of an IP Network Acquisition and Control Plug-in Based on a Matrix Command Adapter
By building a dynamic protocol adaptation layer, deploying resource virtualization pool, intelligent scheduling algorithm, distributed event bus and lightweight containerized deployment architecture, the adaptability, compatibility and resource allocation problems of IP network procurement and control plug-ins in the existing technology are solved, efficient management and control of heterogeneous network equipment is realized, and network performance and reliability are improved.
Patent Information
- Application Number
- CN202510330627.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-03-20
AI Technical Summary
In the prior art, the dynamic adaptation capability of the Matrix command adapter is limited, the cross-platform compatibility of the IP network procurement and control plug-ins is poor and the resource allocation is rigid, and it is unable to adapt to the dynamic changes in device load in large-scale heterogeneous network scenarios, resulting in low instruction execution efficiency and poor reliability.
By building a dynamic protocol adaptation layer, analyzing and converting control instructions of heterogeneous network devices, a standardized intermediate instruction set is generated; a resource virtualization pool is deployed in the IP network procurement and control plug-in to dynamically allocate network bandwidth, computing resources and device interfaces; based on intelligent scheduling algorithm, the execution capabilities of the intermediate instruction set and the target device are matched in real time, and executable device control instructions are generated; the device status is synchronized through the distributed event bus, and the resource allocation and instruction execution path is dynamically optimized based on the feedback results; a lightweight containerized deployment architecture is adopted to support the plug-in to operate cross-platforms of edge computing nodes and cloud platforms.
It realizes unified management and efficient control of heterogeneous network equipment, improves network performance and reliability, improves resource utilization, ensures the stable operation of core business equipment, and significantly improves instruction execution efficiency and system flexibility.
Smart Images

Figure CN119854382B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technologies, and in particular, to a method and device for implementing an IP network acquisition and control plug-in based on a Matrix command adapter. Background Art
[0002] In today's complex network environment, there are a large number of heterogeneous network devices with different protocols and interfaces, resulting in many challenges in network management and control.
[0003] The dynamic adaptation ability of traditional Matrix command adapters is limited. Relying on a static protocol template library conventionally, it is difficult to meet the requirements of new devices and new protocols; while existing IP network acquisition and control plug-ins have poor cross-platform compatibility and rigid resource allocation, and cannot adapt to the dynamic changes of device loads in large-scale heterogeneous network scenarios. They lack an intelligent scheduling mechanism, with low instruction execution efficiency and poor reliability. Therefore, there is an urgent need for a method and device for implementing an IP network acquisition and control plug-in based on a Matrix command adapter to solve these problems. Summary of the Invention
[0004] The invention aims to provide a method and device for implementing an IP network acquisition and control plug-in based on a Matrix command adapter to solve the problems of difficult protocol adaptation, unreasonable resource allocation, low instruction execution efficiency, and poor cross-platform compatibility in the prior art, and to achieve unified management and efficient control of heterogeneous network devices, and improve network performance and reliability.
[0005] To solve the above technical problems, a method and device for implementing an IP network acquisition and control plug-in based on a Matrix command adapter provided by the present invention include the following steps:
[0006] Step 1, construct a dynamic protocol adaptation layer, parse and convert the control instructions of heterogeneous network devices through a Matrix command adapter, and generate a standardized intermediate instruction set;
[0007] Step 2, deploy a resource virtualization pool in the IP network acquisition and control plug-in, dynamically allocate network bandwidth, computing resources, and device interfaces, and the allocation strategy includes:
[0008] S21, predict future bandwidth requirements through a time series analysis model, and calculate the resource allocation weight of the device in combination with the real-time load and historical peak data of the device;
[0009] S22, deploy a resource virtualization pool, divide priority queues according to device types, and achieve elastic allocation of resources;
[0010] Step 3, based on an intelligent scheduling algorithm, match the intermediate instruction set with the execution ability of the target device in real time, and generate executable device control instructions, specifically:
[0011] S31. Calculate the expected execution time for the device to execute instructions based on the device's computing power, processing latency, and current queue depth.
[0012] S32. Split complex instructions into atomic sub-instruction sets and distribute them to multiple devices for parallel execution through the consistent hashing algorithm to ensure the atomicity and result consistency of the sub-instructions.
[0013] Step Four. Synchronize the device status through the distributed event bus and dynamically optimize resource allocation and instruction execution paths based on the feedback results.
[0014] Step Five. Adopt a lightweight containerized deployment architecture to support the cross-platform operation of plugins on edge computing nodes and cloud platforms.
[0015] As a preferred technical solution, based on Step One, construct a dynamic protocol adaptation layer. Parse and convert the control instructions of heterogeneous network devices through the Matrix command adapter to generate a standardized intermediate instruction set. The specific steps are as follows:
[0016] S11. Protocol parsing: When the Matrix command adapter receives the original device instructions, extract the instruction parameters and operation types in the original device instructions through the semantic parsing module.
[0017] S12. Template matching: Set a protocol template library, including protocol type templates for several types of devices; match the protocol type of the target device from the protocol template library to generate standardized intermediate instructions.
[0018] S13. Exception handling: If the protocol type in the protocol template library cannot match the protocol type of the target device, indicating a template missing, generate a protocol extension signal; the protocol extension signal calls a user-defined script through the protocol extension interface to generate a new protocol type template.
[0019] As a preferred technical solution, predict the future bandwidth requirements through a time series analysis model, and calculate the resource allocation weight of the device by combining the device's real-time load and historical peak data. Specifically:
[0020] Use the autoregressive integrated moving average model to fit the historical bandwidth device to obtain the future bandwidth requirements within the predicted set duration. ;
[0021] Obtain the future bandwidth requirements of device i , real-time CPU utilization , historical peak bandwidth , where i represents the device number, and use the weighted average method to calculate the resource allocation weight. The formula is expressed as , where N represents the total number of devices, j represents the device number, Represents the future bandwidth requirement of device j, Represents the historical peak bandwidth of device j, Represents the summation of the future predicted bandwidth requirements of all devices from the 1st to the Nth in the network, Represents the summation of the historical peak bandwidths of all devices, Respectively represent the weight coefficients corresponding to the future bandwidth requirement, real-time CPU utilization, and historical peak bandwidth.
[0022] As a preferred technical solution, the resource virtualization pool adopts SDN-based virtualization technology, divides the priority queue according to device types, and realizes elastic allocation of resources, specifically as follows:
[0023] S221, Real-time monitor the physical resource status in the network through the SDN controller, including the usage of network bandwidth, computing resources, and device interfaces, and abstract and convert them into virtual resources;
[0024] S222, Classify the devices in the network, set device type groups, including core business devices and ordinary business devices; and assign corresponding priorities to each device type in the device type group, create three different priority queues of high, medium, and low, and sort the device priorities in the three different priority queues of high, medium, and low according to the order of the resource allocation weights;
[0025] S223, Real-time monitor the resource usage and resource requests in each priority queue through the SDN controller, start processing requests from the high-priority queue, and when the requests in the high-priority queue are satisfied, process the requests in the medium- and low-priority queues in turn; if the resources are insufficient, give priority to processing the resource requirements of high-priority devices, and delay or partially process the requests of low-priority devices; when the resources are idle, allocate them to the waiting requests in a timely manner.
[0026] As a preferred technical solution, split the complex instructions into atomic sub-instruction sets, and allocate them to multiple devices for parallel execution through the consistent hashing algorithm to ensure the atomicity and result consistency of the sub-instructions, specifically as follows:
[0027] S321, Instruction splitting: Identify the complex instruction and mark it as R, and split it into n sub-instructions R1, R2,..., Rn according to its logical structure and data dependency relationship, so that each sub-instruction is relatively independent and can be executed in parallel;
[0028] Record the dependency relationship between sub-instructions to form a dependency graph G=(V, E), where is the set of sub-instructions, and E is the set of edges representing the sub-instruction dependency relationship;
[0029] S322, Device Selection and Allocation: The consistent hashing algorithm is adopted to allocate sub-instructions to multiple devices for execution. Specifically, the devices are mapped to a virtual hash ring through the consistent hashing algorithm. Each sub-instruction calculates a hash value through a hash function, and the device node closest to the hash value in the clockwise direction on the hash ring is used as the execution device.
[0030] S323, Atomicity Guarantee: The two-phase commit protocol is adopted to ensure the atomicity of sub-instructions.
[0031] As a preferred technical solution, the distributed event bus adopts the Kafka message queue, which supports the real-time synchronization and exception backtracking of device status data.
[0032] As a preferred technical solution, the device status is synchronized through the distributed event bus, and the resource allocation and instruction execution path are dynamically optimized according to the feedback results, specifically as follows:
[0033] Obtain the status data published by the device in real time, including CPU utilization rate, memory occupancy rate, and queue depth;
[0034] Dynamic Optimization of Resource Allocation: Obtain the target resource utilization rate F1 and the actual resource utilization rate F2 of the device, and subtract the actual resource utilization rate from the target resource utilization rate to obtain the target resource deviation value F; adjust the resource allocation weight of the device according to the target resource deviation value, and the formula is expressed as , represents the learning rate;
[0035] Sort the priority queue according to the updated resource allocation weight, and satisfy the device with the highest priority when allocating resources;
[0036] Optimization of Instruction Execution Path: Calculate the execution ability score Sd based on the device status, and select the optimal device. The calculation formula is expressed as , where Hg represents the expected time for the device to execute the instruction, H3 represents the current queue depth, represents the queue depth penalty coefficient;
[0037] Use reinforcement learning to dynamically optimize instruction allocation according to the Q-Learning path selection algorithm. The formula is expressed as , where respectively represent the current state s selecting the action a, represents the reward, represents the discount factor.
[0038] As a preferred technical solution, the lightweight containerized architecture is implemented based on Docker, and the plugin module is deployed by microservice splitting. Specifically:
[0039] S51, Microservice splitting: Split the plugin into multiple independent microservices according to functions, including Matrix command adaptation, resource scheduling, instruction execution, and status monitoring microservices;
[0040] S52, Image building: Create Docker images for each microservice, configure the running environment in the Dockerfile, install dependencies, and copy the code;
[0041] S53, Orchestration and deployment: Orchestrate containers with Kubernetes, and define Deployment and Service resources through YAML files;
[0042] S54, Set the CPU and memory requests and limits for microservice containers in Kubernetes.
[0043] An implementation device of an IP network acquisition and control plugin based on a Matrix command adapter provided by this application adopts the above-mentioned method, and includes a dynamic protocol adaptation module, a resource virtualization pool management module, an intelligent scheduling engine, a distributed event bus module, and a containerized deployment module;
[0044] The dynamic protocol adaptation module is used to parse and convert the control instructions of heterogeneous network devices through the Matrix command adapter to generate a standardized intermediate instruction set;
[0045] The resource virtualization pool management module is used to deploy a resource virtualization pool in the IP network acquisition and control plugin, and dynamically allocate network bandwidth, computing resources, and device interfaces;
[0046] The intelligent scheduling engine is based on an intelligent scheduling algorithm, and matches the intermediate instruction set with the execution capabilities of target devices in real time to generate executable device control instructions.
[0047] The distributed event bus module is used to synchronize device status through the distributed event bus, and dynamically optimize resource allocation and instruction execution paths according to the feedback results;
[0048] The containerized deployment module is used to adopt a lightweight containerized deployment architecture to support cross-platform operation of the plugin on edge computing nodes and cloud platforms.
[0049] As a preferred technical solution, the intelligent scheduling engine includes a hardware acceleration unit; the hardware acceleration unit uses a pipeline architecture to process multi-device instructions in parallel, and the pipeline architecture includes lexical analysis, syntax analysis, semantic mapping, and protocol conversion stages.
[0050] Compared with related technologies, an implementation method and device of an IP network acquisition and control plugin based on a Matrix command adapter provided by the present invention have the following beneficial effects:
[0051] Through the dynamic protocol adaptation layer, the present invention can flexibly parse and convert heterogeneous network device instructions. Through template matching and custom script extension, it can quickly adapt to new devices and new protocols, improving the compatibility and scalability of network management. Moreover, through the resource virtualization pool combined with the prediction model and the dynamic priority queue, it can intelligently allocate resources according to the real-time load and historical data of the devices, improving resource utilization rate, ensuring the operation of core business devices, and enhancing the overall performance of the network.
[0052] Through the cooperation of the intelligent scheduling engine and the hardware acceleration unit, the present invention evaluates and processes instructions in parallel according to the device capabilities, splits complex instructions and ensures atomicity and consistency, significantly improving the execution efficiency and reliability and shortening the response time.
[0053] The lightweight containerized architecture of the present invention enables the plug-in to run across platforms between edge computing nodes and cloud platforms, isolates the operating environment, reduces deployment and maintenance costs, and improves the flexibility and adaptability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flowchart of an implementation method of an IP network acquisition and control plug-in based on a Matrix command adapter provided by the present invention;
[0055] Figure 2 It is a schematic block diagram of an implementation device of an IP network acquisition and control plug-in based on a Matrix command adapter provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0056] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0057] The terms used in the present disclosure are only for the purpose of describing specific embodiments, and are not intended to limit the present disclosure. The singular forms of "group", "class" and "the" used in the present disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0058] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to a determination".
[0059] Please refer to in combination Figure 1 - Figure 2 . A method for implementing an IP network acquisition and control plug-in based on a Matrix command adapter includes the following steps:
[0060] Step 1, construct a dynamic protocol adaptation layer, parse and convert the control instructions of heterogeneous network devices through the Matrix command adapter, and generate a standardized intermediate instruction set;
[0061] Step 2, deploy a resource virtualization pool in the IP network acquisition and control plug-in, dynamically allocate network bandwidth, computing resources, and device interfaces, and the allocation policies include:
[0062] S21, predict the future bandwidth demand through a time series analysis model, and calculate the resource allocation weight of the device by combining the real-time load and historical peak data of the device;
[0063] S22, deploy a resource virtualization pool, divide the priority queue according to the device type, and achieve elastic allocation of resources;
[0064] Step 3, based on an intelligent scheduling algorithm, match the intermediate instruction set with the execution ability of the target device in real time, and generate executable device control instructions, specifically:
[0065] S31, obtain the processing delay H1, computing power H2, and current queue depth H3 of the device, calculate the expected time Hg for the device k to execute the instruction m, and identify the complexity O of the instruction m. The formula is expressed as , where represents the queue depth weight coefficient, which is used to measure the influence degree of the queue depth on the instruction execution time and is determined by optimization through experiments or machine learning algorithms; among them, the processing delay of the device represents the inherent delay time of the device before starting to process after receiving the instruction, the computing power represents the computing performance of the device measured in millions of instructions per second (MIPS), the current queue depth represents the number of instructions to be processed by the device currently, and the quantification of the complexity is determined according to factors such as the amount of computation and data processing required by the instruction, and can be obtained through empirical values or historical data statistics;
[0066] It should be noted that the expected execution time is calculated by comprehensively considering the processing delay, computing power, current queue depth, and instruction complexity of the device. This multi-factor evaluation method can more accurately reflect the actual time consumed by the device to execute instructions; the queue depth weight coefficient is optimized and determined through experiments or machine learning algorithms, ensuring the accuracy and scientificity of the calculation results and providing a reliable basis for subsequent instruction allocation;
[0067] S32, split the complex instruction into an atomic sub-instruction set, and allocate it to multiple devices for parallel execution through the consistent hashing algorithm to ensure the atomicity and result consistency of the sub-instructions;
[0068] Step 4, synchronize the device status through the distributed event bus, and dynamically optimize the resource allocation and instruction execution path according to the feedback results;
[0069] Step 5, adopt a lightweight containerized deployment architecture to support the cross-platform operation of plugins between edge computing nodes and cloud platforms.
[0070] In this application, based on Step 1, a dynamic protocol adaptation layer is constructed. The control instructions of heterogeneous network devices are parsed and converted through the Matrix command adapter to generate a standardized intermediate instruction set. The specific steps are as follows:
[0071] S11, protocol parsing: When the Matrix command adapter receives the original device instruction (such as a CLI command), the instruction parameters and operation types in the original device instruction are extracted through the semantic parsing module;
[0072] S12, template matching: Set a protocol template library, including protocol type templates of several devices; match the protocol type of the target device (such as Huawei vRP and Cisco IOS) from the protocol template library to generate a standardized intermediate instruction;
[0073] S13, exception handling: If the protocol type in the protocol template library cannot match the protocol type of the target device, it means that the template is missing, and a protocol extension signal is generated; the protocol extension signal calls a user-defined script through the protocol extension interface to generate a new protocol type template.
[0074] It should be noted that the Matrix command adapter adopts semantic parsing technology, which can accurately extract the parameters and operation types in heterogeneous device instructions, just like a translation software that recognizes keywords and grammatical structures in different languages; the protocol template library is like a multilingual dictionary, storing various device protocol type templates for quick matching; when encountering a new device protocol, the user-defined script extension function allows professionals to write code to create new templates, just like adding new words to a dictionary, so that the system can adapt to various new devices and new protocols; different from the traditional method that relies on a static protocol template library, this dynamic protocol adaptation layer has self-expansion ability, greatly improving the compatibility and scalability of network management, and can access new devices without a large amount of code modification, saving development costs and time.
[0075] In this application, the future bandwidth demand is predicted through a time series analysis model, and the resource allocation weight of the device is calculated by combining the real-time load of the device and the historical peak data. Specifically:
[0076] Use the autoregressive integrated moving average model to fit the historical bandwidth device to obtain the future bandwidth demand within the predicted set time period ;
[0077] Obtain the future bandwidth demand of device i , real-time CPU utilization , historical peak bandwidth Among them, the historical peak bandwidth is the highest bandwidth usage reached by the device at a certain moment or within a set time period during the past operation of the device. Here, i represents the device number, and the resource allocation weight is calculated by the weighted average method. The formula is expressed as , where N represents the total number of devices, j represents the device number, represents the future bandwidth demand of device j, represents the historical peak bandwidth of device j, represents the sum of the future predicted bandwidth demands of all devices from the 1st to the Nth in the network, represents the sum of the historical peak bandwidths of all devices, respectively represent the weight coefficients corresponding to the future bandwidth demand, real-time CPU utilization, and historical peak bandwidth;
[0078] It should be further noted that the time series analysis model uses the autoregressive integrated moving average model to predict the future bandwidth demand. This model fully considers the trend and fluctuation of historical bandwidth data. Compared with simple empirical estimation or fixed rule allocation, it can more accurately grasp the future resource demand, and combines the real-time load of the device and the historical peak data to calculate the resource allocation weight, just like providing a precise portrait of the resource demands of different devices, making the resource allocation more in line with the actual situation.
[0079] In this application, based on step S22, the resource virtualization pool adopts SDN-based virtualization technology, divides the priority queue according to device types, and realizes elastic resource allocation as follows:
[0080] S221. The SDN controller monitors the status of physical resources in the network in real time, including network bandwidth, computing resources, and the usage of device interfaces, specifically the link bandwidth occupancy rate, device CPU utilization rate, and the number of used interfaces, and abstractly converts them into virtual resources;
[0081] S222. Classify the devices in the network, set device type groups according to the functions and importance of the devices in the network, including core business devices and ordinary business devices; and assign corresponding priorities to each device type in the device type group, create three different priority queues of high, medium, and low, and sort the device priorities in the three different priority queues of high, medium, and low according to the size order of resource allocation weights;
[0082] S223. Monitor the resource usage and resource requests in each priority queue through the SDN controller in real time. When a resource request enters the queue, the controller checks the high-priority queue to determine whether there are sufficient resources in the virtual resource pool. Specifically:
[0083] Set the initial total bandwidth of the virtual resource pool, identify the currently allocated bandwidth, and subtract the currently allocated bandwidth from the initial total bandwidth to obtain the current available bandwidth B; set the initial total computing resources, identify the currently allocated computing resources, and subtract the currently allocated computing resources from the initial total computing resources to obtain the current available computing resources C; set the initial total number of device interfaces, identify the currently allocated number of interfaces, and subtract the currently allocated number of interfaces from the initial total number of device interfaces to obtain the current available number of device interfaces I;
[0084] When receiving a resource request from any device, obtain the resource requirement information corresponding to the device, including the required bandwidth Bn, required computing resources Cn, and required number of device interfaces In; if the conditions are simultaneously met, it means that there are sufficient resources in the virtual resource pool to meet the requests in the high-priority queue, and then immediately allocate resources for this request; otherwise, if the conditions are not simultaneously met, it means that the resources required for this request are insufficient, then record the request and wait for resource release, and mark this request as a waiting request; after satisfying the requests in the high-priority queue, process the requests in the medium-priority queue and low-priority queue in the same way; during the resource allocation process, if resources are idle, the SDN controller will select requests from all waiting requests in the order of priority for resource allocation;
[0085] It should be noted that through the SDN-based virtualization technology, physical resources are abstracted into virtual resources, which is convenient for unified management and allocation. By dividing the priority queue according to device types, it can ensure that core business devices can obtain resources preferentially, enabling important tasks to be processed first. When resources are scarce, high-priority devices are preferentially satisfied, and requests from low-priority devices are reasonably delayed or partially processed. When resources are idle, they are allocated in a timely manner, effectively improving resource utilization and ensuring the stable operation of key network services.
[0086] In this application, complex instructions are split into atomic sub-instruction sets and distributed to multiple devices for parallel execution through the consistent hashing algorithm to ensure the atomicity and result consistency of sub-instructions, as follows:
[0087] S321, Instruction splitting: Identify complex instructions and mark them as R. According to their logical structure and data dependency relationships, split them into n sub-instructions R1, R2,..., Rn, making each sub-instruction relatively independent and capable of parallel execution;
[0088] Record the dependency relationships between sub-instructions to form a dependency graph G = (V, E), where V is the set of sub-instructions, and E is the set of edges representing the dependency relationships of sub-instructions;
[0089] S322, Device selection and allocation: Adopt the consistent hashing algorithm to distribute sub-instructions to multiple devices for execution. Specifically, by setting the hash function as H(x), for any instruction Ir, r represents the instruction number, calculate hr = H(Ir), and find the first device node Ds in the clockwise direction on the hash ring, and allocate the sub-instruction Ir to the device Ds for execution;
[0090] S323, Atomicity guarantee: Adopt the two-phase commit protocol to ensure the atomicity of sub-instructions. Specifically, in the first phase, the coordinator sends a pre-execution request to all devices executing sub-instructions, and the devices execute the sub-instructions locally and feedback the execution results (success or failure); in the second phase, if all devices feedback successful execution, the coordinator sends a commit request to all devices, and the devices officially commit the execution results; if any one device feedbacks failure, the coordinator sends a rollback request to all devices, and the devices revoke the executed operations to ensure the atomicity of sub-instructions;
[0091] It should be noted that splitting complex instructions into atomic sub-instruction sets and using the consistent hashing algorithm to distribute them to multiple devices for parallel execution makes full use of the computing resources of multiple devices in the network, greatly improving the instruction execution efficiency. The two-phase commit protocol ensures the atomicity and result consistency of sub-instructions, and each phase is strictly carried out in accordance with the rules, ensuring the integrity and correctness of data and avoiding data chaos problems caused by the failure of some instructions to execute.
[0092] In this application, the distributed event bus adopts the Kafka message queue, which supports the real-time synchronization and exception backtracking of device status data. It should be noted that by adopting the Kafka message queue for the distributed event bus, it has the characteristics of high throughput and low latency, can quickly synchronize device status data, ensure the timely transmission of device status information, and the exception backtracking function helps to quickly locate and solve faults when problems occur, improving the stability and reliability of the system.
[0093] In this application, the device status is synchronized through the distributed event bus, and the resource allocation and instruction execution path are dynamically optimized according to the feedback results, specifically as follows:
[0094] Obtain the status data published by the device in real time, including CPU utilization rate, memory occupancy rate, and queue depth;
[0095] Dynamic optimization of resource allocation: Obtain the target resource utilization rate F1 and the actual resource utilization rate F2 of the device, and subtract the actual resource utilization rate from the target resource utilization rate to obtain the target resource deviation value F; adjust the resource allocation weight of the device according to the target resource deviation value, and the formula is expressed as , represents the learning rate;
[0096] Sort the priority queue according to the updated resource allocation weight, and satisfy the device with the highest priority when allocating resources;
[0097] Optimization of instruction execution path: Calculate the execution ability score Sd based on the device status, and select the optimal device. The calculation formula is expressed as , where Hg represents the expected time for the device to execute the instruction, H3 represents the current queue depth, represents the queue depth penalty coefficient;
[0098] Dynamically optimize the instruction allocation using reinforcement learning according to the Q-Learning path selection algorithm. The formula is expressed as , where respectively represent selecting action a in the current state s, represents the reward, represents the discount factor;
[0099] It should be noted that by dynamically optimizing the resource allocation and instruction execution path according to the device status feedback, the system can adapt to the changes in the network environment in real time. By adjusting the resource allocation weight and selecting the optimal device to execute the instruction, the system performance is continuously improved, ensuring that the network is always in an efficient operation state.
[0100] In this application, the lightweight containerized architecture is implemented based on Docker, and the plugin module is deployed by microservice splitting. Specifically:
[0101] S51, Microservice splitting: Split the plugin into multiple independent microservices according to functions, including Matrix command adaptation, resource scheduling, instruction execution, and status monitoring microservices;
[0102] S52, Image building: Create Docker images for each microservice, configure the running environment in the Dockerfile, install dependencies, and copy the code;
[0103] S53, Orchestration and deployment: Orchestrate containers with Kubernetes and define Deployment and Service resources through YAML files;
[0104] S54, Set the CPU and memory requests and limits for microservice containers in Kubernetes;
[0105] It should be noted that through the lightweight containerized deployment architecture based on Docker, the cross-platform operation of the plugin between edge computing nodes and cloud platforms is realized, which means that enterprises can flexibly select the deployment environment according to their own business needs, meet the real-time requirements in edge computing scenarios, utilize powerful computing resources on the cloud platform, and be able to adapt to different network infrastructures;
[0106] Moreover, the plugin module is deployed by splitting it into microservices, and complex functions are split into multiple independent microservices. Each microservice focuses on one function, reducing the system coupling degree and facilitating development, maintenance, and extension; Kubernetes orchestrates containers by defining Deployment and Service resources through YAML files, realizing the automated deployment, management, and extension of containers, and improving the flexibility and maintainability of the system.
[0107] As an implementation device of an IP network acquisition and control plugin based on a Matrix command adapter provided in this application, the method described above is adopted, including a dynamic protocol adaptation module, a resource virtualization pool management module, an intelligent scheduling engine, a distributed event bus module, and a containerized deployment module;
[0108] The dynamic protocol adaptation module is used to parse and convert the control instructions of heterogeneous network devices through the Matrix command adapter to generate a standardized intermediate instruction set;
[0109] The resource virtualization pool management module is used to deploy a resource virtualization pool in the IP network acquisition and control plugin and dynamically allocate network bandwidth, computing resources, and device interfaces;
[0110] The intelligent scheduling engine, based on intelligent scheduling algorithms, matches the intermediate instruction set with the execution capabilities of target devices in real time to generate executable device control instructions,
[0111] The distributed event bus module is used to synchronize device status through the distributed event bus and dynamically optimize resource allocation and instruction execution paths according to the feedback results;
[0112] The containerized deployment module is used to adopt a lightweight containerized deployment architecture to support the cross-platform operation of plugins on edge computing nodes and cloud platforms.
[0113] In this application, the intelligent scheduling engine includes a hardware acceleration unit; the hardware acceleration unit uses a pipeline architecture to process multi-device instructions in parallel, and the pipeline architecture includes lexical analysis, syntax analysis, semantic mapping, and protocol conversion stages.
[0114] Those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention, which follow the general principles of the present invention and include known common knowledge or conventional technical means in the technical field not disclosed in this disclosure. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present invention are pointed out by the following claims.
[0115] It should be understood that the present invention is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.
Claims
1. A method for implementing an IP network acquisition and control plug-in based on a Matrix command adapter, characterized in that: The following steps are involved: Step 1: Build a dynamic protocol adaptation layer to parse and convert the control instructions of heterogeneous network devices through the Matrix command adapter to generate a standardized intermediate instruction set; Step 2: Deploy a resource virtualization pool in the IP network acquisition and control plug-in to dynamically allocate network bandwidth, computing resources, and device interfaces. The allocation strategies include: S21, predict future bandwidth demand through time series analysis model, combine the real-time load and historical peak data of the device to calculate the resource allocation weight of the device; S22, deploy resource virtualization pool, divide priority queues by device type, and realize flexible resource allocation; Step 3: Based on the intelligent scheduling algorithm, the intermediate instruction set is matched with the execution capability of the target device in real time to generate executable device control instructions, specifically: S31, calculating the expected execution time of the device to execute the instruction according to the computing capability, processing delay and current queue depth of the device; S32, splits complex instructions into atomic sub-instruction sets, distributes them to multiple devices for parallel execution through a consistent hashing algorithm, and ensures the atomicity and result consistency of the sub-instructions; Step 4: Synchronize device status through a distributed event bus, and dynamically optimize resource allocation and instruction execution path based on feedback results; Step 5: Use a lightweight containerized deployment architecture to support cross-platform operation of plug-ins on edge computing nodes and cloud platforms.
2. According to claim 1, a method for implementing an IP network acquisition and control plug-in based on a Matrix command adapter is characterized in that: Based on step 1, a dynamic protocol adaptation layer is constructed, and the control instructions of heterogeneous network devices are parsed and converted through the Matrix command adapter to generate a standardized intermediate instruction set. The specific steps are as follows: S11, protocol parsing: when the Matrix command adapter receives the original device command, it extracts the command parameters and operation types in the original device command through the semantic parsing module; S12, template matching: setting a protocol template library, including protocol type templates of several types of devices; matching the protocol type of the target device from the protocol template library, and generating a standardized intermediate instruction; S13, exception handling: If the protocol type in the protocol template library cannot match the protocol type of the target device, it means that the template is missing, and a protocol extension signal is generated; the protocol extension signal calls the user-defined script through the protocol extension interface to generate a new protocol type template.
3. According to claim 1, a method for implementing an IP network acquisition and control plug-in based on a Matrix command adapter is characterized in that: The future bandwidth demand is predicted through the time series analysis model. The resource allocation weight of the device is calculated by combining the real-time load and historical peak data of the device. Specifically, it is: The autoregressive integrated moving average model is used to fit the historical bandwidth equipment to obtain the future bandwidth demand within the predicted set time period. ; Get the future bandwidth requirements of device i , Real-time CPU utilization , historical peak bandwidth , where i represents the device number, and the resource allocation weight is calculated using a weighted average method. The formula is: , where N represents the total number of devices and j represents the device number. represents the future bandwidth requirement of device j, represents the historical peak bandwidth of device j, It represents the sum of the future predicted bandwidth requirements of all devices from the 1st to the Nth in the network. Indicates the sum of the historical peak bandwidths of all devices. They represent the weight coefficients corresponding to future bandwidth demand, real-time CPU utilization, and historical peak bandwidth respectively.
4. According to the method for implementing an IP network acquisition and control plug-in based on a Matrix command adapter according to claim 1, it is characterized in that: Based on step S22, the resource virtualization pool adopts SDN-based virtualization technology to divide priority queues according to device types to achieve flexible allocation of resources, as follows: S221, monitor the status of physical resources in the network in real time through the SDN controller, including the usage of network bandwidth, computing resources and device interfaces, and abstract them into virtual resources; S222, classifying the devices in the network and setting device type groups, including core business devices and common business devices; And assign a corresponding priority to each device type in the device type group, create three different priority queues, namely high, medium and low, and sort the device priorities in the three different priority queues according to the order of resource allocation weight; S223, through the real-time monitoring of resource usage and resource requests in each priority queue by the SDN controller, requests are processed starting from the high priority queue. When the high priority queue request is satisfied, requests from the medium and low priority queues are processed in turn. If resources are insufficient, resource requirements of high priority devices are processed first, and requests from low priority devices are delayed or partially processed. When resources are idle, they are promptly allocated to waiting requests.
5. The method for implementing an IP network acquisition and control plug-in based on a Matrix command adapter according to claim 1, characterized in that: Complex instructions are split into atomic sub-instruction sets, which are distributed to multiple devices for parallel execution through a consistent hashing algorithm to ensure the atomicity and result consistency of the sub-instructions. The details are as follows: S321, instruction splitting: identify complex instructions and mark them as R, and split them into n sub-instructions R1, R2, ..., Rn according to their logical structure and data dependency, so that each sub-instruction is relatively independent and can be executed in parallel; Record the dependencies between sub-instructions to form a dependency graph G=(V,E), where is a set of sub-instructions, and E is a set of edges representing the dependency relationship of sub-instructions; S322, device selection and allocation: Use consistent hashing algorithm to allocate sub-instructions to multiple devices for execution. Specifically, the consistent hashing algorithm is used to map the devices to a virtual hash ring. Each sub-instruction is calculated by a hash function to obtain a hash value. The hash value is used to find the nearest device node clockwise on the hash ring as the execution device. S323, Atomicity Guarantee: A two-phase commit protocol is used to ensure the atomicity of sub-instructions.
6. The method for implementing an IP network acquisition and control plug-in based on a Matrix command adapter according to claim 1, characterized in that: The distributed event bus uses Kafka message queues to support real-time synchronization of device status data and exception backtracking.
7. The method for implementing an IP network acquisition and control plug-in based on a Matrix command adapter according to claim 1, characterized in that: The device status is synchronized through the distributed event bus, and resource allocation and instruction execution path are dynamically optimized based on the feedback results, as follows: Obtain status data published by the device in real time, including CPU utilization, memory usage, and queue depth; Dynamic optimization of resource allocation: Get the target resource utilization F1 and actual resource utilization F2 of the device, subtract the target resource utilization from the actual resource utilization to get the target resource deviation value F; adjust the resource allocation weight of the device according to the target resource deviation value. The formula is: , represents the learning rate; Sort the priority queues according to the updated resource allocation weights and allocate resources to the devices with the highest priority. Instruction execution path optimization: Calculate the execution capability score Sd based on the device status and select the optimal device. The calculation formula is expressed as , where Hg represents the expected time for the device to execute instructions, H3 represents the current queue depth, Indicates the queue depth penalty coefficient; According to the Q-Learning path selection algorithm, reinforcement learning is used to dynamically optimize instruction allocation. The formula is expressed as ,in, They represent the current state s and the action a, Indicates reward, Represents the discount factor.
8. The method for implementing an IP network acquisition and control plug-in based on a Matrix command adapter according to claim 1, characterized in that: The lightweight containerized architecture is implemented based on Docker, and the plug-in module is split and deployed through microservices, specifically: S51, Microservice Splitting: Split the plug-in into multiple independent microservices according to function, including Matrix command adaptation, resource scheduling, instruction execution and status monitoring microservices; S52, Image building: Create a Docker image for each microservice, configure the operating environment in the Dockerfile, install dependencies, and copy the code; S53, orchestration and deployment: Use Kubernetes to orchestrate containers and define Deployment and Service resources through YAML files; S54, set CPU and memory requests and limits for microservice containers in Kubernetes.
9. A device for implementing an IP network acquisition and control plug-in based on a Matrix command adapter, using the method described in any one of claims 1 to 8, characterized in that: It includes dynamic protocol adaptation module, resource virtualization pool management module, intelligent scheduling engine, distributed event bus module and containerized deployment module; The dynamic protocol adaptation module is used to parse and convert the control instructions of the heterogeneous network devices through the Matrix command adapter to generate a standardized intermediate instruction set; The resource virtualization pool management module is used to deploy the resource virtualization pool in the IP network acquisition and control plug-in and dynamically allocate network bandwidth, computing resources and device interfaces; The intelligent scheduling engine is based on the intelligent scheduling algorithm, which matches the intermediate instruction set with the execution capability of the target device in real time and generates executable device control instructions. The distributed event bus module is used to synchronize device states through the distributed event bus and dynamically optimize resource allocation and instruction execution paths based on feedback results; The containerized deployment module is used to adopt a lightweight containerized deployment architecture to support cross-platform operation of plug-ins on edge computing nodes and cloud platforms.
10. The device for implementing an IP network acquisition and control plug-in based on a Matrix command adapter according to claim 9, characterized in that: The intelligent scheduling engine includes a hardware acceleration unit; the hardware acceleration unit uses a pipeline architecture to process multi-device instructions in parallel, and the pipeline architecture includes lexical analysis, grammatical analysis, semantic mapping, and protocol conversion stages.
Citation Information
Patent Citations
Internet of Things protocol adaptation method and device and computer equipment
CN118400447A
Method and apparatus for automated negotiation for resources on a switched underlay network
US20050076339A1