[go: up one dir, main page]

CN113778645A - Task scheduling method, device and equipment based on edge calculation and storage medium - Google Patents

Task scheduling method, device and equipment based on edge calculation and storage medium Download PDF

Info

Publication number
CN113778645A
CN113778645A CN202110949593.6A CN202110949593A CN113778645A CN 113778645 A CN113778645 A CN 113778645A CN 202110949593 A CN202110949593 A CN 202110949593A CN 113778645 A CN113778645 A CN 113778645A
Authority
CN
China
Prior art keywords
integer value
task
node
virtual node
integer
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
CN202110949593.6A
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.)
China Coal Research Institute CCRI
Original Assignee
China Coal Research Institute CCRI
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 China Coal Research Institute CCRI filed Critical China Coal Research Institute CCRI
Priority to CN202110949593.6A priority Critical patent/CN113778645A/en
Publication of CN113778645A publication Critical patent/CN113778645A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本公开公开了一种基于边缘计算的任务调度方法、装置、设备及存储介质,涉及大数据和边缘计算等人工智能技术领域,具体实现方案为:获取当前待计算的任务以及所述待计算的任务对应的参数信息;根据所述参数信息,确定所述待计算的任务对应的第一整数值;根据预设的整数环上各整数值与虚拟节点的对应关系,确定所述第一整数值对应的目标虚拟节点;将所述待计算的任务,发送给所述目标虚拟节点所属的边缘节点。由此,通过将虚拟节点均匀分布在预设的整数环上,使得每个节点负载相对均衡,根据当前任务的参数计算出对应的哈希值,使得该任务可以与整数环中的整数值相对应,进而找出用于处理该任务的节点,具有一定的可扩展性。

Figure 202110949593

The present disclosure discloses a task scheduling method, device, equipment and storage medium based on edge computing, and relates to the technical fields of artificial intelligence such as big data and edge computing. The parameter information corresponding to the task; according to the parameter information, determine the first integer value corresponding to the task to be calculated; according to the preset corresponding relationship between each integer value on the integer ring and the virtual node, determine the first integer value The corresponding target virtual node; the task to be calculated is sent to the edge node to which the target virtual node belongs. Therefore, by evenly distributing the virtual nodes on the preset integer ring, the load of each node is relatively balanced, and the corresponding hash value is calculated according to the parameters of the current task, so that the task can match the integer value in the integer ring. Correspondingly, and then find out the node for processing the task, which has a certain scalability.

Figure 202110949593

Description

Task scheduling method, device and equipment based on edge calculation and storage medium
Technical Field
The disclosure relates to the technical field of artificial intelligence such as big data and edge calculation, in particular to a task scheduling method, a device, equipment and a storage medium based on edge calculation.
Background
In the edge calculation, which edge node should execute the task is a key issue, and if all tasks are executed by one edge node in the network area, it is easy to have insufficient resources to provide service at the time of peak request. Therefore, task placement should distribute the load to the edge nodes capable of providing services in a balanced manner as much as possible on the premise of ensuring the use experience requirements of users, so that the use of the edge node cluster resources is balanced. Therefore, how to ensure the load balance of the edge nodes in the task allocation process becomes a problem which needs to be solved urgently at present.
Disclosure of Invention
The disclosure provides a task scheduling method, a task scheduling device, a task scheduling equipment and a task scheduling storage medium based on edge computing.
According to a first aspect of the present disclosure, there is provided a task scheduling method based on edge computing, including:
acquiring a current task to be calculated and parameter information corresponding to the task to be calculated;
determining a first integer value corresponding to the task to be calculated according to the parameter information;
determining a target virtual node corresponding to the first integer value according to the corresponding relation between each integer value and a virtual node on a preset integer ring;
and sending the task to be calculated to the edge node to which the target virtual node belongs.
According to a second aspect of the present disclosure, there is provided an edge-computation-based task scheduling apparatus, including:
the system comprises an acquisition module, a calculation module and a calculation module, wherein the acquisition module is used for acquiring a current task to be calculated and parameter information corresponding to the task to be calculated;
a first determining module, configured to determine, according to the parameter information, a first integer value corresponding to the task to be calculated;
a second determining module, configured to determine, according to a correspondence between each integer value on a preset integer ring and a virtual node, a target virtual node corresponding to the first integer value;
and the sending module is used for sending the task to be calculated to the edge node to which the target virtual node belongs.
Optionally, the second determining module includes:
a first determining unit, configured to determine each current virtual node according to a current available edge node;
and a second determining unit, configured to map the virtual nodes uniformly into a preset integer ring, so as to determine a corresponding relationship between each integer value and a virtual node.
Optionally, the second determining unit includes:
the first determining subunit is configured to uniformly divide a preset integer ring according to the number of the virtual nodes, so as to determine an integer value corresponding to each division point;
and the second determining subunit is configured to associate the number corresponding to each virtual node with each integer value one by one, so as to determine a corresponding relationship between each integer value and a virtual node.
Optionally, the second determining subunit is further configured to:
and determining the number of each virtual node according to the preset number of the available edge nodes and the number of the virtual nodes corresponding to each available edge node, wherein the numbers of the available edge nodes corresponding to the virtual nodes with adjacent numbers are different.
Optionally, the first determining module is specifically configured to:
and performing hash operation on the corresponding end device address parameter, the port parameter, the request timestamp parameter and the task data parameter to determine the first integer value.
Optionally, the second determining module is specifically configured to:
traversing the integer ring by taking the first integer value as a starting point along a preset sequence to determine a second integer value with the minimum distance from the starting point;
and determining a target virtual node corresponding to the second integer value according to the corresponding relation between each integer value and the virtual node.
An embodiment of a third aspect of the present disclosure provides a computer device, including: the present invention relates to a computer program product, and a computer program stored on a memory and executable on a processor, which when executed by the processor performs a method as set forth in an embodiment of the first aspect of the present disclosure.
A fourth aspect of the present disclosure is directed to a non-transitory computer-readable storage medium storing a computer program, which when executed by a processor implements the method as set forth in the first aspect of the present disclosure.
A fifth aspect of the present disclosure provides a computer program product, which when executed by an instruction processor performs the method provided in the first aspect of the present disclosure.
In the embodiment of the disclosure, a task to be currently calculated and parameter information corresponding to the task to be calculated are first obtained, then a first integer value corresponding to the task to be calculated is determined according to the parameter information, then a target virtual node corresponding to the first integer value is determined according to a corresponding relationship between each integer value and a virtual node on a preset integer ring, and finally the task to be calculated is sent to an edge node to which the target virtual node belongs. Therefore, the virtual nodes are uniformly distributed on the preset integer ring, so that the load of each node is relatively balanced, the corresponding hash value is calculated according to the parameters of the current task, the task can correspond to the integer value in the integer ring, and then the node for processing the task is found out.
The task scheduling method, device and equipment based on edge computing provided by the disclosure have at least the following beneficial effects:
it should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic flowchart of a task scheduling method based on edge computation according to the present disclosure;
FIG. 2 is a schematic flow chart of another task scheduling method based on edge computing according to the present disclosure;
fig. 3 is a block diagram of a task scheduling apparatus based on edge computation according to the present disclosure.
FIG. 4 is a block diagram of an electronic device for implementing a task scheduling method based on edge computing according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The method for task scheduling based on edge computing provided by the present disclosure may be executed by the task scheduling apparatus based on edge computing provided by the present disclosure, and may also be executed by an electronic device provided by the present disclosure, where the electronic device may include but is not limited to a desktop computer, a tablet computer, and other terminal devices, and the following is to execute the method for task scheduling based on edge computing provided by the present disclosure with the electronic device provided by the present disclosure, without limiting the present disclosure.
A task scheduling method based on edge computing according to the present disclosure is described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a task scheduling method based on edge computing according to an embodiment of the present disclosure.
As shown in fig. 1, the task scheduling method based on edge calculation may include the following steps:
step 101, acquiring a current task to be calculated and parameter information corresponding to the task to be calculated.
Optionally, the parameter information may include an address parameter, a port parameter, a request timestamp parameter, a task data parameter, and the like of a corresponding end device of the task to be currently calculated, which is not limited herein.
Specifically, the task to be calculated may be an application instance for generating data for the device at the sensing layer side, and is not limited herein.
And step 102, determining a first integer value corresponding to the task to be calculated according to the parameter information.
The first integer value may be a hash value corresponding to the task to be calculated.
Optionally, any hash operation may be performed on the device address parameter, the port parameter, the request timestamp parameter, and the task data parameter corresponding to the task, for example, an SHA256 algorithm is used to perform an encryption operation, so as to determine the first integer value, which is not limited herein.
And 103, determining a target virtual node corresponding to the first integer value according to the corresponding relation between each integer value on the preset integer ring and the virtual node.
The integer ring can be a pre-constructed integer ring, for example, the hash value space is 0-264-1 integer ring. It is understood that an integer ring may be a virtual circular ring organized by hash values, and the integer ring may have an integer value of 0 as the head of the integer ring and 264-1 as the tail of the integer ring.
It should be noted that the virtual node may be a node uniquely associated with a real node, that is, an edge node, and in the present disclosure, the number of edge nodes in a current edge node cluster may be determined first, and then a corresponding virtual node is created through an edge node server corresponding to each edge node. Each edge node may correspond to a plurality of virtual nodes and may be the same in number. Or, a corresponding number of nodes may be generated according to the load condition of the edge node, that is, the edge node with strong computing capability and small load may correspond to a plurality of virtual nodes, so that the load of each edge node is relatively balanced.
For example, if the number of the current edge nodes is m, n virtual nodes may be created for each edge node. Further, the method can be used for 0-2 pre-constructed64The integer ring of-1 is divided, i.e. m × n division points are divided into m × n +1 arc segments as equally as possible, so that each division point corresponds to a unique integer value on the integer ring. Since the number of the current edge nodes is m, the number of the virtual nodes corresponding to all the current edge nodes is m × n, that is, the number is the same as the number of the segmentation points. It should be noted that this example is only a schematic illustration of the present disclosure, and does not limit the present disclosure.
In order to distribute the tasks to be calculated to different virtual nodes of the current integer ring relatively uniformly, namely to make the load of each edge node relatively balanced. In the present disclosure, it is necessary to distribute the tasks to be calculated to all buffers as much as possible, that is, all buffer spaces are utilized. As a possible implementation manner, virtual nodes corresponding to each edge node may be arranged in a cross manner, for example, numbers of each edge node, such as P1, P2, and P3, may be determined first, numbers of virtual nodes corresponding to each edge node, such as virtual nodes P1Q1, P1Q2, and P1Q3 corresponding to the edge node 1, are then determined, and then virtual nodes corresponding to each edge node may be arranged in a cross manner, that is, the virtual nodes corresponding to each edge node may be arranged in the following order, i.e., P1Q1, P2Q1, P3Q1, P1Q2, P2Q2, P3Q2, P3Q1, P3Q2, and P3Q3, so that edge nodes corresponding to adjacent virtual nodes may be different, and thus load balance and overall utilization rate may be improved.
It should be noted that the above example is only an illustrative example, and the disclosure is not limited, that is, the number and the arrangement order of each edge node and each virtual node are not limited.
Thus, after the order of each virtual node is determined, the present disclosure may determine its correspondence to each division point since the integer value corresponding to each division point is from 0 to 264-1, so that each virtual node can be associated with an integer value corresponding to each partitioning point. For example, after the first integer value is determined, the position of the first integer value in the integer ring may be determined, and then the integer ring may be traversed in a clockwise order starting from the first integer value to determine an integer value corresponding to a partition point with a minimum distance between the starting points, so that a node corresponding to the integer value may be determined as the target virtual node.
And 104, sending the task to be calculated to the edge node to which the target virtual node belongs.
It should be noted that a certain mapping relationship exists between the virtual node and the edge node, and therefore after the target edge node is determined, the present disclosure may determine the edge node to which the target virtual node belongs according to the mapping relationship, and further may deliver the task to be calculated to the edge node for processing. In addition, under the condition that any edge node is in fault, the corresponding mapping relation and the virtual node can be deleted from the integer ring in time, so that a new task can find a next adjacent available node for processing, the task accumulation and the response failure caused by the fault node are avoided, the operation of a non-fault node is basically not influenced, certain expandability is realized, smooth horizontal expansion can be supported, and the edge node can be added and deleted.
In the embodiment of the disclosure, a task to be currently calculated and parameter information corresponding to the task to be calculated are first obtained, then a first integer value corresponding to the task to be calculated is determined according to the parameter information, then a target virtual node corresponding to the first integer value is determined according to a corresponding relationship between each integer value and a virtual node on a preset integer ring, and finally the task to be calculated is sent to an edge node to which the target virtual node belongs. Therefore, the virtual nodes are uniformly distributed on the preset integer ring, so that the load of each node is relatively balanced, the corresponding hash value is calculated according to the parameters of the current task, the task can correspond to the integer value in the integer ring, and then the node for processing the task is found out.
Fig. 2 is a flowchart illustrating a task scheduling method based on edge computing according to another embodiment of the present disclosure.
As shown in fig. 2, the task scheduling method based on edge calculation may include the following steps:
step 201, acquiring a current task to be calculated and parameter information corresponding to the task to be calculated.
Step 202, according to the parameter information, determining a first integer value corresponding to the task to be calculated.
It should be noted that, the specific implementation manner of steps 201 and 202 may refer to the above embodiments, and is not described herein again.
Step 203, determining each current virtual node according to the current available edge node.
The edge node can be a service platform constructed near the network edge of the user, can provide resources such as storage, calculation, network and the like, and sinks part of key service application to the edge of the access network so as to reduce the width and delay loss caused by network transmission and multistage forwarding.
It should be noted that, the edge node corresponds to the edge node server, and the number of virtual nodes corresponding to the currently available edge node can be determined according to the computational power and the operating state of the edge node, so that the process is more flexible.
Step 204, mapping each virtual node uniformly into a preset integer ring to determine the corresponding relationship between each integer value and the virtual node.
As a possible implementation manner, a preset integer ring may be uniformly divided according to the number of virtual nodes to determine an integer value corresponding to each division point, and then numbers corresponding to each virtual node are associated with each integer value one by one to determine a corresponding relationship between each integer value and a virtual node.
Optionally, the number of each virtual node may be determined according to a preset number of available edge nodes and the number of virtual nodes corresponding to each available edge node, where the numbers of available edge nodes corresponding to virtual nodes with adjacent numbers are different.
In the present disclosure, the correspondence between each integer value and a virtual node may be determined as needed. In order to map each virtual node to a preset integer ring, the preset integer ring may be first divided uniformly to determine each division point and an integer value corresponding to each division point, and then each integer value may be associated with the preset virtual node in a sequence from small to large one by one, so that one virtual node corresponds to one division point and one integer value.
It should be noted that the preset number of the edge node may be determined according to the number of the edge nodes, such as 1,2, 3. And then, determining the number of virtual nodes according to the number of the edge nodes, and determining the number of each virtual node, where the virtual nodes may be randomly arranged, or alternately and randomly arranged according to the order of the edge nodes, and this is not limited herein. Wherein the numbers of available edge nodes corresponding to adjacent numbered virtual nodes may be different.
Step 205, taking the first integer value as a starting point, traversing the integer ring along a preset sequence to determine a second integer value with the smallest distance from the starting point.
It should be noted that the preset sequence may be the same as the sequence of the integer ring, for example, if the integer ring is organized clockwise, traversal may be performed along the integer ring with the first integer value as a starting point, and the integer value corresponding to the virtual node with the smallest distance from the starting point is taken as the second integer value.
Wherein the second integer value may be an integer value corresponding to the target virtual node.
Step 206, determining a target virtual node corresponding to the second integer value according to the corresponding relationship between each integer value and the virtual node.
After the correspondence relationship between each integer value and the virtual node is determined, the virtual node corresponding to the second integer value may be set as the target virtual node.
And step 207, sending the task to be calculated to the edge node to which the target virtual node belongs.
It should be noted that, reference may be made to the foregoing embodiments for specific implementation of step 207, which is not described herein again.
In the embodiment of the disclosure, a task to be currently calculated and parameter information corresponding to the task to be calculated are first obtained, then a first integer value corresponding to the task to be calculated is determined according to the parameter information, then current virtual nodes are determined according to current available edge nodes, then the virtual nodes are uniformly mapped into a preset integer ring to determine a corresponding relationship between each integer value and each virtual node, then the integer ring is traversed along a preset sequence with the first integer value as a starting point to determine a second integer value with the smallest distance from the starting point, then a target virtual node corresponding to the second integer value is determined according to the corresponding relationship between each integer value and each virtual node, and finally the task to be calculated is sent to the edge node to which the target virtual node belongs. Therefore, after the integer value corresponding to the task to be calculated is determined, the corresponding position of the integer value and the integer ring can be determined, and the corresponding target virtual node can be further determined. Because the integer ring can be divided by a plurality of virtual nodes corresponding to the current available edge nodes, tasks can be relatively and uniformly distributed to different nodes, and the load of each node is relatively balanced, so that the overall performance utilization rate of the edge node cluster is ensured.
In order to implement the above embodiments, the present disclosure further provides a task scheduling device based on edge computation.
Fig. 3 is a schematic structural diagram of a task scheduling device based on edge computation according to an embodiment of the present disclosure.
As shown in fig. 3, the task scheduler 300 based on edge calculation includes: an obtaining module 310, a first determining module 320, a second determining module 330, and a sending module 340.
An obtaining module 310, configured to obtain a current task to be computed and parameter information corresponding to the task to be computed;
a first determining module 320, configured to determine, according to the parameter information, a first integer value corresponding to the task to be calculated;
a second determining module 330, configured to determine, according to a correspondence between each integer value on a preset integer ring and a virtual node, a target virtual node corresponding to the first integer value;
a sending module 340, configured to send the task to be computed to the edge node to which the target virtual node belongs.
Optionally, the second determining module includes:
a first determining unit, configured to determine each current virtual node according to a current available edge node;
and a second determining unit, configured to map the virtual nodes uniformly into a preset integer ring, so as to determine a corresponding relationship between each integer value and a virtual node.
Optionally, the second determining unit includes:
the first determining subunit is configured to uniformly divide a preset integer ring according to the number of the virtual nodes, so as to determine an integer value corresponding to each division point;
and the second determining subunit is configured to associate the number corresponding to each virtual node with each integer value one by one, so as to determine a corresponding relationship between each integer value and a virtual node.
Optionally, the second determining subunit is further configured to:
and determining the number of each virtual node according to the preset number of the available edge nodes and the number of the virtual nodes corresponding to each available edge node, wherein the numbers of the available edge nodes corresponding to the virtual nodes with adjacent numbers are different.
Optionally, the first determining module is specifically configured to:
and performing hash operation on the corresponding end device address parameter, the port parameter, the request timestamp parameter and the task data parameter to determine the first integer value.
Optionally, the second determining module is specifically configured to:
traversing the integer ring by taking the first integer value as a starting point along a preset sequence to determine a second integer value with the minimum distance from the starting point;
and determining a target virtual node corresponding to the second integer value according to the corresponding relation between each integer value and the virtual node.
In the embodiment of the disclosure, a task to be currently calculated and parameter information corresponding to the task to be calculated are first obtained, then a first integer value corresponding to the task to be calculated is determined according to the parameter information, then a target virtual node corresponding to the first integer value is determined according to a corresponding relationship between each integer value and a virtual node on a preset integer ring, and finally the task to be calculated is sent to an edge node to which the target virtual node belongs. Therefore, the virtual nodes are uniformly distributed on the preset integer ring, so that the load of each node is relatively balanced, the corresponding hash value is calculated according to the parameters of the current task, the task can correspond to the integer value in the integer ring, and then the node for processing the task is found out.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 4 shows a schematic block diagram of an example electronic device 400 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 4, the apparatus 400 includes a computing unit 401 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)402 or a computer program loaded from a storage unit 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
A number of components in device 400 are connected to I/O interface 405, including: an input unit 406 such as a keyboard, a mouse, or the like; an output unit 407 such as various types of displays, speakers, and the like; a storage unit 408 such as a magnetic disk, optical disk, or the like; and a communication unit 409 such as a network card, modem, wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Computing unit 401 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 401 executes the respective methods and processes described above, such as a task scheduling method based on edge calculation. For example, in some embodiments, the edge-computing-based task scheduling method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 400 via the ROM 402 and/or the communication unit 409. When the computer program is loaded into RAM 403 and executed by computing unit 401, one or more steps of the above described edge computing based task scheduling method may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the edge-computation-based task scheduling method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
In the embodiment of the disclosure, a task to be currently calculated and parameter information corresponding to the task to be calculated are first obtained, then a first integer value corresponding to the task to be calculated is determined according to the parameter information, then a target virtual node corresponding to the first integer value is determined according to a corresponding relationship between each integer value and a virtual node on a preset integer ring, and finally the task to be calculated is sent to an edge node to which the target virtual node belongs. Therefore, the virtual nodes are uniformly distributed on the preset integer ring, so that the load of each node is relatively balanced, the corresponding hash value is calculated according to the parameters of the current task, the task can correspond to the integer value in the integer ring, and then the node for processing the task is found out.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (10)

1. A task scheduling method based on edge computing is characterized by comprising the following steps:
acquiring a current task to be calculated and parameter information corresponding to the task to be calculated;
determining a first integer value corresponding to the task to be calculated according to the parameter information;
determining a target virtual node corresponding to the first integer value according to the corresponding relation between each integer value and a virtual node on a preset integer ring;
and sending the task to be calculated to the edge node to which the target virtual node belongs.
2. The method according to claim 1, wherein before determining the target virtual node corresponding to the first integer value according to the correspondence between each integer value and the virtual node on the preset integer ring, the method further comprises:
determining each current virtual node according to the current available edge node;
and uniformly mapping each virtual node into a preset integer ring to determine the corresponding relation between each integer value and the virtual node.
3. The method according to claim 2, wherein the uniformly mapping each virtual node into a preset integer ring to determine a correspondence relationship between each integer value and a virtual node comprises:
uniformly dividing a preset integer ring according to the number of the virtual nodes to determine an integer value corresponding to each division point;
and associating the number corresponding to each virtual node with each integer value one by one to determine the corresponding relation between each integer value and the virtual node.
4. The method according to claim 3, further comprising, before said associating a number corresponding to each virtual node with each of said integer values, one-to-one:
and determining the number of each virtual node according to the preset number of the available edge nodes and the number of the virtual nodes corresponding to each available edge node, wherein the numbers of the available edge nodes corresponding to the virtual nodes with adjacent numbers are different.
5. The method according to claim 1, wherein the determining, according to the parameter information, a first integer value corresponding to the task to be calculated, includes:
and performing hash operation on the corresponding end device address parameter, the port parameter, the request timestamp parameter and the task data parameter to determine the first integer value.
6. The method according to claim 1, wherein the determining a target virtual node corresponding to the first integer value according to a correspondence between each integer value on a preset integer ring and a virtual node includes:
traversing the integer ring by taking the first integer value as a starting point along a preset sequence to determine a second integer value with the minimum distance from the starting point;
and determining a target virtual node corresponding to the second integer value according to the corresponding relation between each integer value and the virtual node.
7. An edge computing-based task scheduler, comprising:
the system comprises an acquisition module, a calculation module and a calculation module, wherein the acquisition module is used for acquiring a current task to be calculated and parameter information corresponding to the task to be calculated;
a first determining module, configured to determine, according to the parameter information, a first integer value corresponding to the task to be calculated;
a second determining module, configured to determine, according to a correspondence between each integer value on a preset integer ring and a virtual node, a target virtual node corresponding to the first integer value;
and the sending module is used for sending the task to be calculated to the edge node to which the target virtual node belongs.
8. The apparatus of claim 7, wherein the second determining module comprises:
a first determining unit, configured to determine each current virtual node according to a current available edge node;
and a second determining unit, configured to map the virtual nodes uniformly into a preset integer ring, so as to determine a corresponding relationship between each integer value and a virtual node.
9. The apparatus of claim 8, wherein the second determining unit comprises:
the first determining subunit is configured to uniformly divide a preset integer ring according to the number of the virtual nodes, so as to determine an integer value corresponding to each division point;
and the second determining subunit is configured to associate the number corresponding to each virtual node with each integer value one by one, so as to determine a corresponding relationship between each integer value and a virtual node.
10. The apparatus of claim 9, wherein the second determining subunit is further configured to:
and determining the number of each virtual node according to the preset number of the available edge nodes and the number of the virtual nodes corresponding to each available edge node, wherein the numbers of the available edge nodes corresponding to the virtual nodes with adjacent numbers are different.
CN202110949593.6A 2021-08-18 2021-08-18 Task scheduling method, device and equipment based on edge calculation and storage medium Pending CN113778645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110949593.6A CN113778645A (en) 2021-08-18 2021-08-18 Task scheduling method, device and equipment based on edge calculation and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110949593.6A CN113778645A (en) 2021-08-18 2021-08-18 Task scheduling method, device and equipment based on edge calculation and storage medium

Publications (1)

Publication Number Publication Date
CN113778645A true CN113778645A (en) 2021-12-10

Family

ID=78838086

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110949593.6A Pending CN113778645A (en) 2021-08-18 2021-08-18 Task scheduling method, device and equipment based on edge calculation and storage medium

Country Status (1)

Country Link
CN (1) CN113778645A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115878331A (en) * 2023-02-09 2023-03-31 苏州浪潮智能科技有限公司 Data distribution method, device, equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106559448A (en) * 2015-09-28 2017-04-05 北京国双科技有限公司 Server load balancing method and apparatus
CN110688523A (en) * 2019-09-29 2020-01-14 深圳市网心科技有限公司 Video service providing method, device, electronic device and storage medium
CN111225059A (en) * 2020-01-10 2020-06-02 中移(杭州)信息技术有限公司 Network request resource scheduling method and device, electronic equipment and storage medium
CN111245924A (en) * 2020-01-08 2020-06-05 北京松果电子有限公司 Load balancing method and device and computer storage medium
CN112948120A (en) * 2021-03-18 2021-06-11 广东好太太智能家居有限公司 Load balancing method, system, device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106559448A (en) * 2015-09-28 2017-04-05 北京国双科技有限公司 Server load balancing method and apparatus
CN110688523A (en) * 2019-09-29 2020-01-14 深圳市网心科技有限公司 Video service providing method, device, electronic device and storage medium
CN111245924A (en) * 2020-01-08 2020-06-05 北京松果电子有限公司 Load balancing method and device and computer storage medium
CN111225059A (en) * 2020-01-10 2020-06-02 中移(杭州)信息技术有限公司 Network request resource scheduling method and device, electronic equipment and storage medium
CN112948120A (en) * 2021-03-18 2021-06-11 广东好太太智能家居有限公司 Load balancing method, system, device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115878331A (en) * 2023-02-09 2023-03-31 苏州浪潮智能科技有限公司 Data distribution method, device, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN113537508A (en) Federal calculation processing method and device, electronic equipment and storage medium
CN111880914A (en) Resource scheduling method, resource scheduling apparatus, electronic device, and storage medium
CN112559632B (en) State synchronization method and device of distributed graph database, electronic equipment and medium
CN111694646A (en) Resource scheduling method and device, electronic equipment and computer readable storage medium
CN112866391A (en) Message pushing method and device, electronic equipment and storage medium
CN113556394A (en) Cloud product network usage processing method, device, equipment, storage medium and product
CN114461407B (en) Data processing method, data processing device, distribution server, data processing system, and storage medium
CN113312560B (en) Group detection method and device and electronic equipment
CN118394513A (en) Method, device, system, equipment and storage medium for scheduling computing power network resources
CN115567602A (en) CDN node back-to-source method, device and computer readable storage medium
CN112817992B (en) Method, device, electronic device and readable storage medium for performing modification tasks
EP4060496A2 (en) Method, apparatus, device and storage medium for running inference service platform
CN116707786A (en) Method, device and equipment for elastic scaling load of server cipher machine
CN114500326B (en) Abnormality detection method, device, electronic device and storage medium
CN113778645A (en) Task scheduling method, device and equipment based on edge calculation and storage medium
CN113344074B (en) Model training method, device, equipment and storage medium
CN114090247A (en) Method, apparatus, device and storage medium for processing data
JP7289381B2 (en) Methods and devices for acquiring information, electronic devices, storage media, and computer programs
CN115577958A (en) Risk processing method, device, equipment and storage medium
CN114143196B (en) Instance configuration updating method, device, equipment, storage medium and program product
CN113641688A (en) Node updating method, related device and computer program product
CN118233430B (en) Subnet allocation method, device, equipment and storage medium
CN111901254A (en) Full-node bandwidth allocation method, apparatus, electronic device and storage medium
CN116112441B (en) Service request current limiting method, device, electronic equipment and storage medium
CN115033823B (en) Method, apparatus, device, medium, and article for processing data

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: 20211210