State monitoring method, system, device and equipment based on edge computing
By generating comprehensive vectors and using a large language model to match edge devices, the problem of task failure caused by uneven edge device resources is solved, the real-time and reliable monitoring of operator status is achieved, and data transmission latency is reduced.
Patent Information
- Application Number
- CN202510813060.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-11-04
AI Technical Summary
In existing technologies, the computing power and storage resources of edge devices vary, leading to task processing failures or inaccurate results, and failing to effectively guarantee the real-time performance and reliability of operator status monitoring.
By generating a comprehensive vector of device status, network status, spatiotemporal context, and task information, a large language model is used to quickly match the most suitable edge device, ensuring that it has the ability to perform tasks and to quantify and allocate resources.
It ensured accurate task execution, reduced data transmission latency, guaranteed the real-time and reliable status monitoring of operators, and improved resource utilization efficiency and task execution stability.
Smart Images

Figure CN120892283A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of AI detection and edge computing, and particularly relates to a state monitoring method, system, device and equipment based on edge computing. BACKGROUND
[0002] Traditional worker state monitoring systems usually rely on the computing power of cloud servers, and specifically transmit state data of workers collected by data collection devices such as wristbands and armbands to cloud servers, and perform tasks on the servers. The tasks can be fatigue state monitoring, health state monitoring, etc.
[0003] However, this cloud computing-based mode has obvious disadvantages. On the one hand, the data transmission process has a high requirement for network bandwidth. A large amount of state data needs to be transmitted to the cloud in real time and stably. Once the network bandwidth is insufficient, the data transmission may be delayed or even interrupted, affecting the continuity and accuracy of monitoring. On the other hand, the problem of high monitoring delay is more prominent. Since the data needs to be transmitted to the cloud for processing and then the processing result is returned, the time difference between the two makes the system unable to respond to the state changes of the workers in real time. For example, when the worker suddenly has an emergency such as illness or fatigue, the cloud monitoring system may not be able to issue a warning in time, thus delaying the processing opportunity and increasing the safety risk.
[0004] In order to solve the problem of real-time response to the state changes of the workers, the related technical field proposes a new scheme of using edge devices to perform tasks. The basic idea is to randomly select one from a plurality of edge devices, and the selected edge device performs the task originally performed in the cloud. However, this random selection of edge devices to perform tasks has a great hidden danger. Since the computing power, storage capacity and other hardware resources of edge devices are uneven, the selected edge device may not have sufficient performance to support the smooth execution of the task, thus causing the task processing to fail or the result to be inaccurate, and unable to effectively guarantee the real-time and reliability of the worker state monitoring. SUMMARY
[0005] The embodiments of the present application provide a state monitoring method, system, device and equipment based on edge computing, to solve the problem that the determined edge device may not have sufficient performance to support the smooth execution of the task, thus causing the task processing to fail or the result to be inaccurate, and unable to effectively guarantee the real-time and reliability of the worker state monitoring.
[0006] In a first aspect, the embodiments of the present application provide a state monitoring method based on edge computing, comprising:
[0007] receiving a task execution request carrying a task execution identifier sent by a data collection device;
[0008] For each edge device, a device vector containing the device state of the edge device, a state vector containing the network state between the edge device and the data collection device, a space-time vector containing the space-time context of the edge device performing the corresponding task, obtaining the saved task information for the task identification, generating a task vector containing the task information, splicing the device vector, the state vector, the space-time vector and the task vector to obtain the target vector of the edge device;
[0009] The target vector of each edge device is input into a large language model to obtain a target edge device output by the large language model; so that the target edge device obtains the state data of the work personnel collected by the data collection device, performs the task corresponding to the task identification based on the state data, and obtains a monitoring result.
[0010] The above technical solution has the following advantages or beneficial effects: in the embodiments of the present application, the target vector of each edge device is input into a large language model by an electronic device, and a target edge device suitable for performing a to-be-executed task is quickly generated by using the large language model, which ensures that the selected target edge device completely has the ability to perform the to-be-executed task, and the determined edge device has sufficient performance to support the smooth execution of the task, thereby accurately and effectively performing task processing, ensuring the real-time performance and reliability of work personnel state monitoring. The target vector of each edge device is formed by splicing a device vector, a state vector, a space-time vector and a task vector, so it can accurately and effectively represent the information of the task and the edge device. In addition, the state data of the work personnel collected by the data collection device is obtained by the determined target edge device, without waiting for the state data to be transmitted to the electronic device and then transmitted to the edge device by the electronic device, which can reduce the time delay of data transmission, quickly perform task processing, and respond to the state changes of the work personnel in real time.
[0011] In a possible implementation, the inputting the target vector of each edge device into a large language model to obtain a target edge device output by the large language model comprises:
[0012] The target vector of each edge device is input into a large language model to obtain a target edge device output by the large language model and the amount of resources used, wherein the amount of resources used includes the used memory capacity and the used CPU core number of the target edge device performing the task corresponding to the task identification.
[0013] The sending the task identification to the target edge device comprises:
[0014] send the task identifier and the used resource amount to the target edge device; and cause the target edge device to invoke a resource of the used resource amount to execute a task corresponding to the task identifier.
[0015] The technical solution has the following advantages or beneficial effects: based on the large language model electronic device, the device state and the task demand can be comprehensively considered, the optimal edge device is intelligently matched, and the used resource amount is accurately quantified, so that the resource utilization efficiency is significantly improved, and resource waste or deficiency is avoided; secondly, by synchronously issuing the predicted detailed resource specification and the task identifier to the target device, the pre-allocation and fine control of the resource are realized, which not only guarantees the stability of task execution, but also provides reliable isolation for multi-task parallelism.
[0016] In a possible implementation, the generating the device vector containing the device state of the edge device comprises:
[0017] sending an instruction to the edge device, receiving the current CPU usage, the current memory usage and the current energy consumption of the edge device returned by the edge device, obtaining a first feature vector composed of exponential decay of the CPU usage, the memory usage and the energy consumption, and determining a device vector containing the device state of the edge device based on a dynamic projection matrix and the first feature vector.
[0018] The technical solution has the following advantages or beneficial effects: the method provided by the embodiment of the application can consider the CPU usage, the current memory usage and the current energy consumption of the edge device and the task information at the same time, so as to make more accurate resource allocation decisions. And the dynamic projection improves the feature quality, and the joint representation realizes the deep matching of the device and the task; the unified vectorization input simplifies the processing flow of the large language model.
[0019] In a possible implementation, the generating the state vector containing the network state between the edge device and the data acquisition device comprises:
[0020] obtaining the bandwidth and the delay between the edge device and the data acquisition device, determining the sum of the delay and a preset value, and determining the value after logarithmic transformation of the sum, determining a first ratio of the bandwidth and the value, inputting the first ratio into a graph attention network for encoding to obtain an encoded feature matrix;
[0021] determining a state vector containing the network state between the edge device and the data acquisition device based on a dynamic projection matrix and the feature matrix.
[0022] The technical scheme has the following advantages or beneficial effects: in the embodiment of the application, the scale difference of the network index is effectively eliminated based on the logarithmic transformation delay processing, the feature robustness is enhanced, the device performance under different network conditions is comparable, the graph attention network coding mechanism not only captures the direct network state between devices, but also implicitly learns the global network environment features through topological correlation modeling, which greatly improves the accuracy of network quality evaluation. The introduction of dynamic projection technology further enhances the expression ability of the features, which can adapt to different scheduling scenarios. By cross-modal fusion of the network state vector and the task demand vector, the joint optimization of network transmission performance and computing resource demand is realized, effectively avoiding the problem of network bottleneck or computing resource waste in traditional scheduling.
[0023] In a possible implementation, the space-time vector containing the space-time context of the edge device performing the corresponding task is generated by:
[0024] The transmission cost of the edge device and the data acquisition device and the time information of the to-be-executed task are obtained; the time information is the deadline and influence information, the transmission cost and the time information are input into the space-time encoder, the output of the space-time encoder is obtained, and the space-time vector containing the space-time context of the edge device performing the corresponding task is determined based on the dynamic projection matrix and the output.
[0025] The technical scheme has the following advantages or beneficial effects: the embodiment of the application realizes the joint modeling of transmission cost and time constraint, adopts multi-scale time feature extraction technology, accurately captures the urgency and timeliness requirements of the task, models the topological correlation of the transmission cost through the space-time encoder, enhances the representation ability of the features, and realizes the unified space mapping of different modal features through the dynamic projection mechanism, to provide an interpretable feature representation for subsequent decision determination.
[0026] In a possible implementation, the task information saved for the task identifier is obtained by:
[0027] The second ratio of the computing resource for performing the task corresponding to the task identifier to the remaining resource of the edge device is obtained, the difference between the maximum delay allowed by the task and the estimated delay of the edge device performing the task is obtained, the third ratio of the difference to the maximum delay is determined, and the matching degree of the task corresponding to the task identifier and the edge node is determined.
[0028] The task vector containing the task information is generated by:
[0029] The second feature vector composed of the second ratio, the third ratio and the matching degree is determined, and the task vector containing the task information is determined based on the dynamic projection matrix and the second feature vector.
[0030] The technical solution has the following advantages or beneficial effects: the task vector generated by the method provided in the embodiment of the application not only encodes static resource requirements, but also integrates dynamic constraint conditions and environmental adaptation characteristics, thereby providing comprehensive and accurate feature representation for subsequent intelligent scheduling decisions. The ratio calculation realizes the standardized comparison of cross-node resources; the multi-dimensional matching degree evaluation enhances the comprehensiveness of the scheduling decision; and the dynamic projection improves the representation ability of the features.
[0031] In a possible implementation, the method further includes:
[0032] After receiving the new data set, first sample data in the new data set and a standard recognition result saved for the first sample data are acquired, the first sample data is input into the large language model, an output recognition result output by the large language model is acquired, and a first loss value is determined according to the output recognition result and the standard recognition result;
[0033] Second sample data in an initial data set are acquired, the second sample data are input into the teacher large language model and the large language model, a first prediction result and a second prediction result respectively output are acquired, and a second loss value is determined according to the KL divergence of the first prediction result and the second prediction result;
[0034] The parameters of the large language model are fine-tuned according to the first loss value and the second loss value.
[0035] The technical solution has the following advantages or beneficial effects: in the embodiment of the application, the large language model achieves excellent balance between new data adaptability and old knowledge retention. The supervised loss function ensures that the model accurately captures the distribution characteristics of new data, and the distillation loss based on the KL divergence stabilizes the original representation space. This double constraint enables the model to maintain stable performance in the open domain incremental learning scenario, avoiding the catastrophic forgetting problem in the common large model fine-tuning process.
[0036] In a second aspect, the embodiment of the application further provides a state monitoring system based on edge computing, which includes at least two edge devices, and an electronic device.
[0037] The electronic device is configured to receive a task execution request carrying a task execution identifier sent by a data collection device; for each edge device, generate a device vector containing a device state of the edge device, a state vector containing a network state between the edge device and the data collection device, and a space-time vector containing a space-time context in which the edge device executes a corresponding task; obtain task information saved for the task identifier, generate a task vector containing the task information, and splice the device vector, the state vector, the space-time vector, and the task vector to obtain a target vector of the edge device; input the target vector of each edge device into a large language model to obtain a target edge device output by the large language model; and send the task identifier to the target edge device.
[0038] The target edge device is configured to obtain state data of a job worker collected by the data collection device, execute a task corresponding to the task identifier based on the state data, and obtain a monitoring result.
[0039] In a possible implementation, the electronic device is specifically configured to input the target vector of each edge device into a large language model, obtain a target edge device output by the large language model and a used resource amount, wherein the used resource amount includes a used memory capacity and a used CPU core number of the target edge device in executing the task corresponding to the task identifier, and send the task identifier and the used resource amount to the target edge device.
[0040] The target edge device is specifically configured to invoke resources of the used resource amount to execute the task corresponding to the task identifier.
[0041] In a possible implementation, the electronic device is specifically configured to send an instruction to the edge device, receive a current CPU usage rate, a current memory usage rate, and a current energy consumption of the edge device returned by the edge device, obtain a first feature vector composed of an exponential decay of the CPU usage rate, the memory usage rate, and the energy consumption, and determine a device vector containing a device state of the edge device based on a dynamic projection matrix and the first feature vector.
[0042] In a possible implementation, the electronic device is specifically configured to obtain a bandwidth and a delay between the edge device and the data collection device, determine a sum of the delay and a preset value, determine a value after logarithmic transformation of the sum, determine a first ratio of the bandwidth to the value, input the first ratio into a graph attention network for encoding to obtain an encoded feature matrix, and determine a state vector containing a network state between the edge device and the data collection device based on a dynamic projection matrix and the feature matrix.
[0043] In a possible implementation, the electronic device is specifically configured to obtain transmission cost of the edge device and the data collection device and time information of the to-be-executed task, wherein the time information is a deadline and influence information, input the transmission cost and the time information into a space-time encoder, obtain an output of the space-time encoder, and determine a space-time vector containing a space-time context of the edge device executing a corresponding task based on a dynamic projection matrix and the output.
[0044] In a possible implementation, the electronic device is specifically configured to obtain a second ratio of a computing resource executing a task corresponding to the task identifier and a remaining resource of the edge device, obtain a difference between a maximum delay allowed by the task and an estimated delay of the edge device executing the task, determine a third ratio of the difference and the maximum delay, and determine a matching degree of the task corresponding to the task identifier and the edge node; determine a second feature vector composed of the second ratio, the third ratio and the matching degree, and determine a task vector containing the task information based on a dynamic projection matrix and the second feature vector.
[0045] In a possible implementation, the electronic device is further configured to, after receiving a new data set, obtain first sample data in the new data set and a standard recognition result saved for the first sample data, input the first sample data into a large language model, obtain an output recognition result output by the large language model, and determine a first loss value according to the output recognition result and the standard recognition result; and obtain second sample data in an initial data set, input the second sample data into a teacher large language model and the large language model, obtain a first prediction result and a second prediction result output respectively, determine a second loss value according to a KL divergence of the first prediction result and the second prediction result, and fine-tune parameters of the large language model according to the first loss value and the second loss value.
[0046] In a third aspect, an edge computing-based state monitoring apparatus is also provided in the embodiments of the present application, and the apparatus comprises:
[0047] The receiving module is configured to receive a task execution request carrying a task execution identifier sent by the data collection device;
[0048] The processing module is configured to, for each edge device, generate a device vector containing a device state of the edge device, generate a state vector containing a network state between the edge device and the data collection device, generate a space-time vector containing a space-time context in which the edge device performs a corresponding task, obtain task information saved for the task identifier, generate a task vector containing the task information, splice the device vector, the state vector, the space-time vector, and the task vector to obtain a target vector of the edge device, input the target vector of each edge device into a large language model, obtain a target edge device output by the large language model, and send the task identifier to the target edge device, so that the target edge device obtains state data of a worker collected by the data collection device, performs a task corresponding to the task identifier based on the state data, and obtains a monitoring result.
[0049] In a possible implementation, the processing module is specifically configured to input the target vector of each edge device into a large language model, obtain a target edge device output by the large language model and a used resource amount, wherein the used resource amount includes a used memory capacity and a used CPU core number of the target edge device performing the task corresponding to the task identifier, send the task identifier and the used resource amount to the target edge device, so that the target edge device invokes resources of the used resource amount to perform the task corresponding to the task identifier.
[0050] In a possible implementation, the processing module is specifically configured to send an instruction to the edge device, receive a current CPU usage rate, a current memory usage rate, and a current energy consumption of the edge device returned by the edge device, obtain a first feature vector composed of exponential decay of the CPU usage rate, the memory usage rate, and the energy consumption, and determine a device vector containing a device state of the edge device based on a dynamic projection matrix and the first feature vector.
[0051] In a possible implementation, the processing module is specifically configured to obtain a bandwidth and a delay between the edge device and the data collection device, determine a sum value of the delay and a preset value, determine a value after logarithmic transformation of the sum value, determine a first ratio value of the bandwidth and the value, input the first ratio value into a graph attention network for encoding to obtain an encoded feature matrix, and determine a state vector containing a network state between the edge device and the data collection device based on a dynamic projection matrix and the feature matrix.
[0052] In a possible implementation, the processing module is specifically configured to obtain transmission cost of the edge device and the data collection device and time information of the to-be-executed task, wherein the time information is a deadline and influence information, input the transmission cost and the time information into a space-time encoder, obtain an output of the space-time encoder, and determine a space-time vector containing a space-time context of the edge device executing a corresponding task based on a dynamic projection matrix and the output.
[0053] In a possible implementation, the processing module is specifically configured to obtain a second ratio of a computing resource executing a task corresponding to the task identifier and a remaining resource of the edge device, obtain a difference between a maximum delay allowed by the task and an estimated delay of the edge device executing the task, determine a third ratio of the difference and the maximum delay, and determine a matching degree of the task corresponding to the task identifier and the edge node; determine a second feature vector composed of the second ratio, the third ratio, and the matching degree, and determine a task vector containing the task information based on a dynamic projection matrix and the second feature vector.
[0054] In a possible implementation, the processing module is further configured to, after receiving a new data set, obtain first sample data in the new data set and a standard recognition result saved for the first sample data, input the first sample data into a large language model, obtain an output recognition result output by the large language model, and determine a first loss value according to the output recognition result and the standard recognition result; and obtain second sample data in an initial data set, input the second sample data into a teacher large language model and the large language model, obtain a first prediction result and a second prediction result output respectively, determine a second loss value according to a KL divergence of the first prediction result and the second prediction result, and fine-tune parameters of the large language model according to the first loss value and the second loss value.
[0055] In a fourth aspect, the present application provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
[0056] The memory is used to store a computer program.
[0057] The processor is used to execute the program stored on the memory, and implement the method.
[0058] Since in the embodiment of the present application, the target vector of all edge devices is input into the large language model by the electronic device, and the large language model is used to quickly generate a target edge device suitable for performing the to-be-executed task, it is ensured that the selected target edge device has the ability to perform the to-be-executed task, and the determined edge device has sufficient performance to support the smooth execution of the task, thereby accurately and effectively processing the task, ensuring the real-time and reliability of the work personnel state monitoring, and the state data of the work personnel collected by the data acquisition device is obtained by the determined target edge device, without waiting for the state data to be transmitted to the electronic device and then transmitted to the edge device by the electronic device, the time delay of data transmission can be reduced, the task processing can be quickly performed, and the state change of the work personnel can be responded in real time. BRIEF DESCRIPTION OF DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0060] Figure 1 A process schematic diagram of a state monitoring method based on edge computing provided by an embodiment of the present application;
[0061] Figure 2 A detailed process schematic diagram of state monitoring provided by an embodiment of the present application;
[0062] Figure 3 A detailed process schematic diagram of determining a device vector of a certain edge device provided by an embodiment of the present application;
[0063] Figure 4 A detailed process schematic diagram of state monitoring based on edge computing provided by an embodiment of the present application;
[0064] Figure 5 A structure schematic diagram of a state monitoring system based on edge computing provided by an embodiment of the present application;
[0065] Figure 6 A structure schematic diagram of a state monitoring device based on edge computing provided by an embodiment of the present application;
[0066] Figure 7 A structure schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to make the purpose and the embodiments of the present application more clear, the exemplary embodiments of the present application will be described clearly and completely below in combination with the drawings of the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application.
[0068] It should be noted that the brief description of the terms in the present application is only for the convenience of understanding the subsequently described embodiments, and is not intended to limit the embodiments of the present application. Unless otherwise specified, these terms should be understood according to their ordinary and general meanings.
[0069] The terms "first", "second", "third", and the like in the specification and claims of the present application and the above drawings are used to distinguish similar or identical objects or entities, and do not necessarily mean a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchanged under appropriate circumstances.
[0070] The terms "include" and "have" and any variations thereof are intended to cover but not exclusive inclusion, for example, a product or device including a series of components does not have to be limited to all the components listed clearly, but can include other components not listed clearly or inherent to these products or devices.
[0071] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or a combination of hardware or / and software code capable of performing a function associated with the element.
[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent substitutions for some or all of the technical features; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
[0073] For the convenience of explanation, the above description has been made in combination with specific embodiments. However, the above exemplary discussion is not intended to exhaust or limit the embodiments to the specific forms disclosed above. Various modifications and variations can be derived according to the above teachings. The selection and description of the above embodiments are for better explanation of the principles and practical applications, so that those skilled in the art can better use the embodiments and various different modified embodiments suitable for specific use considerations.
[0074] In order to accurately and effectively monitor the state of the work personnel, the embodiments of the present application provide a state monitoring method, system, device and electronic equipment based on edge computing.
[0075] The edge computing-based state monitoring method comprises the following steps: receiving a task execution request carrying a task execution identifier sent by a data collection device; obtaining device information of each edge device, task information saved for the task identifier, inputting the device information and the task information into a large language model, and obtaining a target edge device output by the large language model; sending the task identifier to the target edge device; so that the target edge device obtains state data of a worker collected by the data collection device, executes a task corresponding to the task identifier based on the state data, and obtains a monitoring result.
[0076] Figure 1 A process schematic diagram of an edge computing-based state monitoring method provided by the embodiment of the application is shown in the figure. The process comprises the following steps:
[0077] S101: receiving a task execution request carrying a task execution identifier sent by a data collection device.
[0078] The edge computing-based state monitoring method provided by the embodiment of the application is applied to an electronic device, which can be a PC or a server or other intelligent device.
[0079] In order to accurately and effectively perform state monitoring, the electronic device can receive a task execution request carrying a task execution identifier sent by a data collection device. The data collection device can be a device worn by a worker, such as a bracelet, an arm ring, or other forms of devices, such as a helmet or a chest bag.
[0080] In an example, if only one kind of state monitoring is performed, such as monitoring only the fatigue state of a worker, the task execution request can not carry a task execution identifier, and the task execution request can be referred to as a data stream.
[0081] In an example, the data collection device can send the task execution request to one or more edge devices, and the edge devices can send the task execution request to the electronic device.
[0082] S102: for each edge device, generating a device vector containing a device state of the edge device, a state vector containing a network state between the edge device and the data collection device, a space-time vector containing a space-time context of the edge device executing a corresponding task, obtaining task information saved for the task identifier, generating a task vector containing the task information, and splicing the device vector, the state vector, the space-time vector, and the task vector to obtain a target vector of the edge device.
[0083] After receiving the task execution request, the electronic device can obtain a target vector of each edge device. Specifically, for each edge device, the electronic device can send an acquisition instruction to the edge device, and the edge device sends its device information to the electronic device. The electronic device generates a device vector containing the device state of the edge device. The device vector can quantify the real-time running state of the edge device, including hardware indicators such as computing resources, storage capacity, and current task load, to ensure that the device has the basic ability to execute tasks. The electronic device also generates a state vector containing the network state between the edge device and the data collection device. The state vector represents the network communication quality between the edge device and the data collection device, and can cover parameters such as delay, bandwidth, packet loss rate, and connection stability, to assess the real-time performance and reliability of data transmission. The electronic device also generates a space-time vector containing the space-time context of the edge device executing the corresponding task. The space-time vector embeds context environment information of task execution, such as the geographical location of the edge device (whether close to the data collection device) and time constraints (task deadline, periodic requirements), to adapt to space-time sensitive tasks.
[0084] To accurately and effectively perform state monitoring, the electronic device locally pre-stores a correspondence between a task identifier and task information. The electronic device can obtain the task information stored for the task identifier. In one example, the task information can include resources required to execute the task. After obtaining the task information, the electronic device can generate a task vector containing the task information.
[0085] For each edge device, the electronic device concatenates the device vector, state vector, space-time vector of the edge device, and the task vector of the task to obtain the target vector of the edge device.
[0086] S103: inputting the target vector of each edge device into a large language model to obtain a target edge device output by the large language model; sending the task identifier to the target edge device; so that the target edge device obtains state data of the work personnel collected by the data collection device, executes the task corresponding to the task identifier based on the state data, and obtains a monitoring result.
[0087] Inputting the target vector of each edge device into a large language model, the large language model outputs a target edge device, which is a device sufficient to execute the task corresponding to the task identifier.
[0088] The large language model can output a device identifier of the target edge device.
[0089] After obtaining the target edge device, the electronic device can send the task identifier to the target edge device. After receiving the task identifier sent by the electronic device, the target edge device can obtain the state data of the work personnel collected by the data collection device, and execute the task corresponding to the task identifier based on the state data to obtain the monitoring result. In an example, the target edge device locally stores models corresponding to different tasks. The target edge device can obtain a target model corresponding to the task identifier, input the obtained state data into the target model, and obtain the monitoring result output by the target model.
[0090] In an example, the electronic device determining the target edge device can also be referred to as determining a task offloading strategy.
[0091] In the embodiments of the present application, the edge device organization and deployment scheme includes: (1) the edge device receives data from a bracelet, an arm ring, and other data collection devices; (2) the edge device receives task offloading strategies from a large language model, which are inferred based on real-time environment data and historical task patterns; (3) according to the strategies inferred by the large language model, the edge device executes the assigned data processing and analysis tasks; (4) the edge device feeds back the data analysis results to the bracelet, the arm ring, and other data collection devices or monitoring personnel. The edge device deploys a quantized AI detection model to achieve high accuracy and intelligent level of work personnel state monitoring.
[0092] The embodiments of the present application propose a low-latency work personnel state monitoring system based on edge computing technology. The inference ability of the large language model is used to intelligently perform task offloading and resource allocation, thereby reducing the time delay of the monitoring system and effectively monitoring the state of the work personnel.
[0093] The embodiments of the present application propose deploying multiple edge devices at the user end, assigning monitoring tasks of work personnel to the edge devices, and judging and feeding back the state of the work personnel by the edge devices. A dynamic edge computing strategy based on a large language model is proposed. The inference ability of the large language model can also be used to fine-tune the large language model for edge computing tasks, thereby realizing the dynamic task offloading and resource allocation strategy. The state of the work personnel is monitored by the edge device, which avoids transmitting a large amount of data back to the cloud, reduces the bandwidth requirement and time delay of data transmission. The dynamic task offloading and resource allocation strategy based on the large language model avoids the complicated task of training a reinforcement learning model, and effectively improves the efficiency of edge computing.
[0094] It should be noted that the conventional work personnel state monitoring system usually relies on cloud computing, that is, the data collected by the terminal side device such as the bracelet and the arm ring is transmitted to the cloud server, the work personnel state information is mined on the server, the fatigue state of the work personnel is judged, and then the result is fed back to the user. Therefore, in the conventional work personnel state monitoring system, although the powerful computing capability of the cloud provides support for complex data analysis, the data transmission relies on high bandwidth, and the monitoring delay is high, which cannot respond to the state change of the work personnel in real time. Some advanced methods try to introduce edge computing into the monitoring system, which reduces the burden of data transmission by performing preliminary processing and analysis of data on the edge node, however, these systems usually use simple rules or lightweight models for data analysis, resulting in low accuracy and intelligence of monitoring. In addition, the existing edge computing technology lacks effective task offloading and resource allocation strategies. In the edge computing environment, how to dynamically adjust the allocation and offloading strategy of the computing task according to the computing capability of the device, the network condition and the urgency of the task is the key to improve the performance of the system. Reinforcement learning as a machine learning method has been widely used in task offloading and resource allocation strategies in recent years, although reinforcement learning has adaptability and optimization capability in dynamic environment, but in practical application, it usually needs a large amount of training data and time to learn effective strategy, which is often difficult and time-consuming. Therefore, the method proposes a low-delay work personnel state monitoring system based on edge computing, which realizes low-delay personnel state monitoring and feedback by deploying edge devices and relying on fine-tuned inference large language models.
[0095] Figure 2 A detailed process diagram of state monitoring is provided for the embodiments of the present application, and the process includes the following steps:
[0096] S201: The electronic device receives the task execution request carrying the task execution identifier sent by the data collection device.
[0097] S202: The electronic device generates, for each edge device, a device vector containing the device state of the edge device, a state vector containing the network state between the edge device and the data collection device, a space-time vector containing the space-time context of the edge device executing the corresponding task, obtains the task information saved for the task identifier, and generates a task vector containing the task information.
[0098] S203: The electronic device splices the device vector, the state vector, the space-time vector and the task vector for each edge device to obtain the target vector of the edge device.
[0099] S204: The electronic device inputs the target vector of each edge device into the large language model to obtain the target edge device output by the large language model.
[0100] S205: The electronic device sends the task identifier to the target edge device.
[0101] S206: The target edge device acquires the state data of the work personnel collected by the data collection device.
[0102] S207: The target edge device performs the task corresponding to the task identifier based on the state data, and acquires the monitoring result.
[0103] The technical solution has the following advantages or beneficial effects: in the embodiment, the electronic device inputs the target vector of each edge device into a large language model, the target vector is obtained by splicing the device vector, the state vector, the space-time vector, and the task vector, which can accurately and effectively represent the information of the task and the edge device, and the large language model is used to quickly generate a target edge device suitable for performing the to-be-executed task, ensuring that the selected target edge device has the ability to perform the to-be-executed task, and the determined edge device has sufficient performance to support the smooth execution of the task, thereby accurately and effectively performing the task processing, ensuring the real-time performance and reliability of the work personnel state monitoring, and acquiring the state data of the work personnel collected by the data collection device by the determined target edge device, without waiting for the state data to be transmitted to the electronic device and then transmitted to the edge device by the electronic device, which can reduce the time delay of data transmission and quickly perform the task processing to respond to the state change of the work personnel in real time.
[0104] In order to accurately and effectively perform the state monitoring, in the embodiment, the inputting of the target vector of each edge device into the large language model and the acquisition of the target edge device output by the large language model comprises:
[0105] The target vector of each edge device is input into the large language model, and the target edge device output by the large language model and the used resource amount are acquired, wherein the used resource amount includes the used memory capacity and the used CPU core number of the target edge device for performing the task corresponding to the task identifier.
[0106] The sending of the task identifier to the target edge device comprises:
[0107] The task identifier and the used resource amount are sent to the target edge device, so that the target edge device calls the resources of the used resource amount to perform the task corresponding to the task identifier.
[0108] In order to realize the intelligent edge computing task scheduling, the electronic device can also determine the used resource amount of the target edge device for performing the task.
[0109] Specifically, the electronic device can input the device information and the task information into the large language model for resource evaluation and allocation. Specifically, the electronic device can first input the target vector of each edge device into the large language model, and the large language model outputs the identification of the target edge device most suitable for executing the task and the resource amount required for the task execution based on inference calculation. The resource amount can be referred to as the used resource amount. The used resource amount can include the memory space capacity required for task execution, and the number of CPU computing cores required for allocation. In an example, the used resource amount can also include the estimated storage input / output (Input / Output, IO) bandwidth requirement and the expected task execution time estimation.
[0110] In the task scheduling stage, the electronic device not only sends the task identification to the target edge device, but also synchronously transmits the used resource amount calculated by the large language model. This enables the target edge device to make accurate resource reservation and allocation in advance, and to allocate computing resources according to the specified memory capacity and CPU core number, ensuring efficient and stable execution of the task.
[0111] The above technical solution has the following advantages or beneficial effects: based on the large language model, the electronic device can comprehensively consider device status and task demand, intelligently match the optimal edge device, and accurately quantify the used resource amount, thereby significantly improving resource utilization efficiency and avoiding resource waste or deficiency; secondly, by synchronously issuing the predicted detailed resource specification and the task identification to the target device, resource pre-allocation and fine control are realized, which not only guarantees the stability of task execution, but also provides reliable isolation for multi-task parallelism.
[0112] In order to accurately and effectively perform state monitoring, on the basis of the above embodiments, in the embodiments of the present application, the device vector containing the device status of the edge device is generated, including:
[0113] An instruction is sent to the edge device, and the current CPU usage, current memory usage, and current energy consumption of the edge device returned by the edge device are received. A first feature vector composed of exponential decay of the CPU usage, the memory usage, and the energy consumption is obtained. Based on the dynamic projection matrix and the first feature vector, a device vector containing the device status of the edge device is determined.
[0114] In order to improve the dynamic adaptability of the large language model, the embodiments of the present application can use multi-dimensional dynamic coding to calculate the target edge device and the used resource amount.
[0115] Specifically, the electronic device can send an instruction to each edge device, which can be a state query instruction, through which the core operating indicators of the edge device are obtained in real time, including the instantaneous CPU usage, memory usage and current energy consumption. These basic indicators are processed through nonlinear transformation, and the exponential decay of energy consumption is further calculated to form a feature vector reflecting the dynamic performance of the device. In order to facilitate distinction, the feature vector can be referred to as a first feature vector. In order to improve the feature expression ability, the present application embodiment can introduce a learnable dynamic projection matrix to map the original feature space to a higher-dimensional latent representation space, generating a device vector with stronger distinguishability.
[0116] wherein the first feature vector is composed of three parts, respectively representing the CPU usage, memory usage and energy efficiency exponential decay of the edge device at the current time t:
[0117]
[0118] wherein, is the first feature vector, CPU t is the instantaneous occupied CPU computing resource amount at time t, CPU max is the maximum available CPU computing capability, is the CPU usage of the edge device at time t, normalized to the proportion relative to the maximum CPU usage capability, which can make the CPU usage of different edge devices comparable; MEM t is the real-time memory occupation total amount of the edge device at time t, MEM max is the upper limit of the physical memory hardware of the edge device, is the memory usage of the device at time t, normalized to the proportion relative to the maximum memory capacity, which helps to standardize the memory usage of different devices; E t is the energy consumption of the edge device at time t, and a is a preset control parameter of exponential decay rate, and the exponential decay function e -αEt is used to convert the energy consumption into a feature more suitable for model processing, reduce the influence of extreme values on the model, and make the sensitivity of the model to energy consumption changes more smooth and stable.f t dev helps the large language model to understand the current state of the edge device, so as to make corresponding prediction or decision.
[0119] In an example, the electronic device can determine the device vector through the following formula:
[0120] H dev =W dev f dev
[0121] wherein, Hdev is a device vector, W dev is a dynamic projection matrix of learnable parameters, f dev is a first feature vector.
[0122] Figure 3 is a detailed process diagram provided by an embodiment of the application for determining a device vector of an edge device, the process comprising the following steps:
[0123] S301: sending an instruction to the edge device.
[0124] S302: receiving the current CPU usage, current memory usage and current energy consumption of the edge device returned by the edge device.
[0125] S303: obtaining a first feature vector composed of exponential decay of CPU usage, memory usage and energy consumption.
[0126] S304: determining a device vector containing the device state of the edge device based on the dynamic projection matrix and the first feature vector.
[0127] The above technical solution has the following advantages or beneficial effects: the method provided by the embodiment of the application can simultaneously consider the CPU usage, current memory usage and current energy consumption of the edge device and task information, thereby making more accurate resource allocation decisions. And the dynamic projection improves the feature quality, and the joint representation realizes the deep matching of the device and the task; the unified vectorization input simplifies the processing flow of the large language model.
[0128] In order to accurately and effectively perform state monitoring, on the basis of the above embodiments, in the embodiments of the application, a state vector containing the network state between the edge device and the data acquisition device is generated, comprising:
[0129] Obtaining the bandwidth and delay between the edge device and the data acquisition device, determining the sum value of the delay and a preset value, and determining the value after logarithmic transformation of the sum value, determining the first ratio of the bandwidth and the value, inputting the first ratio into the graph attention network for encoding to obtain the encoded feature matrix;
[0130] Determining a state vector containing the network state between the edge device and the data acquisition device based on the dynamic projection matrix and the feature matrix.
[0131] In order to improve the dynamic adaptability of the large language model, the embodiments of the application can use multi-dimensional dynamic coding to calculate the target edge device and the amount of resources used.
[0132] Specifically, the electronic device can collect network performance indicators between each edge device and the data collection node in real time for each edge device using a distributed probe, including bandwidth and end-to-end transmission delay. To eliminate the dimensional differences of network indicators and enhance feature robustness, logarithmic transformation is applied to the delay data. In one example, the sum of the delay and a preset value can be determined, the sum is subjected to logarithmic transformation, and a first ratio of the bandwidth to the logarithmically transformed value is determined.
[0133] In the network feature encoding stage, the embodiment of the application introduces a graph attention network, and inputs the first ratio into the graph attention network. The graph attention network dynamically learns the weight distribution of different network link features through a multi-head attention mechanism, and outputs an encoded feature matrix with context awareness capability. The feature matrix is further subjected to a learnable dynamic projection transformation to generate a state vector. The graph attention network is a neural network model for processing graph structured data. It dynamically assigns different weights to the neighbors of each node by introducing an attention mechanism, thereby better capturing the relationships and features between nodes.
[0134] The feature matrix is determined in the following manner:
[0135] h net =GAT(f net )
[0136] wherein, h net is the feature matrix, GAT is the graph attention network, GAT(f net ) is the encoding of f net into the graph attention network, f net is the first ratio, BW ij is the bandwidth between edge device i and data collection device j; is a transformed form of the delay (Latency ij ) between edge device i and data collection device j, Latency ij is the delay between edge device i and data collection device j. The log function and the reciprocal are used to scale and standardize the delay value, making it more suitable for model training.
[0137] In one example, the electronic device can determine the state vector by the following formula:
[0138] H net =W net h net
[0139] wherein, H net is the state vector, W net is a dynamic projection matrix of learnable parameters, and hnet is a feature matrix.
[0140] The technical solution has the following advantages or beneficial effects: the log transformation-based delay processing in the embodiments of the application effectively eliminates the scale difference of network indicators, enhances feature robustness, and makes the device performance under different network conditions comparable; the graph attention network coding mechanism not only captures the direct network state between devices, but also implicitly learns global network environment features through topology association modeling, which greatly improves the accuracy of network quality evaluation. The introduction of dynamic projection technology further enhances the expression ability of features, which can adapt to different scheduling scenarios. By cross-modal fusion of the network state vector and the task demand vector, joint optimization of network transmission performance and computing resource demand is realized, effectively avoiding the problem of network bottleneck or waste of computing resources in traditional scheduling.
[0141] In order to accurately and effectively perform state monitoring, on the basis of the above embodiments, in the embodiments of the application, a spatiotemporal vector containing the spatiotemporal context of the edge device performing the corresponding task is generated, including:
[0142] The transmission cost of the edge device and the data acquisition device and the time information of the to-be-executed task are obtained; wherein the time information is the deadline and the impact information, the transmission cost and the time information are input into the spatiotemporal encoder, the output of the spatiotemporal encoder is obtained, and based on the dynamic projection matrix and the output, a spatiotemporal vector containing the spatiotemporal context of the edge device performing the corresponding task is determined.
[0143] To improve the dynamic adaptability of large language models, the embodiments of the application can use multi-dimensional dynamic coding to calculate the target edge device and the amount of resources used.
[0144] Specifically, the electronic device can collect the multi-dimensional transmission cost between each edge device and the data acquisition device in real time, including but not limited to bandwidth cost, energy consumption, link reliability, and other economic and performance parameters. At the same time, the information time of the to-be-executed task is accurately extracted. The information time can include the deadline of the task and the impact information. The impact information can be the decreasing benefit after timeout, such as the rapid decline of user experience due to long response time.
[0145] In the feature encoding stage, the spatiotemporal encoder specifically designed in this application embodiment allows the electronic device to input the acquired transmission cost and time information into the spatiotemporal encoder. The spatiotemporal encoder uses a temporal convolutional network to capture the periodic patterns of the task's temporal features, and simultaneously utilizes a graph neural network to model the topological dependence of the transmission cost. The electronic device acquires the output of the spatiotemporal encoder, which, after being transformed by a dynamic projection matrix, generates a spatiotemporal vector with a unified semantic representation. This spatiotemporal vector not only quantifies the transmission efficiency between the device and the data acquisition device, but also encodes the temporal constraint strength and temporal dependency of the task execution.
[0146] The output of this spatiotemporal encoder can also be called a spatiotemporal context vector, which consists of two parts, fused together with the spatiotemporal encoding:
[0147] f st =ST-Encoder(position, time window)
[0148] Among them, f st The output of the spatiotemporal encoder is ST-Encoder. The spatiotemporal context integrates environmental state features from both spatial and temporal dimensions to model the dynamic relationship between task scheduling decisions and the physical environment. The location dimension converts physical distance into network transmission cost; for example, a device 50 meters away from an edge node may require a 3-hop route. The time window dimension includes hard deadlines (tasks must be completed before a specified time) and soft time windows (diminishing benefits after timeout, such as a sharp drop in user experience due to excessively long response times).
[0149] The above-mentioned technical solution has the following advantages or beneficial effects: The embodiments of this application realize the joint modeling of transmission cost and time constraints, adopt multi-scale time feature extraction technology to accurately capture the urgency and timeliness requirements of the task; enhance the representation ability of features by modeling the topological correlation of transmission cost through a spatiotemporal encoder; and realize the unified spatial mapping of different modal features through a dynamic projection mechanism to provide interpretable feature representation for subsequent decision determination.
[0150] To ensure accurate and effective status monitoring, based on the above embodiments, this application embodiment further refines the implementation.
[0151] The step of obtaining the task information saved for the task identifier includes:
[0152] Obtain a second ratio of the computing resources required to execute the task corresponding to the task identifier to the remaining resources of the edge device; obtain the difference between the maximum allowed latency of the task and the estimated latency of the edge device executing the task; determine a third ratio of the difference to the maximum latency; and determine the matching degree between the task corresponding to the task identifier and the edge node.
[0153] The generating the task vector containing the task information comprises:
[0154] The second feature vector composed of the second ratio, the third ratio and the matching degree is determined, and a task vector containing the task information is determined based on a dynamic projection matrix and the second feature vector.
[0155] In order to determine the task vector corresponding to the task information, the electronic device can first calculate the ratio of the computing resources required by the task to the current remaining resources of the edge device, which directly reflects the resource carrying capacity of the edge device for the task. Through normalization processing, the edge devices of different specifications have comparability. In terms of timeliness, the electronic device quantifies the gap between the maximum delay allowed by the task and the actual estimated delay of the edge device executing the task, and converts it into a ratio relative to the maximum delay. In order to facilitate distinction, this ratio can be referred to as the third ratio. This processing not only captures the absolute time difference, but also retains the relative measure of the sensitivity of the task to delay.
[0156] In order to comprehensively evaluate the adaptation degree of the task and the edge device, the electronic device also determines the matching degree of the task corresponding to the task identifier and the edge device. In an example, the electronic device can input the device information of the edge device and the task information of the task into the recognition model to obtain the matching degree output by the recognition model. The electronic device can determine a second feature vector composed of the second ratio, the third ratio and the matching degree. The second feature vector can be mapped to a high-dimensional semantic space through a learnable dynamic projection matrix to generate a task vector with unified representation ability. This dynamic projection process can adaptively strengthen the key feature dimension, for example, automatically increase the weight of the delay-related feature in a scene with strict real-time requirement.
[0157] In an example, the electronic device can determine the difference between the maximum delay and the estimated delay, and replace the third ratio with the ratio of the difference to the maximum delay.
[0158] The second feature vector is composed of three parts, and the matching degree index of demand-resource is introduced:
[0159]
[0160] Wherein, is the second feature vector, C req represents the computing resources required by the task, C avail is the available computing resources of the edge device, i.e. the remaining resources, D est is the estimated delay, D max is the maximum delay allowed by the task, and Priority is the matching degree of demand and resource.
[0161] The technical solution has the following advantages or beneficial effects: the task vector generated by the method provided in the application encodes not only static resource requirements, but also dynamic constraint conditions and environment adaptation characteristics, thereby providing comprehensive and accurate feature representation for subsequent intelligent scheduling decisions. The ratio calculation realizes the standardized comparison of cross-node resources; the multi-dimensional matching degree evaluation enhances the comprehensiveness of the scheduling decision; and the dynamic projection improves the representation ability of the features.
[0162] In an example, the electronic device can determine the device information of the edge device based on the device vector, the state vector and the space-time vector. At this time, the electronic device can splice the state vector, the state vector and the space-time vector determined based on each edge device, and splice the task vector determined based on the edge device to obtain a target vector. Specifically, the electronic device can determine the target vector using the following formula:
[0163]
[0164] wherein H is the target vector, W (.) is a dynamic projection matrix of a learnable parameter, represents vector splicing, f dev is a first feature vector, h net is a feature matrix encoded by a graph attention network, f task is a second feature vector, f st is the output of a space-time encoder, W dev , W net , W task , W st are corresponding dynamic projection matrices respectively. Wherein f dev may be referred to as device state, f net may be referred to as network state, f task may be referred to as task feature, and f st may be referred to as space-time context.
[0165] In the embodiments of the application, the electronic device inputs the above unified environment perception vector into an embedding layer and combines it with a large language model to offload decision D t : indicates whether the task is offloaded to a specific edge device node; resource allocation R t , indicates the amount of computing resources allocated to the task, is the model output, fine-tunes the large language model, and fine-tunes the text encoder (to adapt to the environment perception embedding layer information) and the text decoder of the large language model, enhances the effective scheduling and decision of the large language model for edge computing.
[0166] In order to accurately and effectively perform state monitoring, on the basis of the above embodiments, in the embodiments of the application, the method further comprises:
[0167] After receiving the new data set, a first sample data in the new data set and a standard recognition result saved for the first sample data are acquired, the first sample data is input into a large language model, an output recognition result output by the large language model is acquired, and a first loss value is determined according to the output recognition result and the standard recognition result;
[0168] And a second sample data in an initial data set is acquired, the second sample data is input into a teacher large language model and the large language model, a first prediction result and a second prediction result respectively output are acquired, and a second loss value is determined according to a KL divergence of the first prediction result and the second prediction result.
[0169] The parameters of the large language model are fine-tuned according to the first loss value and the second loss value.
[0170] In order to ensure that the large language model used for task offloading and resource configuration continuously maintains efficient and accurate performance in the edge computing environment, continuous optimization and maintenance are needed. Embodiments of the present application propose a two-stage large language model fine-tuning strategy, which realizes stable and efficient large language model iterative update by jointly optimizing the generalization ability of the model on new data and the transfer efficiency of the knowledge of the teacher model.
[0171] Specifically, after receiving the new data set, the electronic device can first extract the first sample data and the corresponding standard recognition result from the new data set, input the first sample data into the large language model to be fine-tuned to obtain the predicted output recognition result, and determine the first loss value according to the output recognition result and the standard recognition result. In an example, the electronic device can calculate the first loss value between the model output and the true label through the cross-entropy loss function.
[0172] To make full use of historical knowledge and prevent catastrophic forgetting, the electronic device synchronously acquires the second sample data from the initial data set, respectively inputs the second sample data into the teacher model with frozen parameters and the student model to be trained, and acquires the first prediction result and the second prediction result respectively output. By calculating the KL divergence between the first prediction result and the second prediction result, the second loss value is determined. This loss function constrains the student model to adapt to new data while maintaining consistency with the teacher model on the original task, effectively preserving existing knowledge representation. In the optimization stage, a dynamic weighting strategy is used to fuse the two types of loss signals, and the weight of the first loss term is adaptively adjusted according to the proportion of new data, ensuring the balance of the large language model between new and old tasks.
[0173] In an example, the electronic device can obtain a new data set based on data collection and feedback. Specifically, the performance indicators of the edge device are monitored in real time, such as task processing delay, resource utilization, and the processing results and environmental change information are collected to form feedback data for model optimization.
[0174] Incremental learning is performed using the newly collected data set to update the parameters of the large language model to adapt to new task patterns and environmental changes. Assuming that the parameters of the current large language model are θ, the new data is D new , and the incremental learning update formula is:
[0175]
[0176] where θ ′ is the fine-tuned parameter, θ is the parameter before fine-tuning, η is the learning rate, Loss is the total loss function, including task loss Loss task and incremental learning loss Loss Incre , Loss task is the cross-entropy loss function, and Loss Incre is the KL divergence function. In each online learning and update, the present scheme proposes to use the previous version of the model as the teacher to guide the performance of the new model (student) on the old data, avoiding catastrophic forgetting of knowledge. Specifically:
[0177] The student model is used to predict the old data:
[0178]
[0179] The teacher model is used to predict the old data:
[0180]
[0181] The KL divergence is used to measure the output difference between the student model and the teacher model on the old data, which is the incremental learning loss:
[0182]
[0183] The present scheme proposes an online learning scheme for edge computing. After deployment, the system can continue to collect new data and regularly update and fine-tune the large language model to adapt to environmental changes. Online learning enables the model to continue learning and adapting to new environmental changes after deployment, effectively improving the scalability of edge computing in other scenarios. In the inference stage, the large language model performs real-time inference based on the received state information, generates task offloading and resource configuration strategies, and delivers the inference results to the relevant edge devices to guide their task processing.
[0184] The above-mentioned technical solution has the following advantages or beneficial effects: In the embodiments of this application, the large language model achieves an excellent balance between adaptability to new data and retention of old knowledge. The supervised loss function ensures that the model accurately captures the distribution characteristics of new data, while the distillation loss based on KL divergence stabilizes the original representation space. This dual constraint enables the model to maintain stable performance in open-domain incremental learning scenarios and avoids the catastrophic forgetting problem that is common in the fine-tuning process of large models.
[0185] Figure 4 This is a detailed schematic diagram illustrating a state monitoring process based on edge computing, provided as an embodiment of this application.
[0186] Depend on Figure 4 As can be seen, the cloud (i.e., the electronic device described in the embodiments of this application) determines the task unloading strategy and resource allocation strategy based on the large model, that is, it determines the target edge device for executing the task and the amount of resources used by the target edge device, and sends the task identifier and the amount of resources used to the edge computing end, i.e. the target edge device. The target edge device establishes a connection with terminals such as wristbands and armbands (i.e., the data acquisition device described in the embodiments of this application) through device connection, obtains the status data collected by the data acquisition device and sends it to the target edge device. The target edge device performs data processing through AI model inference to obtain the personnel status monitoring result, and returns the monitoring result to the data acquisition device.
[0187] Figure 5 This is a schematic diagram of a state monitoring system based on edge computing provided in an embodiment of the present application. The system includes: at least two edge devices 501 and an electronic device 502.
[0188] The electronic device 502 is configured to receive a task execution request carrying a task execution identifier sent by the data acquisition device; for each edge device 501, it generates a device vector containing the device state of the edge device 501, a state vector containing the network state between the edge device 501 and the data acquisition device, and a spatiotemporal vector containing the spatiotemporal context of the corresponding task executed by the edge device 501; it obtains task information stored for the task identifier, generates a task vector containing the task information, and concatenates the device vector, the state vector, the spatiotemporal vector, and the task vector to obtain the target vector of the edge device 501; it inputs the target vector of each edge device 501 into a large language model to obtain the target edge device 5011 output by the large language model; and it sends the task identifier to the target edge device 5011.
[0189] The target edge device 5011 is used to acquire the status data of the operators collected by the data acquisition device, execute the task corresponding to the task identifier based on the status data, and obtain monitoring results.
[0190] In a possible implementation, the electronic device 502 is specifically configured to input the target vector of each edge device 501 into a large language model, obtain a target edge device 5011 and a resource amount used output by the large language model, where the resource amount used includes a used memory capacity and a used CPU core number of the target edge device 5011 for executing the task identified by the task identifier; and send the task identifier and the resource amount used to the target edge device 5011.
[0191] The target edge device 5011 is specifically configured to invoke a resource of the resource amount used to execute the task corresponding to the task identifier.
[0192] In a possible implementation, the electronic device 502 is specifically configured to send an instruction to the edge device 501, receive a current CPU usage rate, a current memory usage rate and a current energy consumption of the edge device 501 returned by the edge device 501, obtain a first feature vector composed of an exponential decay of the CPU usage rate, the memory usage rate and the energy consumption, and determine a device vector containing a device state of the edge device 501 based on a dynamic projection matrix and the first feature vector.
[0193] In a possible implementation, the electronic device 502 is specifically configured to obtain a bandwidth and a delay between the edge device 501 and the data acquisition device, determine a sum value of the delay and a preset value, determine a value after logarithmic transformation of the sum value, determine a first ratio of the bandwidth to the value, input the first ratio into a graph attention network for encoding to obtain an encoded feature matrix, and determine a state vector containing a network state between the edge device 501 and the data acquisition device based on a dynamic projection matrix and the feature matrix.
[0194] In a possible implementation, the electronic device 502 is specifically configured to obtain a transmission cost of the edge device 501 and the data acquisition device and time information of the task to be executed, where the time information includes a deadline and influence information, input the transmission cost and the time information into a space-time encoder, obtain an output of the space-time encoder, and determine a space-time vector containing a space-time context of the edge device 501 for executing the corresponding task based on a dynamic projection matrix and the output.
[0195] In a possible implementation, the electronic device 502 is specifically configured to obtain a second ratio of a computing resource corresponding to a task identified by the task identifier to a remaining resource of the edge device 501, obtain a difference between a maximum delay allowed by the task and an estimated delay of the edge device 501 in executing the task, determine a third ratio of the difference to the maximum delay, and determine a matching degree of the task identified by the task identifier to the edge node; determine a second feature vector composed of the second ratio, the third ratio, and the matching degree, and determine a task vector containing the task information based on a dynamic projection matrix and the second feature vector.
[0196] In a possible implementation, the electronic device 502 is further configured to, after receiving a new data set, obtain first sample data in the new data set and a standard recognition result saved for the first sample data, input the first sample data into a large language model, obtain an output recognition result output by the large language model, and determine a first loss value according to the output recognition result and the standard recognition result; and obtain second sample data in an initial data set, input the second sample data into a teacher large language model and the large language model, obtain a first prediction result and a second prediction result output respectively, determine a second loss value according to a KL divergence of the first prediction result and the second prediction result, and fine-tune parameters of the large language model according to the first loss value and the second loss value.
[0197] Figure 6 The edge computing-based state monitoring device structure schematic diagram provided in the application comprises:
[0198] The receiving module 601 is configured to receive a task execution request carrying a task execution identifier sent by a data acquisition device.
[0199] The processing module 602 is configured to, for each edge device, generate a device vector containing a device state of the edge device, generate a state vector containing a network state between the edge device and the data acquisition device, generate a space-time vector containing a space-time context of the edge device in executing a corresponding task, obtain task information saved for the task identifier, generate a task vector containing the task information, and splice the device vector, the state vector, the space-time vector, and the task vector to obtain a target vector of the edge device; input the target vector of each edge device into a large language model to obtain a target edge device output by the large language model; and send the task identifier to the target edge device, so that the target edge device obtains state data of a work personnel collected by the data acquisition device, executes a task corresponding to the task identifier based on the state data, and obtains a monitoring result.
[0200] In a possible implementation, the processing module 602 is specifically configured to input the target vector of each edge device into a large language model, obtain a target edge device and an amount of resources used output by the large language model, where the amount of resources used includes an amount of memory used and a number of CPU cores used by the target edge device for executing the task identified by the task identifier; and send the task identifier and the amount of resources used to the target edge device, so that the target edge device invokes resources of the amount of resources used to execute a task corresponding to the task identifier.
[0201] In a possible implementation, the processing module 602 is specifically configured to send an instruction to the edge device, receive a current CPU usage rate, a current memory usage rate, and a current energy consumption of the edge device returned by the edge device, obtain a first feature vector composed of exponential decays of the CPU usage rate, the memory usage rate, and the energy consumption, and determine a device vector containing a device state of the edge device based on a dynamic projection matrix and the first feature vector.
[0202] In a possible implementation, the processing module 602 is specifically configured to obtain a bandwidth and a delay between the edge device and the data collection device, determine a sum of the delay and a preset value, determine a value after logarithmic transformation of the sum, determine a first ratio of the bandwidth to the value, input the first ratio into a graph attention network for encoding, and obtain a feature matrix after encoding; and determine a state vector containing a network state between the edge device and the data collection device based on a dynamic projection matrix and the feature matrix.
[0203] In a possible implementation, the processing module 602 is specifically configured to obtain a transmission cost of the edge device and the data collection device and time information of the task to be executed, where the time information includes a deadline and influence information, input the transmission cost and the time information into a space-time encoder, obtain an output of the space-time encoder, and determine a space-time vector containing a space-time context of the edge device for executing a corresponding task based on a dynamic projection matrix and the output.
[0204] In a possible implementation, the processing module 602 is specifically configured to obtain a second ratio of a computing resource for performing a task corresponding to the task identifier to remaining resources of the edge device, obtain a difference between a maximum delay allowed by the task and an estimated delay of the edge device performing the task, determine a third ratio of the difference to the maximum delay, and determine a matching degree of the task corresponding to the task identifier and the edge node; determine a second feature vector composed of the second ratio, the third ratio, and the matching degree, and determine a task vector containing the task information based on a dynamic projection matrix and the second feature vector.
[0205] In a possible implementation, the processing module 602 is further configured to, after receiving a new data set, obtain first sample data in the new data set and a standard recognition result saved for the first sample data, input the first sample data into a large language model, obtain an output recognition result output by the large language model, and determine a first loss value according to the output recognition result and the standard recognition result; and obtain second sample data in an initial data set, input the second sample data into a teacher large language model and the large language model, obtain a first prediction result and a second prediction result output respectively, determine a second loss value according to a KL divergence of the first prediction result and the second prediction result, and fine-tune parameters of the large language model according to the first loss value and the second loss value.
[0206] Figure 7 An electronic device structure schematic diagram is provided in the embodiment of the application. Based on the above embodiments, the embodiment of the application further provides an electronic device, as shown in the figure. Figure 7 The processor 701, the communication interface 702, and the memory 703 can communicate with each other through the communication bus 704.
[0207] The memory 703 stores a computer program. When the program is executed by the processor 701, the processor 701 executes any of the above method steps.
[0208] The communication bus mentioned in the above electronic device can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or only one type of bus.
[0209] The communication interface 502 is configured to communicate between the electronic device and other devices.
[0210] The memory can include a random access memory (RAM) and can also include a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.
[0211] The aforementioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc. It can also be a digital signal processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic component, a discrete hardware component, etc.
[0212] The present application also provides a computer storage readable storage medium, which stores a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device is caused to execute the above method steps.
[0213] The present application provides a computer program product, which includes an executable program, and when the executable program is executed by a processor, the method is implemented.
[0214] Although the preferred embodiments of the present application have been described, those skilled in the art can make further changes and modifications to the embodiments once they know the basic inventive concept. Therefore, the appended claims are intended to be interpreted as including all the preferred embodiments and all the changes and modifications falling within the scope of the present application.
[0215] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A state monitoring method based on edge computing, characterized in that, The method includes: Receive a task execution request sent by the data acquisition device, which carries a task execution identifier; For each edge device, generate a device vector containing the device state of the edge device, a state vector containing the network state between the edge device and the data acquisition device, and a spatiotemporal vector containing the spatiotemporal context of the edge device executing the corresponding task. Obtain the task information saved for the task identifier, generate a task vector containing the task information, and concatenate the device vector, the state vector, the spatiotemporal vector and the task vector to obtain the target vector of the edge device. The target vector of each edge device is input into the large language model to obtain the target edge device output by the large language model; the task identifier is sent to the target edge device; so that the target edge device can obtain the status data of the operator collected by the data acquisition device, execute the task corresponding to the task identifier based on the status data, and obtain the monitoring results.
2. The method according to claim 1, characterized in that, The step of inputting the target vector of each edge device into the large language model to obtain the target edge device output by the large language model includes: The target vector of each edge device is input into the large language model to obtain the target edge device and the amount of resources used by the large language model. The amount of resources used includes the memory capacity and the number of CPU cores used by the target edge device to execute the task corresponding to the task identifier. Sending the task identifier to the target edge device includes: The task identifier and the amount of resources used are sent to the target edge device so that the target edge device can use the resources of the amount of resources used to execute the task corresponding to the task identifier.
3. The method according to claim 1, characterized in that, The process of generating a device vector containing the device state of the edge device includes: Send instructions to the edge device, receive the current CPU utilization, current memory utilization, and current energy consumption of the edge device, obtain a first feature vector composed of the exponential decay of the CPU utilization, the memory utilization, and the energy consumption, and determine a device vector containing the device state of the edge device based on the dynamic projection matrix and the first feature vector.
4. The method according to claim 1, characterized in that, Generate a state vector containing the network state between the edge device and the data acquisition device, including: The bandwidth and latency between the edge device and the data acquisition device are obtained, the sum of the latency and a preset value is determined, and the value after logarithmic transformation of the sum is determined. The first ratio of the bandwidth to the value is determined, and the first ratio is input into a graph attention network for encoding to obtain the encoded feature matrix. Based on the dynamic projection matrix and the feature matrix, a state vector containing the network state between the edge device and the data acquisition device is determined.
5. The method according to claim 1, characterized in that, Generate a spatiotemporal vector containing the spatiotemporal context of the task performed by the edge device, including: The transmission cost between the edge device and the data acquisition device and the time information of the task to be executed are obtained; wherein the time information is the deadline and impact information. The transmission cost and the time information are input into the spatiotemporal encoder, and the output of the spatiotemporal encoder is obtained. Based on the dynamic projection matrix and the output, the spatiotemporal vector containing the spatiotemporal context of the edge device executing the corresponding task is determined.
6. The method according to claim 3, 4, or 5, characterized in that, The step of obtaining the task information saved for the task identifier includes: Obtain a second ratio of the computing resources required to execute the task corresponding to the task identifier to the remaining resources of the edge device; obtain the difference between the maximum allowed latency of the task and the estimated latency of the edge device executing the task; determine a third ratio of the difference to the maximum latency; and determine the matching degree between the task corresponding to the task identifier and the edge node. The generation of a task vector containing the task information includes: A second feature vector composed of the second ratio, the third ratio, and the matching degree is determined. Based on the dynamic projection matrix and the second feature vector, a task vector containing the task information is determined.
7. The method according to claim 1, characterized in that, The method further includes: After receiving a new dataset, the first sample data in the new dataset and the standard recognition result saved for the first sample data are obtained. The first sample data is input into the large language model, and the output recognition result output by the large language model is obtained. The first loss value is determined based on the output recognition result and the standard recognition result. And obtain the second sample data in the initial dataset, input the second sample data into the teacher's large language model and the large language model, obtain the first prediction result and the second prediction result output respectively, and determine the second loss value based on the KL divergence of the first prediction result and the second prediction result; The parameters of the large language model are fine-tuned based on the first loss value and the second loss value.
8. A state monitoring system based on edge computing, characterized in that, The system includes: at least two edge devices and electronic devices; The electronic device is configured to receive a task execution request carrying a task execution identifier sent by a data acquisition device; for each edge device, generate a device vector containing the device state of the edge device, a state vector containing the network state between the edge device and the data acquisition device, and a spatiotemporal vector containing the spatiotemporal context of the edge device executing the corresponding task; obtain task information stored for the task identifier; generate a task vector containing the task information; concatenate the device vector, the state vector, the spatiotemporal vector, and the task vector to obtain the target vector of the edge device; input the target vector of each edge device into a large language model to obtain the target edge device output by the large language model; and send the task identifier to the target edge device. The target edge device is used to acquire the status data of the operators collected by the data acquisition device, execute the task corresponding to the task identifier based on the status data, and obtain the monitoring results.
9. A state monitoring device based on edge computing, characterized in that, The device includes: The receiving module is used to receive task execution requests carrying task execution identifiers sent by the data acquisition device; The processing module is configured to, for each edge device, generate a device vector containing the device status of the edge device, a state vector containing the network status between the edge device and the data acquisition device, and a spatiotemporal vector containing the spatiotemporal context of the edge device executing the corresponding task; obtain task information saved for the task identifier; generate a task vector containing the task information; concatenate the device vector, the state vector, the spatiotemporal vector, and the task vector to obtain the target vector of the edge device; input the target vector of each edge device into a large language model to obtain the target edge device output by the large language model; send the task identifier to the target edge device; so that the target edge device can obtain the status data of the operator collected by the data acquisition device, execute the task corresponding to the task identifier based on the status data, and obtain monitoring results.
10. An electronic device, characterized in that, The electronic device includes at least a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the steps of the edge computing-based state monitoring method as described in any one of claims 1-7.