Automatic topology identification method and system for power internet of things
By obtaining node information of the scheduling platform in the power Internet of Things, deploying microservice containers using container packaging and pre-selecting strategies, building timing models and constraints, and optimizing microservice scheduling, it solves the problem of high coupling between applications and hardware in the power Internet of Things, realizes efficient data sharing and information exchange between systems, and improves the speed and accuracy of the computing load model.
Patent Information
- Application Number
- CN202510474967.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-07-04
AI Technical Summary
The high coupling of applications and hardware in the power Internet of Things leads to increased deployment and operation and maintenance complexity, low efficiency in data sharing and information exchange between systems, and lack of overall security protection and management platform.
By obtaining the node information of the scheduling platform, using containers to encapsulate the node resource status, combining preselected policies and preferred strategies to deploy the microservice container to the highest-scored load node, building the timing model and constraints of the microservices, optimizing the microservice scheduling logic, and building an automatic topology recognition system model.
It reduces the coupling between applications and hardware, improves the efficiency of data sharing and information exchange between systems, improves the speed and accuracy of the computing load model, supports multi-dimensional load information processing, enhances the scalability of microservice connection relationships, and reduces the volatility of edge computing load resources.
Smart Images

Figure CN120263659A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of the Internet of Things for power, and particularly to a method and system for automatic topology recognition in the Internet of Things for power. Background Art
[0002] With the rapid development of the smart grid and the in-depth promotion of the Internet of Things for power, power enterprises have deployed a variety of business applications in the Internet of Things for power. However, due to the lack of a unified operation and maintenance deployment standard and technical system, there are significant differences in technical requirements among systems, resulting in a high degree of coupling between application programs and terminal hardware. This coupling not only increases the complexity of application program deployment and operation and maintenance, but also consumes a large amount of resources. In addition, the obstacles to data sharing and information exchange between systems further exacerbate this problem, making the Internet of Things for power lack an overall security protection system and management platform, and only able to meet the primary low-level interconnection requirements. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method and system for automatic topology recognition in the Internet of Things for power, so as to effectively reduce the coupling degree between application programs and hardware and improve the efficiency of data sharing and information exchange between systems.
[0004] To solve the above technical problem, the present invention provides a method for automatic topology recognition in the Internet of Things for power, including:
[0005] Step S1, obtaining node information of a scheduling platform, where the node information includes a master node and a worker node. Among them, the master node is used for task allocation, resource monitoring, cluster scheduling and management, and the worker node is used for running microservices and includes a Pod operation and maintenance component and a Scheduler network scheduling component;
[0006] Step S2, encapsulating the monitoring status of node resources by using containers, obtaining microservice container information and node information, deploying the microservice containers to the load node with the highest score based on a preselected policy and a preferred policy, and analyzing the scheduling policy of the load node to determine the deployment of containers on the worker node;
[0007] Step S3, constructing a timing model of the microservice according to the scheduling policy of the container deployed on the worker node, generating a unified matrix description and a mapping algorithm of the timing connection model based on the timing model, inputting the information after matrix transformation mapping into the Scheduler network scheduling component, obtaining node status and microservice information, and allocating the microservice to the corresponding target node through quantitative evaluation;
[0008] Step S4, migrating the target node to create a new container, and determining the constraint conditions between the new container and the microservice container, where the constraint conditions include the consistency of computing resource consumption;
[0009] Step S5: Construct an automatic topology recognition system model based on the constraint conditions and microservice information. The system model includes a network topology model, an energy consumption model, and a delay constraint model.
[0010] Preferably, the preselection strategy includes a resource fragmentation rate filtering strategy and a differential resource adjustment strategy, where:
[0011] The resource fragmentation rate filtering strategy excludes nodes with a resource fragmentation rate exceeding a preset threshold by calculating the resource balance rate;
[0012] The differential resource adjustment strategy deploys container combinations with a resource request difference exceeding a set range to the same node.
[0013] Preferably, the scoring method of the preference strategy is:
[0014] N SP =P LR +P RR +P SSP
[0015] where P LR is the score of the minimum computing resource preference strategy, P RR is the score of the resource balance strategy, P SSP is the score of the minimum same server first scheduling strategy; N SP is the score of the preference strategy;
[0016] The minimum computing resource preference strategy is used to preferentially select nodes with a resource utilization rate lower than a preset value. Its scoring method is:
[0017]
[0018] where C i is the CPU sub-resource required by the i-th microservice container currently running on the current node, and C sys is the CPU resource of the current working node; M i is the storage resource required by the i-th microservice container currently running on the current node, and M sys is the total value of the storage resources of the current working node, N Pod is the number of microservice containers currently running on the current node, and K LR is the weight coefficient of the total score sum;
[0019] The resource balance strategy is used to optimize the balance of CPU and storage resources within a node. Its scoring method is:
[0020]
[0021] where K RMis a weight coefficient for adjusting the weight of the resource balance strategy score, C′ sys is the reference value of the CPU resources of the current working node;
[0022] The minimum identical service optimization strategy is used to reduce the probability of centralized deployment of containers of the same type, and its scoring method is:
[0023]
[0024] where K SSP is a weight coefficient for adjusting the weight of the minimum identical server priority scheduling strategy score, N SPod represents the total number of containers in which the current edge computing task is running, N Cpod is the number of containers of the same category running on the current node.
[0025] Preferably, in step S3, the unified matrix of the time series connection model is described as an (N + 1)×(n + 1)-dimensional matrix L:
[0026]
[0027] where N represents the number of microservices, l represents the link state of the microservices, and the matrix element l i,j represents the information flow direction between microservices;
[0028] The mapping algorithm includes: decomposing the matrix L into an upper triangular matrix A and a lower triangular matrix B, and determining the number of logical nodes M through the following rank calculation method:
[0029] M = rank(A)
[0030] and generating a node-microservice association matrix LR N,M as follows:
[0031] The relationship between microservices is represented by a time series connection matrix L, and the corresponding formula is:
[0032]
[0033] Preferably, step S3 further includes:
[0034] According to the main link association degree scoring formula:
[0035]
[0036] Preferentially allocate resources to the critical microservice set X, and the critical microservice set X is determined by the longest time link in the time series connection model; where mrs is the task to be deployed, and v is the set of microservices already deployed in the working node.
[0037] Preferably, in the step S4, the constraint conditions include replica constraint, dispersion constraint, and latency constraint, where:
[0038] The replica constraint restricts the resource consumption consistency between the new container and the original container through the following formula:
[0039]
[0040] where S c represents the resource capacity of the system, r n,m (t) is the resource usage value of the n nodes at the current time t, r k,cpu / ram (t) is the resource consumption when the kth task migrates, ε(t) represents the step function, and Δt mov is the migration duration, and R represents the relevant set of resource usage;
[0041] The dispersion constraint requires the same functional containers to be deployed dispersedly through the following formula:
[0042]
[0043] where θ s represents the expected limit value, N(i) represents the number of tasks in the i node, and N(S) represents the number of nodes; S cpu represents the statistic related to CPU resources, S ram represents the statistic related to RAM resources, and S represents the set of nodes;
[0044] The latency constraint defines the task processing time window through the following formula:
[0045]
[0046] where r j,cpu,limt is the highest limit for calculating CPU resources, r j,cpu,req is the lowest requirement for calculating CPU resources, L i,j represents the task volume of the jth container on the ith node, and Δt i,j is the task length of the jth container on the ith node.
[0047] Preferably, the container migration operation includes three methods: migration, container swapping, and relay migration. When migrating, a new container replica is created on the target node, and the original container is destroyed after the migration is completed.
[0048] Preferably, the step S5 further includes:
[0049] Calculating the total utilization rate of resources through the edge proxy:
[0050]
[0051] The sum of the remaining total equilibrium overhead:
[0052]
[0053] Dynamically adjust the number of container replicas;
[0054] Among them, among them, B i,j (s) is the remaining resource overhead of different resource categories i, j, s i , s j represents two different resource categories, and u(c, s) characterizes the utilization rate of resource s in node c. is the average utilization rate of resource S in all running nodes, and C is the set of all nodes.
[0055] Preferably, the method further includes:
[0056] Dynamically adjust the container resource upper limit through a resource sensitivity calculation formula. The sensitivity is defined as the ratio of the difference between resource demand and limit, and the corresponding calculation expression is:
[0057]
[0058] Among them, ζ i,j,cpu 、ζ i,j,ram are the CPU and RAM resource demand sensitivities of the jth Pod of node i, r j,ram,limt is the highest limit for calculating RAM resources, r j,ram,req is the lowest demand for calculating RAM resources.
[0059] The present invention also provides an automatic topology recognition system for the power Internet of Things, including:
[0060] An edge resource analysis unit for obtaining node information of the scheduling platform. The node information includes a master node and a worker node. Among them, the master node is used for task allocation, resource monitoring, cluster scheduling and management, and the worker node is used for running microservices and includes a Pod operation and maintenance component and a Scheduler network scheduling component;
[0061] A policy quantization construction unit for encapsulating the monitoring status of node resources by containers, obtaining microservice container information and node information, deploying microservice containers to the load node with the highest score based on preselected policies and preferred policies, and analyzing the scheduling policies of the load node to determine the deployment of containers on the worker node;
[0062] The scheduling policy implementation unit is used to construct a timing model of microservices according to the scheduling policy for deploying containers on working nodes, generate a unified matrix description and mapping algorithm of the timing connection model based on the timing model, input the information after matrix transformation mapping into the Scheduler network scheduling component, obtain node status and microservice information, and allocate microservices to corresponding target nodes through quantitative evaluation;
[0063] The container optimization and migration unit is used to migrate target nodes to create new containers and determine the constraint conditions between the new containers and the microservice containers, where the constraint conditions include the consistency of computing resource consumption;
[0064] The automatic topology recognition unit is used to construct an automatic topology recognition system model based on the constraint conditions and microservice information, and the system model includes a network topology model, an energy consumption model, and a delay constraint model.
[0065] Implementing the present invention has the following beneficial effects: By encapsulating node resource status using containerization technology, combining preselection strategies and optimization strategies to deploy microservice containers to the optimal load nodes, and optimizing microservice scheduling logic through timing model construction and matrix mapping algorithms. In addition, container migration and system model construction based on constraint conditions further improve resource utilization and task processing efficiency. The present invention significantly improves the speed and accuracy of the computing load model, supports multi-dimensional load information processing, and enhances the scalability of microservice connection relationships. At the same time, the scheduling policy effectively reduces the volatility of edge computing load resources, ensures the completion time of high-priority microservices in the timing link, and provides reliable technical support for the efficient operation of the power Internet of Things. Description of the Drawings
[0066] To more clearly illustrate the technical solutions in the embodiments of the present invention or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.
[0067] Figure 1 It is a flowchart of a method for automatic topology recognition of a power Internet of Things in Embodiment 1 of the present invention.
[0068] Figure 2 It is a structural diagram of a system for automatic topology recognition of a power Internet of Things in Embodiment 2 of the present invention. Detailed Embodiments
[0069] The following descriptions of the embodiments refer to the drawings to exemplify specific embodiments in which the present invention can be implemented.
[0070] Please refer to Figure 1 As shown in Figure 1 , Embodiment 1 of the present invention provides an automatic topology recognition method for a power Internet of Things, including:
[0071] Step S1, obtain node information of the scheduling platform, where the node information includes a master node and a working node. Among them, the master node is used for task allocation, resource monitoring, cluster scheduling, and management, and the working node is used to run microservices and includes a Pod operation and maintenance component and a Scheduler network scheduling component;
[0072] Step S2, encapsulate the monitoring status of node resources using containers, obtain microservice container information and node information, deploy the microservice containers to the load node with the highest score based on a preselected policy and a preferred policy, and analyze the scheduling policy of the load node to determine the working node for deploying the containers;
[0073] Step S3, construct a timing model of the microservice according to the scheduling policy of the working node for deploying the containers, generate a unified matrix description and a mapping algorithm of the timing connection model based on the timing model, input the information after matrix transformation mapping into the Scheduler network scheduling component, obtain node status and microservice information, and allocate the microservices to the corresponding target nodes through quantitative evaluation;
[0074] Step S4, migrate the target node to create a new container, and determine the constraint conditions between the new container and the microservice container, where the constraint conditions include the consistency of computing resource consumption;
[0075] Step S5, construct an automatic topology recognition system model based on the constraint conditions and microservice information, where the system model includes a network topology model, an energy consumption model, and a delay constraint model.
[0076] Specifically, in the embodiment of the present invention, the automatic topology recognition of the power Internet of Things is based on a containerized edge computing architecture, including the following core components:
[0077] Master node: responsible for task allocation, resource monitoring, cluster scheduling, and management, including an API service component, a control and management component, and a resource scheduling component.
[0078] Working node: runs microservice containers, integrates a Pod operation and maintenance component and a Scheduler network scheduling component, and supports dynamic resource adjustment and container deployment.
[0079] Scheduling platform: equipped with an edge IoT proxy device, and realizes automatic container scheduling and topology recognition by obtaining node information (status of the master node and the working node), resource requirements of microservice containers, and scheduling policies.
[0080] The specific process of the automatic topology recognition method in the embodiment of the present invention is as follows:
[0081] In step S1, node information is obtained, that is, the real-time status information of the master node and the worker nodes is obtained from the scheduling platform. The master node includes an API service component, a control and management component, and a resource scheduling component, which is responsible for cluster task allocation, resource monitoring, and scheduling; the worker nodes include a Pod operation and maintenance component and a Scheduler network scheduling component, which are used to run microservice containers and support dynamic resource adjustment.
[0082] In step S2, the monitoring status of node resources (CPU, storage, network bandwidth) is encapsulated through container technology to generate microservice container information (including resource requirements, priorities, timing constraints, etc.).
[0083] Optionally, the task scheduling of the container includes vertical control and horizontal control. In vertical control, the resource quota on the load node where the container is located is adjusted according to the resource calculation requirements of the application service. In horizontal control, the number of containers is adjusted according to the computing load requirements of the aggregated service, and the container replicas are dynamically scaled in and out according to the resource usage situation. After obtaining the performance metrics of the Pod operation and maintenance component, the number of target container parents is obtained through formula (1):
[0084]
[0085] Among them, dRs represents the number of target replicas to be adjusted, cRs represents the number of replicas in the current node, cMV represents the resource amount in the current node, and dMV represents the expected resource amount in the current node. If it is determined according to the calculation result that cMV is less than dMV, an expansion operation is performed; otherwise, a contraction operation is performed.
[0086] In this embodiment, the analysis of the scheduling strategy for microservice containers includes the minimum computing resource optimization strategy, the resource balance strategy, and the minimum identical service optimization scheduling strategy, specifically including:
[0087] Minimum computing resource optimization strategy: Concentrate the computing resources in some nodes and select the nodes with low resource utilization to ensure the reasonable computing time of tasks. The scoring of the strategy is as shown in formula (2):
[0088]
[0089] where C i is the CPU sub-resource required for the i-th microservice container currently running on the current node, and C sys is the CPU resource of the current worker node; M i is the storage resource required for the i-th microservice container currently running on the current node, M sys is the total storage resource value of the current worker node, N Pod is the number of microservice containers currently running on the current node, and K LRis the weight coefficient of the total score sum;
[0090] Resource balancing strategy: The scoring algorithm for the resource balancing strategy is formula (3):
[0091]
[0092] where K RM is the weight coefficient for adjusting the weight of the resource balancing strategy score, and C' sys is the reference value of the CPU resources of the current working node.
[0093] Least same server first scheduling strategy: Place different containers belonging to the same aggregated service on different nodes. Before entering the Scheduler network scheduling component, obtain the aggregated type information of the containers in the node, and obtain the aggregated attributes to which the containers of the task belong. The node selection quantization formula in network computing is formula (4):
[0094]
[0095] where K SSP is the weight coefficient for adjusting the weight of the least same server first scheduling strategy score, N SPod represents the total number of containers in which the current edge computing task is running, and N CPod is the number of containers of the same category running on the current node. The more containers of the same category in the node, the lower the score. The weighted sum of the scoring strategies gives formula (5), and the node arrangement list suitable for container operation is obtained through formula (5). The nodes in the list are sorted from high score to low score, and the Scheduler network scheduling component selects the working node with the highest score to deploy the container;
[0096] N SP =P LR +P RR +P SSP (5)
[0097] where the scheduling algorithm includes: obtaining the computing load situation of the working node, obtaining the resource requirements of the microservice containers, selecting appropriate nodes according to the strategy and matching the compatible containers, and returning the nodes that meet the strategy under the current resource supply.
[0098] It should be noted that step S3 constructs the unified matrix description and mapping algorithm of the timing connection model according to the timing model, including:
[0099] The relationship between microservices is represented by the timing connection matrix L, and the corresponding formula is:
[0100]
[0101] Among them, N represents the number of microservices, l represents the link status of microservices, and the matrix element l i,j represents the information flow direction between microservices. The status values are represented by -1 and 1. -1 indicates information outflow, and 1 indicates information inflow;
[0102] Take the upper triangular part of the time-sequence connection matrix L to form matrix A, take the lower triangular part as matrix B, and the rank of the column transformation of matrix A is the number of nodes M:
[0103] M = rank(A) (7)
[0104] Extract the linearly independent column numbers in A and B and recombine them to form the matrix LR composed of microservices and nodes. Among them, the number of rows represents the number of microservices, and the number of columns is the number of time-sequence logic nodes. The corresponding formula is:
[0105]
[0106] Thereby improving the accuracy of microservice load calculation.
[0107] When calculating resources according to the time-sequence logic of microservices, it is necessary to consider the CPU computing power resource r cpu , storage resource r ram , business priority l p , time requirement t limt . The general CPU computing power resource load model of power microservices is expressed as:
[0108] r = [r cpu , r ram , l p , t limt (9)
[0109] The computing loads of all services are represented by a matrix. The corresponding formula is:
[0110] E = {r1, r2..., r n} (10)
[0111] According to the resource requirements of the load, take the occupied time length, the allocated CPU computing power, and RAM as step functions, and calculate the resource processing time-sequence of the current Pod task through formulas (11) and (12):
[0112] ξ j,cpu (t) = ∑ k=0 r k,cpu (t) × (ε(t - t k,0 ) - ε(t - t k,0 - Δt i,j )) (11)
[0113] ξj,ram (t) = ∑ k=0 r k,ram (t) × (ε(t - t k,0 ) - ε(t - t k,0 - Δt i,j )) (12)
[0114] where ξ j,cpu (t), ξ j,ram (t) represent the CPU processing time series and RAM occupancy time slots of the j-th container respectively, r k,cpu (t), r k,ram (t) are the CPU and RAM resource requirements of the Pod operation and maintenance component respectively, ε(t) represents the step function, all aggregation computing tasks have a silent period and a running active period, t k,0 represents the start time of task execution, and k represents the number of complete running active periods.
[0115] In this embodiment, according to the calculation load modeling, the number of nodes of the aggregation service, the shunt information can be obtained to find the task ID corresponding to the longest time series in the nodes. Based on the known logical point matrix, the series nodes are calculated through formula (13):
[0116]
[0117] where E 1×M is the unit row vector, is the connection matrix of the service and node matrix. All elements in the matrix are the squares of the original elements. The nodes with element values of 2 in the result vector are series nodes, and the corresponding set is α. The nodes with vector elements greater than or equal to 3 are parallel nodes, and the corresponding microservice set is β. The elements of α and β have an overlapping relationship. The normalized connection affinity scoring relationship is as shown in formula (14):
[0118]
[0119] where mrs is the task to be deployed, P scom (mrs) is the score of mrs on a certain node, v is the set of microservices already deployed in the working nodes, and N is the number of non-zero elements obtained in the set;
[0120] Given the running time t of the load, obtain the set X of microservices corresponding to the longest time link in the composition time series curve. The main link correlation score is expressed as:
[0121]
[0122] It should be noted that the variance of the resource utilization rate of all node information is used to calculate the utilization overhead of the overall cluster resources. The corresponding formula is:
[0123]
[0124] Among them, U b is the resource utilization balance rate, and u(c, s) represents the utilization rate of resource s in node c. is the average utilization rate of resource S in all running nodes, which is used to measure the balance of the computing resource usage of the edge IoT agent.
[0125] The total utilization rate of the edge proxy computing resources is the sum of the utilization rates of all computing resources, and the corresponding formula is:
[0126]
[0127] Define the remaining resource balance as:
[0128] B i,j (s) = ∑ c∈C max{0, A(c, s i ) - A(c, s j ) × t(s i , s j )} (18)
[0129] Among them, B i,j (s) is the remaining resource overhead of different resource categories i and j, t(s i , s j ) is the remaining ratio value of the two resources, and A(c, s j ) is the remaining amount of resource i in node c. The sum of the remaining total balance overheads of the resources in the edge IoT cluster of the power IoT network B cost As shown in formula (19), the resource balance is measured by the total resource utilization overhead and the remaining resource utilization overhead:
[0130]
[0131] It should be understood that in order to improve the efficiency of the operating system, containers with overlapping functions can be reused to streamline the overall edge computing level. In the actual use process, the associated reuse relationship of each task also needs to be considered. For example, in the power price-based load response service, the line loss analysis service is reused, and there is a mutual relationship in the load time series logic of the input parameters. Therefore, for the extended comprehensive service, there is a more complex time series logic relationship.
[0132] Optionally, the constraint conditions include replica constraints, scattering constraints, and latency constraints. The constraint expression combining the capacity constraint and the replica constraint is:
[0133]
[0134] Among them, S c represents the resource capacity of the system, and r n,m (t) is the resource usage value of the n nodes at the current moment t, and r k,cpu / ram (t) is the resource consumption during the migration of the kth task. ε(t) represents the step function, and Δt mov is the migration duration, and R represents the relevant set of resource usage;
[0135] Let the containers of the same function but different aggregation services run dispersedly on different nodes. The spreading constraint expression is:
[0136]
[0137] Among them, θ s represents the expected limit value, N(i) represents the number of tasks in node i, and N(S) represents the number of nodes; S cpu represents the statistic related to CPU resources, and S ram represents the statistic related to RAM resources, and S represents the set of nodes;
[0138] After setting the minimum resource requirements of the resource sensitivity joint Pod, the highest resource limit of the container can be obtained. The corresponding calculation expression is:
[0139]
[0140] Among them, ζ i,j,cpu and ζ i,j,ram are the CPU and RAM resource demand sensitivities of the jth Pod in node i, and r j,cpu,limt and r j,ram,limt are the highest limits for calculating CPU and RAM resources, and r j,cpu,req and r j,ram,req are the minimum resource requirements for calculating CPU and RAM;
[0141] The expression for calculating the sequential processing time of tasks is:
[0142]
[0143] Among them, Δt i,j is the task length of the jth container on the ith node, and L i,j represents the task volume of the jth container on the ith node.
[0144] In this embodiment, the container scheduling strategy comprehensively considers the timing and node relationship of the aggregation service, and reduces the volatility of nodes on the basis of meeting the computing requirements, balancing requirements, and latency requirements. During the container migration process, it is necessary to create a new container replica on the target node to be migrated first. Only after the new replica is created will the original container be destroyed. Therefore, there will be two identical containers during the migration stage. These two containers consume the same computing resources and become replica constraints. At the same time, during the optimization stage, only suitable nodes are selected from the very beginning, and the time spent cannot meet the real-time allocation requirements. Therefore, based on the sequential scheduling of the power IoT resources, the solution is sought within the neighborhood, and then the solution space is restricted within the range of the optimal results, reducing the search time for the global solution, thereby improving the algorithm solving speed.
[0145] In this embodiment, the optimized container migration includes migration operations, container swapping, and relay migration. The network topology model includes multiple aggregation nodes evenly distributed in the scenario, and each aggregation node is equipped with an edge node. The energy consumption model includes the computing energy consumption generated when the self-equipped edge node performs calculations and the energy consumed when the aggregation node forwards data. The latency constraint model includes that the processing of power IoT services is divided into performing calculations locally at the aggregation node, offloading to surrounding aggregation nodes for calculations, and transmitting to the private cloud for calculations. The container scheduling technology is an automated control mechanism that makes feedback control and outputs control effects after obtaining the input information of the microservice and the status information of the load cluster resources. Therefore, the input microservice information, node information, and the processing method of the scheduling component are all crucial. To further improve the resource utilization rate and reduce the resource fragmentation rate of the working nodes, it is necessary to consider an important characteristic of the scheduling component in the scheduling, which is the elastic supply of resources. The resources of the edge IoT agent can flexibly change and automatically adjust according to the needs of users, realizing the reasonable adaptability of computing resources.
[0146] It should be noted that when the node resource fragmentation is too large, the node should be avoided as much as possible to avoid unreasonable allocation that makes computing resource fragmentation too serious. When the node with too much resource differentiation has a long time to get the opportunity to deploy microservices. Regardless of the large difference in resource requests, containers with large resource requests are combined and deployed on the node, which can change the node resource differentiation. When the concurrency of power edge computing tasks is large, the node produces large resource fragments, which are then ignored in the final task delay evaluation. When calculating the balance of supply and demand, it is a feasible method to avoid running low-priority, large-length, batch-processed microservice containers as much as possible to maintain the power edge computing resource pool and reduce task delay. The computing applications in the power Internet of Things are mostly periodic businesses with strong resource stability and close timing relationships. There is a strong causal connection between power microservices. For example, if the information collection microservice cannot run, then the analysis microservice has no collection data to analyze. Therefore, it is necessary to evaluate the importance of causal timing microservices, give priority to guaranteeing the running time of these microservices, and place them in working nodes with low resource utilization.
[0147] It should be understood that the implementation of the scheduling strategy first requires analyzing the relationship between microservices and analyzing the resource requirements of aggregated services. If the operating logic between containers is not considered and they are simply placed in the corresponding work computing load nodes based on the work computing load score, it will easily lead to large fluctuations in the resource requirements of subsequent container operations, and the computing load of some tasks within a certain time interval will be compressed. The power microservices cannot be operated in a timely manner. Therefore, the power edge resources need to be kept as stable as possible on a time scale. By setting an edge resource analysis unit, a policy quantification construction unit, a scheduling strategy implementation unit, a container optimization migration unit, and an automatic topology identification unit, the node information of the scheduling platform with edge IoT agent devices is obtained, the monitoring status of the node resources is encapsulated using containers, and the microservice container information and node information are obtained accordingly. The pre-selected strategy and the preferred strategy are selected to deploy the microservice container to the load node corresponding to the highest score, and the scheduling strategy of the microservice container corresponding to the load node is analyzed to obtain the working node deployment container. The timing model of the microservice is constructed according to the scheduling strategy corresponding to the working node deployment container, and the timing connection is constructed according to the timing model. The unified matrix description and mapping algorithm of the model transforms and maps the matrix to obtain the information passed into the Scheduler network scheduling component, obtains the status of the node information and the running microservice information, migrates the target node to create a new container and determines the constraints between the new container and the microservice container, and builds an automatic topology recognition system model based on the constraints and microservice information, which improves the speed and accuracy of the computing load model, makes the computing load information multidimensional, and facilitates the expansion of microservice connection relationships. The scheduling strategy can effectively reduce the volatility of the edge computing load resources of the power Internet of Things and ensure the completion time of microservices with higher importance in the timing link.
[0148] As Figure 2 shown, corresponding to the power Internet of Things automatic topology recognition method described in Embodiment 1 of the present invention, Embodiment 2 of the present invention further provides a power Internet of Things automatic topology recognition system, including:
[0149] An edge resource analysis unit, configured to obtain node information of a scheduling platform, where the node information includes a master node and a working node. Among them, the master node is used for task allocation, resource monitoring, cluster scheduling and management, and the working node is used for running microservices and includes a Pod operation and maintenance component and a Scheduler network scheduling component;
[0150] A policy quantization and construction unit, configured to encapsulate the monitoring status of node resources by using containers, obtain microservice container information and node information, deploy microservice containers to the load node with the highest score based on a preselected policy and a preferred policy, and analyze the scheduling policy of the load node to determine the working node for deploying containers;
[0151] A scheduling policy implementation unit, configured to construct a timing model of microservices according to the scheduling policy of the working node for deploying containers, generate a unified matrix description and a mapping algorithm of the timing connection model based on the timing model, input the information after matrix transformation mapping into the Scheduler network scheduling component, obtain node status and microservice information, and allocate microservices to corresponding target nodes through quantitative evaluation;
[0152] A container optimization and migration unit, configured to migrate a target node to create a new container, and determine the constraint conditions between the new container and the microservice container, where the constraint conditions include the consistency of computing resource consumption;
[0153] An automatic topology recognition unit, configured to construct an automatic topology recognition system model based on the constraint conditions and microservice information, where the system model includes a network topology model, an energy consumption model and a delay constraint model.
[0154] Corresponding to the power Internet of Things automatic topology recognition method described in Embodiment 1 of the present invention, Embodiment 3 of the present invention further provides a power Internet of Things automatic topology recognition device, including:
[0155] One or more processors;
[0156] A memory;
[0157] One or more applications, where the one or more applications are stored in the memory and are configured to be executed by the one or more processors, and the one or more applications are configured to execute the power Internet of Things automatic topology recognition method.
[0158] Corresponding to the automatic topology identification method of the power Internet of Things described in the first embodiment of the present invention, the fourth embodiment of the present invention further provides a computer program product, including computer instructions, and the computer instructions direct a computer device to perform operations corresponding to the automatic topology identification method of the first embodiment of the present invention described above.
[0159] Preferably, the processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may also be any conventional processor. The processor is the control center of the device and connects various parts of the device through various interfaces and lines.
[0160] The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc., and the data storage area can store relevant data, etc. In addition, the memory may be a high-speed random access memory, or may also be a non-volatile memory, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., or the memory may also be other volatile solid-state storage devices.
[0161] It should be noted that the above device may include but is not limited to a processor and a memory, which can be understood by those skilled in the art.
[0162] Regarding the working principle and process of this embodiment, please refer to the description of the first embodiment of the present invention above, and details will not be repeated here.
[0163] Compared with the prior art, the beneficial effects brought by the embodiments of the present invention are as follows. The present invention encapsulates the node resource status by adopting containerization technology, deploys microservice containers to the optimal load nodes by combining pre-selection strategies and optimization strategies, and optimizes the microservice scheduling logic through the construction of a time series model and a matrix mapping algorithm. In addition, container migration based on constraint conditions and system model construction further improve resource utilization and task processing efficiency. The present invention significantly improves the speed and accuracy of the computational load model, supports the processing of multi-dimensional load information, and enhances the scalability of microservice connection relationships. At the same time, the scheduling strategy effectively reduces the volatility of edge computing load resources, ensures the completion time of high-priority microservices in the time series link, and provides reliable technical support for the efficient operation of the power Internet of Things.
[0164] The above-disclosed are only the preferred embodiments of the present invention. Of course, the scope of the rights of the present invention cannot be limited thereby. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope covered by the present invention.
Claims
1. An automatic topology recognition method for the power Internet of Things, characterized in that, Including: Step S1: Obtain the node information of the scheduling platform. The node information includes a master node and worker nodes. Among them, the master node is used for task allocation, resource monitoring, cluster scheduling, and management, and the worker nodes are used to run microservices and include a Pod operation and maintenance component and a Scheduler network scheduling component; Step S2: Use containers to encapsulate the monitoring status of node resources, obtain microservice container information and node information, deploy the microservice containers to the load node with the highest score based on a preselection strategy and an optimization strategy, and analyze the scheduling strategy of the load node to determine the worker nodes for deploying containers; Step S3: Construct a timing model of the microservice according to the scheduling strategy of the worker nodes for deploying containers, generate a unified matrix description and a mapping algorithm of the timing connection model based on the timing model, input the information after matrix transformation mapping into the Scheduler network scheduling component, obtain the node status and microservice information, and allocate the microservices to the corresponding target nodes through quantitative evaluation; Step S4: Migrate the target node to create a new container, and determine the constraint conditions between the new container and the microservice container. The constraint conditions include the consistency of computing resource consumption; Step S5: Construct an automatic topology recognition system model based on the constraint conditions and microservice information. The system model includes a network topology model, an energy consumption model, and a delay constraint model.
2. The method according to claim 1, wherein The preselection strategy includes a resource fragmentation rate filtering strategy and a differential resource adjustment strategy, where: The resource fragmentation rate filtering strategy excludes nodes with a resource fragmentation rate exceeding a preset threshold by calculating the resource balance rate; The differential resource adjustment strategy deploys container combinations with a resource request difference exceeding a set range to the same node.
3. The method according to claim 1 or 2, characterized in that, The scoring method of the optimization strategy is: N SP = P LR + P RR + P SSP Among them, P LR is the optimal strategy score for the lowest computing resources, P RR is the resource balance strategy score, P SSP is the minimum same server priority scheduling strategy score; N SP is the score of the optimal strategy; The lowest computing resource optimization strategy is used to preferentially select nodes with a resource utilization rate lower than a preset value, and its scoring method is: Among them, C i is the CPU sub-resource required for the i-th microservice container currently running on the current node, and C sys is the CPU resource of the current working node; M i is the storage resource required for the i-th microservice container currently running on the current node, and M sys is the total value of the storage resources of the current working node, N Pod is the number of microservice containers currently running on the current node, K LR is the weight coefficient of the total score sum; The resource balance strategy is used to optimize the balance between CPU and storage resources within a node, and its scoring method is: Among them, K RM is the weight coefficient for adjusting the weight of the resource balance strategy score, and C' sys is the reference value of the CPU resources of the current working node; The minimum same service optimization strategy is used to reduce the probability of centralized deployment of similar containers, and its scoring method is: Among them, K SSP is the weight coefficient for adjusting the weight of the minimum same server priority scheduling policy score, N SPod represents the total number of containers in which the current edge computing task is running, N CPod is the number of containers of the same category running on the current node.
4. The method according to claim 1, characterized in that In step S3, the unified matrix description of the timing connection model is an (N + 1)×(N + 1)-dimensional matrix L: Among them, N represents the number of microservices, l represents the link status of microservices, and the matrix element l i,j represents the information flow direction between microservices; The mapping algorithm includes: decomposing the matrix L into an upper triangular matrix A and a lower triangular matrix B, and determining the number of logical nodes M through the following rank calculation method: M = rank(A) And generate the node-microservice association matrix LR N,M As follows: The relationship between microservices is represented by the timing connection matrix L, and the corresponding formula is:
5. The method according to claim 4, wherein Step S3 also includes: According to the main link association degree scoring formula: Preferentially allocate resources to the critical microservice set X, and the critical microservice set X is determined by the longest time link in the timing connection model; where mrs is the task to be deployed, and v is the set of microservices already deployed in the worker nodes.
6. The method according to claim 1, wherein In step S4, the constraint conditions include replica constraints, dispersion constraints, and delay constraints, where: The replica constraint restricts the resource consumption consistency between the new container and the original container through the following formula: Among them, S c represents the resource capacity of the system, r n,m (t) is the resource usage value of the n-node at the current time t, r k,cpu / ram (t) is the resource consumption when the k-th task migrates, ε(t) represents the step function, Δt mov is the migration duration, and R represents the relevant set of resource usage; The dispersion constraint requires the dispersed deployment of containers with the same function through the following formula: Among them, θ s represents the expected limit value, N(i) represents the number of tasks in node i, and N(S) represents the number of nodes; S cpu represents the statistic related to CPU resources, S ram represents the statistic related to RAM resources, and S represents the set of nodes; The delay constraint limits the task processing time window through the following formula: where r j,cpu,limt is the highest limit for calculating CPU resources, and r j,cpu,req is the lowest requirement for calculating CPU resources. L i,j represents the task volume of the j-th container on the i-th node, and Δt i,j is the task length of the j-th container on the i-th node.
7. The method according to claim 6, wherein The container migration operation includes three methods: migration, container swapping, and relay migration. When migrating, a new container replica is created on the target node, and the original container is destroyed after the migration is completed.
8. The method according to claim 7, characterized in that, The step S5 further includes: Calculating the total utilization rate of computing resources through the edge proxy: And the sum of the remaining total balancing overhead: Dynamically adjusting the number of container replicas; Among them, among them, B i,j (s) is the remaining resource overhead of different resource categories i, j, s i , s j represents two different resource categories, and u(c, s) characterizes the utilization rate of resource s in node c. is the average utilization rate of resource S among all running nodes, and C is the set of all nodes.
9. The method according to claim 8, wherein The method further includes: Dynamically adjusting the container resource upper limit through the resource sensitivity calculation formula. The sensitivity is defined as the ratio of the difference between resource requirements and limits, and the corresponding calculation expression is: Among them, ζ i,j,cpu , ζ i,j,ram are the CPU and RAM resource demand sensitivities of the j-th Pod of node i, r j,ram,limt is the highest limit for calculating RAM resources, r j,ram,req is the minimum requirement for calculating RAM resources.
10. An automatic topology recognition system for the power Internet of Things, characterized in that, Including: An edge resource analysis unit for obtaining node information of the scheduling platform. The node information includes a master node and worker nodes. Among them, the master node is used for task allocation, resource monitoring, cluster scheduling, and management, and the worker nodes are used to run microservices and include a Pod operation and maintenance component and a Scheduler network scheduling component; A policy quantization and construction unit for encapsulating the monitoring status of node resources by containers, obtaining microservice container information and node information, deploying microservice containers to the load node with the highest score based on preselected policies and optimal policies, and analyzing the scheduling policies of the load node to determine the worker nodes for deploying containers; A scheduling policy implementation unit for constructing a timing model of microservices according to the scheduling policy of deploying containers on worker nodes, generating a unified matrix description and mapping algorithm of the timing connection model based on the timing model, inputting the information after matrix transformation mapping into the Scheduler network scheduling component, obtaining node status and microservice information, and allocating microservices to corresponding target nodes through quantitative evaluation; A container optimization and migration unit for migrating the target node to create a new container and determining the constraint conditions between the new container and the microservice container. The constraint conditions include the consistency of computing resource consumption; An automatic topology recognition unit for constructing an automatic topology recognition system model based on the constraint conditions and microservice information. The system model includes a network topology model, an energy consumption model, and a delay constraint model.