A patrol data processing method and system based on the Internet of Things
Patent Information
- Application Number
- CN202311508658.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2043-11-13
AI Technical Summary
[0003]在边缘计算中,通过将部分待执行任务卸载到边缘服务器执行能够达到降低移动设备的负载、提升移动应用性能和减少设备开销的目的.但对于时延敏感任务,只有在截止期限内完成才具有实际意义.但是边缘服务器的资源往往有限,当同时接收来自多个设备的数据传输及处理任务时,可能造成任务长时间的排队等待,导致部分任务因超时而执行失败,因此无法兼顾多台设备的性能
[0035] Compared with the existing technology, the beneficial effects achieved by the present invention are: the present invention uses the firefly group optimization scheduling joint method to realize the optimal scheduling of inspection tasks. By considering the priority, the invention can prioritize the inspection tasks with short and urgent task time limits. , to avoid task execution failure due to timeout due to long queue waiting for tasks. At the same time, the delay and energy consumption issues in the optimization scheduling process are considered, making the processing of inspection data more accurate and faster, and reducing energy consumption. The edge data on the edge server is transmitted to the cloud center processing layer for processing through the corresponding processing pipeline. There is no need to further classify the edge data, which reduces the complexity of data processing and increases the speed of data processing.
Smart Images

Figure CN117560372B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an inspection data processing method and system based on the Internet of Things. Background Art
[0002] With the development of the Internet, we have gradually entered the era of the Internet of Everything, and the application of intelligent inspection systems has become increasingly widespread. Although intelligent inspection can well meet the needs of industrial inspection, due to the rich sensors and controllers of the inspection system, a large amount of data will be generated when interacting with the surrounding environment, which has higher requirements for the storage, computing and processing capabilities, and transmission speed of the inspection data. Existing intelligent inspection systems have begun to use edge computing methods to alleviate the computing pressure of the central server, share the responsibilities of the central server, and cooperate with the central server to process the inspection data in an orderly and fast manner.
[0003] In edge computing, by offloading some tasks to be executed to edge servers, the load on mobile devices can be reduced, the performance of mobile applications can be improved, and device overhead can be reduced. However, for delay-sensitive tasks, it is only meaningful if they are completed within the deadline. However, the resources of edge servers are often limited. When receiving data transmissions and processing tasks from multiple devices at the same time, tasks may be queued for a long time, resulting in some tasks failing to execute due to timeouts. Therefore, the performance of multiple devices cannot be taken into account.
[0004] Therefore, it is necessary to consider the priority of the inspection task and calculate the energy consumption when processing the inspection data, so that the inspection data can be processed quickly and accurately. Summary of the invention
[0005] The purpose of the present invention is to provide an inspection data processing method and system based on the Internet of Things, which utilizes the firefly swarm optimization scheduling joint method to achieve optimal scheduling of inspection tasks, taking into account the priority of inspection tasks and the delay and energy consumption issues in the optimization scheduling process, so that the inspection data can be processed quickly and accurately.
[0006] In order to solve the above technical problems, the present invention provides the following technical solution, a method for processing inspection data based on the Internet of Things, the steps of which include:
[0007] The inspection equipment obtains inspection tasks, prioritizes the inspection tasks, and determines energy consumption and delay constraints;
[0008] A joint method for optimizing the scheduling of firefly swarms based on energy consumption and delay constraints is constructed;
[0009] Based on the priority of the inspection task, the inspection data is transmitted to the edge server for processing using the firefly swarm optimization scheduling joint method. The processed inspection data is prioritized and assigned a pipeline mark to obtain edge data.
[0010] After the cloud computing center recognizes the pipeline mark of the edge data, it inputs the edge data into the corresponding processing pipeline for processing, and comprehensively processes the pipeline processing results to achieve inspection optimization, prediction and display.
[0011] According to the above technical solution, the inspection tasks are divided into primary inspection tasks and secondary inspection tasks according to the completion deadline of the inspection tasks. The priority of the primary inspection tasks is 1, and the priority of the secondary inspection tasks is 0.
[0012] Among them, the inspection tasks whose completion deadline is less than or equal to the maximum limit deadline ζ are classified as first-level inspection tasks, and the inspection tasks whose completion deadline is greater than the maximum limit deadline ζ are classified as second-level inspection tasks.
[0013] According to the above technical solution, the energy consumption constraint condition is:
[0014]
[0015] Among them, x ij indicates that the i-th inspection task is assigned to the j-th edge server, x ij ∈{0,1}, n represents the number of edge servers, m represents the number of inspection tasks, f ij represents the energy consumption of the i-th inspection task when it is processed on the j-th edge server, G jmax represents the maximum load of the j-th edge server.
[0016] According to the above technical solution, the delay constraint condition is:
[0017]
[0018] Where T represents the time slot length, t represents the time slot, and T qw It is represented as the waiting time of inspection task q, T qcom The total delay of inspection task q includes transmission delay, calculation delay and unloading delay, T qfin Indicates the completion deadline of inspection task q, s qt =1 means that the inspection task q is successfully assigned to the edge server s in time slot t, s qt =0 indicates that the inspection task q fails to be assigned to the edge server s in time slot t, k indicates the allocation constraint rate of the inspection task q, and Q[.] indicates the collection of successful and failed inspection tasks q assigned to the edge server s in time slot t within the T period. The computational delay refers to the delay generated by local computation.
[0019] According to the above technical solution, the firefly swarm optimization scheduling joint method comprises the following steps:
[0020] Each inspection task is regarded as a firefly, and the priority of the inspection task is determined. All inspection tasks with a priority of 0 constitute firefly group a, and all inspection tasks with a priority of 1 constitute firefly group b;
[0021] In the firefly swarm a, each firefly swarm is set with the same concentration of fluorescein. The fluorescein calculation formula is used to update the fluorescent pigment of the firefly swarm and calculate the probability of fireflies moving to the low concentration of fluorescein to update the position of the fireflies until the number of iterations and the constraint conditions are met and the position update stops;
[0022] The updated firefly position is
[0023]
[0024] Among them, L represents the step size of each iteration of Firefly, represents the standard Euclidean distance, x o (s) represents the location of the edge server s where the low concentration of fluorescent pigment is located, x q (1+s) represents the updated firefly position, x q (s) represents the location where the inspection task q is assigned to the edge server s.
[0025] In the firefly swarm b, the distance from each inspection task to the edge server to all edge servers is calculated, and each inspection task is assigned to the edge server with the closest distance. The total capacity c of all inspection tasks assigned to the edge server is calculated and compared with the remaining capacity C of the edge server. The difference τ between the total capacity c of the inspection task and the remaining capacity C of the edge server and the difference σ between the remaining capacity C of the edge server and the total capacity c of the inspection task are calculated.
[0026] When c>C, select the servers corresponding to σ greater than τ, and redistribute the inspection tasks of the edge servers corresponding to τ into two parts. One part of the inspection tasks whose total capacity c is less than the remaining capacity C of the edge server is assigned to the original corresponding edge server. Calculate the distance between the other part of the inspection tasks and the edge server corresponding to τ, assign the inspection tasks to the nearest edge server, and compare the total capacity c of all inspection tasks assigned on the edge server with the remaining capacity C of the edge server. If c>C still exists, repeat the above steps for allocation until c≤C, and the allocation is completed.
[0027] According to the above technical solution, the calculation formula of fluorescein is expressed as:
[0028]
[0029] Where W represents the concentration of fluorescein, l q (t) represents the concentration of fluorescein after the inspection task q is assigned to the edge server s, β represents the attenuation coefficient, and x q represents the location where the inspection task q is assigned to the edge server s, G(.) represents the objective function of the inspection task q after iteration, w1 represents the calculation delay weight factor, w2 represents the energy consumption weight factor, T com represents computing delay, and E represents energy consumption.
[0030] According to the above technical solution, the types of inspection tasks and the types of pipeline marks are one-to-one corresponding, and one processing pipeline corresponds to one pipeline mark.
[0031] An inspection data processing system based on the Internet of Things, comprising:
[0032] Inspection equipment layer, including inspection equipment and corresponding sensors, used to obtain inspection tasks;
[0033] The edge service layer, based on the priority of the inspection task, uses the firefly swarm optimization scheduling joint method to transmit the inspection data to the edge server for processing, determines the priority of the processed inspection data and assigns a pipeline mark to obtain the edge data;
[0034] The cloud center processing layer is used to identify the pipeline mark of the edge data and input the edge data into the corresponding processing pipeline for processing, and comprehensively process the pipeline processing results to achieve inspection optimization, prediction and display.
[0035] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: the present invention utilizes the firefly swarm optimization scheduling joint method to achieve optimized scheduling of inspection tasks. By considering the priority, it can give priority to processing inspection tasks with short and urgent task limits, avoiding long-term queuing waiting for tasks, which may lead to task execution failure due to timeout. At the same time, the time delay and energy consumption issues in the optimization scheduling process are considered, so that the processing of inspection data can be more accurate and fast, and energy consumption is reduced. The edge data on the edge server is transmitted to the cloud center processing layer for processing through the corresponding processing pipeline. There is no need to further classify the edge data, which reduces the complexity of data processing and improves the speed of data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0037] Figure 1 It is a flow chart of the steps of an inspection data processing method based on the Internet of Things of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] Example 1
[0040] Taking factory equipment inspection as an example, the factory inspection includes 30 sets of inspection equipment, 10 edge servers and a cloud center. The inspection equipment is used to obtain inspection tasks, the edge server serves as the intermediate processor of the inspection data, and the cloud center serves as the final processing center for the inspection data.
[0041] The present invention provides an inspection data processing method based on the Internet of Things, the steps of which include:
[0042] S1. The inspection equipment obtains the inspection tasks, and divides the inspection tasks into primary inspection tasks and secondary inspection tasks according to the completion deadline of the inspection tasks. The priority of the primary inspection tasks is 1, and the priority of the secondary inspection tasks is 0. The energy consumption and delay constraints are also determined.
[0043] Wherein, the energy consumption constraint condition is:
[0044]
[0045] Among them, x ij indicates that the i-th inspection task is assigned to the j-th edge server, x ij ∈{0,1}, n represents the number of edge servers, m represents the number of inspection tasks, f ij represents the energy consumption of the i-th inspection task when it is processed on the j-th edge server, G jmax represents the maximum load of the j-th edge server.
[0046] The energy consumption constraints are:
[0047]
[0048] Among them, x ij indicates that the i-th inspection task is assigned to the j-th edge server, x ij ∈{0,1}, n represents the number of edge servers, m represents the number of inspection tasks, f ij represents the energy consumption of the i-th inspection task when it is processed on the j-th edge server, G jmax represents the maximum load of the j-th edge server.
[0049] S2. Construct a firefly swarm optimization scheduling joint method based on energy consumption and delay constraints. Specifically, each inspection task is regarded as a firefly, and the priority of the inspection task is determined. All inspection tasks with a priority of 0 constitute firefly swarm a, and all inspection tasks with a priority of 1 constitute firefly swarm b.
[0050] In the firefly swarm a, each firefly swarm is set with the same concentration of fluorescein. The fluorescein calculation formula is used to update the fluorescent pigment of the firefly swarm and calculate the probability of fireflies moving to the low concentration of fluorescein to update the position of the fireflies until the number of iterations and the constraint conditions are met and the position update stops;
[0051] In the firefly swarm b, the distance from each inspection task to the edge server to all edge servers is calculated, and each inspection task is assigned to the edge server with the closest distance. The total capacity c of all inspection tasks assigned to the edge server is calculated and compared with the remaining capacity C of the edge server. The difference τ between the total capacity c of the inspection task and the remaining capacity C of the edge server and the difference σ between the remaining capacity C of the edge server and the total capacity c of the inspection task are calculated.
[0052] When c>C, select the servers corresponding to σ greater than τ, and redistribute the inspection tasks of the edge servers corresponding to τ into two parts. One part of the inspection tasks whose total capacity c is less than the remaining capacity C of the edge server is assigned to the original corresponding edge server. Calculate the distance between the other part of the inspection tasks and the edge server corresponding to τ, assign the inspection tasks to the nearest edge server, and compare the total capacity c of all inspection tasks assigned on the edge server with the remaining capacity C of the edge server. If c>C still exists, repeat the above steps for allocation until c≤C, and the allocation is completed.
[0053] S3. Based on the priority of the inspection task, the inspection data is transmitted to the edge server for processing using the firefly swarm optimization scheduling joint method, the processed inspection data is prioritized and assigned a pipeline mark to obtain edge data;
[0054] S4. After the cloud computing center recognizes the pipeline mark of the edge data, it inputs the edge data into the corresponding processing pipeline for processing, and comprehensively processes the pipeline processing results to achieve inspection optimization, prediction and display; the types of inspection tasks and the types of pipeline marks are one-to-one corresponding, and one processing pipeline corresponds to one pipeline mark.
[0055] Example 2
[0056] An inspection data processing system based on the Internet of Things, comprising:
[0057] Inspection equipment layer, including inspection equipment and corresponding sensors, used to obtain inspection tasks;
[0058] The edge service layer, based on the priority of the inspection task, uses the firefly swarm optimization scheduling joint method to transmit the inspection data to the edge server for processing, determines the priority of the processed inspection data and assigns a pipeline mark to obtain the edge data;
[0059] The cloud center processing layer is used to identify the pipeline mark of the edge data and input the edge data into the corresponding processing pipeline for processing, and comprehensively process the pipeline processing results to achieve inspection optimization, prediction and display.
[0060] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0061] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for processing inspection data based on the Internet of Things, characterized in that the steps include: The inspection equipment obtains the inspection tasks, prioritizes the inspection tasks, and determines energy consumption and delay constraints; the energy consumption constraints are: Among them, x ij indicates that the i-th inspection task is assigned to the j-th edge server, x ij ∈{0,1}, n represents the number of edge servers, m represents the number of inspection tasks, f ij represents the energy consumption of the i-th inspection task when it is processed on the j-th edge server, G jmax represents the maximum load of the jth edge server; The delay constraint condition is: Where T represents the time slot length, t represents the time slot, and T qw It is represented as the waiting time of inspection task q, T qcom The total delay of inspection task q includes transmission delay, calculation delay and unloading delay, T qfin represents the completion deadline of inspection task q, s qt =1 means that the inspection task q is successfully assigned to the edge server s in time slot t, s qt =0 indicates that the inspection task q fails to be assigned to the edge server s in time slot t, k indicates the allocation constraint rate of the inspection task q, and Q[.] indicates the set of successful and failed inspection tasks q assigned to the edge server s in time slot t within the T period; A firefly swarm optimization scheduling joint method is constructed based on energy consumption and delay constraints. The firefly swarm optimization scheduling joint method comprises the following steps: Each inspection task is regarded as a firefly, and the priority of the inspection task is determined. All inspection tasks with a priority of 0 constitute firefly group a, and all inspection tasks with a priority of 1 constitute firefly group b; In the firefly swarm a, each firefly swarm is set with the same concentration of fluorescein. The fluorescein calculation formula is used to update the fluorescent pigment of the firefly swarm and calculate the probability of fireflies moving to the low concentration of fluorescein to update the position of the fireflies until the number of iterations and the constraint conditions are met and the position update stops; In the firefly swarm b, the distance from each inspection task to the edge server to all edge servers is calculated, and each inspection task is assigned to the edge server with the closest distance. The total capacity c of all inspection tasks assigned to the edge server is calculated and compared with the remaining capacity C of the edge server. The difference τ between the total capacity c of the inspection task and the remaining capacity C of the edge server and the difference σ between the remaining capacity C of the edge server and the total capacity c of the inspection task are calculated. When c>C, select the server corresponding to σ greater than τ, and redistribute the inspection tasks of the edge server corresponding to τ into two parts. The total capacity c of one part of the inspection tasks is less than the remaining capacity C of the edge server and is assigned to the original corresponding edge server. Calculate the distance between the other part of the inspection tasks and the edge server corresponding to τ, assign the inspection tasks to the nearest edge server, and compare the total capacity c of all inspection tasks assigned on the edge server with the remaining capacity C of the edge server. If c>C still exists, repeat the above steps for allocation until c≤C, and the allocation is completed; wherein, the calculation formula of the fluorescein is expressed as: Where W represents the concentration of fluorescein, l q (t) represents the concentration of fluorescein after the inspection task q is assigned to the edge server s, β represents the attenuation coefficient, and x q represents the location where the inspection task q is assigned to the edge server s, G(.) represents the objective function of the inspection task q after iteration, w1 represents the calculation delay weight factor, w2 represents the energy consumption weight factor, T com represents computing delay, and E represents energy consumption; Based on the priority of the inspection task, the inspection data is transmitted to the edge server for processing using the firefly swarm optimization scheduling joint method. The processed inspection data is prioritized and assigned a pipeline mark to obtain edge data. After the cloud computing center recognizes the pipeline mark of the edge data, it inputs the edge data into the corresponding processing pipeline for processing, and comprehensively processes the pipeline processing results to achieve inspection optimization, prediction and display.
2. The inspection data processing method based on the Internet of Things according to claim 1 is characterized in that: According to the completion deadline of the inspection task, the inspection task is divided into primary inspection task and secondary inspection task. The priority of the primary inspection task is 1, and the priority of the secondary inspection task is 0.
3. The inspection data processing method based on the Internet of Things according to claim 1 is characterized in that: There is a one-to-one correspondence between the types of inspection tasks and the types of pipeline marks, and one processing pipeline corresponds to one pipeline mark.
4. An inspection data processing system based on the Internet of Things, used for an inspection data processing method based on the Internet of Things according to any one of claims 1 to 3, characterized in that: include: Inspection equipment layer, including inspection equipment and corresponding sensors, used to obtain inspection tasks; The edge service layer, based on the priority of the inspection task, uses the firefly swarm optimization scheduling joint method to transmit the inspection data to the edge server for processing, determines the priority of the processed inspection data and assigns a pipeline mark to obtain the edge data; The cloud center processing layer is used to identify the pipeline mark of the edge data and input the edge data into the corresponding processing pipeline for processing, and comprehensively process the pipeline processing results to achieve inspection optimization, prediction and display.
