Edge device resource allocation method, system, device, equipment and medium

By determining the delay and energy consumption of edge devices in industrial vision detection, and using the digital twin layer to train the resource allocation model, the problem of difficult resource allocation in industrial production environment is solved, and the resource is realized under the situation of large network fluctuations. Automatic, fast, accurate allocation and cost reduction.

CN116820778BActive Publication Date: 2024-11-05CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310862883.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-13
Publication Date
2024-11-05
Estimated Expiration
2043-07-13

AI Technical Summary

Technical Problem

In the industrial production environment and the network is unstable, it is difficult to allocate resources to edge devices and it is difficult to take into account the cost and overhead.

Method used

The minimum joint cost is determined through the delay and energy consumption of multiple edge devices in industrial vision detection, and the resource allocation situation and device status information are mapped using the digital twin layer to train the resource allocation model to achieve automatic, fast and accurate allocation of resources.

Benefits of technology

In the case of large network fluctuations, resources are automatically, quickly and accurately allocated to edge devices, reducing the cost of edge devices for processing and testing industrial products, taking into account the two dimensions of resource allocation and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116820778B_ABST
    Figure CN116820778B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, system, device, equipment and medium for allocating resources to edge devices, and relates to the field of emerging information technology. The method includes: determining the minimum joint cost of each edge device in terms of delay and energy consumption through the delay when multiple edge devices perform industrial product inspection in industrial visual inspection and the energy consumption of each edge device, and training the resource allocation model in the digital twin layer according to the industrial product information, inspection classification results, device status information and resource allocation obtained by mapping in the digital twin layer when taking the minimum joint cost, and allocating resources to multiple edge devices according to the trained resource allocation model. By mapping the information of the edge device when taking the minimum joint cost through the digital twin layer, training the resource allocation model, and using it to allocate resources, it is possible to not only automatically, quickly and accurately allocate resources to the edge device, but also reduce the use cost of the edge device.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Industrial vision is one of the most common scenarios in industrial applications. The use of various edge devices to detect and classify industrial products has become increasingly popular in the industrial field.

[0003] However, the network environment in an industrial production environment usually fluctuates greatly. In related technologies, it is difficult to allocate resources to edge devices when the network is unstable, and it is also difficult to take into account cost issues when allocating resources.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The present disclosure provides an edge device resource allocation method, system, apparatus, device and medium, which can at least quickly and accurately allocate resources to edge devices, while also taking into account cost expenditures and reducing costs.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] In a first aspect, an embodiment of the present disclosure provides a method for allocating resources to an edge device, the method comprising:

[0008] Determine the minimum joint cost of each edge device in terms of latency and energy consumption by analyzing the latency of multiple edge devices in industrial product inspection and the energy consumption of each edge device in industrial visual inspection.

[0009] Through the digital twin layer, the resource allocation situation, device status information and detection and classification results of industrial products by each edge device are mapped when the latency and energy consumption of each edge device are minimized.

[0010] Training a resource allocation model in the digital twin layer according to the industrial product information mapped in the digital twin layer, the detection classification result, the device status information, and the resource allocation situation;

[0011] Resources are allocated to the multiple edge devices according to the trained resource allocation model.

[0012] In a possible embodiment, determining the minimum joint cost of each edge device in terms of latency and energy consumption by using the latency of multiple edge devices performing industrial product inspection in industrial visual inspection and the energy consumption of each edge device, includes:

[0013] Obtaining a computing request that each edge device needs to execute for industrial product detection, and determining a latency for each edge device to execute the computing request;

[0014] Obtaining energy consumption of each edge device in industrial visual inspection according to a delay of each edge device executing a computing request;

[0015] Determine a joint cost according to a latency of each edge device executing a computing request and an energy consumption of each edge device, and a first adjustment parameter and a second adjustment parameter having a proportional relationship;

[0016] Determine the minimum joint cost of latency and energy consumption for each edge device.

[0017] In a possible embodiment, obtaining a computing request that each edge device needs to execute to perform industrial product detection and determining a latency for each edge device to execute the computing request includes:

[0018] Using any one of the plurality of edge devices as a local edge device;

[0019] Determine the latency of the local edge device executing all the local computing requests according to the number of local computing requests sent by the user to the local edge device and the latency of the user;

[0020] Obtaining the number of other edge device requests sent to the local edge device by other edge devices other than the local edge device among the multiple edge devices;

[0021] Determining a delay for the local edge device to execute the other edge device requests according to the number of the other edge device requests and the computational cost of the local edge device executing the other edge device requests;

[0022] Determine the latency of the edge device executing the computing request according to the latency of the local edge device executing all the local computing requests and the latency of the local edge device executing the requests of other edge devices;

[0023] The time delay for each edge device to execute the computing request is determined one by one to obtain the time delay for each edge device to execute the computing request.

[0024] In a possible embodiment, obtaining the energy consumption of each edge device in industrial visual inspection according to the latency of each edge device executing a computing request includes:

[0025] Determine the energy consumption of each edge device executing the computing request according to the latency of each edge device executing the computing request and the power of each edge device executing the computing;

[0026] Obtaining energy consumption of other devices in the industrial visual inspection except the edge device;

[0027] Allocate the energy consumption of the other devices to each edge device to obtain the basic energy consumption of each edge device;

[0028] The energy consumption of each edge device is obtained according to the basic energy consumption and the energy consumption of each edge device executing the computing request.

[0029] In a possible embodiment, determining the joint cost according to the latency of executing the computing request by each edge device, the energy consumption of running each edge device, and the first adjustment parameter and the second adjustment parameter having a proportional relationship includes:

[0030] The product of the first adjustment parameter and the energy consumption of each edge device is used as a joint energy consumption cost;

[0031] The product of the second adjustment parameter and the latency of each edge device executing the computing request is used as a joint latency cost;

[0032] The sum of the joint energy consumption cost and the joint delay cost is taken as the joint cost.

[0033] In a possible embodiment, the resource allocation model in the digital twin layer is trained according to the industrial product information mapped in the digital twin layer, the detection and classification results of the industrial products by each edge device, the device status information and the resource allocation situation, including:

[0034] Mapping the industrial product information collected by each edge device through the digital twin layer;

[0035] In the digital twin layer, the resource allocation model is trained according to the industrial product information, the device status information, the detection and classification results of each edge device on the industrial product, and the resource allocation situation;

[0036] If the industrial product information is input into the resource allocation model for detection, and the resource allocation result output by the resource allocation model matches the resource allocation situation, the training is completed and a trained resource allocation model is obtained.

[0037] In a second aspect, an embodiment of the present disclosure provides an edge device resource allocation system, comprising: an edge device server and an edge device; wherein the edge device server is used to build a digital twin layer;

[0038] The edge device server is configured to execute the method described in any one of the first aspects.

[0039] In a third aspect, an embodiment of the present disclosure provides an edge device resource allocation device, including:

[0040] A joint optimization unit, used to determine the minimum joint cost of each edge device in terms of latency and energy consumption by considering the latency of multiple edge devices in industrial visual inspection and the energy consumption of each edge device when the device is operating.

[0041] A mapping unit, used to map, through a digital twin layer, the resource allocation situation of each edge device, the device status information, and the detection and classification results of each edge device on the industrial product when the latency and energy consumption of each edge device are minimized;

[0042] A training unit, configured to train a resource allocation model in the digital twin layer according to the industrial product information mapped in the digital twin layer, the detection classification result, the device status information and the resource allocation situation;

[0043] The allocation unit is used to allocate resources to the multiple edge devices according to the trained resource allocation model.

[0044] In a possible embodiment, the joint optimization unit is further used for:

[0045] Obtaining a computing request that each edge device needs to execute for industrial product detection, and determining a latency for each edge device to execute the computing request;

[0046] Obtaining energy consumption of each edge device in industrial visual inspection according to a delay of each edge device executing a computing request;

[0047] Determine a joint cost according to a latency of each edge device executing a computing request and an energy consumption of each edge device, and a first adjustment parameter and a second adjustment parameter having a proportional relationship;

[0048] Determine the minimum joint cost of latency and energy consumption for each edge device.

[0049] In a possible embodiment, the joint optimization unit is further used for:

[0050] Using any one of the plurality of edge devices as a local edge device;

[0051] Determine the latency of the local edge device executing all the local computing requests according to the number of local computing requests sent by the user to the local edge device and the latency of the user;

[0052] Obtaining the number of other edge device requests sent to the local edge device by other edge devices other than the local edge device among the multiple edge devices;

[0053] Determining a delay for the local edge device to execute the other edge device requests according to the number of the other edge device requests and the computational cost of the local edge device executing the other edge device requests;

[0054] Determine the latency of the edge device executing the computing request according to the latency of the local edge device executing all the local computing requests and the latency of the local edge device executing the requests of other edge devices;

[0055] The time delay for each edge device to execute the computing request is determined one by one to obtain the time delay for each edge device to execute the computing request.

[0056] In a possible embodiment, the joint optimization unit is further used for:

[0057] Determine the energy consumption of each edge device executing the computing request according to the latency of each edge device executing the computing request and the power of each edge device executing the computing;

[0058] Obtaining energy consumption of other devices in the industrial visual inspection except the edge device;

[0059] Allocate the energy consumption of the other devices to each edge device to obtain the basic energy consumption of each edge device;

[0060] The energy consumption of each edge device is obtained according to the basic energy consumption and the energy consumption of each edge device executing the computing request.

[0061] In a possible embodiment, the joint optimization unit is further used for:

[0062] The product of the first adjustment parameter and the energy consumption of each edge device is used as a joint energy consumption cost;

[0063] The product of the second adjustment parameter and the latency of each edge device executing the computing request is used as a joint latency cost;

[0064] The sum of the joint energy consumption cost and the joint delay cost is taken as the joint cost.

[0065] In a possible embodiment, the training unit is further used for:

[0066] Mapping the industrial product information collected by each edge device through the digital twin layer;

[0067] In the digital twin layer, the resource allocation model is trained according to the industrial product information, the device status information, the detection and classification results of each edge device on the industrial product, and the resource allocation situation;

[0068] If the industrial product information is input into the resource allocation model for detection, and the resource allocation result output by the resource allocation model matches the resource allocation situation, the training is completed and a trained resource allocation model is obtained.

[0069] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method described in the first aspect above by executing the executable instructions.

[0070] In a fifth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method described in the first aspect when executed by a processor.

[0071] In a sixth aspect, according to another aspect of the present disclosure, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes any of the above-described methods.

[0072] An edge device resource allocation method provided by an embodiment of the present disclosure specifically includes: determining the minimum joint cost of each edge device in terms of delay and energy consumption through the delay of multiple edge devices in industrial visual inspection and the energy consumption of each edge device, mapping the resource allocation of each edge device, device status information and the detection and classification results of each edge device on industrial products when the delay and energy consumption of each edge device are the minimum joint cost through the digital twin layer, training the resource allocation model in the digital twin layer according to the industrial product information, detection classification results, device status information and resource allocation obtained by mapping in the digital twin layer, and allocating resources to multiple edge devices according to the trained resource allocation model. By calculating the minimum joint cost of the edge device in terms of delay and energy consumption, the cost of processing and detecting industrial products by the edge device is reduced, and by mapping data in the digital twin layer through the device information in this case, as well as the resource allocation situation, etc., the resource allocation model is trained by simulation, and through the trained model, in the case of large network fluctuations, resources can be automatically, quickly and accurately allocated to the edge device, and both cost and resource allocation can be considered.

[0073] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0075] Figure 1 A schematic diagram showing the structure of an edge device resource allocation system in an embodiment of the present disclosure is shown;

[0076] Figure 2 A schematic diagram showing the structure of another edge device resource allocation system in an embodiment of the present disclosure is shown;

[0077] Figure 3 A schematic diagram showing the structure of another edge device resource allocation system in an embodiment of the present disclosure is shown;

[0078] Figure 4 A schematic diagram showing a flow chart of a method for allocating resources to an edge device in an embodiment of the present disclosure is shown;

[0079] Figure 5 A schematic diagram showing the structure of an edge device resource allocation device in an embodiment of the present disclosure is shown;

[0080] Figure 6 A schematic structural diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0081] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0082] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0083] Since the network environment in an industrial production environment usually fluctuates greatly, in related technologies, it is difficult to allocate resources to edge devices when the network is unstable, and it is also difficult to take into account the cost issue when allocating resources.

[0084] Based on this, the present disclosure provides an edge device resource allocation method, which specifically includes: determining the minimum joint cost of each edge device in terms of delay and energy consumption through the delay of multiple edge devices in industrial visual inspection and the energy consumption of each edge device, mapping the resource allocation of each edge device, the device status information and the detection and classification results of each edge device on industrial products when the delay and energy consumption of each edge device are the minimum joint cost through the digital twin layer, training the resource allocation model in the digital twin layer according to the industrial product information, detection classification results, device status information and resource allocation obtained by mapping in the digital twin layer, and allocating resources to multiple edge devices according to the trained resource allocation model. By calculating the minimum joint cost of the edge device in terms of delay and energy consumption, the cost of processing and detecting industrial products by the edge device is reduced, and by mapping the data in the digital twin layer through the device information in this case, as well as the resource allocation situation, etc., the resource allocation model is trained by simulation, and through the trained model, in the case of large network fluctuations, resources can be automatically, quickly and accurately allocated to the edge device, and both cost and resource allocation can be considered.

[0085] The edge device resource allocation method in the present disclosure can be applied to electronic devices, and can also be applied to edge device resource allocation systems.

[0086] Figure 1 FIG. 2 shows a schematic diagram of the structure of an edge device resource allocation system in an embodiment of the present disclosure. Figure 1 As shown, the edge device resource allocation system 100 may include an edge device server 101 , an edge device 102 , and an edge device 103 .

[0087] The edge device 102 and the edge device 103 of the embodiment of the present disclosure can be used to perform industrial visual inspection tasks in emerging information technology, for example, to perform industrial product inspection to determine whether the industrial product is qualified.

[0088] The edge device server 101 can be used to determine the minimum joint cost of each edge device in terms of latency and energy consumption through the latency when multiple edge devices perform industrial product inspection in industrial visual inspection and the energy consumption of each edge device. Through the digital twin layer, the resource allocation situation, device status information and inspection and classification results of industrial products for each edge device are mapped to each edge device when the latency and energy consumption take the minimum joint cost. The resource allocation model in the digital twin layer is trained based on the industrial product information, inspection and classification results, device status information and resource allocation situation mapped in the digital twin layer, and resources are allocated to multiple edge devices based on the trained resource allocation model.

[0089] The edge device resource allocation system 100 can be understood as a multi-agent composed of multiple edge devices and an edge device server 101 .

[0090] In one possible embodiment, Figure 2 FIG. 2 shows a schematic diagram of the structure of another edge device resource allocation system in an embodiment of the present disclosure. Figure 2 As shown, the edge device resource allocation system 100 may include an edge device server 101 , an edge device 102 , and an edge device 103 .

[0091] Taking the edge device 102 as an example, the structured data may include the resource allocation of the edge device 102 when the edge device detects industrial products, the device status information of the edge device 102, and the detection and classification results of the industrial products by the edge device 102.

[0092] The edge device 102 may include a perception device 112 , a detection module 122 , a segmentation module 132 and a decision transmission module 142 .

[0093] The edge device 103 may include a perception device 113 , a detection module 123 , a segmentation module 133 , and a decision transmission module 143 .

[0094] The sensing device 112 is used to identify the industrial product information of the industrial product. The identification can be performed in the form of pictures, etc. The detection module 122 is used to detect the information of the industrial product. The segmentation module 132 is used to segment the industrial product information. The decision transmission module 142 is used to determine which standard the industrial product meets based on the segmented industrial product information.

[0095] The output detection classification results may include abnormal solder leg length, solder leg offset, good product, excessive tin, insufficient tin, abnormal slope, etc.

[0096] The edge device server 101 may include a digital twin acceleration module 111 and a processor 121 .

[0097] The digital twin acceleration module 111 can be used to establish a digital twin layer, generate twin data for multiple edge devices, store the twin data in a database, and establish twin models for multiple edge devices in industrial visual inspection, etc.

[0098] The digital twin acceleration module 111 can also be used to train resource allocation models through twin data.

[0099] The processor 121 may be used to receive data from edge devices, for example, to receive data information uploaded by each edge device, perform structured processing and batch processing, and transmit the batch processed data information to the digital twin acceleration module 111 .

[0100] The processor 121 may also be used to allocate various resources of the edge device, such as computing resources and communication resources.

[0101] The data information may include the original resource allocation status of each edge device, device status information, and the detection and classification results of each edge device for industrial products and industrial product information.

[0102] Twin data can be understood as data obtained by twinning data information and processed data information.

[0103] In one possible embodiment, Figure 3 FIG. 2 shows a schematic diagram of the structure of another edge device resource allocation system in an embodiment of the present disclosure. Figure 3 As shown, the edge device resource allocation system 100 may include an edge device server 101 , an edge device 102 , an edge device 103 , and a decision aggregation module 104 .

[0104] The decision aggregation module 104 can be used to package various data information of each edge device, perform structured processing, and directly upload the structured data information to the edge device server 101.

[0105] The processor 121 in the edge device server 101 is used to receive structured data information, perform batch processing, and then transmit it to the digital twin acceleration module 111.

[0106] The present exemplary implementation is described in detail below with reference to the accompanying drawings and embodiments.

[0107] First, an edge device resource allocation method is provided in an embodiment of the present disclosure. The method can be executed by any electronic device with computing and processing capabilities. In the following process, the electronic device is taken as an edge device server as an example.

[0108] Figure 4 A flow chart of a method for allocating resources to an edge device in an embodiment of the present disclosure is shown. Figure 4 As shown, the edge device resource allocation method provided in the embodiment of the present disclosure includes the following steps:

[0109] S402: Determine the minimum joint cost of each edge device in terms of latency and energy consumption through the latency of multiple edge devices performing industrial product inspection in industrial visual inspection and the energy consumption of each edge device.

[0110] In one possible embodiment, the edge device server can be used to control the latency and energy consumption of multiple edge devices in industrial visual inspection, so that each edge device achieves the minimum joint cost in latency and energy consumption during the process of edge devices inspecting industrial products.

[0111] When each edge device performs industrial product testing, it needs to execute various computing requests. Therefore, the latency of each edge device can be the latency of executing the computing request; it can also be the sum of the latency of the computing request and some data transmission latency required to execute the computing request, and the latency of executing the computing request. The following explanation is based on the example that the latency of each edge device can be the latency of executing the computing request.

[0112] The energy consumption of each edge device can be calculated by the delay of each edge device. The joint cost is determined by setting a first adjustment parameter and a second adjustment parameter that have a proportional relationship between the delay and the energy consumption, and the minimum joint cost is determined.

[0113] In a possible embodiment, the method for determining the minimum joint cost can be: obtaining the computing requests that each edge device needs to execute for industrial product inspection, determining the latency of each edge device executing the computing requests, and obtaining the energy consumption of each edge device in industrial visual inspection based on the latency of each edge device executing the computing requests. Based on the latency of each edge device executing the computing requests and the energy consumption of each edge device, as well as the first adjustment parameter and the second adjustment parameter that are in proportional relationship, determine the joint cost, and determine the minimum joint cost of each edge device in terms of latency and energy consumption.

[0114] Exemplarily, the latency for each edge device to execute a computing request can be determined specifically in the following manner: taking any one of the multiple edge devices as a local edge device, determining the latency for the local edge device to execute all local computing requests based on the number of local computing requests sent by the user to the local edge device and the user's latency, obtaining the number of other edge device requests sent to the local edge device by edge devices other than the local edge device from the multiple edge devices, determining the latency for the local edge device to execute the other edge device requests based on the number of other edge device requests and the computing cost of the local edge device to execute the other edge device requests, determining the latency for the edge device to execute the computing request based on the latency for the local edge device to execute all local computing requests and the latency for the local edge device to execute other edge device requests, determining the latency for each edge device to execute the computing request one by one, and obtaining the latency for each edge device to execute the computing request.

[0115] Any edge device can be used as edge device A, and the computing requests executed by edge device A are divided into computing requests executed by edge device A itself and computing requests executed by edge device A from other edge devices.

[0116] The computing request executed by edge device A itself can be understood as the computing request generated by industrial products detected by edge device A itself; the computing request executed by edge device A from other edge devices can be understood as the computing request sent by other edge devices. Edge device A can be taken as a local edge device as an example.

[0117] Specifically, it can be calculated by the following formula (1):

[0118]

[0119] Among them, T i represents the latency of the i-th edge device, taking edge device A as an example; R ij represents the number of computing requests sent by the j-th user to the i-th edge device; T ij R represents the latency of the jth user’s computation request on the i-th edge device; i,j=0 represents the number of computing requests sent by other edge devices to the i-th edge device for execution; Φ i represents the computational cost, which is used to characterize the cost of the i-th edge device executing the computational requests of other edge devices; These are parameters that appear in the existing technology and have no specific meanings, and will not be described in detail in this disclosure.

[0120] Exemplarily, the energy consumption of each edge device can be determined in the following manner: based on the latency of each edge device executing the computing request and the power of each edge device executing the computing, the energy consumption of each edge device executing the computing request is determined; the energy consumption of other devices in industrial visual inspection except the edge devices is obtained, and the energy consumption of other devices is distributed on each edge device to obtain the basic energy consumption of each edge device; based on the basic energy consumption and the energy consumption of each edge device executing the computing request, the energy consumption of each edge device is obtained.

[0121] Specifically, it can be calculated by the following formula (2):

[0122]

[0123] Among them, E i represents the energy consumption of the i-th edge device; P ij represents power; E0 represents the energy consumption of other equipment; α represents the basic parameter, which is a pre-set constant.

[0124] Furthermore, after determining the latency and energy consumption, the specific method for determining the joint cost is as follows: the product of the first adjustment parameter and the energy consumption of each edge device is used as the joint energy consumption cost, the product of the second adjustment parameter and the latency of each edge device executing the computing request is used as the joint delay cost, and the sum of the joint energy consumption cost and the joint delay cost is used as the joint cost.

[0125] Specifically, it can be calculated by the following formula (3):

[0126] J i =λ1E i +λ2T i (3)

[0127] Among them, J i represents the joint cost; λ1 represents the first adjustment parameter; λ2 represents the second adjustment parameter.

[0128] By using the above formula (3), we can get the minimum value of the joint cost min{J i}, to obtain the minimum joint cost of the i-th edge device in terms of latency and energy consumption, and further obtain the minimum joint cost of each edge device.

[0129] S404: Through the digital twin layer, map the resource allocation status, device status information and detection and classification results of industrial products of each edge device when the latency and energy consumption of each edge device are minimized.

[0130] In a possible embodiment, the edge device server determines the minimum joint cost of each edge device in terms of latency and energy consumption, and can obtain the resource allocation status of each edge device.

[0131] Resources are allocated on the edge device server, and each edge device performs simple vectorization operations, receives allocated resources, and uses the resources to obtain the detection and classification results of industrial products by the edge device.

[0132] Ultimately, the resource allocation status of each edge device, device status information, and the detection and classification results of industrial products by the edge device will be used as training data for the resource allocation model in the digital twin layer.

[0133] In a possible embodiment, the resource allocation status of each edge device, the device status information and the detection and classification results of the edge device on the industrial products can be processed first, these data can be structured, and then the structured data can be transmitted to the edge device server. The structured data can be used as training data for training the resource allocation model in the digital twin layer.

[0134] S406: Train the resource allocation model in the digital twin layer according to the industrial product information, detection classification results, equipment status information and resource allocation status mapped in the digital twin layer.

[0135] In a possible embodiment, when the sensing device in the edge device senses industrial product information, the industrial product information is also uploaded to the edge device server and used in the digital twin layer to train the resource allocation model.

[0136] It should be noted that the industrial product information obtained by the sensing device can be simply processed, and the data useful for training the resource allocation model can be uploaded to the edge device server, and the industrial product information directly sensed and obtained by the sensing device can be simply cleaned.

[0137] In a possible embodiment, after obtaining the above-mentioned data information, the edge device server can construct a twin model of multiple edge devices in industrial visual inspection with the above-mentioned data information in the digital twin layer, and construct a resource allocation model capable of allocating resources to the edge devices in the digital virtual layer. By performing simulation and emulation based on the data information obtained in the twin model, the detection and classification of industrial products by the edge devices and the resource allocation to the edge devices are simulated to realize the training of the model.

[0138] Exemplarily, the industrial product information collected by each edge device is mapped through the digital twin layer. In the digital twin layer, the resource allocation model is trained based on the industrial product information, device status information, the detection and classification results of each edge device on the industrial products, and the resource allocation situation. If the industrial product information is input into the resource allocation model for detection, the resource allocation result output by the resource allocation model matches the resource allocation situation, then the training is completed and a trained resource allocation model is obtained.

[0139] The training process is the process of learning the resource allocation model. The data obtained is the resource allocation situation of the edge device at the minimum joint cost. Therefore, the resource allocation model is trained through the above data information. The trained resource allocation model can allocate resources at the minimum joint cost of latency and energy consumption when the subsequent edge devices detect and classify industrial products.

[0140] In a possible embodiment, after obtaining some data information, the twin model can be virtually run in the digital twin layer, and the detection of industrial products by edge devices can be simulated in a data simulation manner, and iterative training can be performed to realize the training of the resource allocation model. In this way, not only is there no need to interfere too much with the operation of the actual edge devices, but the training of the resource allocation model can also be accelerated. The speed of data virtual simulation is faster than the speed of actual edge devices detecting industrial products.

[0141] S408: Allocate resources to multiple edge devices according to the trained resource allocation model.

[0142] Through the above-trained resource allocation model, when the edge device detects and classifies industrial products, resources can be allocated to each edge device to detect industrial products.

[0143] Through the above method, not only can the resources of edge devices be automatically allocated in the case of large network fluctuations, but the entire training process is completed through the digital twin layer, by obtaining data information, building a twin model, and realizing edge-to-edge collaborative training and reasoning. It also takes into account the cost issues of edge devices in terms of latency and energy consumption, which can reduce the cost of using edge devices.

[0144] In a possible embodiment, in the subsequent process of continuously allocating resources to edge devices, data can continue to be acquired in a mapping manner through the digital twin layer, and the resource allocation model can continue to be trained through the data twin acceleration module to continue to improve the resource allocation model.

[0145] Based on the same inventive concept, the embodiments of the present disclosure also provide an edge device resource allocation device, such as the following embodiments. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.

[0146] Figure 5 A schematic diagram of the structure of an edge device resource allocation device in an embodiment of the present disclosure is shown. Figure 5 As shown, the edge device resource allocation device 50 includes: a joint optimization unit 501, which is used to determine the minimum joint cost of each edge device in terms of delay and energy consumption through the delay when multiple edge devices perform industrial product inspection in industrial visual inspection and the energy consumption of each edge device; a mapping unit 502, which is used to map through the digital twin layer to obtain the resource allocation status, device status information and detection and classification results of industrial products of each edge device when the delay and energy consumption of each edge device are minimized; a training unit 503, which is used to train the resource allocation model in the digital twin layer according to the industrial product information, detection and classification results, device status information and resource allocation status mapped in the digital twin layer; an allocation unit 504, which is used to allocate resources to multiple edge devices according to the trained resource allocation model.

[0147] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0148] Refer to the following Figure 6 The electronic device 600 according to this embodiment of the present disclosure is described. Figure 6 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0149] like Figure 6 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include but are not limited to: at least one processing unit 610, at least one storage unit 620, and a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610).

[0150] The storage unit stores a program code, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps of various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification. For example, the processing unit 610 can perform any step in the above method embodiments.

[0151] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .

[0152] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0153] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0154] The electronic device 600 may also communicate with one or more external devices 640 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 660. As shown, the network adapter 660 communicates with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0155] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0156] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer program product or a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method in the above embodiment.

[0157] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the above method of the present disclosure is stored thereon. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above “Exemplary Method” section of this specification.

[0158] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0159] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0160] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0161] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0162] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0163] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0164] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0165] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. A method for allocating resources of an edge device, characterized in that: The method comprises: Determine the minimum joint cost of each edge device in terms of latency and energy consumption by analyzing the latency of multiple edge devices in industrial product inspection and the energy consumption of each edge device in industrial visual inspection. Through the digital twin layer, the resource allocation situation, device status information and detection and classification results of industrial products by each edge device are mapped when the latency and energy consumption of each edge device are minimized. Training a resource allocation model in the digital twin layer according to the industrial product information mapped in the digital twin layer, the detection classification result, the device status information, and the resource allocation situation; Allocate resources to the multiple edge devices according to the trained resource allocation model; The training of the resource allocation model in the digital twin layer according to the industrial product information mapped in the digital twin layer, the detection classification result, the device status information and the resource allocation situation includes: Mapping the industrial product information collected by each edge device through the digital twin layer; In the digital twin layer, the resource allocation model is trained according to the industrial product information, the device status information, the detection and classification results of each edge device on the industrial product, and the resource allocation situation; If the industrial product information is input into the resource allocation model for detection, and the resource allocation result output by the resource allocation model matches the resource allocation situation, the training is completed and a trained resource allocation model is obtained.

2. The method according to claim 1, characterized in that The method determines the minimum joint cost of each edge device in terms of latency and energy consumption by measuring the latency of multiple edge devices performing industrial product inspection in industrial visual inspection and the energy consumption of each edge device, including: Obtaining a computing request that each edge device needs to execute for industrial product detection, and determining a latency for each edge device to execute the computing request; Obtaining energy consumption of each edge device in industrial visual inspection according to a delay of each edge device executing a computing request; Determine a joint cost according to a latency of each edge device executing a computing request and an energy consumption of each edge device, and a first adjustment parameter and a second adjustment parameter having a proportional relationship; Determine the minimum joint cost of latency and energy consumption for each edge device.

3. The method according to claim 2, characterized in that The obtaining of the computing request that each edge device needs to execute for industrial product detection and determining the latency of each edge device executing the computing request includes: Using any one of the plurality of edge devices as a local edge device; Determine the latency of the local edge device executing all the local computing requests according to the number of local computing requests sent by the user to the local edge device and the latency of the user; Obtaining the number of other edge device requests sent to the local edge device by other edge devices other than the local edge device among the multiple edge devices; Determining a delay for the local edge device to execute the other edge device requests according to the number of the other edge device requests and the computational cost of the local edge device executing the other edge device requests; Determine the latency of the edge device executing the computing request according to the latency of the local edge device executing all the local computing requests and the latency of the local edge device executing the requests of other edge devices; The time delay for each edge device to execute the computing request is determined one by one to obtain the time delay for each edge device to execute the computing request.

4. The method according to claim 2, characterized in that: The step of obtaining the energy consumption of each edge device in the industrial visual inspection according to the latency of each edge device in executing the computing request includes: Determine the energy consumption of each edge device executing the computing request according to the latency of each edge device executing the computing request and the power of each edge device executing the computing; Obtaining energy consumption of other devices in the industrial visual inspection except the edge device; Allocate the energy consumption of the other devices to each edge device to obtain the basic energy consumption of each edge device; The energy consumption of each edge device is obtained according to the basic energy consumption and the energy consumption of each edge device executing the computing request.

5. The method according to claim 2, characterized in that: The determining of the joint cost according to the latency of each edge device executing the computing request and the energy consumption of each edge device running, and the first adjustment parameter and the second adjustment parameter having a proportional relationship, comprises: The product of the first adjustment parameter and the energy consumption of each edge device is used as a joint energy consumption cost; The product of the second adjustment parameter and the latency of each edge device executing the computing request is used as a joint latency cost; The sum of the joint energy consumption cost and the joint delay cost is taken as the joint cost.

6. An edge device resource allocation system, characterized in that: include: An edge device server and an edge device; wherein the edge device server is used to build a digital twin layer; The edge device server is configured to execute the method according to any one of claims 1 to 5.

7. An edge device resource allocation device, characterized in that: include: A joint optimization unit, used to determine the minimum joint cost of each edge device in terms of latency and energy consumption by considering the latency of multiple edge devices in industrial visual inspection and the energy consumption of each edge device when the device is operating. A mapping unit, used to map, through a digital twin layer, the resource allocation situation of each edge device, the device status information, and the detection and classification results of each edge device on the industrial product when the latency and energy consumption of each edge device are minimized; A training unit, configured to train a resource allocation model in the digital twin layer according to the industrial product information mapped in the digital twin layer, the detection classification result, the device status information and the resource allocation situation; An allocation unit, configured to allocate resources to the plurality of edge devices according to a trained resource allocation model; The training unit is also used to map the industrial product information collected by each edge device through the digital twin layer; in the digital twin layer, the resource allocation model is trained according to the industrial product information, the device status information, the detection and classification results of the industrial products by each edge device, and the resource allocation situation; if the industrial product information is input into the resource allocation model for detection, the resource allocation result output by the resource allocation model matches the resource allocation situation, then the training is completed and a trained resource allocation model is obtained.

8. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 5 by executing the executable instructions.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Relay edge network task unloading method based on digital twinning

    CN113590232A

  • Unmanned aerial vehicle auxiliary edge calculation method for power grid inspection

    CN114237917A

  • Digital twinborn assisted 5G power distribution network resource scheduling method

    CN114375050A

  • Digital twin network-based low-latency and high-reliability transmission method and apparatus, device, and medium

    WO2023087442A1