CN112905320A - System, method and device for executing tasks of Internet of things - Google Patents

System, method and device for executing tasks of Internet of things Download PDF

Info

Publication number
CN112905320A
CN112905320A CN202110159615.9A CN202110159615A CN112905320A CN 112905320 A CN112905320 A CN 112905320A CN 202110159615 A CN202110159615 A CN 202110159615A CN 112905320 A CN112905320 A CN 112905320A
Authority
CN
China
Prior art keywords
task
processed
edge computing
cloud center
computing node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110159615.9A
Other languages
Chinese (zh)
Inventor
闫丹凤
张梦琪
傅威
郭熙东
姬捷
任春
吴姿颍
李旭
赵家宝
万梓聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN202110159615.9A priority Critical patent/CN112905320A/en
Publication of CN112905320A publication Critical patent/CN112905320A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a system, a method and a device for executing tasks of the Internet of things, wherein edge equipment is used for sending tasks to be processed to edge computing nodes; the edge computing node is used for receiving the tasks to be processed; calculating the processing time of the edge computing node for executing the task to be processed based on the acquired resource demand parameter for executing the task to be processed and the attribute characteristics of the edge computing node; if the processing time length meets the preset time length condition, executing the task to be processed; if not, sending the task to be processed to the cloud center; and the cloud center is used for executing tasks sent by the edge computing nodes. Therefore, in the scheme, after the task is obtained, the task is not directly uploaded to the cloud center, the processing time for the edge computing node obtaining the task to execute the task is calculated first, if the processing time meets the preset threshold condition, the edge computing node executes the task without uploading the task to the cloud center, the transmission time of the task is saved, and the processing time of the task is reduced.

Description

System, method and device for executing tasks of Internet of things
Technical Field
The invention relates to the technical field of Internet of things, in particular to a system, a method and a device for executing tasks of the Internet of things.
Background
The Internet of Things (The Internet of Things, referred to as IOT) may be understood as a network that installs some information sensing devices, such as radio frequency identification, infrared sensor, global positioning system, laser scanner, etc., on an article, and through these information sensing devices, The article is connected to The Internet, and performs information exchange and communication, thereby implementing intelligent sensing, identification and management of The article. Or, the internet of things can be understood as a network based on the information bearer such as the internet, the traditional telecommunication network and the like, so that interconnection and intercommunication can be formed between common physical objects which can be independently addressed.
In the process of intelligent perception, identification and management of articles, cloud center and edge computing nodes included in the internet of things are generally utilized. Generally, after acquiring a task, an edge computing node uploads the task to a cloud center; the cloud center processes the task, or the cloud center issues the task to other edge computing nodes for processing, and a task processing result is obtained; and the cloud center feeds back the task processing result to the edge computing node where the task is obtained.
In the above scheme, after the edge computing node acquires the task, the acquired task needs to be uploaded to the cloud center, and then the cloud center issues the task to other edge computing nodes for processing. This scheme of uploading before issuing results in a long processing time for the task.
Disclosure of Invention
The embodiment of the invention aims to provide an execution system, method and device of tasks of the Internet of things, so as to reduce the processing time of the tasks. The specific technical scheme is as follows:
in order to achieve the above object, an embodiment of the present invention provides an execution system for tasks of an internet of things, where the system includes: the system comprises edge equipment, edge computing nodes and a cloud center;
the edge device is used for sending a task to be processed to the edge computing node;
the edge computing node is used for receiving the task to be processed; acquiring a resource demand parameter for executing the task to be processed; calculating the processing time length of the edge computing node for executing the task to be processed based on the resource demand parameters and the attribute characteristics of the edge computing node acquired in advance; judging whether the processing time length meets a preset time length condition or not; if yes, executing the task to be processed; if not, sending the task to be processed to the cloud center;
and the cloud center is used for executing the tasks to be processed sent by the edge computing nodes.
Optionally, the resource demand parameter includes any one or more of the following: CPU clock period number, CPU resource requirement and memory resource requirement;
the attribute characteristics include any one or more of: CPU idle rate, memory idle rate, exclusive running time of unit task.
Optionally, the edge computing node is further configured to:
determining the number of subtasks contained in the task to be processed; and calculating the processing time of the edge computing node to execute the task to be processed based on the resource demand parameter, the attribute characteristics of the edge computing node obtained in advance and the number of the subtasks.
Optionally, the edge computing node is further configured to:
determining the total time of the cloud center for executing the task to be processed; judging whether the processing time length is less than the total time length; if the processing time length is smaller than the preset time length, the processing time length is judged to meet the preset time length condition.
Optionally, the edge computing node is further configured to:
acquiring transmission time for uploading the task to be processed to a cloud center; calculating the time for the cloud center to execute the task to be processed based on the resource demand parameters and the attribute characteristics of the cloud center acquired in advance; and determining the total time length of the cloud center for executing the task to be processed based on the time of the cloud center for executing the task to be processed and the transmission time.
Optionally, the task to be processed includes a device token;
the edge computing node is further configured to determine whether the device token is successfully matched with a pre-stored device token after receiving the to-be-processed task; and if so, executing the step of acquiring the resource demand parameters for executing the task to be processed.
Alternatively to this, the first and second parts may,
the cloud center is also used for issuing a user token to the user after verifying the identity of the user; receiving a reservation equipment request sent by the user, wherein the reservation equipment request comprises the user token; after the user token is verified, sending a device work order generated based on the reservation device request to the edge computing node;
the edge computing node is further used for generating an equipment token according to the equipment work order; acquiring a use request of a user; judging whether the use request meets a preset use condition; and if so, sending the equipment token to the user.
Optionally, the edge computing node is further configured to:
acquiring an execution result of executing the task to be processed; sending the execution result to the cloud center; judging whether the cloud center successfully receives the execution result; if yes, marking the execution result as a synchronized result; if not, marking the execution result as an unsynchronized result; judging whether a preset time point is reached; if yes, sending the unsynchronized result to the cloud center; judging whether the cloud center successfully receives the unsynchronized result; if yes, marking the unsynchronized result as a synchronized result; if not, returning to the step of judging whether the preset time point is reached.
In order to achieve the above object, an embodiment of the present invention further provides an execution method of an internet of things task, which is applied to an edge computing node, and the method includes:
acquiring a task to be processed;
acquiring a resource demand parameter for executing the task to be processed;
calculating the processing time length of the edge computing node for executing the task to be processed based on the resource demand parameters and the attribute characteristics of the edge computing node acquired in advance;
judging whether the processing time length meets a preset time length condition or not;
and if so, executing the task to be processed.
In order to achieve the above object, an embodiment of the present invention further provides an apparatus for executing a task of an internet of things, including:
the first acquisition module is used for acquiring the tasks to be processed;
the second acquisition module is used for acquiring the resource demand parameters for executing the tasks to be processed;
the computing module is used for computing the processing time of the edge computing node for executing the task to be processed based on the resource demand parameters and the attribute characteristics of the edge computing node acquired in advance;
the judging module is used for judging whether the processing time length meets a preset time length condition or not; if yes, triggering an execution module;
and the execution module is used for executing the task to be processed.
By applying the embodiment of the invention, the edge device is used for sending the task to be processed to the edge computing node; the edge computing node is used for receiving the tasks to be processed; acquiring a resource demand parameter for executing a task to be processed; calculating the processing time of the edge computing node to execute the task to be processed based on the resource demand parameters and the attribute characteristics of the edge computing node acquired in advance; judging whether the processing time length meets a preset time length condition or not; if yes, executing the task to be processed; if not, sending the task to be processed to the cloud center; and the cloud center is used for executing the tasks to be processed sent by the edge computing nodes. Therefore, in the scheme, after the task is obtained, the task is not directly uploaded to the cloud center, the processing time for the edge computing node obtaining the task to execute the task is calculated first, if the processing time meets the preset threshold condition, the edge computing node executes the task without uploading the task to the cloud center, the transmission time of the task is saved, and the processing time of the task is reduced.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an execution system of tasks of the internet of things according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an edge computing node executing a task of the internet of things according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a method for executing tasks of the internet of things according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an internet-of-things task execution device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to achieve the above object, embodiments of the present invention provide a system, a method, and an apparatus for executing tasks of an internet of things, where the method and the apparatus can be applied to edge computing nodes. The following first describes the task execution system of the internet of things in detail.
Fig. 1 is a schematic structural diagram of an execution system of tasks of the internet of things provided in an embodiment of the present invention, where the system includes: an edge device 101, an edge computing node 102, and a cloud center 103;
the edge device 101 is configured to send the task to be processed to the edge computing node 102.
The edge device may be a monitoring camera, a mobile device held by a user, or the like, and the specific edge device is not limited. The tasks to be processed may be: tasks submitted by the user to the edge device, tasks detected by the edge device, and the like, and the specific tasks to be processed are not limited.
Taking the edge device 101 as a mobile device held by a user as an example, when the user uses the mobile device, such as a mobile phone, to perform face recognition, the face recognition task may be determined as a task to be processed, and the face recognition task may be sent to the edge computing node 102.
The edge computing node 102 is used for receiving a task to be processed; acquiring a resource demand parameter for executing a task to be processed; calculating the processing time of the edge computing node to execute the task to be processed based on the resource demand parameters and the attribute characteristics of the edge computing node acquired in advance; judging whether the processing time length meets a preset time length condition or not; if yes, executing the task to be processed; if not, sending the task to be processed to the cloud center 103.
In one embodiment, the edge computing node 102 is further configured to: generating an equipment token according to the equipment work order sent by the cloud center 103; acquiring a use request of a user; judging whether the use request meets a preset use condition; and if so, sending the equipment token to the user.
The equipment work order can be understood as a certificate of the cloud center for allowing the user to use the equipment; the device token may be understood as a credential that the edge computing node generates to allow the user to use the device based on the allowed device usage information in the device work order. The use request can be understood as a request for allowing the user to use the equipment in order to obtain permission of the equipment of the internet of things connected by using the edge computing node; the preset use conditions may be: the user token contained in the use request is matched with the equipment work order acquired by the edge computing node in advance, the submission time of the use request meets the time limit of the equipment work order, and the like, and the specific preset use condition is not limited.
In this embodiment, after the user initiates a login request to the cloud center, the cloud center matches the identity of the user with the identity of a legal user recorded in advance by the cloud center, and if the matching is successful, a user token is sent to the user, and the user token can be understood as a credential that the cloud center allows the user to access the internet of things where the cloud center is located. The method comprises the steps that a user sends a reservation equipment request carrying a user token to a cloud center, after the cloud center verifies the user token, the cloud center judges equipment requested by the user according to the reservation equipment request, and sends an equipment work order of the equipment requested by the user to an edge computing node; and after receiving the equipment work order, the edge computing node generates an equipment token according to the equipment work order.
In one case, the user sends a use request carrying a user token to the edge compute node. If the preset use condition is that the user token contained in the use request is matched with the equipment work order acquired by the edge computing node in advance, judging whether the user token contained in the use request is matched with the equipment work order acquired by the edge computing node in advance; if yes, sending a device token to the user; if not, the use request of the user can be continuously acquired.
In another case, the user sends a use request carrying a user token to the edge compute node. If the preset use condition is that the submission time of the use request meets the time limit of the equipment work order, determining the time limit in the equipment work order, for example, the time limit may be that the validity period of the equipment work order is 5 minutes, the validity time of the equipment work order is half to 10, and the like, and the specific time limit is not limited. For example, if the validity period of the device work order is 5 minutes, recording the time for acquiring the device work order, determining the time for acquiring the use request, judging whether the time for acquiring the use request and the time interval for acquiring the device work order are less than 5 minutes, and if so, sending a device token to the user; if not, the use request of the user can be continuously acquired.
In one case, if the usage request does not meet the preset usage condition, a usage request verification may be initiated to the cloud center, and if the cloud center passes the usage request verification, the edge computing node may send a device token to the user; if the cloud center does not verify the use request, the use request of the user can be continuously acquired.
In some related schemes, each time before a user submits a task to an edge computing node, a login request needs to be initiated to the cloud center. In the embodiment, the device token can be used for submitting the tasks to the edge computing nodes, and when a subsequent user submits the tasks to the edge computing nodes, the login request does not need to be initiated to the cloud center again. Therefore, the device token is used as a certificate for session maintenance between the user and the edge computing node, the times that the user needs to initiate a login request to the cloud center when submitting a task are reduced, and the efficiency of the Internet of things in practical application is improved.
In one embodiment, the pending task includes a device token, and the edge computing node is further configured to: after receiving the task to be processed, judging whether the device token is successfully matched with a pre-stored device token; if so, acquiring a resource demand parameter for executing the task to be processed; if not, the task to be processed is not executed, and other tasks to be processed can be continuously received.
In one embodiment, the edge computing node 102 is further configured to: and determining the number of subtasks contained in the task to be processed.
In one case, the number of subtasks corresponding to different task types may be set in advance in the edge computing node, where the task types may be classified into an identification type task, a prediction type task, and the like, and the specific task type is not limited. After the task to be processed is obtained, the type of the task to be processed can be judged, and then the corresponding number of subtasks is obtained according to the type of the task to be processed.
For example, the number of the subtasks of the identification type task may be set to be 20, and the number of the subtasks of the prediction type task may be set to be 25 in advance, and if the task type of the acquired to-be-processed task is the identification type task, it may be determined that the number of the subtasks of the to-be-processed task is 20. The number of the subtasks may be 15, 20, and the like, and the specific number of the subtasks is not limited.
Or, in other cases, the task to be processed may be pre-analyzed, and the number of subtasks of the task to be processed is obtained through analysis. The embodiment of the invention does not limit the specific pre-analysis method.
In one embodiment, the resource requirement parameters may include: the number of clock cycles of a CPU (Central Processing Unit), CPU resource requirements, memory resource requirements, and the like, and specific resource requirement parameters are not limited.
In one case, resource demand parameters corresponding to different task types may be set in advance in the edge computing node, where the task types may be classified into an identification type task, a prediction type task, and the like, and the specific task type is not limited. After the task to be processed is obtained, the type of the task to be processed can be judged, and then the corresponding resource demand parameter is obtained according to the type of the task to be processed.
For example, the number of CPU clock cycles of the identification class task may be preset to be 20 CPU clock cycles, the CPU resource requirement may be 2 CPU resources, and the memory resource requirement may be 64KB (Kilobyte), and the number of CPU clock cycles of the prediction class task may be 17 CPU clock cycles, the CPU resource requirement may be 1 CPU resource, and the memory resource requirement may be 128 KB. Thus, if the task type of the received task to be processed is the identification type task, it can be determined that the CPU clock cycle number of the task to be processed is 20 CPU clock cycles, the CPU resource requirement is 2 CPU resources, and the memory resource requirement is 64 KB. The number of the CPU clock cycles may be 20 CPU clock cycles, 17 CPU clock cycles, or the like, and the specific number of the CPU clock cycles is not limited; the CPU resource requirements can be 1 CPU resource, 1.7 CPU resources and the like, and the specific CPU resource requirements are not limited; the memory resource requirement may be 64KB, 128KB, etc., and the specific memory resource requirement is not limited.
Or, in other cases, the task to be processed may be pre-analyzed, and the resource requirement parameter of the task to be processed is obtained through analysis. The embodiment of the invention does not limit the specific pre-analysis method.
In one embodiment, the attribute features may include: the CPU idle rate, the memory idle rate, the exclusive running time of the unit task, and the like, and the specific attribute characteristics are not limited.
Wherein, the CPU idle rate can be understood as the percentage of unused CPU resources in the total CPU resources; the memory idle rate can be understood as the percentage of unused memory resources to the total memory resources; the exclusive running time of a unit task can be understood as the time when one task exclusively uses the edge computing node.
In one embodiment, determining the number of subtasks included in the to-be-processed task, and based on the resource demand parameter and the attribute characteristics of the edge computing node obtained in advance, calculating the processing time for the edge computing node to execute the to-be-processed task may include: and calculating the processing time of the edge computing node to execute the task to be processed based on the resource demand parameter, the attribute characteristics of the edge computing node obtained in advance and the number of the subtasks.
For example, if the resource demand parameters include: CPU clock period number, CPU resource requirement and memory resource requirement; if the attribute characteristics include: CPU idle rate, memory idle rate, exclusive running time of unit task; then, the processing time of the edge computing node to execute the task to be processed can be calculated by using the following formula:
Figure BDA0002935863480000081
wherein D isedge(i, k) represents a processing time length for the k-th edge computing node to execute the i-th task, i represents an ordinal number of the task, k represents an ordinal number of the edge computing node, λiWeight, CPU, representing the CPU resource requirement of the ith taskkIndicates the CPU idle rate, mu, of the k-th edge computing node acquiring the ith taskiWeight, mem, representing the memory resource demand of the ith taskkRepresents the memory vacancy rate, st, of the k-th edge compute nodeiIndicating the number of subtasks contained in the ith task, ciIndicating the number of CPU clock cycles required to complete the ith task, c indicating the total number of CPU clock cycles, tkIndicating the exclusive running time of the unit subtask on the k-th edge computing node.
In one embodiment, the edge computing node 102 is further configured to: determining the total time of the cloud center for executing the tasks to be processed; judging whether the processing time length is less than the total time length; if the processing time length is smaller than the preset time length, judging that the processing time length meets the preset time length condition, and executing the task to be processed; if not, judging that the processing time does not meet the preset time condition, and uploading the task to be processed to the cloud center 103.
In one case, the transmission time for uploading the task to be processed to the cloud center may be obtained; calculating the time of the cloud center for executing the task to be processed based on the resource demand parameters and the attribute characteristics of the cloud center acquired in advance; and determining the total time length of the cloud center for executing the tasks to be processed based on the time for executing the tasks to be processed by the cloud center and the transmission time.
The transmission time for uploading the task to the cloud center can be monitored by sending the test data packet at regular time, and the embodiment of the invention does not limit the data packet specifically used for detection.
For example, if the resource demand parameters include: CPU clock period number, CPU resource requirement and memory resource requirement; if the attribute characteristics include: CPU idle rate, memory idle rate, exclusive running time of unit task; then, the processing time of the cloud center for executing the task to be processed may be calculated by using the following equation:
Figure BDA0002935863480000091
wherein D iscloud(i, 0) represents the processing time of the ith task executed by the cloud center, i represents the ordinal number of the task, 0 represents the cloud center, and λiWeight, CPU, representing the CPU resource requirement of the ith task0Denotes CPU Idle Rate, μ, of cloud centeriWeight, mem, representing the memory resource demand of the ith task0Representing the memory vacancy rate, st, of the cloud centeriIndicating the number of subtasks contained in the ith task, ciIndicating the number of CPU clock cycles required to complete the ith task, c indicating the total number of CPU clock cycles, t0And the exclusive running time of the unit subtask in the cloud center is represented.
For example, if the acquired transmission time for uploading the task to be processed to the cloud center is 5 seconds, and the calculated time for executing the task to be processed by the cloud center is 20 seconds, based on the time for executing the task to be processed by the cloud center being 20 seconds and the transmission time being 5 seconds, it may be determined that the total time for executing the task to be processed by the cloud center is 25 seconds (20 seconds +5 seconds is 25 seconds); if the processing time is 20 seconds, the total time is less than 25 seconds, and the task to be processed can be executed; if the processing time is 30 seconds, the total time is not less than 25 seconds, and the task to be processed can be uploaded to the cloud center 103. Wherein, the transmission time may be 5 seconds, 10 seconds, etc., and the specific transmission time is not limited; the time for the cloud center to execute the task to be processed may be 20 seconds, 30 seconds, and the like, and the time for the cloud center to execute the task to be processed is not limited.
Or, in another case, the time for the cloud center to execute the task to be processed may be calculated based on the resource demand parameter and the attribute characteristics of the cloud center acquired in advance; and taking the time of the cloud center for executing the task to be processed as the total time of the cloud center for executing the task to be processed.
For example, if the time for executing the task to be processed by the cloud center obtained through calculation is 20 seconds, it may be determined that the total time for executing the task to be processed by the cloud center is 20 seconds; if the processing time is 15 seconds, the total time is less than 20 seconds, and the task to be processed can be executed; if the processing time is 30 seconds, the total time is not less than 20 seconds, and the task to be processed can be uploaded to the cloud center 103. The total time for the cloud center to execute the task to be processed may be 20 seconds, 30 seconds, and the like, and the specific total time for the cloud center to execute the task to be processed is not limited.
Alternatively, in another embodiment, the preset duration condition may be: the processing time length is less than a first preset time length, the processing time length is greater than a second preset time length, and the like, wherein the specific preset time length condition is not limited; the first preset time period may be 15 seconds, 30 seconds, and the like, and is not limited specifically; the second preset time period may be 3 seconds, 5 seconds, and the like, and is not limited specifically; the first preset duration may be longer than the second preset duration.
For example, if the preset duration condition is that the processing duration is less than the first preset duration by 40 seconds; if the processing time is 20 seconds, the processing time is less than the first preset time by 40 seconds, and the task to be processed can be executed; if the processing time is 55 seconds, the processing time is not longer than the first preset time by 40 seconds, and the task to be processed can be uploaded to the cloud center 103.
In one embodiment, the edge computing node 102 is further configured to: acquiring an execution result of executing a task to be processed; sending an execution result to the cloud center; judging whether the cloud center successfully receives the execution result; if yes, marking the execution result as a synchronized result; if not, marking the execution result as an unsynchronized result; judging whether a preset time point is reached; if yes, sending an unsynchronized result to the cloud center; judging whether the cloud center successfully receives the unsynchronized result; if yes, marking the unsynchronized result as a synchronized result; if not, returning to the step of judging whether the preset time point is reached.
The preset time point may be 10 points, 11 points, and the like, and the specific preset time point is not limited.
For example, after the edge computing node executes the task to be processed, an execution result is obtained, the execution result is sent to the cloud center, whether the cloud center successfully receives the execution result or not is judged, if the cloud center successfully receives the execution result, the data synchronization is successful, and the execution result can be marked as a synchronized result; if the cloud center does not successfully receive the execution result, the data synchronization fails, the execution result can be marked as an unsynchronized result, and timing synchronization of the data is waited. Judging whether a preset time point is reached, if the preset time point is 10 points, judging whether the preset time point is reached, if so, sending the unsynchronized data to the cloud center, judging whether the cloud center successfully receives the unsynchronized result, if so, successfully synchronizing the data, and marking the unsynchronized result as a synchronized result; if not, the data synchronization fails, and the step of judging whether the preset time point is reached can be returned to wait for the next timing data synchronization.
In some related schemes, data synchronization is performed only when a preset time point is reached. In the embodiments, data synchronization is performed only when the preset time point is reached, so that partial execution results cannot be synchronized to the cloud center from the edge computing node in time, and the overall timeliness of the internet of things is reduced; in some embodiments, the obtained execution result is immediately uploaded to the cloud center, but it is not determined whether the cloud center successfully receives the execution result, so that although a part of the execution result is uploaded, the cloud center does not successfully receive the part of the execution result, and thus the part of the execution result cannot be synchronized to the cloud center by the edge computing node.
In the embodiment, the obtained execution result is immediately uploaded to the cloud center, whether the cloud center successfully receives the execution result is judged, and if the cloud center does not successfully receive the execution result, the unsuccessfully received execution result is sent to the cloud center at regular time. Therefore, by applying the embodiment, the obtained execution result is immediately uploaded to the cloud center, the overall timeliness of the internet of things is ensured to a certain extent, meanwhile, the execution result which is not successfully synchronized is sent to the cloud center at regular time, and the phenomenon that the execution result cannot be synchronized to the cloud center by the edge computing node is reduced.
And the cloud center 103 is used for executing the tasks to be processed sent by the edge computing nodes.
In one embodiment, the cloud center 103 is further configured to: the method comprises the steps that a user token is issued to a user after the identity of the user is verified; receiving a reservation equipment request sent by the user, wherein the reservation equipment request comprises the user token; and after the user token is verified, sending a device work order generated based on the reservation device request to the edge computing node.
In this embodiment, after the user initiates a login request to the cloud center, the cloud center matches the identity of the user with the identity of a legal user recorded in advance by the cloud center, and if the matching is successful, a user token is sent to the user, and the user token can be understood as a credential that the cloud center allows the user to access the internet of things where the cloud center is located. The user sends a reservation equipment request carrying a user token to the cloud center, after the user token is verified by the cloud center, the cloud center judges equipment requested by the user according to the reservation equipment request, and sends an equipment work order of the equipment requested by the user to the edge computing node 102.
Fig. 2 is a schematic flow chart of an edge computing node executing a task of the internet of things according to an embodiment of the present invention, where the schematic flow chart includes:
s201: and acquiring the task to be processed.
The edge device may be a monitoring camera, a mobile device held by a user, or the like, and the specific edge device is not limited. The task to be processed is a task to be processed sent by the edge device to the edge node, and the task to be processed may be: tasks submitted by the user to the edge device, tasks detected by the edge device, and the like, and the specific tasks to be processed are not limited.
In one embodiment, S201 may further include: generating an equipment token according to an equipment work order sent by the cloud center; acquiring a use request of a user; judging whether the use request meets a preset use condition; and if so, sending the equipment token to the user.
The equipment work order can be understood as a certificate of the cloud center for allowing the user to use the equipment; the device token may be understood as a credential that the edge computing node generates to allow the user to use the device based on the allowed device usage information in the device work order. The use request can be understood as a request for allowing the user to use the equipment in order to obtain permission of the equipment of the internet of things connected by using the edge computing node; the preset use conditions may be: the user token contained in the use request is matched with the user token recorded in advance by the edge computing node, the submission time of the use request meets the time limit of the equipment work order, and the like, and the specific preset use condition is not limited.
In this embodiment, after the user initiates a login request to the cloud center, the cloud center matches the identity of the user with the identity of a legal user recorded in advance by the cloud center, and if the matching is successful, a user token is sent to the user, and the user token can be understood as a credential that the cloud center allows the user to access the internet of things where the cloud center is located. The method comprises the steps that a user sends a reservation equipment request carrying a user token to a cloud center, after the cloud center verifies the user token, the cloud center judges equipment requested by the user according to the reservation equipment request, and sends an equipment work order of the equipment requested by the user to an edge computing node; and after receiving the equipment work order, the edge computing node generates an equipment token according to the equipment work order.
In one case, the user sends a use request carrying a user token to the edge compute node. If the preset use condition is that the user token contained in the use request is matched with the equipment work order acquired by the edge computing node in advance, judging whether the user token contained in the use request is matched with the equipment work order acquired by the edge computing node in advance; if yes, sending a device token to the user; if not, the use request of the user can be continuously acquired.
In another case, the user sends a use request carrying a user token to the edge compute node. If the preset use condition is that the submission time of the use request meets the time limit of the equipment work order, determining the time limit in the equipment work order, for example, the time limit may be that the validity period of the equipment work order is 5 minutes, the validity time of the equipment work order is half to 10, and the like, and the specific time limit is not limited. For example, if the validity period of the device work order is 5 minutes, recording the time for acquiring the device work order, determining the time for acquiring the use request, judging whether the time for acquiring the use request and the time interval for acquiring the device work order are less than 5 minutes, and if so, sending a device token to the user; if not, the use request of the user can be continuously acquired.
In one case, if the usage request does not meet the preset usage condition, a usage request verification may be initiated to the cloud center, and if the cloud center passes the usage request verification, the edge computing node may send a device token to the user; if the cloud center does not verify the use request, the use request of the user can be continuously acquired.
In some related schemes, each time before a user submits a task to an edge computing node, a login request needs to be initiated to the cloud center. In the embodiment, the device token can be used for submitting the tasks to the edge computing nodes, and when a subsequent user submits the tasks to the edge computing nodes, the login request does not need to be initiated to the cloud center again. Therefore, the device token is used as a certificate for session maintenance between the user and the edge computing node, the times that the user needs to initiate a login request to the cloud center when submitting a task are reduced, and the efficiency of the Internet of things in practical application is improved.
In one embodiment, the to-be-processed task includes a device token, and after S201, the method may further include: judging whether the device token is successfully matched with a pre-stored device token or not; if yes, S202 may be performed; if not, the task to be processed is not executed, and other tasks to be processed can be continuously acquired.
In one embodiment, after S201, the method may further include: and determining the number of subtasks contained in the task to be processed.
In one case, the number of subtasks corresponding to different task types may be set in advance in the edge computing node, where the task types may be classified into an identification type task, a prediction type task, and the like, and the specific task type is not limited. After the task to be processed is obtained, the type of the task to be processed can be judged, and then the corresponding number of subtasks is obtained according to the type of the task to be processed.
For example, the number of the subtasks of the identification type task may be set to be 20, and the number of the subtasks of the prediction type task may be set to be 25 in advance, and if the task type of the acquired to-be-processed task is the identification type task, it may be determined that the number of the subtasks of the to-be-processed task is 20. The number of the subtasks may be 15, 20, and the like, and the specific number of the subtasks is not limited.
Or, in other cases, the task to be processed may be pre-analyzed, and the number of subtasks of the task to be processed is obtained through analysis. The embodiment of the invention does not limit the specific pre-analysis method.
S202: and acquiring a resource demand parameter for executing the task to be processed.
In one embodiment, the resource requirement parameters may include: the number of clock cycles of a CPU (Central Processing Unit), CPU resource requirements, memory resource requirements, and the like, and specific resource requirement parameters are not limited.
In one case, resource demand parameters corresponding to different task types may be set in advance in the edge computing node, where the task types may be classified into an identification type task, a prediction type task, and the like, and the specific task type is not limited. After the task to be processed is obtained, the type of the task to be processed can be judged, and then the corresponding resource demand parameter is obtained according to the type of the task to be processed.
For example, the number of CPU clock cycles of the identification class task may be preset to be 20 CPU clock cycles, the CPU resource requirement may be 2 CPU resources, and the memory resource requirement may be 64KB (Kilobyte), and the number of CPU clock cycles of the prediction class task may be 17 CPU clock cycles, the CPU resource requirement may be 1 CPU resource, and the memory resource requirement may be 128 KB. In this way, if the task type of the to-be-processed task acquired in S101 is the identification type task, it may be determined that the CPU clock cycle number of the to-be-processed task is 20 CPU clock cycles, the CPU resource requirement is 2 CPU resources, and the memory resource requirement is 64 KB. The number of the CPU clock cycles may be 20 CPU clock cycles, 17 CPU clock cycles, or the like, and the specific number of the CPU clock cycles is not limited; the CPU resource requirements can be 1 CPU resource, 1.7 CPU resources and the like, and the specific CPU resource requirements are not limited; the memory resource requirement may be 64KB, 128KB, etc., and the specific memory resource requirement is not limited.
Or, in other cases, the task to be processed may be pre-analyzed, and the resource requirement parameter of the task to be processed is obtained through analysis. The embodiment of the invention does not limit the specific pre-analysis method.
S203: and calculating the processing time of the edge computing node to execute the task to be processed based on the resource demand parameters and the attribute characteristics of the edge computing node acquired in advance.
In one embodiment, the attribute features may include: the CPU idle rate, the memory idle rate, the exclusive running time of the unit task, and the like, and the specific attribute characteristics are not limited.
Wherein, the CPU idle rate can be understood as the percentage of unused CPU resources in the total CPU resources; the memory idle rate can be understood as the percentage of unused memory resources to the total memory resources; the exclusive running time of a unit task can be understood as the time when one task exclusively uses the edge computing node.
In the foregoing one embodiment, the number of subtasks included in the task to be processed is determined, and S103 may include: and calculating the processing time of the edge computing node to execute the task to be processed based on the resource demand parameter, the attribute characteristics of the edge computing node obtained in advance and the number of the subtasks.
For example, if the resource demand parameters include: CPU clock period number, CPU resource requirement and memory resource requirement; if the attribute characteristics include: CPU idle rate, memory idle rate, exclusive running time of unit task; then, the processing time of the edge computing node to execute the task to be processed can be calculated by using the following formula:
Figure BDA0002935863480000151
wherein D isedge(i, k) represents a processing time length for the k-th edge computing node to execute the i-th task, i represents an ordinal number of the task, k represents an ordinal number of the edge computing node, λiWeight, CPU, representing the CPU resource requirement of the ith taskkIndicates the CPU idle rate, mu, of the k-th edge computing node acquiring the ith taskiWeight, mem, representing the memory resource demand of the ith taskkRepresents the memory vacancy rate, st, of the k-th edge compute nodeiIndicating the number of subtasks contained in the ith task, ciIndicating the number of CPU clock cycles required to complete the ith task, c indicating the total number of CPU clock cycles, tkIndicating the exclusive running time of the unit subtask on the k-th edge computing node.
S204: and judging whether the processing time length meets a preset time length condition or not. If yes, S205 may be performed; if not, the task to be processed can be uploaded to the cloud center.
In one embodiment, S204 may include: determining the total time of the cloud center for executing the tasks to be processed; judging whether the processing time length is less than the total time length; if the processing time length is less than the preset time length, determining that the processing time length meets the preset time length condition, and executing S205; if not, judging that the processing time does not meet the preset time condition, and uploading the task to be processed to the cloud center.
In one case, the transmission time for uploading the task to be processed to the cloud center may be obtained; calculating the time of the cloud center for executing the task to be processed based on the resource demand parameters and the attribute characteristics of the cloud center acquired in advance; and determining the total time length of the cloud center for executing the tasks to be processed based on the time for executing the tasks to be processed by the cloud center and the transmission time.
The transmission time for uploading the task to the cloud center can be monitored by sending the test data packet at regular time, and the embodiment of the invention does not limit the data packet specifically used for detection.
For example, if the resource demand parameters include: CPU clock period number, CPU resource requirement and memory resource requirement; if the attribute characteristics include: CPU idle rate, memory idle rate, exclusive running time of unit task; then, the processing time of the cloud center for executing the task to be processed may be calculated by using the following equation:
Figure BDA0002935863480000161
wherein D iscloud(i, 0) represents the processing time of the ith task executed by the cloud center, i represents the ordinal number of the task, 0 represents the cloud center, and λiWeight, CPU, representing the CPU resource requirement of the ith task0Denotes CPU Idle Rate, μ, of cloud centeriWeight, mem, representing the memory resource demand of the ith task0Representing the memory vacancy rate, st, of the cloud centeriIndicating the number of subtasks contained in the ith task, ciIndicating the number of CPU clock cycles required to complete the ith task, c indicating the total number of CPU clock cycles, t0And the exclusive running time of the unit subtask in the cloud center is represented.
For example, if the acquired transmission time for uploading the task to be processed to the cloud center is 5 seconds, and the calculated time for executing the task to be processed by the cloud center is 20 seconds, based on the time for executing the task to be processed by the cloud center being 20 seconds and the transmission time being 5 seconds, it may be determined that the total time for executing the task to be processed by the cloud center is 25 seconds (20 seconds +5 seconds is 25 seconds); if the processing time is 20 seconds, the processing time is less than 25 seconds of the total time, and S105 may be executed; if the processing time is 30 seconds, the total time is not less than 25 seconds, and the task to be processed can be uploaded to the cloud center. Wherein, the transmission time may be 5 seconds, 10 seconds, etc., and the specific transmission time is not limited; the time for the cloud center to execute the task to be processed may be 20 seconds, 30 seconds, and the like, and the time for the cloud center to execute the task to be processed is not limited.
Or, in another case, the time for the cloud center to execute the task to be processed may be calculated based on the resource demand parameter and the attribute characteristics of the cloud center acquired in advance; and taking the time of the cloud center for executing the task to be processed as the total time of the cloud center for executing the task to be processed.
For example, if the time for executing the task to be processed by the cloud center obtained through calculation is 20 seconds, it may be determined that the total time for executing the task to be processed by the cloud center is 20 seconds; if the processing time is 15 seconds, the processing time is less than the total time by 20 seconds, and S105 may be executed; if the processing time is 30 seconds, the total time is not less than 20 seconds, and the task to be processed can be uploaded to the cloud center. The total time for the cloud center to execute the task to be processed may be 20 seconds, 30 seconds, and the like, and the specific total time for the cloud center to execute the task to be processed is not limited.
Alternatively, in another embodiment, the preset duration condition may be: the processing time length is less than a first preset time length, the processing time length is greater than a second preset time length, and the like, wherein the specific preset time length condition is not limited; the first preset time period may be 15 seconds, 30 seconds, and the like, and is not limited specifically; the second preset time period may be 3 seconds, 5 seconds, and the like, and is not limited specifically; the first preset duration may be longer than the second preset duration.
For example, if the preset duration condition is that the processing duration is less than the first preset duration by 40 seconds; if the processing time is 20 seconds, the processing time is less than the first preset time by 40 seconds, and S105 may be executed; if the processing time is 55 seconds, the processing time is not longer than 40 seconds which is less than the first preset time, and the task to be processed can be uploaded to the cloud center.
S205: and executing the task to be processed.
In one embodiment, S205 may be followed by: acquiring an execution result of executing a task to be processed; sending an execution result to the cloud center; judging whether the cloud center successfully receives the execution result; if yes, marking the execution result as a synchronized result; if not, marking the execution result as an unsynchronized result; judging whether a preset time point is reached; if yes, sending an unsynchronized result to the cloud center; judging whether the cloud center successfully receives the unsynchronized result; if yes, marking the unsynchronized result as a synchronized result; if not, returning to the step of judging whether the preset time point is reached.
The preset time point may be 10 points, 11 points, and the like, and the specific preset time point is not limited.
For example, after the edge computing node executes the task to be processed, an execution result is obtained, the execution result is sent to the cloud center, whether the cloud center successfully receives the execution result or not is judged, if the cloud center successfully receives the execution result, the data synchronization is successful, and the execution result can be marked as a synchronized result; if the cloud center does not successfully receive the execution result, the data synchronization fails, the execution result can be marked as an unsynchronized result, and timing synchronization of the data is waited. Judging whether a preset time point is reached, if the preset time point is 10 points, judging whether the preset time point is reached, if so, sending the unsynchronized data to the cloud center, judging whether the cloud center successfully receives the unsynchronized result, if so, successfully synchronizing the data, and marking the unsynchronized result as a synchronized result; if not, the data synchronization fails, and the step of judging whether the preset time point is reached can be returned to wait for the next timing data synchronization.
In some related schemes, data synchronization is performed only when a preset time point is reached. In the embodiments, data synchronization is performed only when the preset time point is reached, so that partial execution results cannot be synchronized to the cloud center from the edge computing node in time, and the overall timeliness of the internet of things is reduced; in some embodiments, the obtained execution result is immediately uploaded to the cloud center, but it is not determined whether the cloud center successfully receives the execution result, so that although a part of the execution result is uploaded, the cloud center does not successfully receive the part of the execution result, and thus the part of the execution result cannot be synchronized to the cloud center by the edge computing node.
In the embodiment, the obtained execution result is immediately uploaded to the cloud center, whether the cloud center successfully receives the execution result is judged, and if the cloud center does not successfully receive the execution result, the unsuccessfully received execution result is sent to the cloud center at regular time. Therefore, by applying the embodiment, the obtained execution result is immediately uploaded to the cloud center, the overall timeliness of the internet of things is ensured to a certain extent, meanwhile, the execution result which is not successfully synchronized is sent to the cloud center at regular time, and the phenomenon that the execution result cannot be synchronized to the cloud center by the edge computing node is reduced.
By applying the embodiment of the invention, the task to be processed is obtained; acquiring a resource demand parameter for executing a task to be processed; calculating the processing time of the edge computing node to execute the task to be processed based on the resource demand parameters and the attribute characteristics of the edge computing node acquired in advance; judging whether the processing time length meets a preset time length condition or not; and if so, executing the task to be processed. In the scheme, on the first aspect, after the task is obtained, the task is not directly uploaded to the cloud center, the processing time for the edge computing node obtaining the task to execute the task is calculated first, and if the processing time meets the preset threshold condition, the edge computing node executes the task without uploading the task to the cloud center, so that the transmission time of the task is saved, and the processing time of the task is reduced.
In the second aspect, the device token can be used for submitting tasks to the edge computing node, and when a subsequent user submits the tasks to the edge computing node, a login request does not need to be initiated to the cloud center again. Therefore, the device token is used as a certificate for session maintenance between the user and the edge computing node, the times that the user needs to initiate a login request to the cloud center when submitting a task are reduced, and the efficiency of the Internet of things in practical application is improved.
And in the third aspect, the acquired execution result is immediately uploaded to the cloud center, so that the overall timeliness of the Internet of things is ensured to a certain extent, and meanwhile, the execution result which is not successfully synchronized is sent to the cloud center at regular time, so that the phenomenon that the execution result cannot be synchronized to the cloud center by the edge computing node is reduced.
Fig. 3 is a schematic flow chart of an execution method of an internet of things task according to an embodiment of the present invention, including:
s301: and acquiring the task to be processed.
S302: and acquiring a resource demand parameter for executing the task to be processed.
S303: and calculating the processing time of the edge computing node to execute the task to be processed based on the resource demand parameters and the attribute characteristics of the edge computing node acquired in advance.
S304: and judging whether the processing time length meets a preset time length condition or not. If yes, S105 may be performed; if not, the task to be processed can be uploaded to the cloud center.
S305: and executing the task to be processed.
The implementation of the above steps S301 to S305 is the same as the implementation of the steps S201 to S205 shown in fig. 2, and is not described herein again.
By applying the embodiment of the invention, the task to be processed is obtained; acquiring a resource demand parameter for executing a task to be processed; calculating the processing time of the edge computing node to execute the task to be processed based on the resource demand parameters and the attribute characteristics of the edge computing node acquired in advance; judging whether the processing time length meets a preset time length condition or not; and if so, executing the task to be processed. In the scheme, on the first aspect, after the task is obtained, the task is not directly uploaded to the cloud center, the processing time for the edge computing node obtaining the task to execute the task is calculated first, and if the processing time meets the preset threshold condition, the edge computing node executes the task without uploading the task to the cloud center, so that the transmission time of the task is saved, and the processing time of the task is reduced.
In the second aspect, the device token can be used for submitting tasks to the edge computing node, and when a subsequent user submits the tasks to the edge computing node, a login request does not need to be initiated to the cloud center again. Therefore, the device token is used as a certificate for session maintenance between the user and the edge computing node, the times that the user needs to initiate a login request to the cloud center when submitting a task are reduced, and the efficiency of the Internet of things in practical application is improved.
And in the third aspect, the acquired execution result is immediately uploaded to the cloud center, so that the overall timeliness of the Internet of things is ensured to a certain extent, and meanwhile, the execution result which is not successfully synchronized is sent to the cloud center at regular time, so that the phenomenon that the execution result cannot be synchronized to the cloud center by the edge computing node is reduced.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides an apparatus for executing a task of an internet of things, as shown in fig. 4, including:
a first obtaining module 401, configured to obtain a task to be processed;
a second obtaining module 402, configured to obtain a resource requirement parameter for executing the to-be-processed task;
a calculating module 403, configured to calculate, based on the resource requirement parameter and the attribute characteristics of the edge computing node obtained in advance, a processing time for the edge computing node to execute the to-be-processed task;
a first judging module 404, configured to judge whether the processing duration meets a preset duration condition; if yes, triggering an execution module;
an executing module 405, configured to execute the task to be processed.
In one embodiment, the resource requirement parameters include any one or more of: CPU clock period number, CPU resource requirement and memory resource requirement; the attribute characteristics include any one or more of: CPU idle rate, memory idle rate, exclusive running time of unit task.
In one embodiment, the apparatus further comprises: a determination module (not shown in the figures) in which,
the determining module is used for determining the number of subtasks contained in the task to be processed;
the calculation module 403 is specifically configured to: and calculating the processing time of the edge computing node to execute the task to be processed based on the resource demand parameter, the attribute characteristics of the edge computing node obtained in advance and the number of the subtasks.
In an embodiment, the first determining module 404 is specifically configured to:
acquiring transmission time for uploading the task to be processed to a cloud center;
calculating the time for the cloud center to execute the task to be processed based on the resource demand parameters and the attribute characteristics of the cloud center acquired in advance;
determining a time condition based on the time for the cloud center to execute the task to be processed and the transmission time;
and judging whether the processing time length is smaller than the time condition.
In one embodiment, the task to be processed includes a device token; the device further comprises: a second determining module (not shown in the figure), wherein the second determining module is configured to determine whether the device token is successfully matched with a pre-stored device token, and if so, trigger the second obtaining module 402.
In one embodiment, the apparatus further comprises: a third obtaining module, a third judging module, and a sending module (not shown in the figure), wherein,
the third acquisition module is used for acquiring a use request of a user;
the third judging module is used for judging whether the use request meets the preset use condition; if yes, triggering a first sending module;
a first sending module, configured to send a device token to the user.
In one embodiment, the apparatus further comprises: a fourth obtaining module, a second sending module, a fourth judging module, a fifth judging module, a third sending module, and a sixth judging module (not shown in the figure), wherein,
the fourth acquisition module is used for acquiring an execution result of executing the task to be processed;
the second sending module is used for sending the execution result to the cloud center;
the fourth judging module is used for judging whether the cloud center successfully receives the execution result; if yes, marking the execution result as a synchronized result; if not, marking the execution result as an unsynchronized result;
the fifth judging module is used for judging whether the preset time point is reached or not; if yes, triggering a third sending module;
a third sending module, configured to send the unsynchronized result to the cloud center;
a sixth judging module, configured to judge whether the cloud center successfully receives the unsynchronized result; if yes, marking the unsynchronized result as a synchronized result; if not, triggering the fifth judgment module.
By applying the embodiment of the invention, the task to be processed is obtained; acquiring a resource demand parameter for executing a task to be processed; calculating the processing time of the edge computing node to execute the task to be processed based on the resource demand parameters and the attribute characteristics of the edge computing node acquired in advance; judging whether the processing time length meets a preset time length condition or not; and if so, executing the task to be processed. In the scheme, on the first aspect, after the task is obtained, the task is not directly uploaded to the cloud center, the processing time for the edge computing node obtaining the task to execute the task is calculated first, and if the processing time meets the preset threshold condition, the edge computing node executes the task without uploading the task to the cloud center, so that the transmission time of the task is saved, and the processing time of the task is reduced.
In the second aspect, the device token can be used for submitting tasks to the edge computing node, and when a subsequent user submits the tasks to the edge computing node, a login request does not need to be initiated to the cloud center again. Therefore, the device token is used as a certificate for session maintenance between the user and the edge computing node, the times that the user needs to initiate a login request to the cloud center when submitting a task are reduced, and the efficiency of the Internet of things in practical application is improved.
And in the third aspect, the acquired execution result is immediately uploaded to the cloud center, so that the overall timeliness of the Internet of things is ensured to a certain extent, and meanwhile, the execution result which is not successfully synchronized is sent to the cloud center at regular time, so that the phenomenon that the execution result cannot be synchronized to the cloud center by the edge computing node is reduced.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, including a processor 501 and a memory 502,
a memory 502 for storing a computer program;
the processor 501 is configured to implement any one of the above-described methods for executing tasks of the internet of things when executing the program stored in the memory 502.
The Memory mentioned in the above electronic device may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method for executing any one of the tasks of the internet of things.
In another embodiment, a computer program product containing instructions is provided, which when run on a computer causes the computer to perform the method for performing any of the tasks of the internet of things in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for method embodiments, apparatus embodiments, device embodiments, computer-readable storage medium embodiments, and computer program product embodiments, the description is relatively simple as they are substantially similar to system embodiments, and reference may be made to some descriptions of system embodiments for related points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. An execution system for tasks of the internet of things, the system comprising: the system comprises edge equipment, edge computing nodes and a cloud center;
the edge device is used for sending a task to be processed to the edge computing node;
the edge computing node is used for receiving the task to be processed; acquiring a resource demand parameter for executing the task to be processed; calculating the processing time length of the edge computing node for executing the task to be processed based on the resource demand parameters and the attribute characteristics of the edge computing node acquired in advance; judging whether the processing time length meets a preset time length condition or not; if yes, executing the task to be processed; if not, sending the task to be processed to the cloud center;
and the cloud center is used for executing the tasks to be processed sent by the edge computing nodes.
2. The system of claim 1, wherein the resource demand parameters include any one or more of: CPU clock period number, CPU resource requirement and memory resource requirement;
the attribute characteristics include any one or more of: CPU idle rate, memory idle rate, exclusive running time of unit task.
3. The system of claim 1, wherein the edge computing node is further configured to:
determining the number of subtasks contained in the task to be processed; and calculating the processing time of the edge computing node to execute the task to be processed based on the resource demand parameter, the attribute characteristics of the edge computing node obtained in advance and the number of the subtasks.
4. The system of claim 1, wherein the edge computing node is further configured to:
determining the total time of the cloud center for executing the task to be processed; judging whether the processing time length is less than the total time length; if the processing time length is smaller than the preset time length, the processing time length is judged to meet the preset time length condition.
5. The system of claim 4, wherein the edge computing node is further configured to:
acquiring transmission time for uploading the task to be processed to a cloud center; calculating the time for the cloud center to execute the task to be processed based on the resource demand parameters and the attribute characteristics of the cloud center acquired in advance; and determining the total time length of the cloud center for executing the task to be processed based on the time of the cloud center for executing the task to be processed and the transmission time.
6. The system of claim 1, wherein the pending task comprises a device token;
the edge computing node is further configured to determine whether the device token is successfully matched with a pre-stored device token after receiving the to-be-processed task; and if so, executing the step of acquiring the resource demand parameters for executing the task to be processed.
7. The system of claim 6,
the cloud center is also used for issuing a user token to the user after verifying the identity of the user; receiving a reservation equipment request sent by the user, wherein the reservation equipment request comprises the user token; after the user token is verified, sending a device work order generated based on the reservation device request to the edge computing node;
the edge computing node is further used for generating an equipment token according to the equipment work order; acquiring a use request of a user; judging whether the use request meets a preset use condition; and if so, sending the equipment token to the user.
8. The system of claim 1, wherein the edge computing node is further configured to:
acquiring an execution result of executing the task to be processed; sending the execution result to the cloud center; judging whether the cloud center successfully receives the execution result; if yes, marking the execution result as a synchronized result; if not, marking the execution result as an unsynchronized result; judging whether a preset time point is reached; if yes, sending the unsynchronized result to the cloud center; judging whether the cloud center successfully receives the unsynchronized result; if yes, marking the unsynchronized result as a synchronized result; if not, returning to the step of judging whether the preset time point is reached.
9. An execution method of tasks of the Internet of things is applied to edge computing nodes, and the method comprises the following steps:
acquiring a task to be processed;
acquiring a resource demand parameter for executing the task to be processed;
calculating the processing time length of the edge computing node for executing the task to be processed based on the resource demand parameters and the attribute characteristics of the edge computing node acquired in advance;
judging whether the processing time length meets a preset time length condition or not;
and if so, executing the task to be processed.
10. An execution device for tasks of the Internet of things is characterized by comprising:
the first acquisition module is used for acquiring the tasks to be processed;
the second acquisition module is used for acquiring the resource demand parameters for executing the tasks to be processed;
the computing module is used for computing the processing time of the edge computing node for executing the task to be processed based on the resource demand parameters and the attribute characteristics of the edge computing node acquired in advance;
the judging module is used for judging whether the processing time length meets a preset time length condition or not; if yes, triggering an execution module;
and the execution module is used for executing the task to be processed.
CN202110159615.9A 2021-02-05 2021-02-05 System, method and device for executing tasks of Internet of things Pending CN112905320A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110159615.9A CN112905320A (en) 2021-02-05 2021-02-05 System, method and device for executing tasks of Internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110159615.9A CN112905320A (en) 2021-02-05 2021-02-05 System, method and device for executing tasks of Internet of things

Publications (1)

Publication Number Publication Date
CN112905320A true CN112905320A (en) 2021-06-04

Family

ID=76122771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110159615.9A Pending CN112905320A (en) 2021-02-05 2021-02-05 System, method and device for executing tasks of Internet of things

Country Status (1)

Country Link
CN (1) CN112905320A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118766A (en) * 2022-06-22 2022-09-27 中国银行股份有限公司 Mobile office method based on edge calculation and related device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180075447A1 (en) * 2016-09-13 2018-03-15 Capital One Services, Llc Systems and methods for generating and managing dynamic customized electronic tokens for electronic device interaction
CN108712485A (en) * 2018-05-10 2018-10-26 海信集团有限公司 A kind of resource subscription method and apparatus of internet of things equipment
CN109274672A (en) * 2018-09-26 2019-01-25 南京南瑞信息通信科技有限公司 A kind of mobile operation management and data interaction system for information communication device
CN109688177A (en) * 2017-10-18 2019-04-26 中国移动通信有限公司研究院 A kind of method of data synchronization and device, equipment, storage medium
US20190215319A1 (en) * 2018-01-10 2019-07-11 Abb Schweiz Ag Industrial automation device and cloud service
CN110602250A (en) * 2019-09-29 2019-12-20 网易(杭州)网络有限公司 Data synchronization method and device, server and terminal equipment
CN111427679A (en) * 2020-03-25 2020-07-17 中国科学院自动化研究所 Computing task scheduling method, system and device facing edge computing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180075447A1 (en) * 2016-09-13 2018-03-15 Capital One Services, Llc Systems and methods for generating and managing dynamic customized electronic tokens for electronic device interaction
CN109688177A (en) * 2017-10-18 2019-04-26 中国移动通信有限公司研究院 A kind of method of data synchronization and device, equipment, storage medium
US20190215319A1 (en) * 2018-01-10 2019-07-11 Abb Schweiz Ag Industrial automation device and cloud service
CN108712485A (en) * 2018-05-10 2018-10-26 海信集团有限公司 A kind of resource subscription method and apparatus of internet of things equipment
CN109274672A (en) * 2018-09-26 2019-01-25 南京南瑞信息通信科技有限公司 A kind of mobile operation management and data interaction system for information communication device
CN110602250A (en) * 2019-09-29 2019-12-20 网易(杭州)网络有限公司 Data synchronization method and device, server and terminal equipment
CN111427679A (en) * 2020-03-25 2020-07-17 中国科学院自动化研究所 Computing task scheduling method, system and device facing edge computing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118766A (en) * 2022-06-22 2022-09-27 中国银行股份有限公司 Mobile office method based on edge calculation and related device

Similar Documents

Publication Publication Date Title
US10355865B1 (en) Systems and techniques for certification of trusted media data
US10375119B2 (en) Dynamic multi-factor authentication challenge generation
CN102930199B (en) Secure machine registration in many tenant subscription environment
US20180205745A1 (en) System, method and computer program product for access authentication
US9419804B2 (en) Data authenticity assurance method, management computer, and storage medium
CN111158613B (en) Data block storage method and device based on access heat and storage equipment
CN110889096B (en) Login method, login device, computer equipment and storage medium
TW201712581A (en) Method, apparatus and system for preventing cross-site request forgery
CN111753269A (en) Identity authentication method and device based on block chain
CN111104675A (en) Method and device for detecting system security vulnerability
US20150180850A1 (en) Method and system to provide additional security mechanism for packaged web applications
CN109145651B (en) Data processing method and device
WO2021197392A1 (en) Task queue generation
CN111431908B (en) Access processing method and device, management server and readable storage medium
WO2014032600A1 (en) Method and apparatus for determining automatic scanning action
CN112905320A (en) System, method and device for executing tasks of Internet of things
CN110910141A (en) Transaction processing method, system, device, equipment and computer readable storage medium
TW201931186A (en) Identity recognition method, apparatus and system
CN111460256A (en) Webpage data crawling method and device, computer equipment and storage medium
CN111400027A (en) Distributed task processing method, device and system
KR101944696B1 (en) Method for auto login base on biometric data, and computer readable recording medium applying the same
US20190036880A1 (en) Automated firewall-compliant customer support resolution provisioning system
US11533243B2 (en) Method for computing environment specific baselines for metrics of user experience
CN108763291B (en) Data management method and device and electronic equipment
WO2016078526A1 (en) Method and device for storing and checking information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210604