Task allocation method, system, device and medium based on computing power of Internet of Things

By obtaining dynamic task collection and new task information in the Internet of Things customs, adapting to determine the start time of the task, solve the problem of the level of computing power distribution of the internal equipment access task level of the Internet of Things, and realize that a single Internet of Things customs access more equipment Effect.

CN118863476BActive Publication Date: 2025-01-28SHENZHEN XINGHAI IOT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411331616.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-28
Estimated Expiration
2044-09-24

AI Technical Summary

Technical Problem

The prior art cannot realize the computing power allocation at the task level of the internal device access task of the IoT gateway, resulting in the inability to increase the number of device access to a single IoT gateway, and in turn, more IoT gateways are required to access more terminal devices.

Method used

By obtaining dynamic task collection and new task information, the task startup time for new tasks is determined, and new tasks are started according to the task startup time to update the set of dynamic tasks. This method adapts to the adaptive allocation task in time dimension to achieve the maximum utilization rate of the computing power of the Internet of Things.

Benefits of technology

A single IoT device is accepted by a single IoT device, which improves the utilization rate of IoT customs power, and reduces the demand for the number of IoT customs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118863476B_ABST
    Figure CN118863476B_ABST
Patent Text Reader

Abstract

The present invention discloses a task allocation method, system, device and medium based on the computing power of an Internet of Things gateway, the method comprising the following steps: obtaining a dynamic task set and newly added task information, the dynamic task set comprising the number of tasks executed at each time point, the newly added task information comprising task computing resource information, task transmission requirement information and task storage resource information of the newly added task; determining the task start time of the newly added task according to the dynamic task set and the newly added task information; starting the newly added task according to the task start time, and updating the dynamic task set. The task allocation method of the present invention achieves the maximum utilization of the computing power of an Internet of Things gateway by adaptively allocating tasks in the time dimension, thereby enabling a single Internet of Things gateway to access more Internet of Things devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a task allocation method, system, device and medium based on the computing power of the Internet of Things. Background Art

[0002] In the IoT industry, the IoT gateway plays a vital role. The IoT gateway is responsible for completing the access of terminal IoT devices through various IoT protocols on the edge side, realizing the acquisition and reporting of the heartbeat, attributes, and events of the terminal IoT devices, and realizing the issuance of platform control instructions to the terminal devices. When facing the access of a large number of IoT terminal devices, how to make full use of computing power to achieve the access of more devices is crucial. Because IoT access requires regular acquisition of heartbeats, attributes, and events, but the regular interval is short, usually in seconds or minutes, so when the regular start time and interval time are similar, it will cause a large number of tasks to conflict and accumulate at certain times, and be idle at other times. If the computing power is insufficient, it is usually solved by adding IoT gateways, and the terminal device tasks are issued to different IoT gateways through the platform center, so as to achieve the purpose of controlling the access and launch of a single IoT gateway.

[0003] At the same time, the existing technology can only realize the computing power allocation between IoT gateways, but cannot realize the computing power allocation at the task level of device access within the IoT gateway. Therefore, it is impossible to increase the number of device accesses to a single IoT gateway, and more IoT gateways need to be invested to access more terminal devices. Summary of the invention

[0004] The main problem solved by the present invention is to provide a task allocation method, system, device and medium based on the computing power of an Internet of Things gateway, so as to solve the problem that the computing power allocation at the task level of the internal device access of the Internet of Things gateway cannot be realized, and thus the number of device accesses to a single Internet of Things gateway cannot be increased to realize the access of more Internet of Things terminal devices.

[0005] In order to solve the above technical problems, a technical solution adopted by the present invention is to provide a task allocation method based on the computing power of the Internet of Things, the method comprising the following steps: obtaining a dynamic task set and new task information, the dynamic task set including the number of tasks executed at each time point, the new task information including the task computing resource information, task transmission requirement information and task storage resource information of the new task; determining the task start time of the new task according to the dynamic task set and the new task information; starting the new task according to the task start time, and updating the dynamic task set.

[0006] In some embodiments, the obtaining of the dynamic task set includes the steps of: initializing the dynamic task set according to the existing scheduled task information, allocating the existing scheduled tasks and recording the maximum value of the elements in the dynamic task set and the corresponding time point.

[0007] In some embodiments, the newly added task information includes the estimated start time of the newly added task, the scheduled execution interval time and the maximum delay time allowed for delayed start. Determining the task start time of the newly added task based on the dynamic task set and the newly added task information includes the steps of: obtaining a starting landing time point set of the newly added task based on the estimated start time and the scheduled execution interval time; obtaining a delayed landing time point set of the newly added task based on the starting landing time point set and the maximum delay time; and analyzing and judging the delayed landing time point set to determine the task start time of the newly added task.

[0008] In some embodiments, obtaining the starting location time point set of the newly added task includes the steps of: calculating the starting offset of the newly added task relative to the starting time according to the expected start time, and the starting offset is: ,in, T Indicates the estimated start time, T 1 represents the start time of generating the dynamic task set, T 2 represents the end time of generating the dynamic task set, and % represents the remainder obtained by dividing two numbers; according to the starting offset and the scheduled execution interval, the starting placement time point at which the newly added task will be placed within a unit time length is calculated to obtain the starting placement time point set of the newly added task, and the starting placement time point set is: ,in, I Indicates the scheduled execution interval of the newly added task, Represents an array N Index range , N Get index range All integers within , , / means taking the integer part of the result of dividing two numbers.

[0009] In some embodiments, obtaining the delayed placement time point set of the newly added task includes the steps of: using the starting offset, calculating the delayed offset of the delayed execution of the newly added task, the delayed offset being: ,in, n Indicates the delay time. , drepresents the maximum delay time; the starting offset in the starting placement time point set is replaced by the delay offset to obtain the delayed placement time point set of the newly added task, and the delayed placement time point set is: .

[0010] In some embodiments, starting the newly added task according to the task start time and updating the dynamic task set includes the steps of:

[0011] The task start time is determined according to the real landing time point set, and the real landing time point set is: ,in, D Represents the real delay time, the real landing time point set B Included At each task start time, start the newly added task and add 1 to the value of the corresponding element in the dynamic task set to update the dynamic task set.

[0012] In some embodiments, determining the task start time of the newly added task includes the following steps: if all element values ​​in the dynamic task set reach the task threshold, the dynamic task set is sequentially increased by the unit set length to dynamically expand the dynamic task set.

[0013] The present invention also provides a task allocation system based on the computing power of the Internet of Things, the system comprising: an acquisition module, used to acquire a dynamic task set and newly added task information, the dynamic task set including the number of tasks executed at each time point, the newly added task information including task computing resource information, task transmission requirement information and task storage resource information of the newly added task; a calculation module, used to determine the task start time of the newly added task according to the dynamic task set and the newly added task information; an execution module, used to start the newly added task according to the task start time, and update the dynamic task set.

[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0015] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0016] The beneficial effects of the present invention are as follows: the present invention discloses a method, system, device and medium for task allocation based on the computing power of an Internet of Things gateway, the method comprising the following steps: obtaining a dynamic task set and newly added task information, the dynamic task set comprising the number of tasks executed at each time point, the newly added task information comprising task computing resource information, task transmission requirement information and task storage resource information of the newly added task; determining the task start time of the newly added task according to the dynamic task set and the newly added task information; starting the newly added task according to the task start time, and updating the dynamic task set. The task allocation method of the present invention achieves the maximum utilization of the computing power of the Internet of Things gateway by adaptively allocating tasks in the time dimension, thereby enabling a single Internet of Things gateway to access more Internet of Things devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a flow chart of an embodiment of a task allocation method based on the computing power of the Internet of Things according to the present invention;

[0018] Figure 2 It is a task allocation diagram of an existing scheduled task after being allocated to a part of the time period in an embodiment of a task allocation method based on the computing power of the Internet of Things according to the present invention;

[0019] Figure 3 This is a specific flow chart of step S2 in an embodiment of a task allocation method based on the computing power of the Internet of Things according to the present invention;

[0020] Figure 4 This is a task allocation diagram of a newly added task R4 after being allocated in a partial time period in an embodiment of a task allocation method based on the computing power of the Internet of Things according to the present invention;

[0021] Figure 5 It is a structural block diagram of an embodiment of a task allocation system based on the computing power of the Internet of Things according to the present invention;

[0022] Figure 6 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention;

[0023] Figure 7 It is a schematic block diagram of an embodiment of a computer-readable storage medium of the present invention. DETAILED DESCRIPTION

[0024] In order to facilitate the understanding of the present invention, the present invention is described in more detail below in conjunction with the accompanying drawings and specific embodiments. Preferred embodiments of the present invention are provided in the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in this specification. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.

[0025] It should be noted that, unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used in this specification includes any and all combinations of one or more related listed items.

[0026] like Figure 1 As shown, a task allocation method based on the computing power of the Internet of Things according to the present invention is shown, comprising the following steps:

[0027] Step S1: Obtain dynamic task set and newly added task information.

[0028] It should be noted that the dynamic task set includes multiple elements, the value of each element is the number of tasks executed at each time point (seconds), and the newly added task information includes the task computing resource information, task transmission requirement information and task storage resource information of the newly added tasks. The task computing resource information, task transmission requirement information and task storage resource information are respectively the computing units (corresponding computing resources), transmission rate (corresponding bandwidth resources for communication transmission) and memory space (corresponding storage resources) required to execute the corresponding tasks and other related information.

[0029] The steps of obtaining a dynamic task set include:

[0030] According to the existing scheduled task information, the dynamic task set is initialized, the existing scheduled tasks are allocated and the maximum value of the element with the largest number of tasks and the corresponding time point are recorded. Among them, the existing scheduled task information includes the task computing resource information, task transmission requirement information and task storage resource information of the scheduled task.

[0031] Furthermore, when the program starts, it starts to generate a dynamic task set, and the start time is recorded as the start time T 1 (second timestamp), determines the end time of generating dynamic task set T 2. Get a dynamic task set with a unit set length , dynamic task set A Each element value in The number of tasks executed at the corresponding time point is initialized to 0. Then, according to the existing scheduled task information, the existing scheduled tasks are allocated, and the entire dynamic task set is recorded at the same time. A The maximum value of the elements in (the maximum number of tasks). At the same time, the dynamic task set can be determined A The length of the unit set (the number of elements minus 1) is equal to the termination time T 2 minus the start time T The unit time length of 1 (the number of time points minus 1).

[0032] Among them, if the dynamic task set A The unit set length is 3600, and the corresponding unit time length is 3600s, so the dynamic task set A It is a set of tasks executed per second within one hour. In practice, dynamic task sets with other unit set lengths can also be used based on the existing scheduled task information. A , so as to better evenly distribute the IoT computing power for scheduled tasks in the time dimension.

[0033] Furthermore, due to the initial dynamic task set A The value of each element in is 0. Therefore, the existing scheduled tasks can be directly assigned to different time points as much as possible according to the task execution time interval and other information of the existing scheduled tasks, so that the corresponding scheduled tasks can obtain the required computing units, transmission rate, memory space and other related information at the corresponding time points, ensuring the uniform distribution of the computing power of the Internet of Things.

[0034] In some embodiments, the process of allocating existing tasks is similar to the process of allocating newly added tasks, which will not be described in detail here.

[0035] like Figure 2 The figure shows the distribution of the scheduled tasks in a IoT gateway in some time periods. The figure includes three different scheduled tasks. The execution time intervals of tasks R1 and R3 are both 5, and the execution time interval of task R2 is 10. Among them, task 1 starts at the first time point 0 (i.e., the start time T 1) Starts execution and executes every 5 seconds; Task R2 starts execution from the second time point 1 and executes every 10 seconds; Task R3 starts execution from the eighth time point 7 and executes every 5 seconds. Therefore, we get the dynamic task set , the maximum value of the record element is 1, including element value.

[0036] In this embodiment, by allocating existing scheduled tasks, it is possible to avoid executing multiple scheduled tasks at the same time point, and to better utilize the computing power of a single IoT gateway.

[0037] Step S2: Determine the task start time of the newly added task according to the dynamic task set and the newly added task information.

[0038] It should be noted that the newly added task information also includes the estimated start time of the newly added task, the scheduled execution interval time and the maximum delay time allowed for delayed start. The estimated start time here is a time point, the scheduled execution interval time is the time interval (time period) from one start time point of the newly added task to the next start time point, and the maximum delay time is the maximum time period for which the newly added task can be delayed to start.

[0039] Specifically, if Figure 3 As shown, step S2 includes the following sub-steps:

[0040] Step S21: Obtain a set of starting time points of the newly added task based on the estimated start time and the scheduled execution interval.

[0041] In this embodiment, for a newly added task, the estimated start time of the newly added task is determined. T (seconds timestamp) and scheduled execution interval I , and the maximum delay time allowed for delayed start of this new task d , then relative to the start time T Starting offset of 1 for:

[0042] ,

[0043] Then, calculate the starting time point of the newly added task within a unit time length, and get the starting time point set of the newly added task for:

[0044] ,

[0045] Among them, % represents the remainder obtained by dividing two numbers. Represents an array N Index range ,here N Get index range All integers within , , / means taking the integer part of the result of dividing two numbers.

[0046] Furthermore, at the same time point, the computing power information required to execute the corresponding tasks, such as the computing unit, transmission rate and memory space provided by the IoT gateway, is limited. Therefore, at a certain moment, if there are already a large number of scheduled tasks being executed simultaneously, the newly added tasks can be started with a delay.

[0047] Step S22: Obtain a delayed placement time point set for the newly added task based on the starting placement time point set and the maximum delay time.

[0048] At this time, the actual delay time and the minimum average number of tasks are initialized to 0, and the maximum delay time allowed is d Within the range, get the offset from the start in turn From each time point ( ~ + d ) corresponding to the delayed landing time point set , where a delayed landing time point set is obtained After that, you can add all the delayed placement time points in the collection to the dynamic task collection. A Find the element value of the corresponding time point in , so as to determine the number of tasks at all delayed placement time points. Among them, the corresponding delayed placement time point set for:

[0049] ,

[0050] in, , n Indicates the delay time, specifically the time period for the delay in starting the new task. Represents the delay offset, i.e. N Take the delayed landing time point corresponding to 0 o'clock.

[0051] Step S23: Analyze and judge the delayed placement time point set to determine the task start time of the newly added task.

[0052] In this embodiment, a task threshold is set, which is the maximum value of the elements in the dynamic task set, or the maximum number of tasks allowed to be executed at a time point. After that, according to the corresponding delayed landing time point set All delayed placement time points in the dynamic task set A Find the element value of the corresponding time point in , determine the number of tasks at all delayed placement time points, and then determine whether the number of tasks at all delayed placement time points is less than the task threshold; if the number of tasks at all delayed placement time points is less than the task threshold, then the corresponding delay time n The actual delay time of the newly added task is obtained by stopping the offset from the start. From each time point ( ~ + d ) corresponding to the delayed landing time point set Otherwise, calculate the corresponding delayed landing time point set The average number of delayed tasks corresponding to all delayed placement time points in C, determine the current delay time n Is it equal to d , if the current delay time n Not equal to d , then continue to execute and get the offset from the start From each time point ( ~ + d ) corresponding to the delayed landing time point set Steps; if the current delay time n equal d , then we get the average number of delayed tasks C The minimum delay landing time point set Among them, each delayed landing time point set The average number of delayed tasks corresponding to all delayed placement time points in C for:

[0053] ,

[0054] in, Represents a set of delayed placement time points middle N Pick x A delayed landing time point corresponding to Represents a dynamic task set A Mid-time point The corresponding element value, Represents a set of delayed placement time points The number of elements in .

[0055] Furthermore, when determining the current delay time n Is it equal to d Previously, the delayed placement time point collection The average number of delayed tasks C Make a judgment, if the minimum average number of tasks is 0 or greater than the delayed average number of tasks C , then let the minimum average number of tasks be equal to the delayed average number of tasks C If the set of all delayed placement time points There are delayed placement time points where the corresponding number of tasks is not less than the task threshold, so we can finally get an average number of delayed tasks. C The minimum delay landing time point set , the delay time corresponding to this set n The actual delay time of the newly added task and the corresponding delay placement time point set A collection of real landing time points for newly added tasks B , the real landing time point set BEach real landing time point in is the task start time of the newly added task.

[0056] In this embodiment, the actual landing time point set obtained is B It can be expressed as:

[0057] ,

[0058] in, D Indicates the actual delay time.

[0059] For example, combined with Figure 2 , if the estimated start time of a new task R4 is T For the 12th time point 11, the scheduled execution interval I is 7, and the unit time length is 20, then the new task R4 is obtained relative to the start time T Starting offset of 1 , the starting point of landing time set , that is, the starting time points of the newly added task R4 are 1 at the second time point, 8 at the ninth time point, and 15 at the sixteenth time point.

[0060] Then, if the maximum delay time of a newly added task R4 is d is 7, and the task threshold is the maximum value of the elements in the dynamic task set, that is, the task threshold is 1, then combined with the starting location time point set of the newly added task R4 , and get each time point (8 ~ 15) Corresponding delayed landing time point set , according to the corresponding delayed landing time point set All delayed placement time points in the dynamic task set A Find the element value of the corresponding time point in , determine the number of tasks at all delayed placement time points, and then determine whether the number of tasks at all delayed placement time points is less than 1. , the corresponding delayed landing time point set is obtained , then the delayed placement time points of the newly added task R4 are 1 at the second time point, 8 at the ninth time point, and 15 at the sixteenth time point. A The element values ​​of the corresponding time points are 1, 0, and 1 respectively, and there is a time point that is not less than 1. Therefore, the delayed placement time point set at this time The conditions are not met and the delayed landing time point set needs to be calculated The average number of delayed tasks corresponding to all delayed placement time points in C =2 / 3>0, and the minimum average number of tasks is the initial value 0, so let the minimum average number of tasks be equal to the delayed average number of tasks C=2 / 3. Due to the current delay time If it is not equal to 7, you need to continue to execute and get each time point (8 ~ 15) Corresponding delayed landing time point set Therefore, when , the corresponding delayed landing time point set is obtained , then the delayed placement time points of the newly added task R4 are the third time point 2, the tenth time point 9 and the seventeenth time point 16. In the dynamic task set A The element values ​​of the corresponding time points are all 0<1. Since the task threshold is 1 at this time, the corresponding delay time 1 is the actual delay time of the newly added task. Stop and get each time point (8 ~ 15) Corresponding delayed landing time point set Therefore, we get the real time point set of the newly added task R4: , determine that the task start time of the newly added task R4 is the 3rd time point 2, the 10th time point 9 and the 17th time point 16, such as Figure 4 shown.

[0061] In some embodiments, if the dynamic task set of unit set length A All element values ​​in (corresponding to the number of tasks executed at all time points) have reached the task threshold, that is, the newly added tasks cannot be assigned to the dynamic task set of unit set length. A At the corresponding time point in the A Increase the length of the unit set in sequence to expand the dynamic task set A length, so that new tasks can be assigned to the dynamic task set A The corresponding time points in the new expansion section are executed.

[0062] In this application, a dynamic task set is used A , the time when the newly added task can be delayed is calculated through the formula, so as to determine the task start time of the newly added task in the time dimension, which can make full use of the computing power of the IoT gateway.

[0063] Step S3: Start the newly added task according to the task start time and update the dynamic task set.

[0064] It should be noted that the task start time here is the set of real landing time points obtained in step S2 B Each real landing time point in the B Included The real landing time point, that is, the new tasks include The time when a task starts.

[0065] Furthermore, at each task start time, the corresponding new task is started, and the dynamic task set A The value of the corresponding element in (that is, the number of tasks at the corresponding time point) + 1, thereby updating the dynamic task set A , record the new dynamic task set A The maximum value of the elements in is the maximum number of tasks executed at all time points. Among them, the new dynamic task set is determined A Is the maximum number of tasks in greater than the original maximum number of elements? If the new dynamic task set A If the maximum number of tasks in is greater than the original maximum number of elements, the new dynamic task set A The maximum number of tasks in the new dynamic task set A The maximum value of the elements in; otherwise, the new dynamic task set A The maximum value of the elements in is still the maximum value of the original elements.

[0066] Combination Figure 2 and Figure 4 , for the newly added task R4 mentioned in step S2, it is started at the 3rd time point 2, the 10th time point 9 and the 17th time point 16, and the dynamic task set A The number of tasks at the corresponding time point in the task list + 1, and the updated dynamic task set is obtained. , record the new dynamic task set A The maximum value of an element in is 1.

[0067] In actual use, each time a new task is added, steps S1 to S3 are executed, so that the new tasks are reasonably allocated in the time dimension to achieve the maximum utilization of the computing power of the IoT gateway, and then a single IoT gateway can be connected to more IoT devices.

[0068] Based on the same inventive concept, Figure 5 As shown, the present invention also provides a task allocation system based on the computing power of the Internet of Things, the system comprising:

[0069] The acquisition module 101 is used to acquire a dynamic task set and newly added task information. The dynamic task set includes the number of tasks executed at each time point. The newly added task information includes task computing resource information, task transmission requirement information and task storage resource information of the newly added task.

[0070] The calculation module 102 is used to determine the task start time of the newly added task according to the dynamic task set and the newly added task information.

[0071] The execution module 103 is used to start the newly added task according to the task start time and update the dynamic task set.

[0072] In the present application, other technical features of the above-mentioned task allocation system based on IoT computing power are the same as the features disclosed in the above-mentioned method embodiment and will not be repeated here.

[0073] Based on the same inventive concept, the present application also provides an electronic device, which includes a processor, a memory and a communication circuit, and the processor is connected to the memory and the communication circuit respectively; wherein the communication circuit is used for communication connection, the memory is used to store a computer program, and the processor is used to execute the computer program to implement the above method.

[0074] See also Figure 6 The electronic device described in the embodiment of the present application may specifically include a processor 210 and a memory 220. The memory 220 is coupled to the processor 210.

[0075] The processor 210 is used to control the operation of the electronic device. The processor 210 may also be referred to as a CPU (Central Processing Unit). The processor 210 may be an integrated circuit chip with signal processing capabilities. The processor 210 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor 210 may also be any conventional processor, etc.

[0076] The memory 220 is used to store computer programs, and may be a RAM, a ROM, or other types of storage terminals. Specifically, the memory 220 may include one or more computer-readable storage media, which may be non-transitory. The memory 220 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage terminals, flash memory storage terminals. In some embodiments, the non-transitory computer-readable storage medium in the memory 220 is used to store at least one program code.

[0077] The processor 210 is used to execute the computer program stored in the memory 220 to implement the methods described in the various method embodiments of the present application.

[0078] In some embodiments, the electronic device may further include: a peripheral terminal interface 230 and at least one peripheral terminal. The processor 210, the memory 220 and the peripheral terminal interface 230 may be connected via a bus or a signal line. Each peripheral terminal may be connected to the peripheral terminal interface 230 via a bus, a signal line or a circuit board. Specifically, the peripheral terminal includes: at least one of a radio frequency circuit 240, a display screen 250, an audio circuit 260 and a power supply 270.

[0079] The peripheral terminal interface 230 may be used to connect at least one peripheral terminal related to I / O (Input / output) to the processor 210 and the memory 220. In some embodiments, the processor 210, the memory 220, and the peripheral terminal interface 230 are integrated on the same chip or circuit board; in some other implementations, any one or two of the processor 210, the memory 220, and the peripheral terminal interface 230 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0080] The radio frequency circuit 240 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 240 communicates with the communication network and other IoT devices through electromagnetic signals, and the radio frequency circuit 240 is the communication circuit of the electronic device. The radio frequency circuit 240 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 240 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, an operator identity module card, and the like. The radio frequency circuit 240 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 240 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0081] The display screen 250 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 250 is a touch display screen, the display screen 250 also has the ability to collect touch signals on the surface or above the surface of the display screen 250. The touch signal can be input to the processor 210 as a control signal for processing. At this time, the display screen 250 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 250 can be one, set on the front panel of the electronic device; in other embodiments, the display screen 250 can be at least two, respectively set on different surfaces of the electronic device or in a folding design; in other embodiments, the display screen 250 can be a flexible display screen, set on a curved surface or a folding surface of the electronic device. Even, the display screen 250 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 250 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).

[0082] The audio circuit 260 may include a microphone and a speaker. The microphone is used to collect sound waves from the operator and the environment, and convert the sound waves into electrical signals and input them into the processor 210 for processing, or input them into the radio frequency circuit 240 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged in different parts of the electronic device. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 210 or the radio frequency circuit 240 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 260 may also include a headphone jack.

[0083] The power supply 270 is used to power various components in the electronic device. The power supply 270 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 270 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged through a wired line, and a wireless rechargeable battery is a battery that is charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0084] For a detailed description of the functions and execution processes of each functional module or component in the electronic device embodiment of the present application, reference can be made to the description in the above-mentioned method embodiments of the present application, which will not be repeated here.

[0085] In the several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the various embodiments of the electronic devices described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0086] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0087] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0088] Based on the same inventive concept, the present application also provides a computer-readable storage medium storing a computer program, which can be executed by a processor to implement the above method.

[0089] See also Figure 7 , if the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium 300. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions / computer programs to enable an IoT device (which can be a personal computer, server, or network terminal, etc.) or a processor (processor) to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks or optical disks, and electronic terminals such as computers, mobile phones, laptops, tablet computers, cameras, etc. having the above-mentioned storage media.

[0090] The description of the execution process of the program data in the computer-readable storage medium can refer to the description in the above-mentioned method embodiments of the present application, and will not be repeated here.

[0091] It can be seen that the present invention discloses a task allocation method, system, device and medium based on the computing power of an Internet of Things gateway, the method comprising the following steps: obtaining a dynamic task set and newly added task information, the dynamic task set including the number of tasks executed at each time point, the newly added task information including the task computing resource information, task transmission requirement information and task storage resource information of the newly added task; determining the task start time of the newly added task according to the dynamic task set and the newly added task information; starting the newly added task according to the task start time, and updating the dynamic task set. The task allocation method of the present invention achieves the maximum utilization of the computing power of the Internet of Things gateway by adaptively allocating tasks in the time dimension, thereby enabling a single Internet of Things gateway to access more Internet of Things devices.

[0092] The above are only embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any equivalent structural transformations made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are included in the protection scope of the present invention.

Claims

1. A task allocation method based on the computing power of the Internet of Things, characterized in that: The method comprises the following steps: Acquire a dynamic task set and newly added task information, wherein the dynamic task set includes the number of tasks executed at each time point, and the newly added task information includes task computing resource information, task transmission requirement information, and task storage resource information of the newly added task; Determining a task start time of the newly added task according to the dynamic task set and the newly added task information; Starting the newly added task according to the task start time, and updating the dynamic task set; The newly added task information includes an estimated start time and a scheduled execution interval of the newly added task. The step of determining the task start time of the newly added task according to the dynamic task set and the newly added task information includes the following steps: According to the estimated start time and the scheduled execution interval, a set of start placement time points of the newly added task is obtained; The step of obtaining a set of starting landing time points of the newly added task includes the following steps: According to the estimated start time, the starting offset of the newly added task relative to the start time is calculated, and the starting offset is: , in, T Indicates the estimated start time, T 1 represents the start time of generating the dynamic task set, T 2 represents the termination time of generating the dynamic task set, and % represents the remainder obtained by dividing two numbers; According to the starting offset and the scheduled execution interval, the starting placement time point at which the newly added task will be placed within a unit time length is calculated to obtain a starting placement time point set of the newly added task, and the starting placement time point set is: , in, I Indicates the scheduled execution interval of the newly added task, Represents an array N Index range , N Get index range All integers within , , / means taking the integer part of the result of dividing two numbers.

2. The task allocation method according to claim 1, characterized in that: The step of obtaining a dynamic task set includes the following steps: Initialize the dynamic task set according to the existing scheduled task information, allocate the existing scheduled tasks, and record the maximum value of the element with the largest number of tasks in the dynamic task set and the corresponding time point.

3. The task allocation method according to claim 1, characterized in that: The newly added task information also includes the maximum delay time allowed for delayed start of the newly added task. After obtaining the starting landing time point set of the newly added task according to the expected start time and the scheduled execution interval, the step further includes: Obtaining a delayed placement time point set for the newly added task according to the starting placement time point set and the maximum delay time; The delayed placement time point set is analyzed and judged to determine the task start time of the newly added task.

4. The task allocation method according to claim 3, characterized in that: The step of obtaining a delayed placement time point set of the newly added task comprises the following steps: The delay offset of the delayed execution of the newly added task is calculated using the starting offset, and the delay offset is: , in, n Indicates the delay time. , d represents the maximum delay time; The starting offset in the starting placement time point set is replaced by the delayed offset to obtain a delayed placement time point set for the newly added task, where the delayed placement time point set is: 。 5. The task allocation method according to claim 1, characterized in that: The step of starting the newly added task according to the task start time and updating the dynamic task set includes the following steps: The task start time is determined according to the real landing time point set, and the real landing time point set is: , in, D Represents the real delay time, the real landing time point set B Included The task start time; At each task start time, the newly added task is started, and the value of the corresponding element in the dynamic task set is increased by 1 to update the dynamic task set.

6. The task allocation method according to claim 1, characterized in that: The step of determining the task start time of the newly added task comprises the following steps: If all element values ​​in the dynamic task set reach the task threshold, the dynamic task set is sequentially increased by the unit set length to dynamically expand the dynamic task set.

7. A task allocation system based on the computing power of the Internet of Things, characterized in that: The system comprises: An acquisition module is used to acquire a dynamic task set and newly added task information, wherein the dynamic task set includes the number of tasks executed at each time point, and the newly added task information includes task computing resource information, task transmission requirement information, and task storage resource information of the newly added task; A calculation module is used to determine the task start time of the newly added task according to the dynamic task set and the newly added task information, wherein the newly added task information includes an estimated start time of the newly added task and a scheduled execution interval time, and the determining the task start time of the newly added task according to the dynamic task set and the newly added task information comprises the steps of: According to the estimated start time and the scheduled execution interval, a set of start placement time points of the newly added task is obtained; The step of obtaining a set of starting landing time points of the newly added task includes the following steps: According to the estimated start time, the starting offset of the newly added task relative to the start time is calculated, and the starting offset is: , in, T Indicates the estimated start time, T 1 represents the start time of generating the dynamic task set, T 2 represents the termination time of generating the dynamic task set, and % represents the remainder obtained by dividing two numbers; According to the starting offset and the scheduled execution interval, the starting placement time point at which the newly added task will be placed within a unit time length is calculated to obtain a starting placement time point set of the newly added task, and the starting placement time point set is: , in, I Indicates the scheduled execution interval of the newly added task, Represents an array N Index range , N Get index range All integers within , , / means taking the integer part of the result of dividing two numbers; An execution module is used to start the newly added task according to the task start time and update the dynamic task set.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Task scheduling method and device, computer equipment and storage medium

    CN113821330A

  • Task allocation method, device and equipment, medium and digital twin system

    CN116501478A