Communication device networking system and method based on microservice architecture

By adopting a microservice architecture and a cellular collaborative architecture, the problems of expansion difficulties and equipment failure impact in communication equipment networking are solved, and efficient task allocation and self-healing mechanisms are achieved, thereby improving the computing efficiency and resource utilization of communication equipment networking.

CN120729862BActive Publication Date: 2025-12-30GUANGDONG DING XI TONGXIN IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510923818.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-12-30
Estimated Expiration
2045-07-04

AI Technical Summary

Technical Problem

In existing communication equipment networking systems, monolithic architectures are difficult to expand and have high maintenance costs. The high coupling between services and increased communication latency caused by SOA protocols affect communication efficiency. When equipment fails, overall maintenance affects efficiency, and resource contention leads to deadlock.

Method used

A microservice architecture is adopted, and a cellular collaborative architecture is constructed by registering the relative distance between computing devices and the microservice capability vector. The computing tasks are decomposed into parallel subtasks, and a directed acyclic graph is used to formulate scheduling sequences and match energy efficiency functions to realize the execution of tasks on the best devices and a self-healing mechanism.

Benefits of technology

It improves the efficiency of network computing tasks for communication equipment, reduces network load, reduces operational complexity, avoids deadlock, and improves resource utilization and system reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120729862B_ABST
    Figure CN120729862B_ABST
Patent Text Reader

Abstract

The application discloses a communication device networking system and method based on a micro-service architecture, and relates to the technical field of micro-service.The application obtains a neighbor set of each communication device according to the communication radius of the communication device; decomposes a computing task in the communication device networking into parallel sub-tasks, constructs a directed acyclic graph by using the dependency relationship between the sub-tasks; constructs a matching energy efficiency function and a constraint condition, and allocates each sub-task in the best communication device for execution; formulates a scheduling sequence of the sub-tasks by using the dependency relationship in the directed acyclic graph, and sets a start time constraint mechanism of each sub-task; analyzes the start time, judges whether the sub-task is executed successfully, and after all the sub-tasks in the directed acyclic graph are executed successfully, aggregates all the sub-task execution results in the first sub-task in the scheduling sequence to obtain a computing task execution result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microservices technology, specifically to a communication device networking system and method based on a microservices architecture. Background Technology

[0002] In the early stages of communication equipment networking, monolithic architecture integrated all functions, making it easy to develop and maintain when the scale was small. However, with the growth of communication services and the continuous enrichment of functions, monolithic architecture became bloated, difficult to expand, and costly to maintain. For example, when new communication functions or support for new device types were needed, large-scale modifications and redeployments of the entire system might be required. To address the problems of monolithic architecture, SOA (Service-Oriented Architecture) breaks down the system into multiple services, but it uses complex communication protocols (such as SOAP), resulting in performance bottlenecks and high coupling between services. For example, in communication equipment networking, the interaction between different services may experience increased latency due to the complexity of the SOAP protocol, affecting communication efficiency. The rise of technologies such as cloud computing and containerization has provided strong support for the development of microservice architecture. Cloud platforms can dynamically provide computing, storage, and network resources to meet the elastic scaling requirements of microservice architecture; container technology can encapsulate microservices and their dependencies, enabling independent operation and efficient resource isolation, making the application of microservice architecture in communication equipment networking possible.

[0003] In today's traditional communication networks, the integration of equipment means that overall maintenance is required when equipment fails, which seriously affects efficiency. On the other hand, with a distributed structure, different tasks may deadlock due to contention for equipment resources during execution. Therefore, it is crucial to ensure the success rate of tasks while speeding up the execution efficiency of communication equipment. Summary of the Invention

[0004] The purpose of this invention is to provide a communication device networking system and method based on a microservice architecture to solve the problems raised in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A method for networking communication devices based on a microservice architecture, the method comprising the following steps:

[0007] S100: Calculate the relative distance between communication devices, determine the neighbor set of each communication device based on the communication radius of the communication device; register the microservice capability vector in each communication device;

[0008] Furthermore, the specific steps for registering microservice capability vectors in each communication device are as follows:

[0009] S101. Extract the location coordinates of each communication device in the communication device network, and calculate the relative distance between all communication devices using the Euclidean distance formula. Let the communication radius of each communication device be R. comm For communication equipment d i Using the communication radius to measure the communication device d i The relative distance to other communication devices is used to determine the communication device d. i The neighboring devices are constructed into a set of neighboring devices as follows:

[0010] ;

[0011] In the formula, N i Dist represents the set of neighboring devices of the i-th communication device. i d j () represents the relative distance between the i-th and j-th communication devices; the same method is used to construct the set of neighboring devices for each communication device within the communication device network;

[0012] S102. Extract all microservice capabilities from the communication device. Microservices include, but are not limited to, the central processing unit and main memory. Convert the numerical values ​​of all microservice capabilities into vector form, so that the microservice capability vector registered by each communication device is:

[0013] ;

[0014] In the formula, c i Let ServiceType1, ServiceType1, ... represent the 1st, 2nd, ...th microservice vectors registered by the i-th communication device; CPU represents the central processing unit capability vector; and RAM represents the main memory capability vector.

[0015] S200. Decompose the computing tasks in the communication equipment network into parallel subtasks, and construct a directed acyclic graph using the dependencies between subtasks; define the structure of each subtask.

[0016] By finding the neighboring devices of each communication device, a set of neighboring devices is built, and the communication devices are networked to form a cellular collaborative architecture. When processing tasks, the cellular collaborative architecture reduces data transmission latency, reduces network load, and improves communication efficiency.

[0017] The microservice capabilities of communication devices are converted into vector form for registration, including key indicators such as CPU and RAM, to provide accurate device capability information for subsequent task allocation, making task allocation more reasonable.

[0018] Furthermore, the specific steps for setting the constraints for each subtask decomposition are as follows:

[0019] S201. For the computing tasks in the communication equipment network, the computing task description is parsed and quantified to obtain the task feature vector T={Input+Size,Output_Size,Computation_Complexity,Deadline}, where Input+Size represents the amount of input data for the computing task, Output_Size represents the amount of output data for the computing task, Computation_Complexity represents the computational complexity coefficient of the computing task, and Deadline represents the actual deadline for completing the computing task; the computational complexity coefficient represents the number of floating-point operations involved in processing each byte of data;

[0020] S202. Utilize professional knowledge to decompose the computational task into parallel subtasks, and calculate the optimal number of subtasks based on the feature vector of the computational task, using the following formula:

[0021] ;

[0022] In the formula, K represents the optimal number of subtasks. max C represents the maximum number of subtasks allowed within a communication equipment network. base This represents the baseline computational cost for a single communication device;

[0023] When decomposing the computational task, the optimal number of subtasks is satisfied. The input and output data of each subtask are evaluated. For any two subtasks, if the output of one subtask is the input of the other, the two subtasks are considered to have a dependency. Subtask dependencies are treated as edges, and subtasks are treated as nodes to construct a directed acyclic graph (DAG), specifically: G = (V, E), where G represents the DAG, V represents the set of nodes, and E represents the set of edges; V = {v1, v2, v3, ..., v...} K}, v1, v2, v3, ..., v K This represents the 1st, 2nd, 3rd, ..., Kth subtask nodes in a directed acyclic graph;

[0024] S203. Define the structure for each subtask in the directed acyclic graph as follows: V k = <ID k input k ,output k f k deadline k >ID k The unique identifier representing the k-th subtask, input k The input and output represent the k-th subtask. k f represents the output of the k-th subtask. kThis represents the computation function for the k-th subtask, and the deadline. k This represents the time constraint for the k-th subtask.

[0025] The optimal number of subtasks is calculated based on the characteristic vectors of the computation task (input data volume, output data volume, computational complexity, and completion time limit) to ensure that the task decomposition fully utilizes parallel processing capabilities while avoiding increased management overhead caused by too many subtasks, thereby improving task processing efficiency.

[0026] By constructing a directed acyclic graph with subtasks as nodes and dependencies as edges, the execution order of tasks is clearly defined, providing a clear basis for subsequent scheduling sequence formulation, avoiding task execution chaos, and ensuring the correctness of task execution.

[0027] S300: Construct matching energy efficiency functions and constraints, pair subtasks with communication devices, and assign each subtask to the optimal communication device for execution;

[0028] Furthermore, the specific steps for assigning each subtask to the optimal communication device for execution are as follows:

[0029] S301. Extract the resource requirement req for each subtask from the directed acyclic graph of the subtasks, and construct the matching energy efficiency function as follows:

[0030] ;

[0031] In the formula, U(v) k d i The expression represents the matching energy efficiency between the i-th communication device and the k-th subtask, where α, β, and γ represent weighting coefficients, respectively. (CPU) i Represents the central processing unit (CPU) capability of the i-th communication device, RAM i Prop_delay represents the main memory capacity of the i-th communication device. i This represents the transmission delay of the i-th communication device;

[0032] The constraints are as follows:

[0033] ;

[0034] In the formula, t calc (v) k () represents the computation time of the k-th subtask;

[0035] S302. Use the matching energy efficiency function and constraints to filter and match all subtasks and communication devices. When the constraints are met and the matching energy efficiency is maximized, the match is successful, and each subtask is assigned to the best communication device for execution.

[0036] By matching energy efficiency functions to comprehensively consider factors such as CPU capability, RAM size, and transmission latency, and combining them with constraints (CPU and RAM resources meet the requirements, and transmission latency does not exceed the time constraint), each subtask is assigned to the best communication device for execution, ensuring that the task achieves optimal resource utilization while meeting the time requirements.

[0037] A precise matching process ensures that each subtask runs on the most suitable device, thereby improving the speed and quality of task execution and reducing the task failure rate caused by insufficient or mismatched device resources.

[0038] S400. Utilize the dependencies in the directed acyclic graph to determine the scheduling sequence of subtasks and set the start time constraint mechanism for each subtask.

[0039] Furthermore, the specific steps for setting the startup time constraint mechanism for each subtask are as follows:

[0040] S401. Sort the execution order of subtasks using the dependencies between them in a directed acyclic graph. Let the scheduling sequence be... And the conditions for setting the scheduling sequence are:

[0041] ;

[0042] The condition indicates that the sorting of any subtask from the u-th to the v-th subtask belongs to a directed acyclic graph, where... This represents the index of the u-th subtask in the scheduling sequence. This represents the index of the v-th subtask in the scheduling sequence;

[0043] S402. Set the startup time constraint mechanism as follows:

[0044] ;

[0045] In the formula, t start (v) v ) represents the start time of the v-th subtask, t finish (v) u ) represents the preceding subtask v of the v-th subtask. u The completion time, t data_trans (v) u →v v ) indicates the execution of subtask v u To execute subtask v v Data transmission time.

[0046] By utilizing the dependencies in a directed acyclic graph, a scheduling sequence for subtasks is determined, ensuring that dependent subtasks are executed in the correct order, avoiding task failures due to incorrect ordering, and guaranteeing the successful completion of the entire computation task.

[0047] S500: Monitor real-time subtask execution time; analyze startup time to determine if subtask execution has failed; and initiate a re-matching strategy when a task fails.

[0048] Furthermore, the specific steps for initiating the re-matching strategy when a task fails are as follows:

[0049] S501. Monitor the execution time of each subtask in real time as ts, and judge the real-time execution time. When ts k >t start (v) k )+t calc (v) k When ts fails, determine if the k-th subtask has failed; where ts k This represents the execution time of the k-th subtask; the execution time of all subtasks is evaluated.

[0050] S502. When a subtask is determined to have failed, a rematching strategy is initiated. The matching strategy is as follows: In the set of neighboring devices of the communication device that failed the subtask, all communication devices corresponding to the failure are removed. The matching efficiency of the remaining communication devices and the failed subtask is recalculated, and the device with the highest matching efficiency is selected for rematching.

[0051] When a task fails, a re-matching strategy is initiated to select a suitable device from the set of neighboring devices to execute the task, thereby reducing the impact of task failure on the entire system and improving the system's reliability and availability.

[0052] S600. After all subtasks in the directed acyclic graph are executed successfully, the first subtask in the scheduling sequence aggregates the execution results of all subtasks to obtain the execution result of the computation task. Then, a resource release signal is issued to execute the next round of computation tasks.

[0053] Furthermore, the specific steps for aggregating the execution results of all subtasks in the scheduling sequence are as follows:

[0054] S601. After all subtasks in the directed acyclic graph have been successfully executed, the first subtask in the scheduling sequence aggregates the execution results of all subtasks, using the following formula:

[0055] ;

[0056] In the formula, Result T The output represents the final result of the computation task T. kThis represents the output of the k-th subtask, and g represents the aggregation function. After obtaining the execution result of the computation task, a resource release signal is issued to execute the next round of computation tasks.

[0057] A communication device networking system based on a microservice architecture includes a device analysis module, a task decomposition module, a matching module, a scheduling sequence module, a re-matching module, and an aggregation module.

[0058] The device analysis module is used to calculate the relative distance between communication devices, determine the neighbor set of each communication device based on the communication radius of the communication device, and register microservice capability vectors in each communication device.

[0059] The task decomposition module is used to decompose the computing tasks in the communication equipment network into parallel subtasks, construct a directed acyclic graph using the dependencies between subtasks, and define the structure of each subtask.

[0060] The matching module is used to construct matching energy efficiency functions and constraints, pair subtasks with communication devices, and assign each subtask to the best communication device for execution.

[0061] The scheduling sequence module is used to formulate a scheduling sequence for subtasks using the dependencies in the directed acyclic graph, and to set a start time constraint mechanism for each subtask.

[0062] The rematching module is used to monitor the real-time subtask execution time; analyze the startup time to determine whether the subtask has failed to execute; and start the rematching strategy when the task fails.

[0063] The aggregation module is used to aggregate the execution results of all subtasks in the scheduling sequence to obtain the execution result of the computation task, and then issue a resource release signal to execute the next round of computation tasks.

[0064] The matching module includes matching energy efficiency units and constraint condition units;

[0065] The matching energy efficiency unit is used to calculate the matching energy efficiency of each subtask and all communication devices;

[0066] The constraint unit is used to compare and judge the microservice capabilities of the communication device and the resource requirements in the subtasks.

[0067] The scheduling sequence module includes an execution sorting unit and a time constraint unit;

[0068] The execution sorting unit is used to sort the execution order of all subtasks according to the dependencies of each subtask;

[0069] The time constraint unit is used to constrain the start time of each subtask.

[0070] Compared with the prior art, the beneficial effects of the present invention are:

[0071] 1. This invention greatly improves the efficiency of network computing tasks of communication equipment and increases resource utilization by integrating microservice architecture and edge computing.

[0072] 2. This invention processes tasks through a cellular framework, enabling local self-healing in the event of equipment failure, thereby reducing the complexity of operation and maintenance of communication equipment.

[0073] 3. This invention defines the execution order of subtasks through the dependencies in a directed acyclic graph, thus avoiding deadlocks caused by contention for equipment resources in multi-level pipeline tasks. Attached Figure Description

[0074] Figure 1 This is a module distribution diagram of the communication device networking system based on microservice architecture of the present invention;

[0075] Figure 2 This is a schematic diagram illustrating the steps of the communication device networking method based on microservice architecture of the present invention. Detailed Implementation

[0076] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0077] Example: Figures 1-2 As shown, the present invention provides a technical solution.

[0078] A method for networking communication devices based on a microservice architecture, the method comprising the following steps:

[0079] S100: Calculate the relative distance between communication devices, determine the neighbor set of each communication device based on the communication radius of the communication device; register the microservice capability vector in each communication device;

[0080] The specific steps for registering microservice capability vectors in each communication device are as follows:

[0081] S101. Extract the location coordinates of each communication device in the communication device network, and calculate the relative distance between all communication devices using the Euclidean distance formula. Let the communication radius of each communication device be R. comm For communication equipment d i Using the communication radius to measure the communication device d iThe relative distance to other communication devices is used to determine the communication device d. i The neighboring devices are constructed into a set of neighboring devices as follows:

[0082] ;

[0083] In the formula, N i Dist represents the set of neighboring devices of the i-th communication device. i d j () represents the relative distance between the i-th and j-th communication devices; the same method is used to construct the set of neighboring devices for each communication device within the communication device network;

[0084] S102. Extract all microservice capabilities from the communication device. Microservices include, but are not limited to, the central processing unit and main memory. Convert the numerical values ​​of all microservice capabilities into vector form, so that the microservice capability vector registered by each communication device is:

[0085] ;

[0086] In the formula, c i Let ServiceType1, ServiceType1, ... represent the 1st, 2nd, ...th microservice vectors registered by the i-th communication device; CPU represents the central processing unit capability vector; and RAM represents the main memory capability vector.

[0087] S200. Decompose the computing tasks in the communication equipment network into parallel subtasks, and construct a directed acyclic graph using the dependencies between subtasks; define the structure of each subtask.

[0088] By finding the neighboring devices of each communication device, a set of neighboring devices is built, and the communication devices are networked to form a cellular collaborative architecture. When processing tasks, the cellular collaborative architecture reduces data transmission latency, reduces network load, and improves communication efficiency.

[0089] The microservice capabilities of communication devices are converted into vector form for registration, including key indicators such as CPU and RAM, to provide accurate device capability information for subsequent task allocation, making task allocation more reasonable.

[0090] The specific steps for setting the constraints for each subtask decomposition are as follows:

[0091] S201. For the computing tasks in the communication equipment network, the computing task description is parsed and quantified to obtain the task feature vector T={Input+Size,Output_Size,Computation_Complexity,Deadline}, where Input+Size represents the amount of input data for the computing task, Output_Size represents the amount of output data for the computing task, Computation_Complexity represents the computational complexity coefficient of the computing task, and Deadline represents the actual deadline for completing the computing task; the computational complexity coefficient represents the number of floating-point operations involved in processing each byte of data;

[0092] S202. Utilize professional knowledge to decompose the computational task into parallel subtasks, and calculate the optimal number of subtasks based on the feature vector of the computational task, using the following formula:

[0093] ;

[0094] In the formula, K represents the optimal number of subtasks. max C represents the maximum number of subtasks allowed within a communication equipment network. base This represents the baseline computational cost for a single communication device;

[0095] When decomposing the computational task, the optimal number of subtasks is satisfied. The input and output data of each subtask are evaluated. For any two subtasks, if the output of one subtask is the input of the other, the two subtasks are considered to have a dependency. Subtask dependencies are treated as edges, and subtasks are treated as nodes to construct a directed acyclic graph (DAG), specifically: G = (V, E), where G represents the DAG, V represents the set of nodes, and E represents the set of edges; V = {v1, v2, v3, ..., v...} K}, v1, v2, v3, ..., v K This represents the 1st, 2nd, 3rd, ..., Kth subtask nodes in a directed acyclic graph;

[0096] S203. Define the structure for each subtask in the directed acyclic graph as follows: V k = <ID k input k ,output k f k deadline k >ID k The unique identifier representing the k-th subtask, input k The input and output represent the k-th subtask. k f represents the output of the k-th subtask. k This represents the computation function for the k-th subtask, and the deadline.k This represents the time constraint for the k-th subtask.

[0097] The optimal number of subtasks is calculated based on the characteristic vectors of the computation task (input data volume, output data volume, computational complexity, and completion time limit) to ensure that the task decomposition fully utilizes parallel processing capabilities while avoiding increased management overhead caused by too many subtasks, thereby improving task processing efficiency.

[0098] By constructing a directed acyclic graph with subtasks as nodes and dependencies as edges, the execution order of tasks is clearly defined, providing a clear basis for subsequent scheduling sequence formulation, avoiding task execution chaos, and ensuring the correctness of task execution.

[0099] S300: Construct matching energy efficiency functions and constraints, pair subtasks with communication devices, and assign each subtask to the optimal communication device for execution;

[0100] The specific steps for assigning each subtask to the optimal communication device for execution are as follows:

[0101] S301. Extract the resource requirement req for each subtask from the directed acyclic graph of the subtasks, and construct the matching energy efficiency function as follows:

[0102] ;

[0103] In the formula, U(v) k d i The expression represents the matching energy efficiency between the i-th communication device and the k-th subtask, where α, β, and γ represent weighting coefficients, respectively. (CPU) i Represents the central processing unit (CPU) capability of the i-th communication device, RAM i Prop_delay represents the main memory capacity of the i-th communication device. i This represents the transmission delay of the i-th communication device;

[0104] The constraints are as follows:

[0105] ;

[0106] In the formula, t calc (v) k () represents the computation time of the k-th subtask;

[0107] S302. Use the matching energy efficiency function and constraints to filter and match all subtasks and communication devices. When the constraints are met and the matching energy efficiency is maximized, the match is successful, and each subtask is assigned to the best communication device for execution.

[0108] By matching energy efficiency functions to comprehensively consider factors such as CPU capability, RAM size, and transmission latency, and combining them with constraints (CPU and RAM resources meet the requirements, and transmission latency does not exceed the time constraint), each subtask is assigned to the best communication device for execution, ensuring that the task achieves optimal resource utilization while meeting the time requirements.

[0109] A precise matching process ensures that each subtask runs on the most suitable device, thereby improving the speed and quality of task execution and reducing the task failure rate caused by insufficient or mismatched device resources.

[0110] S400. Utilize the dependencies in the directed acyclic graph to determine the scheduling sequence of subtasks and set the start time constraint mechanism for each subtask.

[0111] The specific steps for setting up the startup time constraint mechanism for each subtask are as follows:

[0112] S401. Sort the execution order of subtasks using the dependencies between them in a directed acyclic graph. Let the scheduling sequence be... And the conditions for setting the scheduling sequence are:

[0113] ;

[0114] The condition indicates that the sorting of any subtask from the u-th to the v-th subtask belongs to a directed acyclic graph, where... This represents the index of the u-th subtask in the scheduling sequence. This represents the index of the v-th subtask in the scheduling sequence;

[0115] S402. Set the startup time constraint mechanism as follows:

[0116] ;

[0117] In the formula, t start (v) v ) represents the start time of the v-th subtask, t finish (v) u ) represents the preceding subtask v of the v-th subtask. u The completion time, t data_trans (v) u →v v ) indicates the execution of subtask v u To execute subtask v v Data transmission time.

[0118] By utilizing the dependencies in a directed acyclic graph, a scheduling sequence for subtasks is determined, ensuring that dependent subtasks are executed in the correct order, avoiding task failures due to incorrect ordering, and guaranteeing the successful completion of the entire computation task.

[0119] S500: Monitor real-time subtask execution time; analyze startup time to determine if subtask execution has failed; and initiate a re-matching strategy when a task fails.

[0120] The specific steps to initiate the rematching strategy when a task fails are as follows:

[0121] S501. Monitor the execution time of each subtask in real time as ts, and judge the real-time execution time. When ts k >t start (v) k )+t calc (v) k When ts fails, determine if the k-th subtask has failed; where ts k This represents the execution time of the k-th subtask; the execution time of all subtasks is evaluated.

[0122] S502. When a subtask is determined to have failed, a rematching strategy is initiated. The matching strategy is as follows: In the set of neighboring devices of the communication device that failed the subtask, all communication devices corresponding to the failure are removed. The matching efficiency of the remaining communication devices and the failed subtask is recalculated, and the device with the highest matching efficiency is selected for rematching.

[0123] When a task fails, a re-matching strategy is initiated to select a suitable device from the set of neighboring devices to execute the task, thereby reducing the impact of task failure on the entire system and improving the system's reliability and availability.

[0124] S600. After all subtasks in the directed acyclic graph are executed successfully, the first subtask in the scheduling sequence aggregates the execution results of all subtasks to obtain the execution result of the computation task. Then, a resource release signal is issued to execute the next round of computation tasks.

[0125] The specific steps for aggregating the execution results of all subtasks in the scheduling sequence are as follows:

[0126] S601. After all subtasks in the directed acyclic graph have been successfully executed, the first subtask in the scheduling sequence aggregates the execution results of all subtasks, using the following formula:

[0127] ;

[0128] In the formula, Result T The output represents the final result of the computation task T. kThis represents the output of the k-th subtask, and g represents the aggregation function. After obtaining the execution result of the computation task, a resource release signal is issued to execute the next round of computation tasks.

[0129] A communication device networking system based on a microservice architecture includes a device analysis module, a task decomposition module, a matching module, a scheduling sequence module, a re-matching module, and an aggregation module.

[0130] The device analysis module is used to calculate the relative distance between communication devices, determine the neighbor set of each communication device based on the communication radius of the communication device, and register microservice capability vectors in each communication device.

[0131] The task decomposition module is used to decompose the computing tasks in the communication equipment network into parallel subtasks, construct a directed acyclic graph using the dependencies between subtasks, and define the structure of each subtask.

[0132] The matching module is used to construct matching energy efficiency functions and constraints, pair subtasks with communication devices, and assign each subtask to the best communication device for execution.

[0133] The scheduling sequence module is used to formulate a scheduling sequence for subtasks using the dependencies in the directed acyclic graph, and to set a start time constraint mechanism for each subtask.

[0134] The rematching module is used to monitor the real-time subtask execution time; analyze the startup time to determine whether the subtask has failed to execute; and start the rematching strategy when the task fails.

[0135] The aggregation module is used to aggregate the execution results of all subtasks in the scheduling sequence to obtain the execution result of the computation task, and then issue a resource release signal to execute the next round of computation tasks.

[0136] The matching module includes matching energy efficiency units and constraint condition units;

[0137] The matching energy efficiency unit is used to calculate the matching energy efficiency of each subtask and all communication devices;

[0138] The constraint unit is used to compare and judge the microservice capabilities of the communication device and the resource requirements in the subtasks.

[0139] The scheduling sequence module includes an execution sorting unit and a time constraint unit;

[0140] The execution sorting unit is used to sort the execution order of all subtasks according to the dependencies of each subtask;

[0141] The time constraint unit is used to constrain the start time of each subtask. Embodiment

[0142] For a sub-task structure: V3 = <ID: VID123-03, input: Video Chunk 1 (20MB), output: Detection Result (0.2MB), f: YOLOv5_Detect, deadline: deadline - 35ms>

[0143] Let the resources required for this sub-task be: CPU: req = 2GHz, RAM: 500M, deadline = 100ms, t calc = 80ms;

[0144] There are currently three communication devices, and their microservice capabilities are shown in Table 1:

[0145] Table 1 Microservice Capability Table

[0146]

[0147] After judgment, it is found that this sub-task matches successfully with device d1;

[0148] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be encompassed within the present invention. Any reference signs in the claims should not be construed as limiting the claims involved.

Claims

1. A method for networking communication devices based on a micro-service architecture, characterized in that: The method comprises the following steps: S100, calculating the relative distance between the communication devices, judging the neighbor set of each communication device according to the communication radius of the communication device; registering the micro-service capability vector in each communication device; The specific steps of registering the micro-service capability vector in each communication device are: S101, extract the position coordinates of each communication device in the communication device networking, calculate the relative distance between all communication devices by the Euclidean distance formula, set the communication radius of the communication device as R comm , for the communication device d i , the relative distance between the communication device d i and the rest of the communication devices is judged to obtain the neighbor device of the communication device d i , and the neighbor device set is constructed as: ; In the formula, N i represents the neighbor device set of the i-th communication device, dist(d i , d j ) represents the relative distance between the i-th communication device and the j-th communication device; the neighbor device set of each communication device in the communication device group network is constructed by using the same method; S102, extracting all micro-service capabilities in the communication device, the micro-service including the central processor and the main memory, and converting the numerical value of all micro-service capabilities into a vector form, so that the micro-service capability vector registered by each communication device is: ; In the formula, c i represents the micro-service capability vector registered by the i-th communication device, ServiceType1, ServiceType2,... represent the 1st, 2nd,... micro-service vectors registered by the i-th communication device; CPU represents the central processor capability vector, and RAM represents the main memory capability vector; S200, decomposing the computing task in the communication device networking into parallel sub-tasks, constructing a directed acyclic graph by using the dependency relationship between the sub-tasks, and defining the structure of each sub-task; The specific steps of setting the restriction criterion when each sub-task is decomposed are: S201, for the computing task in the communication device networking, the task description is parsed, and a task feature vector T={Input+Size, Output_Size, Computation_Complexity, Deadline} is obtained by quantization, wherein Input+Size represents the input data amount of the computing task, Output_Size represents the output data amount of the computing task, Computation_Complexity represents the computing complexity coefficient of the computing task, and Deadline represents the completion deadline of the computing task; the computing complexity coefficient represents the number of floating-point operations involved when processing each byte of data; S202, the computing task is decomposed into parallel sub-tasks, and the optimal number of sub-tasks is calculated according to the feature vector of the computing task, and the formula is: ; In the formula, K represents the optimal number of subtasks, K max represents the maximum number of subtasks allowed within the communication device network, C base represents the reference calculation amount of a single communication device; When the computing task is decomposed, the optimal number of subtasks is met, the input and output data of each subtask are judged, and for any two subtasks, when the output of one subtask is the input of the other subtask, it is judged that the two subtasks exist dependency; the subtask dependency is taken as an edge, and the subtask is taken as a node to construct a directed acyclic graph, specifically: G= (V, E), wherein G represents a directed acyclic graph, V represents a node set, and E represents an edge set; V={v1, v2, v3,...,v K}, v1, v2, v3,...,v K represent the 1st, 2nd, 3rd,..., Kth subtask node in the directed acyclic graph; S203, define the structure for each subtask in the directed acyclic graph as: V k =<ID k , input k , output k , f k , deadline k >;ID k represents the unique identifier of the kth subtask, input k represents the input of the kth subtask, output k represents the output of the kth subtask, f k represents the calculation function of the kth subtask, deadline k represents the time constraint of the kth subtask; S300, constructing a matching energy efficiency function and a constraint condition, pairing the sub-tasks and the communication devices, and distributing each sub-task in the best communication device for execution; The specific steps of distributing each sub-task in the best communication device for execution are: S301, extracting the resource requirement req of each sub-task in the directed acyclic graph of the sub-task, and constructing a matching energy efficiency function: ; In the formula, U(v k , d i ) represents the matching energy efficiency of the ith communication device and the kth subtask, α, β, and γ represent weight coefficients, CPU i represents the central processing unit capability of the ith communication device, RAM i represents the main memory capability of the ith communication device, and prop_delay i represents the transmission delay of the ith communication device. The constraint condition is constructed as: ; In the formula, t calc (v k ) represents the computation time of the kth subtask. S302, filtering and matching all sub-tasks and communication devices by using the matching energy efficiency function and the constraint condition, and when the constraint condition is met and the matching energy efficiency is maximum, the matching is successful, and each sub-task is distributed in the best communication device for execution; S400, formulating a scheduling sequence of the sub-tasks by using the dependency relationship in the directed acyclic graph, and setting a start time constraint mechanism for each sub-task; S500, monitoring the real-time sub-task execution time; analyzing the start time to judge whether the sub-task is executed successfully, and starting a re-matching strategy when the task fails; S600, when all the sub-tasks in the directed acyclic graph are successfully executed, aggregating all the sub-task execution results in the first sub-task in the scheduling sequence to obtain the computing task execution result, and then sending a resource release signal to execute the next round of computing task. 2.The method of networking communication devices based on micro-service architecture according to claim 1, characterized in that: The specific steps of setting the start time constraint mechanism for each sub-task in S400 are: S401. Sort the execution order of subtasks using the dependencies between them in a directed acyclic graph. Let the scheduling sequence be... And the conditions for setting the scheduling sequence are: ; The conditions represent that the ordering of any u-th subtask to v-th subtask belongs to a directed acyclic graph, wherein, represents a position index of the u-th subtask in the scheduling sequence, represents a position index of the v-th subtask in the scheduling sequence; S402, setting the start time constraint mechanism as: ; In the formula, t start (v) v ) represents the start time of the v-th subtask, t finish (v) u ) represents the preceding subtask v of the v-th subtask. u The completion time, t data_trans (v) u →v v ) indicates the execution of subtask v u To execute subtask v v Data transmission time. 3.The method of networking communication devices based on micro-service architecture according to claim 2, characterized in that: The specific steps of starting the re-matching strategy when the task fails in S500 are: S501, real-time monitoring of the execution time of each subtask is ts, judging the real-time execution time, when ts k t start (v k ) + t calc (v k ) is less than or equal to 0, judging that the kth subtask fails to execute; wherein ts k represents the execution time of the kth subtask; the execution time of all subtasks is judged. S502, when judging that the sub-task execution fails, starting the re-matching strategy, and the matching strategy is: removing all communication devices corresponding to the judgment sub-task execution failure in the communication device neighbor device set of the sub-task execution failure, re-computing the matching energy efficiency of the remaining communication devices and the execution failure sub-task, and selecting the maximum matching energy efficiency for re-matching.

4. The method of claim 3, wherein: The specific steps of the S600 in which the first sub-task in the scheduling sequence aggregates all sub-task execution results are: S601, when all sub-tasks in the directed acyclic graph are executed successfully, the first sub-task in the scheduling sequence aggregates all sub-task execution results, and the formula is: ; In the formula, Result T represents the final result of the computing task T, output k represents the output result of the kth subtask, and g represents an aggregation function. The calculation task execution result is obtained, and then a resource release signal is sent, and the next round of calculation task is executed. 5.A micro-service architecture based communication device networking system using the micro-service architecture based communication device networking method according to any one of claims 1-4, characterized in that: The communication device networking system comprises a device analysis module, a task decomposition module, a matching module, a scheduling sequence module, a re-matching module and an aggregation module. The device analysis module is used for calculating the relative distance between communication devices, judging the neighbor set of each communication device according to the communication radius of the communication device, and registering the micro-service capability vector in each communication device. The task decomposition module is used for decomposing the calculation task in the communication device networking into parallel sub-tasks, constructing a directed acyclic graph by using the dependency relationship between the sub-tasks, and defining the structure of each sub-task. The matching module is used for constructing a matching energy efficiency function and a constraint condition, pairing the sub-tasks and the communication devices, and allocating each sub-task in the best communication device for execution. The scheduling sequence module is used for formulating a scheduling sequence of the sub-tasks by using the dependency relationship in the directed acyclic graph, and setting a start time constraint mechanism of each sub-task. The re-matching module is used for monitoring the real-time sub-task execution time. The start time is analyzed to judge whether the sub-task is executed successfully, and the re-matching strategy is started when the task fails. The aggregation module is used for aggregating all sub-task execution results in the first sub-task in the scheduling sequence, obtaining the calculation task execution result, and then sending a resource release signal to execute the next round of calculation task.

6. The microservices architecture based communication device networking system as claimed in claim 5, wherein: The matching module comprises a matching energy efficiency unit and a constraint condition unit. The matching energy efficiency unit is used for calculating the matching energy efficiency of each sub-task and all communication devices. The constraint condition unit is used for comparing and judging the micro-service capability of the communication device and the required resource in the sub-task.

7. The microservices architecture based communication device networking system as claimed in claim 5, wherein: The scheduling sequence module comprises an execution ordering unit and a time constraint unit. The execution ordering unit is used for ordering the execution order of all sub-tasks according to the dependency relationship of each sub-task. The time constraint unit is used for constraining the start time of each sub-task.

Citation Information

Patent Citations

  • Micro-service workflow flexible scheduling method, system and equipment based on container cloud platform

    CN116302519A

  • Service orchestration method and device, micro-service gateway equipment and storage medium

    CN116760904A