WO2023077791A1 - Service processing method, system and apparatus - Google Patents

Service processing method, system and apparatus Download PDF

Info

Publication number
WO2023077791A1
WO2023077791A1 PCT/CN2022/096569 CN2022096569W WO2023077791A1 WO 2023077791 A1 WO2023077791 A1 WO 2023077791A1 CN 2022096569 W CN2022096569 W CN 2022096569W WO 2023077791 A1 WO2023077791 A1 WO 2023077791A1
Authority
WO
WIPO (PCT)
Prior art keywords
computing
computing device
blockchain
node
resources
Prior art date
Application number
PCT/CN2022/096569
Other languages
French (fr)
Chinese (zh)
Inventor
葛建壮
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023077791A1 publication Critical patent/WO2023077791A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the technical field of the Internet, and in particular to a method, system and device for business processing.
  • Cloud computing uses centralized large-capacity cluster devices to centrally process massive amounts of information, and all computing processes are centrally processed in the cloud to facilitate data collection and sharing, giving rise to a series of big data applications.
  • cloud computing has almost unlimited computing power, in order to use the computing power of cloud computing, a lot of communication costs need to be borne, which inevitably causes delays.
  • the centralized processing method inevitably determines that the user's data needs to be uploaded to the cloud for processing, which makes it difficult to reduce the delay.
  • edge computing architecture is proposed to solve the problem of large delay in cloud computing. Specifically, edge computing processes tasks that require high latency near the user end, and puts services that can only be calculated on the cloud computing platform on edge devices.
  • edge devices Compared with cloud computing devices, the limited computing power of edge devices is the biggest bottleneck. When encountering bursty traffic, the edge device cannot meet business needs due to insufficient local computing power. If the computing power of the edge device is deployed according to the traffic peak, the cost of the edge device will be high.
  • the present application provides a method, system and device for business processing, which improve the efficiency of mutual borrowing of computing power between devices in different device clusters.
  • the present application provides a task processing method, including: a first computing device receives multiple task requests through an objective function (function) in a serverless system.
  • the multiple task requests belong to the same type of task, that is, the multiple tasks need to be processed by calling the same target function.
  • the embodiment of the present application does not limit the type of the task request, for example, it may be a target detection task, a classification task, a semantic segmentation task, and the like.
  • the first computing device sends the objective function to the second computing device, and the second computing device and the first computing device belong to different device clusters.
  • a device cluster described in the embodiment of the present application means that all devices included in the device cluster provide external services in a unified manner.
  • the first computing device When the first computing device obtains that its free computing resources are not sufficient, the first computing device processes the first part of the task request in the first computing device through the target function, and forwards the second part of the task request to the second computing device, indicating that it has The second computing device with idle computing resources processes the second part of task requests through the received target function, and the multiple task requests include the first part of task requests and the second part of task requests.
  • the first computing device receives the processing result of the second part of the task request sent by the second computing device.
  • the multiple task requests can be executed by the target function.
  • the second computing device After the second computing device provides the target funciton to the second computing device, the second computing device has the ability to process any task request in the plurality of task requests, so that the A second computing device may offload work from the first computing device.
  • the first computing device only needs to send the target function (and task request) to the second computing device, without sending the complete task processing program to the second computing device, so it is the same as the entire Compared with the task processing program provided to the second computing device, the amount of data sent by the first aspect of the present invention is small, and the bandwidth occupation is not large.
  • serverless systems are deployed in different device clusters. Due to the serverless system, business developers only need to pay attention to business logic, that is, only need to pay attention to related functions required for business execution, without considering server management, operating system management, resource allocation, expansion and other items. Therefore, after the serverless system is deployed in different device clusters, devices in different device clusters can transfer related functions to each other, and the devices that have obtained the related functions can execute the tasks corresponding to the related functions.
  • the serverless system is deployed in all device clusters. Devices in one device cluster can send related functions to devices in another device cluster to instruct the devices in the other device cluster to share business request.
  • virtual resource image migration between devices is required to realize computing power borrowing between cross-device clusters.
  • the solution provided in the first aspect only needs to transfer computing power between devices. Sub/functions can realize the borrowing of computing power between cross-device clusters, which will greatly reduce the time required to borrow computing power between devices, so as to achieve the purpose of efficiently realizing cross-device cluster borrowing of computing power.
  • the method further includes: the first computing device acquires reference information of at least one device.
  • the first computing device determines the second computing device according to the acquired reference information of at least one device, and the acquisition of the reference information of the second computing device satisfies a preset requirement.
  • one or more optimal devices can be selected from different device clusters as the device for borrowing computing power, so as to better realize the borrowing of computing power across device clusters. Purpose.
  • the reference information of the at least one device includes idle computing resources of each device in the at least one device.
  • devices with sufficient idle computing power resources can be selected as borrowing computing power, so as to improve the efficiency of borrowing computing power across device clusters.
  • the reference information of the at least one device further includes delay information between each of the at least one device and the first computing device.
  • the delay information between devices can be further considered to improve the efficiency of borrowing computing power across device clusters.
  • the reference information of the at least one device further includes each device in the at least one device, and the number of devices separated by the first computing device in the topology where the first computing device is located.
  • the length of the transmission path between devices can be further considered to improve the efficiency of borrowing computing power across device clusters.
  • the method further includes: the first computing device acquires reference information of at least one device from the first blockchain device, and each of the at least one device and the first computing device The devices belong to different device clusters, where the reference information of the third device is written by the third device to the second block chain device, so that the reference information of the third device can be synchronized to the second block chain device through the second block chain device.
  • the first blockchain device is any block in the blockchain maintained by the second blockchain device
  • the third device is any one device in the at least one device.
  • the block chain can also be introduced to realize the collection of measurement information across cluster devices, where the measurement information can include idle computing resources, delay information, bandwidth, etc.
  • the method further includes: establishing a communication link between the first computing device and the second computing device.
  • Sending the objective function to the second computing device by the first computing device includes: sending the objective function to the second computing device by the first computing device through a communication link.
  • the method further includes: if the first computing device obtains sufficient idle computing resources, the first computing device stops forwarding the second part of the task request to the second computing device through the serverless system. The first computing device disconnects the communication link after a specified period of time. In this implementation, if the first computing device obtains sufficient idle computing resources, the first computing device may no longer route traffic to the second computing device, that is, the first computing device may stop sending traffic to the second computing device through the serverless system.
  • the second computing device forwards the partial task request.
  • the first computing device does not immediately disconnect the communication link when it obtains sufficient idle computing resources, but After a long time, the communication link is disconnected.
  • the sending of the objective function from the first computing device to the second computing device includes: if the first computing device obtains that its own idle computing power resources are not sufficient, the first computing device sends the target function to the second computing device The two computing devices send the objective function.
  • the first computing device when it obtains insufficient free computing power resources, it can send the objective function to the second computing device without sending it in advance, which is conducive to the accurate realization of cross-device cluster borrowing of computing power Purpose.
  • the present application provides a task processing system, the system includes a first computing device cluster and a second computing device cluster, the first computing device cluster has multiple computing devices including the first computing device, the first The computing device cluster has multiple computing devices including the second computing device, and is used for: receiving multiple task requests through the target function function in the serverless system.
  • the objective function is sent to a second computing device that belongs to a different device cluster than the first computing device. If it is obtained that the idle computing resources of the first computing device are insufficient, the first part of the task request is processed in the first computing device through the serverless system, and the second part of the task request is forwarded to the second computing device. Including the first part of the task request and the second part of the task request.
  • the second computing device is configured to: process the second part of task requests through the received objective function. The processing result of the second part of the task request is sent to the first computing device.
  • the first computing device is further configured to: acquire reference information of at least one device.
  • the second computing device is determined according to the acquired reference information of at least one device, and the acquisition of the reference information of the second computing device satisfies a preset requirement.
  • the reference information of the at least one device includes idle computing resources of each device in the at least one device.
  • the reference information of the at least one device further includes delay information between each of the at least one device and the first computing device.
  • the reference information of the at least one device further includes each device in the at least one device, and the number of devices separated by the first computing device in the topology where the first computing device is located.
  • the system further includes the first blockchain device and the second blockchain device, and the first computing device is also used to: obtain at least The reference information of a device, each of the at least one device and the first computing device belong to different device clusters, wherein the reference information of the third device is written by the third device to the second block chain device, so that Synchronize the reference information of the third device to other blockchain devices except the second blockchain device in the blockchain maintained by the second blockchain device through the second blockchain device, the first blockchain The device is any blockchain device in the blockchain maintained by the second blockchain device, and the third device is any device in at least one device.
  • the first computing device is further configured to: establish a communication link with the second computing device.
  • the first computing device is specifically configured to: send the objective function to the second computing device through a communication link.
  • the first computing device is further configured to: stop forwarding the second part of the task request to the second computing device through the serverless system if it is obtained that the first computing device has sufficient idle computing resources. After a specified amount of time, disconnect the communication link.
  • the first computing device is specifically configured to: if the acquired free computing resources of the first computing device are insufficient, the first computing device sends the target function.
  • the present application provides a device for task processing, including: a transceiver module configured to: receive multiple task requests through an objective function function in a serverless system.
  • the objective function is sent to a second computing device that belongs to a different device cluster than the first computing device.
  • the processing module is configured to process the first part of the task request in the first computing device through the serverless system if it is obtained that the free computing resources of the first computing device are insufficient, and instruct the transceiver module to forward the second part to the second computing device
  • a task request is used to instruct the second computing device to process the second part of the task requests through the received objective function, and the multiple task requests include the first part of the task requests and the second part of the task requests.
  • the transceiver module is further configured to receive the processing result of the second part of the task request sent by the second computing device.
  • reference information of at least one device is acquired.
  • the processing module is further configured to: determine a second computing device according to the obtained reference information of at least one device, and the acquisition of the reference information of the second computing device meets a preset requirement.
  • the reference information of the at least one device includes idle computing resources of each device in the at least one device.
  • the reference information of the at least one device further includes delay information between each of the at least one device and the first computing device.
  • the reference information of the at least one device further includes each device in the at least one device, and the number of devices separated by the first computing device in the topology where the first computing device is located.
  • the transceiver module is further configured to: obtain reference information of at least one device from the first blockchain device, and each device in the at least one device and the first computing device belong to Different device clusters, where the reference information of the third device is written by the third device to the second block chain device, so that the reference information of the third device can be synchronized to the second block through the second block chain device
  • the first blockchain device is any blockchain device in the blockchain maintained by the second blockchain device
  • the third device is any one of the at least one device.
  • the processing module is further configured to: establish a communication link with the second computing device.
  • the transceiver module is specifically configured to: send the target function to the second computing device through the communication link.
  • the processing module is further configured to: stop forwarding the second part of the task request to the second computing device through the serverless system if it is obtained that the first computing device has sufficient free computing resources. After a specified amount of time, disconnect the communication link.
  • the transceiver module is specifically configured to: if the first computing device obtains that its free computing resources are not sufficient, the first computing device sends the objective function to the second computing device.
  • the present application provides a device for task processing, including: a memory configured to store computer-readable instructions. It also includes a processor coupled to the memory, configured to execute computer-readable instructions in the memory so as to execute the method as described in the first aspect or any possible implementation manner of the first aspect.
  • the present application provides a computer-readable storage medium, including instructions.
  • the instructions When the instructions are run on a computer device, the computer device executes the above-mentioned first aspect or any possible implementation manner of the first aspect. Methods.
  • the present application provides a chip, the chip is coupled with a memory, and is used to execute a program stored in the memory, so as to execute the method described in the first aspect or any possible implementation manner of the first aspect.
  • the embodiments of the present application provide a computer program product including computer programs/instructions, which, when executed by a processor, cause the processor to execute the first aspect or any optional implementation manner in the first aspect method in .
  • the beneficial effects brought by the second aspect to the seventh aspect and each possible implementation manner of the second aspect to the seventh aspect can refer to the first aspect and the advantages brought by each possible implementation manner of the first aspect Beneficial effects are understood, and will not be repeated here.
  • FIG. 1 is a schematic structural diagram of a system provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of a serverless application scenario
  • FIG. 3 is a schematic flow diagram of a business processing method provided in an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another business processing method provided by the embodiment of the present application.
  • FIG. 5 is a schematic flowchart of another business processing method provided by the embodiment of the present application.
  • FIG. 6 is a schematic flowchart of another business processing method provided by the embodiment of the present application.
  • FIG. 7 is a schematic flowchart of another business processing method provided by the embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a system provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a service processing device provided by an embodiment of the present application.
  • Fig. 10 is a schematic structural diagram of another service processing device provided by the embodiment of the present application.
  • FIG. 1 it is a schematic structural diagram of a system 100 provided by an embodiment of the present application.
  • the system 100 includes multiple device clusters.
  • Each device cluster may include one or more devices.
  • m device clusters are shown in FIG. 1, and each device cluster includes n devices, where m is a positive integer greater than 1, and n is a positive integer.
  • each device cluster shown in Figure 1 includes n devices. It should be noted that the embodiment of the present application does not limit the number of devices included in each device cluster. Any two device clusters include The number of devices may be the same or different.
  • a device cluster described in the embodiment of the present application means that all devices included in the device cluster provide external services in a unified manner.
  • a device cluster has an independent computing power system, and any two different device clusters have different computing power systems.
  • a device cluster is usually powered by the same power supply system, and in addition, all devices in a device cluster are usually deployed at the same geographical location.
  • a device cluster is usually managed by a unified management platform. Taking the management platform included in a device cluster and the multiple devices managed by the management platform as an example, the communication between the management platform and the multiple devices managed by the management platform The relationship is explained.
  • the management platform can send control instructions to one or more devices in the device cluster where the management platform is located to control the devices in the device cluster;
  • a device sends configuration resource information to configure the one or more devices; for another example, the management platform can receive the data sent by the one or more devices and process it based on the data sent by the one or more devices to obtain processing result.
  • the management platform can be deployed on the cloud.
  • the management platform is sometimes referred to as a management device, and the devices managed by the management device are referred to as managed devices.
  • One or more devices in the device cluster may include at least one of various types of sensing devices, base stations, access points, switches, routers, gateways, terminals, audio and video devices, controllers, detection devices, and other types of networked devices.
  • configurations may be performed for each managed device, for example, configuration of its computing capability, networking mode, work authority, and so on.
  • the managed device has complete data collection, processing, calculation, and control capabilities.
  • the managed device may be deployed on a terminal.
  • the managed device may be an edge device or an edge scene end device.
  • the managed device is an edge device
  • the edge device is mostly a lightweight device with limited computing power
  • the computing power of the managed device is deployed according to the peak traffic of the managed device, the cost of the managed device will be greatly increased.
  • the embodiment of the present application provides a solution that uses a serverless service architecture.
  • the borrowing device transmits a related function to the borrowed device to obtain
  • the borrowed device that has completed the relevant functions can share the traffic of the borrowed device, so as to achieve the purpose of quickly borrowing computing power between devices across the device cluster.
  • serverless Since this application involves a lot of concepts related to serverless, in order to better understand the solutions provided by the embodiments of this application, serverless is introduced below.
  • the serverless architecture is a new type of Internet architecture, in which application development does not use conventional service processes, which provides a new architecture for applications in edge computing scenarios.
  • the serverless architecture can shield tenants' servers, databases, middleware and other server facilities, and tenants no longer participate in the deployment and maintenance of server facilities, which can greatly simplify tenant deployment and operation and maintenance difficulty.
  • a serverless architecture allows application deployment to be managed at the service deployment level rather than the server deployment level.
  • the serverless architecture enables business R&D personnel to only focus on business logic without considering O&M and capacity, improving the efficiency of business iteration.
  • the serverless service architecture outsources server management, operating system management, resource allocation, capacity expansion, etc., and the services are provided by a third party and triggered by events.
  • Serverless can automatically expand computing power and capacity when the business volume is large to carry more user requests, and shrink resources when the business volume drops to avoid resource waste.
  • This mechanism is serverless.
  • Elastic scaling mechanism When there is a business application, the serverless architecture transfers relevant resources to start running, and after the running is completed, all overhead is offloaded.
  • the serverless architecture allows developers to focus on products without managing and operating cloud or local servers, without having to consider server specifications, storage types, network bandwidth, automatic scaling, etc., and without operating and maintaining servers.
  • the virtualized resources created by the server during service deployment can exist in the form of virtual machines.
  • the virtualized resources are sometimes referred to as containers.
  • the corresponding request value and limit value will be set, where the request value represents the minimum resource requirement used by the container, and the limit value represents the maximum value of the resource that the container can use.
  • the resources here may include resources of multiple dimensions, for example, central processing unit (central processing unit, CPU) resources, network card resources, memory resources, and the like.
  • FIG. 2 is a schematic diagram of an application scenario provided by the embodiment of the present application. As shown in FIG. 2 , it includes a server 10 that can create multiple virtual resources and allocate corresponding resources to each virtual resource.
  • the server 10 has created two virtual resources, which are respectively the first virtual resource 11 and the second virtual resource 12.
  • the first The virtual resource 11 and the second virtual resource 12 perform resource allocation.
  • the server 10 creates the first virtual resource 11 and the second virtual resource 12
  • corresponding parameters will also be set for the first virtual resource 11 and the second virtual resource 12
  • the parameters include the minimum resource requirements used by the virtual resources, namely
  • the request value also includes the maximum value of resources that can be used by the virtual resource, that is, the limit value.
  • the request value and the limit value of different virtual resources may be different, and the request value can be used as a judgment dependence of resource allocation during virtual resource scheduling.
  • the server may allocate initial resources to each virtual resource according to the request value of the virtual resource, and these resources may include CPU, memory, network card, and the like.
  • the device on which the virtual resources are deployed can receive service requests, and then use the allocated resources to process these service requests. For example, in FIG. 2, a service request is sent to the first virtual resource 11, and the first virtual resource 11 can process the service indicated by the service request according to the allocated resources; The allocated resource can process the service indicated by the service request, and so on.
  • Services may include online services and offline services, where online services are services that need to be processed in a timely manner, and offline services are services that do not need to be processed immediately, which is not limited in this embodiment of the present application.
  • the first resource device and the second virtual resource may be deployed on different devices, for example, as shown in FIG. 2 , the first virtual resource is deployed on device A, and the second virtual resource is deployed on device B.
  • the service request may be directly sent to device A or device B.
  • the client may also send a request to the virtual resource, which is not limited in this embodiment of the present application.
  • the virtual resource which is not limited in this embodiment of the present application.
  • this application sometimes also refers to the server described in Figure 2 as a central node, or a management device, and they represent the same meaning.
  • the solution provided by the embodiment of this application utilizes the serverless architecture. Since the serverless architecture is currently deployed inside a device cluster, as shown in Figure 2, within a device cluster, the serverless architecture has an elastic expansion and contraction mechanism. Each operator needs to borrow computing power from each other.
  • This application finds that the serverless architecture can be used to support the ability to transfer operators/functions between devices, and quickly achieve the purpose of cross-device clusters borrowing computing power from each other. Specifically, when a device obtains an operator/function sent by another device, it can use the operator/function to perform the corresponding task, thereby achieving the purpose of borrowing computing power between devices.
  • a device uses A operator to execute For business A
  • device B can also execute business A after acquiring the operator A, then the business A of device A can also be transferred to device B for execution, thereby achieving the purpose of device A borrowing the computing power of device B.
  • virtual resources need to be mirrored and migrated between devices to realize computing power borrowing between cross-device clusters.
  • the solution provided by the embodiment of this application only needs to transmit only Operators/functions can realize computing power borrowing between cross-device clusters, which will greatly reduce the time required to borrow computing power between devices.
  • the solution provided by the embodiment of the present application allows all the devices in one or more clusters to send their computing power, network information and other information related to computing power borrowing to the blockchain.
  • any suitable device can be selected to borrow computing power according to the information recorded in the blockchain.
  • the solution provided by the embodiment of the present application can more efficiently implement cross-cluster devices to borrow computing power from each other, and broaden the application scenarios of computing power borrowing.
  • a data processing method provided by an embodiment of the present application is applied to a serverless system, wherein the serverless system includes multiple computing nodes and blockchain nodes. Specifically, the steps performed by each node are introduced in conjunction with FIG. 3 below:
  • the first computing node writes the idle computing resource of the first computing node to the blockchain node.
  • the computing node described in the embodiment of the present application is used to represent a node with data processing capability, which is sometimes referred to as a device, a virtual machine, a device to be managed, a node, or a site in this application.
  • the computing power of a node is used to represent the computing power of the node.
  • the computing power resource is the resource that the node needs to occupy when performing computing tasks.
  • it can include hardware resources or network resources.
  • it can include the central processing unit (central processing unit) , CPU) computing power resources, graphics processing unit (graphics processing unit, GPU) computing power resources, memory resources, network bandwidth resources, disk resources, etc.
  • Idle computing power resources refer to resources that are not currently occupied by nodes.
  • one or more types of computing power resources may be pre-specified, so that the first computing node acquires idle computing power resources of the type of computing power resources according to the pre-specified types of computing power resources.
  • the computing power resources that need to be written include the idle computing power resources of the CPU and the idle computing power resources of the GPU, then the first computing node only writes the idle computing power of the CPU of the first computing node to the blockchain node Resources and idle computing power resources of GPU do not need to write all idle computing power resources.
  • the first computing node can periodically write the idle computing power resources of the first computing node to the blockchain node, for example, write the first calculation node to the blockchain node every preset time A computing node's current idle computing resources.
  • the first computing node may also respond to the instruction, and based on the instruction, write the current idle computing resources of the first computing node to the blockchain node.
  • the first computing node may respond to the instruction written by the blockchain node, and based on the instruction, write the current idle computing resources of the first computing node to the blockchain node.
  • the first computing node may also respond to instructions written by other nodes, and based on the instruction, write the current idle computing resources of the first computing node to the blockchain node.
  • the first computing node writes the current idle computing resources of the first computing node to the blockchain node in response to the command written by the central node, which is not limited in this embodiment of the present application.
  • a statistical module is deployed on the first computing node, which is used to count the idle computing power resources of the first computing node, and write the idle computing power resources of the first computing node to the blockchain node.
  • the first computing node may be a central node, and the first computing node may also be other nodes managed by the central node.
  • the central node when the first computing node is a central node, the central node can also uniformly obtain the idle computing power resources of other nodes managed by the central node, and the central node can write the central node to the blockchain node.
  • the first computing node is a block chain node, and the first computing node locally writes the idle computing resources of the first computing node. It should be noted that any type of node described in this application can be a blockchain node, which will not be repeated below.
  • the blockchain node After acquiring the idle computing resource of the first computing node, the blockchain node stores the address of the first computing node and the idle computing resource of the first computing node. In a possible implementation, the blockchain node may obtain the address of the first computing node in advance, then after the blockchain node obtains the address of the first computing node, the address of the first computing node and the address of the second computing node are established. A corresponding relationship between idle computing power resources of a computing node.
  • a blockchain is made up of a growing series of records called blocks. These blocks are linked together through cryptography, and each block contains the hash value, timestamp, and transaction data of the previous block.
  • the blockchain is essentially a distributed multi-backup database, but the biggest difference from the database is that the data storage is formed through multi-party consensus, and the hash chain is used to protect the historical data, so that the data cannot be tampered with. Compared with traditional database technology, the immutable feature of blockchain data is easier to gain the trust of users, so it can better support multi-party cooperation.
  • the blockchain nodes described in the embodiments of this application can be regarded as a block. When new data is written in a block, the new data can be synchronized to the block according to the distributed database nature of the blockchain. other blocks in the chain. In a possible implementation manner, the new data may also be synchronized to each computing node in the serverless system.
  • the first computing node acquires delay information between the first computing node and the target node.
  • the target node is any computing node except the first computing node in the serverless system where the first computing node is located.
  • the first computing node may regularly perform network delay detection to obtain the network delay between the first computing node and the target node. It should be noted that the embodiment of the present application does not limit which network delay detection method is used, any network delay detection method can be adopted in the embodiment of the present application. It should be noted that the first computing node may also periodically perform network delay detection.
  • the first computing node may obtain at least one target node's Internet protocol (internet protocol address, IP) address locally, and based on the at least one IP address, obtain the first computing node and each IP address Calculate the time delay between corresponding nodes to obtain at least one detection result, each detection result indicates a network transmission delay between the first calculation node and a target node.
  • IP Internet protocol address
  • the first computing node may obtain the IP address of at least one target node from the central node, and based on the at least one IP address, obtain the connection between the first computing node and the computing node corresponding to each IP address. Delay, to obtain at least one detection result, each detection result indicates a network transmission delay between the first computing node and a target node.
  • the first computing node can obtain at least one IP address of the target node from the blockchain node, and based on the at least one IP address, obtain the first computing node and the computing node corresponding to each IP address The time delay between them is used to obtain at least one detection result, each detection result indicates a network transmission delay between the first computing node and a target node.
  • the first computing node writes the acquired delay information to the blockchain node.
  • the blockchain node After the blockchain node obtains the delay information between the first computing node and at least one target node, it can synchronize to other nodes in the blockchain. In a possible implementation, after the blockchain node obtains the delay information between the first computing node and at least one target node, it can also synchronize to each computing node in the serverless system.
  • the first computing node mentioned in step 301 and step 302 writes to the blockchain node the idle computing resources of the first computing node, the delay information obtained by the first computing node, the first computing node
  • the first computing node can also write other types of information to the blockchain node.
  • the first computing node can also write to the blockchain node the topology of the serverless system obtained by the first computing node; in a possible implementation, the first computing node can also write to the blockchain node
  • the blockchain node writes various network information such as the network bandwidth obtained by the first computing node.
  • the prediction results of the neural network model can be written to the blockchain nodes.
  • the prediction result indicates computing power resource information such as predicted idle computing resources of the first computing node at a certain time period/point, delay information obtained by the first computing node, and the like.
  • the prediction result indicating the predicted idle computing resources of the first computing node at a certain time period/point as an example
  • the idle computing resources of the first computing node at a historical time period/point can be used as the neural network model
  • the training data is to iteratively train the neural network model, so that the trained neural network model can predict the idle computing resources of the first computing node at a certain time period/point.
  • the first computing node receives the service access request.
  • the type of service access request is not limited.
  • the task may be a face recognition task, an object detection task, a classification task, and the like.
  • the idle computing resource of the first computing node is sufficient, and the first computing node is capable of executing the business independently, then the first computing node does not need to borrow computing power resources of other computing nodes, then the first Compute nodes process the task request locally.
  • the idle computing resources of the first computing node are not sufficient, and the first computing node is unable to complete the business by itself, then the first computing node needs to borrow the computing resources of other nodes, and it needs to execute Step 305, which will be described in detail in step 305.
  • the service access request triggers a serverless trigger deployed by the first computing node.
  • the serverless trigger is triggered, the first computing node starts a function (function) for executing the service, such as starting function1, If the idle computing power of the first computing node is sufficient, the first computing node will successfully start the function1 and execute the task based on the function1.
  • the first computing node borrows idle computing power resources of the second computing node to process the service access request.
  • the first computing node needs to borrow computing resources of other nodes.
  • a threshold may be set, and if the idle computing resource of the first computing node is lower than the threshold, it is considered that the idle computing resource of the first computing node is insufficient.
  • the first computing node cannot successfully start a function corresponding to a certain task, it is considered that the idle computing resources of the first computing node are insufficient.
  • the first computing node fails to execute a certain task multiple times, it is considered that the idle computing resources of the first computing node are not sufficient.
  • the first computing node may borrow computing power resources from other nodes to process the service access request received by the first computing node.
  • the first computing node may select one or more computing nodes from multiple computing nodes in the serverless system to borrow computing power resources.
  • one or more suitable computing nodes can be selected to borrow computing power resources based on relevant information such as idle computing power resources and delay information of each node stored in the blockchain node.
  • the first computing node sends a function corresponding to a certain service to other computing nodes, and the computing node that obtains the function corresponding to the service can process the service.
  • the following describes how the first computing node borrows computing power resources of other nodes in conjunction with a possible implementation manner.
  • the serverless management module calls the interface of the optimal node selection module.
  • the serverless management module may be responsible for managing, scheduling and orchestrating various functions of the first computing node, and at the same time responsible for transferring functions between different nodes.
  • the serverless management module is deployed on the first computing node, and in a possible implementation manner, the serverless management module may also be deployed on other nodes.
  • the optimal node selection module obtains one or more suitable second computing nodes.
  • the optimal node selection module selects one or more suitable second computing nodes according to the relevant information such as idle computing power resources and delay information of each node stored in the blockchain nodes and according to predetermined rules.
  • the priority of different types of related information can be defined. For example, if the priority of idle computing resources is set to be the highest, followed by delay information and bandwidth, the optimal node selection module will The node with the highest idle computing resources is preferentially selected as the second computing node.
  • the rules can be customized according to the requirements of actual application scenarios, such as setting the preferred 5G computing nodes or nodes with GPUs.
  • the weights of different types of related information can be defined. For example, if the weight of idle computing resources is set to 0.5, the weight of delay information to 0.3, and the weight of bandwidth to 0.2, the optimal node The selection module will give priority to the node with the highest weight obtained as the second computing node.
  • the optimal node selection module may be deployed on the first computing node, or may be deployed on other nodes.
  • the cross-node network management module establishes a communication network between the first computing node and at least one second computing node.
  • any method of establishing a communication network between nodes may be used to establish a communication network between the first computing node and each second computing node.
  • the communication network may be an overlay communication network or an underlay communication network.
  • the underlay is the network of the basic forwarding architecture of the current data center network. As long as any two points on the data center network are reachable, it refers to the physical base layer.
  • the overlay communication network refers to a virtualization technology mode superimposed on the network architecture. Its general framework is to realize the bearer of the application on the network without large-scale modification of the basic network, and can be separated from other network services. And mainly based on IP-based network technology.
  • the serverless management module transmits the function to be transmitted from the first computing node to the second computing node.
  • the serverless management module transmits the function to be transmitted from the first computing node to the at least one second computing node through the communication network established by the cross-node network management module.
  • the function to be transmitted is a function corresponding to the service that the first computing node requests to share.
  • the function corresponding to the A service is the A function.
  • the service to be shared and processed by the first computing node is the A service, and the function to be transmitted is the A function.
  • the second computing node executes the service initiated to the first computing node by using the obtained function.
  • the first computing node can route part of the local access traffic to the second computing node, and the second computing node executes the initiated business.
  • it may further include (6) when it is obtained that the idle computing resources of the first computing node are sufficient, the first computing node processes the service initiated to the first computing node.
  • the first computing node if the first computing node obtains that it has sufficient idle computing power resources to process the business initiated by the first computing node, the first computing node does not need to borrow the computing power of the second computing node resource.
  • the first computing node may stop routing traffic to the second computing node.
  • the communication network between the first computing node and the second computing node may be disconnected after a specified period of time.
  • the first computing node may also stop routing service traffic to the one or more second computing nodes in batches.
  • the second computing node includes three, which can be divided into three time points. At the first time point, stop routing service traffic to a second computing node, and stop routing service traffic to a second computing node at the second time point. Two computing nodes, stop routing business traffic to two second computing nodes at this time, stop routing business traffic to one second computing node at the third time point, and stop routing business traffic to three second computing nodes at this time .
  • FIG. 4 it is a schematic flowchart of a task processing method provided by the embodiment of the present application.
  • the first node and the second node shown in FIG. 4 belong to different device clusters.
  • FIG. 4 describes a specific first node The process of borrowing computing power from the second node.
  • Both the first node and the second node include a real-time statistics module of local idle computing power resources.
  • the local real-time statistics module periodically writes the available idle computing power of the local CPU/GPU/memory into the blockchain, and uses the distributed database nature of the blockchain to synchronize the available idle computing power of the CPU/GPU/memory to all
  • the edge nodes for example, in the solution shown in FIG. 4 , the edge nodes include a first node and a second node.
  • Both the first node and the second node may also include a network detection module.
  • the network detection module is responsible for real-time detection of the network access delay between each node and the node recorded in the blockchain module, as well as the health of the network connection between nodes, and at the same time writes the network connection bandwidth parameters of the local network and other networks.
  • the network detection module regularly performs network delay detection according to the network information of all nodes in the blockchain (such as the IP address of each node), and writes the detection results, network bandwidth, network topology and other parameters into the blockchain.
  • the distributed database nature of the block chain synchronizes the detection results obtained by the network detection module to all edge nodes.
  • Edge-side services access services on edge nodes.
  • the type of service access request is not limited.
  • the task may be a face recognition task, an object detection task, a classification task, and the like.
  • the service access request triggers the serverless trigger. If no function indicated by the service request is running, start the corresponding function at the edge site, such as the first node. As shown in Figure 4, start functionA-1 and functionA -2, Execute both functionA-1 and functionA-2 to process the service received in step 3.
  • the currently activated function cannot meet the computing power requirements, and the creation of a new function fails due to insufficient resources.
  • Both the first node and the second node may further include a network detection module.
  • the serverless management module is responsible for managing, scheduling, and orchestrating operators, and is also responsible for synchronizing operators between nodes. If the currently activated function cannot meet the computing power requirement, the serverless management module calls the interface of the optimal node selection module to obtain the optimal node.
  • the optimal node selection module is responsible for providing an interface to serverless and providing optimal site information for serverless cross-node scheduling.
  • the optimal node selection module selects the corresponding optimal node according to the optimal node selection algorithm according to the available computing power, network delay, bandwidth, network topology and other parameters recorded in the blockchain, and the optimal node selection algorithm can be Customized by the user, refer to the above optimal node selection module to select one or more suitable nodes based on the relevant information such as idle computing power resources and delay information of each node stored in the blockchain node and according to the pre-specified rules.
  • the second computing node is understood, and will not be repeated here.
  • the serverless management module After the optimal node selection module selects the optimal node (for example, the second node is selected), the serverless management module notifies the cross-node network management module to establish a cross-node transmission network.
  • the cross-node network management module establishes a communication network (overlay or underlay) between the first node and the second node, and configures a route between the local and remote target sites.
  • the serverless management module of the first node will synchronize operators that require flexibility (or operators that need to be transmitted) to the second node through the established network, and use the serverless management on the second node
  • the module starts the function, for example, continue to illustrate on the basis of step 4, and run functionA-3 on the second node.
  • the serverless management module deployed on the first node detects a decrease in business traffic, it can stop routing business traffic to the remote second site through the cross-node routing module, and after a specified period, refer to step 11 to notify the second node to stop running FunctionA-3, and notify the cross-node network management module to release the network connection.
  • FIG. 5 it is a schematic flowchart of another task processing method provided by the embodiment of the present application, which may include the following steps:
  • a first computing device receives multiple task requests through an objective function function in a serverless system.
  • the multiple task requests belong to the same type of task, that is, the multiple tasks need to be processed by calling the same target function.
  • the embodiment of the present application does not limit the type of the task request, for example, it may be a target detection task, a classification task, a semantic segmentation task, and the like.
  • the first computing device sends the objective function to the second computing device.
  • the second computing device and the first computing device belong to different device clusters.
  • the task request indicates the target function that needs to be called to execute the task request, and the first computing device sends the target function indicated in the task request to the second computing device.
  • the first computing device obtains that its free computing resources are not sufficient, process the first part of the task request on the first device through the target function, and forward the second part of the task request to the second computing device.
  • the multiple task requests include a first part of task requests and a second part of task requests.
  • the first computing device chooses to perform load sharing, processing part of the task requests locally on the first computing device, and sharing part of the task requests to the second computing device for processing. Satisfy the processing requirements of the multiple task requests.
  • the second computing device processes the second part of task requests by using the received target function.
  • the serverless system is deployed in the cluster where the second computing device is located, and the second computing device can process the second part of task requests for the received objective function based on the serverless system.
  • the first computing device receives a processing result of the second part of the task request sent by the second computing device.
  • different device clusters deploy serverless systems.
  • the device can transmit related functions (objective functions) to devices in other device clusters.
  • the device receiving the correlation function can share the task request of the device with sufficient computing power resources based on the correlation function.
  • the first computing device acquires reference information of at least one device; the first computing device determines a second computing device according to the acquired reference information of at least one device, and the acquisition of the reference information of the second computing device satisfies the predetermined set demand.
  • the reference information of at least one device includes idle computing resources of each device in the at least one device.
  • the preset requirements can be customized. For example, it can be set that the idle computing power resources exceed the threshold and the preset requirements are considered to be met.
  • the reference information of the at least one device further includes delay information between each device in the at least one device and the first computing device.
  • the reference information of the at least one device further includes each device in the at least one device, and the number of devices separated by the first computing device in the topology where the first computing device is located.
  • the blockchain can also be introduced to realize the collection of metric information across cluster nodes, where the metric information can include idle computing resources, delay information, bandwidth, and so on.
  • FIG. 6 it is a schematic flowchart of another task processing method provided by the embodiment of the present application, which may include the following steps:
  • the first computing device receives multiple task requests through an objective function function in a serverless system.
  • the first computing device acquires reference information of at least one device from the first blockchain device.
  • Each of the at least one device and the first computing device belong to different device clusters, wherein the reference information of the third device is written by the third device into the second block chain device to pass the second block chain
  • the device synchronizes the reference information of the third device to other blockchain devices except the second blockchain device in the blockchain maintained by the second blockchain device.
  • the first blockchain device is the second block Any one of the blockchain devices in the blockchain maintained by the chain device
  • the third device is any one of at least one device.
  • the first computing device sends the objective function to the second computing device.
  • the acquisition of reference information by the second computing device satisfies a preset requirement.
  • the first computing device obtains that its free computing resources are not sufficient, process the first part of the task request on the first device through the target function, and forward the second part of the task request to the second computing device.
  • the second computing device processes the second part of task requests by using the received objective function.
  • the first computing device receives a processing result of the second part of the task request sent by the second computing device.
  • Step 601 , step 603 to step 606 can be understood with reference to step 501 , step 502 to step 505 in the embodiment corresponding to FIG. 5 , and will not be repeated here.
  • FIG. 7 it is a schematic flowchart of another task processing method provided by the embodiment of the present application, which may include the following steps:
  • the first computing device receives multiple task requests through an objective function function in a serverless system.
  • the first computing device acquires reference information of at least one device from the first blockchain device.
  • the first computing device establishes a communication link with the second computing device.
  • the communication network between the first computing device and the second computing device may be established by any means of establishing a communication network between devices.
  • the communication network may be an overlay communication network or an underlay communication network.
  • the first computing device sends the objective function to the second computing device through a communication link.
  • the first computing device obtains that its free computing resources are not sufficient, process the first part of the task request on the first device through the target function, and forward the second part of the task request to the second computing device.
  • the second computing device processes the second part of task requests by using the received objective function.
  • the first computing device receives a processing result of the second part of the task request sent by the second computing device.
  • the first computing device stops forwarding the second part of task requests to the second computing device through the serverless system.
  • the first computing device disconnects the communication link after a specified time period.
  • the first computing device may no longer route traffic to the second computing device, that is, the first computing device may stop sending traffic to the second computing device through the serverless system.
  • the second computing device forwards the partial task request.
  • the first computing device does not immediately disconnect the communication link when it obtains sufficient idle computing resources, but After a long time, the communication link is disconnected.
  • FIG. 8 it is a schematic diagram of an architecture of a service processing system provided by an embodiment of the present application.
  • the system provided by the embodiment of the present application is applicable to marginalized scenarios.
  • most edge nodes are lightweight nodes with limited computing power. When encountering sudden traffic, due to insufficient local computing power, business needs cannot be met. If the computing power is deployed according to the peak value, the cost of edge nodes will be high , and at this time, the central node and adjacent nodes on the edge still have spare computing power. At this time, the computing power resources of the adjacent edge nodes or central nodes are quickly borrowed to meet the sudden traffic demand.
  • the operator can be quickly synchronized to the target node, and the target node can quickly respond to business needs in milliseconds.
  • the borrowing is automatically released according to the monitoring measurement information computing power.
  • the foregoing has introduced in detail the flow of the business processing method and the business processing system provided by this application. Based on the flow of the foregoing business processing method, the business processing device provided by this application will be introduced below.
  • the business processing device can be used to execute the aforementioned Method steps in 3-7.
  • FIG. 9 it is a schematic structural diagram of a service processing device provided by the present application.
  • the service processing device includes a transceiver module 901 and a processing module 902 .
  • the service processing device is the first computing node or the second computing node in Fig. 3-7, and may also be a block chain node/device, the first computing device or the second computing device.
  • the transceiving module 901 can be used to perform 302, 304, 305 and other steps related to transceiving in the embodiment corresponding to FIG. 3 , and optionally, can also be used to perform the implementation corresponding to FIG. 3 Steps 302 and 303 in the example.
  • the processing module 902 is configured to execute step 302 in the embodiment corresponding to FIG. 3 and other processing-related steps.
  • the transceiving module 901 can be used to execute steps 501, 502, 503, 504, 505 and other steps related to sending and receiving in the embodiment corresponding to FIG. Step 503 in the embodiment and other processing-related steps.
  • the transceiving module 901 can be used to execute steps 601, 602, 603, 604, 605, 606 and other steps related to sending and receiving in the embodiment corresponding to FIG. 6 corresponds to step 604 in the embodiment and other processing-related steps.
  • the transceiving module 901 can be used to execute steps 701, 702, 703, 704, 705, 706, 707 and other steps related to transceiving in the embodiment corresponding to FIG. Steps 705, 708, 709 and other processing-related steps in the embodiment corresponding to FIG. 6 are executed.
  • the embodiment of the present application also provides a service processing device, please refer to FIG. 10 , which is a schematic structural diagram of the service processing device provided in the embodiment of the present application.
  • the business processing device 1800 can be deployed with the business processing device described in the embodiment corresponding to FIG. 9, which is used to implement the first computing node or the second computing node in the embodiments corresponding to FIG. 3 to FIG. 7, and may also be a blockchain node. /device, a function of the first computing device or the second computing device.
  • the business processing device 1800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units CPU1822 (for example, one or more processors) and memory 1832, and one or more storage applications A storage medium 1830 for programs 1842 or data 1844 (such as one or more mass storage devices).
  • CPU1822 for example, one or more processors
  • memory 1832 for example, one or more RAM
  • storage applications A storage medium 1830 for programs 1842 or data 1844 (such as one or more mass storage devices).
  • the memory 1832 and the storage medium 1830 may be temporary storage or persistent storage.
  • the memory 1832 is a random access memory (random access memory, RAM), which can directly exchange data with the central processing unit 1822 for loading data 1844 and application programs 1842 and/or operating system 1841 for the central processing unit 1822 runs and uses directly, usually as a temporary data storage medium for operating systems or other running programs.
  • the program stored in the storage medium 1830 may include one or more modules (not shown in FIG. 10 ), and each module may include a series of instruction operations on the business processing device.
  • the central processing unit 1822 may be configured to communicate with the storage medium 1830 , and execute a series of instruction operations in the storage medium 1830 on the service processing device 1800 .
  • the storage medium 1830 stores program instructions and data corresponding to the method steps shown in any one of the foregoing embodiments shown in FIG. 3 to FIG. 7 .
  • the service processing device 1800 may also include one or more power sources 1826, one or more wired or wireless network interfaces 1850, one or more input and output interfaces 1858, and/or, one or more operating systems 1841, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • the embodiment of the present application also provides a business processing device.
  • the business processing device can also be called a digital processing chip or a chip.
  • the chip includes a processing unit and a communication interface.
  • the processing unit can obtain program instructions through the communication interface, and the program instructions are processed by the processing unit.
  • the processing unit is configured to execute the method steps performed by the service processing device shown in any one of the embodiments in FIG. 3 to FIG. 7 .
  • the embodiment of the present application also provides a digital processing chip.
  • the digital processing chip integrates circuits and one or more interfaces for realizing the above processor 1801 or the functions of the processor 1801 .
  • the digital processing chip can complete the method steps in any one or more of the foregoing embodiments.
  • no memory is integrated in the digital processing chip, it can be connected to an external memory through a communication interface.
  • the digital processing chip realizes the first computing node or the second computing node in the above embodiment according to the program code stored in the external memory, and may also be a blockchain node/device, and the first computing device or the second computing device executes Actions.
  • the service processing device when the service processing device provided in the embodiment of the present application is a chip, the chip specifically includes: a processing unit and a communication unit, the processing unit may be, for example, a processor, and the communication unit may be, for example, an input/output interface , pins or circuits, etc.
  • the processing unit can execute the computer-executable instructions stored in the storage unit, so that the chip in the server executes the service processing method described in the embodiments shown in FIGS. 3-7 .
  • the aforementioned storage unit may be a storage unit in the chip, such as a register, a cache, etc., and the storage unit may also be a storage unit located outside the chip in the wireless access device, such as a read-only Memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, random access memory RAM, etc.
  • ROM read-only Memory
  • static storage devices that can store static information and instructions, random access memory RAM, etc.
  • the aforementioned processing unit or processor may be a central processing unit, a network processing unit (neural-network processing unit, NPU), a graphics processing unit (graphics processing unit, GPU), a digital signal processor (digital signal processor, DSP) ), application specific integrated circuit (ASIC) or field programmable logic gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor or any conventional processor or the like.
  • the processor mentioned above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the program execution of the above-mentioned methods in FIGS. 3 to 7 .
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a program, and when it runs on the computer, the computer executes the above-mentioned embodiment as described in Fig. 3 to Fig. 7 steps in the method.
  • the embodiment of the present application also provides a computer program product, which, when running on a computer, causes the computer to execute the first computing node or the second computing node in the method described in the embodiments shown in FIGS. 3 to 7 , and also May be steps performed by blockchain nodes/devices, first computing device or second computing device.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be A physical unit can be located in one place, or it can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • the connection relationship between the modules indicates that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
  • This application can be implemented by means of software plus necessary general-purpose hardware, and of course it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, and dedicated components.
  • dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, and dedicated components.
  • all functions completed by computer programs can be easily realized by corresponding hardware, and the specific hardware structure used to realize the same function can also be varied, such as analog circuits, digital circuits or special-purpose circuit etc.
  • software program implementation is a better implementation mode in most cases.
  • the essence of the technical solution of this application or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, such as a floppy disk of a computer , U disk, mobile hard disk, read-only memory ROM, random access memory RAM, magnetic disk or optical disk, etc., including several instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute the application methods described in the various examples.
  • a readable storage medium such as a floppy disk of a computer , U disk, mobile hard disk, read-only memory ROM, random access memory RAM, magnetic disk or optical disk, etc.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server, or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • wired eg, coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless eg, infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that can be stored by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

A task processing method, system and apparatus, improving the efficiency of mutually borrowing computing power by devices in different device clusters. The method comprises: a first computing device receives a plurality of task requests by means of a target function in a serverless system; the first computing device sends the target function to a second computing device, the second computing device and the first computing device belonging to different device clusters; when the first computing device obtains that its own idle computing power resource is insufficient, the first computing device processes a first part of task requests in the first computing device by means of the target function, and forwards a second part of task requests to the second computing device, so as to instruct the second computing device having an idle computing power resource to process the second part of task requests by means of the received target function, the plurality of task requests comprising the first part of task requests and the second part of task requests; and the first computing device receives a processing result of the second part of task requests sent by the second computing device.

Description

一种业务处理的方法、系统以及装置Method, system and device for business processing
本申请要求于2021年11月02日提交中国专利局、申请号为202111290138.6、发明名称为“一种业务处理的方法、系统以及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111290138.6 and the title of the invention "a method, system and device for business processing" submitted to the China Patent Office on November 02, 2021, the entire contents of which are incorporated herein by reference In this application.
技术领域technical field
本申请涉及互联网技术领域,具体涉及一种业务处理的方法、系统以及装置。The present application relates to the technical field of the Internet, and in particular to a method, system and device for business processing.
背景技术Background technique
传统云计算利用集中式大容量的集群的设备集中处理海量的信息,所有的计算过程都在云端集中处理,方便数据的收集与共享,催生出一系列的大数据应用。云计算虽然有着近乎无限的运算能力,但是为了运用云计算的算力,需要承担许多的通讯成本,不可避免的造成了延迟。集中式处理的方式必然决定了用户的数据需要上传至云端再进行处理,导致延迟很难降低。Traditional cloud computing uses centralized large-capacity cluster devices to centrally process massive amounts of information, and all computing processes are centrally processed in the cloud to facilitate data collection and sharing, giving rise to a series of big data applications. Although cloud computing has almost unlimited computing power, in order to use the computing power of cloud computing, a lot of communication costs need to be borne, which inevitably causes delays. The centralized processing method inevitably determines that the user's data needs to be uploaded to the cloud for processing, which makes it difficult to reduce the delay.
边缘计算架构就是为了解决云计算延迟大的问题而提出的。具体说来,边缘计算在近用户端处理那些对延迟要求高的任务,将原本只能在云计算平台运算的服务放到了边缘设备中。The edge computing architecture is proposed to solve the problem of large delay in cloud computing. Specifically, edge computing processes tasks that require high latency near the user end, and puts services that can only be calculated on the cloud computing platform on edge devices.
但是,边缘设备相对于云计算设备来说,有限的计算能力是其最大的瓶颈。当遇到突发流量时,由于本地算力不足,导致边缘设备无法满足业务需求,如果按照流量峰值部署边缘设备的算力,则会导致边缘设备成本高昂。However, compared with cloud computing devices, the limited computing power of edge devices is the biggest bottleneck. When encountering bursty traffic, the edge device cannot meet business needs due to insufficient local computing power. If the computing power of the edge device is deployed according to the traffic peak, the cost of the edge device will be high.
发明内容Contents of the invention
本申请提供一种业务处理的方法、系统以及装置,提升不同设备集群中的设备之间互相借用算力的效率。The present application provides a method, system and device for business processing, which improve the efficiency of mutual borrowing of computing power between devices in different device clusters.
第一方面,本申请提供一种任务处理的方法,包括:第一计算设备通过无服务器serverless系统中的目标函数(function)接收多个任务请求。该多个任务请求属于同一类型的任务,即该多个任务需要调用相同的目标函数来处理。本申请实施例对任务请求的类型并不进行限定,示例性的,可能是目标检测任务、分类任务、语义分割任务等等。第一计算设备向第二计算设备发送目标函数,第二计算设备和第一计算设备属于不同的设备集群。本申请实施例中描述的一个设备集群是指该一个设备集群中包括的全部设备统一对外提供服务。当第一计算设备获取到自身空闲算力资源不充足,则第一计算设备通过目标function在第一计算设备中处理第一部分任务请求,并且向第二计算设备转发第二部分任务请求,指示拥有空闲算力资源的第二计算设备通过接收到的目标function处理第二部分任务请求,多个任务请求中包括第一部分任务请求和第二部分任务请求。第一计算设备接收第二计算设备发送的第二部分任务请求的处理结果。In a first aspect, the present application provides a task processing method, including: a first computing device receives multiple task requests through an objective function (function) in a serverless system. The multiple task requests belong to the same type of task, that is, the multiple tasks need to be processed by calling the same target function. The embodiment of the present application does not limit the type of the task request, for example, it may be a target detection task, a classification task, a semantic segmentation task, and the like. The first computing device sends the objective function to the second computing device, and the second computing device and the first computing device belong to different device clusters. A device cluster described in the embodiment of the present application means that all devices included in the device cluster provide external services in a unified manner. When the first computing device obtains that its free computing resources are not sufficient, the first computing device processes the first part of the task request in the first computing device through the target function, and forwards the second part of the task request to the second computing device, indicating that it has The second computing device with idle computing resources processes the second part of task requests through the received target function, and the multiple task requests include the first part of task requests and the second part of task requests. The first computing device receives the processing result of the second part of the task request sent by the second computing device.
其中,所述多个任务请求可以由所述目标function执行。当所述第二计算设备把这个目标funciton提供给所述第二计算设备之后,就使得所述第二计算设备拥有了处理所述多个任务请求中任一任务请求的能力,从而使得所述第二计算设备可以分担所述第一计算设 备的工作。此外,所述第一计算设备仅需要发送目标function(以及任务请求)给所述第二计算设备即可,而不需要把完整的任务处理程序发送给所述第二计算设备,因此和把整个任务处理程序提供给第二计算设备相比,本发明第一方面发送的数据量小,对带宽占用不大。Wherein, the multiple task requests can be executed by the target function. After the second computing device provides the target funciton to the second computing device, the second computing device has the ability to process any task request in the plurality of task requests, so that the A second computing device may offload work from the first computing device. In addition, the first computing device only needs to send the target function (and task request) to the second computing device, without sending the complete task processing program to the second computing device, so it is the same as the entire Compared with the task processing program provided to the second computing device, the amount of data sent by the first aspect of the present invention is small, and the bandwidth occupation is not large.
通常跨集群借用算力需要采用手工配置的方式,或者需要执行虚拟资源的镜像迁移操作等,导致跨集群借用算力需要消耗大量时长,业务切换不及时。由第一方面可知,本申请提供的方案,在不同设备集群中均部署serverless系统。由于serverless系统使得业务研发人员只需要关注业务逻辑,即只需要关注业务执行所需的相关函数,而无需考虑服务器管理、操作系统管理、资源分配、扩容等项目。所以,在不同设备集群中均部署serverless系统后,不同设备集群中的设备可以互相传递相关函数,获取了相关函数的设备,就可以执行相关函数对应的任务。通过这种方式,即使不同的设备集群的算力系统不同,也不需要再采用手工配置的方式,或者需要执行虚拟资源的镜像迁移操作等方式来实现跨设备集群借用算力,只需要在不同设备集群中均部署serverless系统,一个设备集群内的设备,可以向另一个设备集群内的设备发送相关函数,就可以指示该另一个设备集群的的设备分担对该一个设备集群内的设备发起的业务请求。相比于传统的跨设备集群算力借用方案,设备之间需要进行虚拟资源的镜像迁移,才能实现跨设备集群之间的算力借用,第一方面提供的方案只需要设备之间只传输算子/函数,就可以实现跨设备集群之间的算力借用,将大大降低设备之间借用算力所需时长,以达到高效实现跨设备集群借用算力的目的。Usually, cross-cluster borrowing of computing power needs to be manually configured, or virtual resource image migration operations need to be performed, etc., resulting in a large amount of time for cross-cluster borrowing of computing power and untimely business switching. It can be known from the first aspect that in the solution provided by this application, serverless systems are deployed in different device clusters. Due to the serverless system, business developers only need to pay attention to business logic, that is, only need to pay attention to related functions required for business execution, without considering server management, operating system management, resource allocation, expansion and other items. Therefore, after the serverless system is deployed in different device clusters, devices in different device clusters can transfer related functions to each other, and the devices that have obtained the related functions can execute the tasks corresponding to the related functions. In this way, even if the computing power systems of different device clusters are different, there is no need to use manual configuration, or perform mirror migration operations of virtual resources to achieve cross-device cluster borrowing of computing power. The serverless system is deployed in all device clusters. Devices in one device cluster can send related functions to devices in another device cluster to instruct the devices in the other device cluster to share business request. Compared with the traditional cross-device cluster computing power borrowing scheme, virtual resource image migration between devices is required to realize computing power borrowing between cross-device clusters. The solution provided in the first aspect only needs to transfer computing power between devices. Sub/functions can realize the borrowing of computing power between cross-device clusters, which will greatly reduce the time required to borrow computing power between devices, so as to achieve the purpose of efficiently realizing cross-device cluster borrowing of computing power.
在第一方面的一种可能的实施方式中,该方法还包括:第一计算设备获取至少一个设备的参考信息。第一计算设备根据获取到的至少一个设备的参考信息确定第二计算设备,第二计算设备的参考信息获取满足预设需求。在这种实施方式中,还可以基于设备的参考信息,从不同的设备集群中选择一个或者多个最佳的设备来作为借用算力的设备,以更好的实现跨设备集群借用算力的目的。In a possible implementation manner of the first aspect, the method further includes: the first computing device acquires reference information of at least one device. The first computing device determines the second computing device according to the acquired reference information of at least one device, and the acquisition of the reference information of the second computing device satisfies a preset requirement. In this embodiment, based on the reference information of the device, one or more optimal devices can be selected from different device clusters as the device for borrowing computing power, so as to better realize the borrowing of computing power across device clusters. Purpose.
在第一方面的一种可能的实施方式中,至少一个设备的参考信息包括至少一个设备中的每个设备的空闲算力资源。在这种实施方式中,可以优选空闲算力资源比较充足的设备来作为借用算力,以提升跨设备集群借用算力的效率。In a possible implementation manner of the first aspect, the reference information of the at least one device includes idle computing resources of each device in the at least one device. In this embodiment, devices with sufficient idle computing power resources can be selected as borrowing computing power, so as to improve the efficiency of borrowing computing power across device clusters.
在第一方面的一种可能的实施方式中,至少一个设备的参考信息还包括至少一个设备中的每个设备和第一计算设备之间的时延信息。在这种实施方式中,还可以进一步的考虑设备之间的时延信息,以提升跨设备集群借用算力的效率。In a possible implementation manner of the first aspect, the reference information of the at least one device further includes delay information between each of the at least one device and the first computing device. In this embodiment, the delay information between devices can be further considered to improve the efficiency of borrowing computing power across device clusters.
在第一方面的一种可能的实施方式中,至少一个设备的参考信息还包括至少一个设备中的每个设备,和第一计算设备在第一计算设备所在的拓扑结构中间隔的设备数目。在这种实施方式中,还可以进一步的考虑设备之间传输路径的长度,以提升跨设备集群借用算力的效率。In a possible implementation manner of the first aspect, the reference information of the at least one device further includes each device in the at least one device, and the number of devices separated by the first computing device in the topology where the first computing device is located. In this embodiment, the length of the transmission path between devices can be further considered to improve the efficiency of borrowing computing power across device clusters.
在第一方面的一种可能的实施方式中,该方法还包括:第一计算设备从第一区块链设备中获取至少一个设备的参考信息,至少一个设备中的每个设备和第一计算设备属于不同的设备集群,其中,第三设备的参考信息是第三设备向第二区块链设备中写入的,以通过第二区块链设备将第三设备的参考信息同步到第二区块链设备维护的区块链中除第二区块 链设备之外的其他区块链设备中,第一区块链设备是第二区块链设备维护的区块链中任意一个区块链设备,第三设备是至少一个设备中的任意一个设备。在这种实施方式中,还可以引入区块链,实现跨集群设备间的度量信息的收集,其中,度量信息可以包括空闲算力资源、时延信息、带宽等。In a possible implementation manner of the first aspect, the method further includes: the first computing device acquires reference information of at least one device from the first blockchain device, and each of the at least one device and the first computing device The devices belong to different device clusters, where the reference information of the third device is written by the third device to the second block chain device, so that the reference information of the third device can be synchronized to the second block chain device through the second block chain device. Among other blockchain devices in the blockchain maintained by the blockchain device except the second blockchain device, the first blockchain device is any block in the blockchain maintained by the second blockchain device The chain device, the third device is any one device in the at least one device. In this embodiment, the block chain can also be introduced to realize the collection of measurement information across cluster devices, where the measurement information can include idle computing resources, delay information, bandwidth, etc.
在第一方面的一种可能的实施方式中,该方法还包括:第一计算设备建立和第二计算设备之间的通信链路。第一计算设备向第二计算设备发送目标函数,包括:第一计算设备通过通信链路向第二计算设备发送目标函数。该方法还包括:若第一计算设备获取到自身空闲算力资源充足,第一计算设备停止通过serverless系统向第二计算设备转发第二部分任务请求。第一计算设备在指定时长后,断开通信链路。在这种实施方式中,若第一计算设备获取到自身空闲算力资源充足,则第一计算设备可以不再将流量路由到第二计算设备,即第一计算设备可以停止通过serverless系统向第二计算设备转发部分任务请求。此外,为了保证第二计算设备已经处理的结果能够顺利传输至第一计算设备,第一计算设备在获取到自身空闲算力资源充足的情况下,不立即断开通信链路,而是在指定时长后再断开通信链路。In a possible implementation manner of the first aspect, the method further includes: establishing a communication link between the first computing device and the second computing device. Sending the objective function to the second computing device by the first computing device includes: sending the objective function to the second computing device by the first computing device through a communication link. The method further includes: if the first computing device obtains sufficient idle computing resources, the first computing device stops forwarding the second part of the task request to the second computing device through the serverless system. The first computing device disconnects the communication link after a specified period of time. In this implementation, if the first computing device obtains sufficient idle computing resources, the first computing device may no longer route traffic to the second computing device, that is, the first computing device may stop sending traffic to the second computing device through the serverless system. The second computing device forwards the partial task request. In addition, in order to ensure that the results processed by the second computing device can be smoothly transmitted to the first computing device, the first computing device does not immediately disconnect the communication link when it obtains sufficient idle computing resources, but After a long time, the communication link is disconnected.
在第一方面的一种可能的实施方式中,第一计算设备向第二计算设备发送目标函数,包括:若第一计算设备获取到自身空闲算力资源不充足,则第一计算设备向第二计算设备发送目标函数。在这种实施方式中,可以在第一计算设备获取到自身空闲算力资源不充足时,向第二计算设备发送目标函数,而不需要提前发送,有利于精准实现跨设备集群借用算力的目的。In a possible implementation manner of the first aspect, the sending of the objective function from the first computing device to the second computing device includes: if the first computing device obtains that its own idle computing power resources are not sufficient, the first computing device sends the target function to the second computing device The two computing devices send the objective function. In this embodiment, when the first computing device obtains insufficient free computing power resources, it can send the objective function to the second computing device without sending it in advance, which is conducive to the accurate realization of cross-device cluster borrowing of computing power Purpose.
第二方面,本申请提供一种任务处理的系统,系统中包括第一计算设备集群和第二计算设备集群,第一计算设备集群拥有包括第一计算设备在内的多个计算设备,第一计算设备集群拥有包括第二计算设备在内的多个计算设备,用于:通过无服务器serverless系统中的目标函数function接收多个任务请求。向第二计算设备发送目标函数,第二计算设备和第一计算设备属于不同的设备集群。若获取到第一计算设备自身空闲算力资源不充足,则通过serverless系统将第一部分任务请求在第一计算设备中处理,并且向第二计算设备转发第二部分任务请求,多个任务请求中包括第一部分任务请求和第二部分任务请求。第二计算设备,用于:通过接收到的目标函数处理第二部分任务请求。向第一计算设备发送第二部分任务请求的处理结果。In the second aspect, the present application provides a task processing system, the system includes a first computing device cluster and a second computing device cluster, the first computing device cluster has multiple computing devices including the first computing device, the first The computing device cluster has multiple computing devices including the second computing device, and is used for: receiving multiple task requests through the target function function in the serverless system. The objective function is sent to a second computing device that belongs to a different device cluster than the first computing device. If it is obtained that the idle computing resources of the first computing device are insufficient, the first part of the task request is processed in the first computing device through the serverless system, and the second part of the task request is forwarded to the second computing device. Including the first part of the task request and the second part of the task request. The second computing device is configured to: process the second part of task requests through the received objective function. The processing result of the second part of the task request is sent to the first computing device.
在第二方面的一种可能的实施方式中,第一计算设备,还用于:获取至少一个设备的参考信息。根据获取到的至少一个设备的参考信息确定第二计算设备,第二计算设备的参考信息获取满足预设需求。In a possible implementation manner of the second aspect, the first computing device is further configured to: acquire reference information of at least one device. The second computing device is determined according to the acquired reference information of at least one device, and the acquisition of the reference information of the second computing device satisfies a preset requirement.
在第二方面的一种可能的实施方式中,至少一个设备的参考信息包括至少一个设备中的每个设备的空闲算力资源。In a possible implementation manner of the second aspect, the reference information of the at least one device includes idle computing resources of each device in the at least one device.
在第二方面的一种可能的实施方式中,至少一个设备的参考信息还包括至少一个设备中的每个设备和第一计算设备之间的时延信息。In a possible implementation manner of the second aspect, the reference information of the at least one device further includes delay information between each of the at least one device and the first computing device.
在第二方面的一种可能的实施方式中,至少一个设备的参考信息还包括至少一个设备中的每个设备,和第一计算设备在第一计算设备所在的拓扑结构中间隔的设备数目。In a possible implementation manner of the second aspect, the reference information of the at least one device further includes each device in the at least one device, and the number of devices separated by the first computing device in the topology where the first computing device is located.
在第二方面的一种可能的实施方式中,系统中还包括第一区块链设备和第二区块链设 备,第一计算设备,还用于:从第一区块链设备中获取至少一个设备的参考信息,至少一个设备中的每个设备和第一计算设备属于不同的设备集群,其中,第三设备的参考信息是第三设备向第二区块链设备中写入的,以通过第二区块链设备将第三设备的参考信息同步到第二区块链设备维护的区块链中除第二区块链设备之外的其他区块链设备中,第一区块链设备是第二区块链设备维护的区块链中任意一个区块链设备,第三设备是至少一个设备中的任意一个设备。In a possible implementation of the second aspect, the system further includes the first blockchain device and the second blockchain device, and the first computing device is also used to: obtain at least The reference information of a device, each of the at least one device and the first computing device belong to different device clusters, wherein the reference information of the third device is written by the third device to the second block chain device, so that Synchronize the reference information of the third device to other blockchain devices except the second blockchain device in the blockchain maintained by the second blockchain device through the second blockchain device, the first blockchain The device is any blockchain device in the blockchain maintained by the second blockchain device, and the third device is any device in at least one device.
在第二方面的一种可能的实施方式中,第一计算设备,还用于:建立和第二计算设备之间的通信链路。第一计算设备,具体用于:通过通信链路向第二计算设备发送目标函数。第一计算设备,还用于:若获取到第一计算设备自身空闲算力资源充足,停止通过serverless系统向第二计算设备转发第二部分任务请求。在指定时长后,断开通信链路。In a possible implementation manner of the second aspect, the first computing device is further configured to: establish a communication link with the second computing device. The first computing device is specifically configured to: send the objective function to the second computing device through a communication link. The first computing device is further configured to: stop forwarding the second part of the task request to the second computing device through the serverless system if it is obtained that the first computing device has sufficient idle computing resources. After a specified amount of time, disconnect the communication link.
在第二方面的一种可能的实施方式中,第一计算设备,具体用于:若获取到第一计算设备的自身空闲算力资源不充足,则第一计算设备向第二计算设备发送目标函数。In a possible implementation manner of the second aspect, the first computing device is specifically configured to: if the acquired free computing resources of the first computing device are insufficient, the first computing device sends the target function.
第三方面,本申请提供一种任务处理的设备,包括:收发模块,用于:通过无服务器serverless系统中的目标函数function接收多个任务请求。向第二计算设备发送目标函数,第二计算设备和第一计算设备属于不同的设备集群。处理模块,用于若获取到第一计算设备自身空闲算力资源不充足,则通过serverless系统将第一部分任务请求在第一计算设备中处理,并且指示收发模块向第二计算设备转发第二部分任务请求,以指示第二计算设备通过接收到的目标函数处理第二部分任务请求,多个任务请求中包括第一部分任务请求和第二部分任务请求。收发模块,还用于接收第二计算设备发送的第二部分任务请求的处理结果。In a third aspect, the present application provides a device for task processing, including: a transceiver module configured to: receive multiple task requests through an objective function function in a serverless system. The objective function is sent to a second computing device that belongs to a different device cluster than the first computing device. The processing module is configured to process the first part of the task request in the first computing device through the serverless system if it is obtained that the free computing resources of the first computing device are insufficient, and instruct the transceiver module to forward the second part to the second computing device A task request is used to instruct the second computing device to process the second part of the task requests through the received objective function, and the multiple task requests include the first part of the task requests and the second part of the task requests. The transceiver module is further configured to receive the processing result of the second part of the task request sent by the second computing device.
在第三方面的一种可能的实施方式中,获取至少一个设备的参考信息。处理模块,还用于:根据获取到的至少一个设备的参考信息确定第二计算设备,第二计算设备的参考信息获取满足预设需求。In a possible implementation manner of the third aspect, reference information of at least one device is acquired. The processing module is further configured to: determine a second computing device according to the obtained reference information of at least one device, and the acquisition of the reference information of the second computing device meets a preset requirement.
在第三方面的一种可能的实施方式中,至少一个设备的参考信息包括至少一个设备中的每个设备的空闲算力资源。In a possible implementation manner of the third aspect, the reference information of the at least one device includes idle computing resources of each device in the at least one device.
在第三方面的一种可能的实施方式中,至少一个设备的参考信息还包括至少一个设备中的每个设备和第一计算设备之间的时延信息。In a possible implementation manner of the third aspect, the reference information of the at least one device further includes delay information between each of the at least one device and the first computing device.
在第三方面的一种可能的实施方式中,至少一个设备的参考信息还包括至少一个设备中的每个设备,和第一计算设备在第一计算设备所在的拓扑结构中间隔的设备数目。In a possible implementation manner of the third aspect, the reference information of the at least one device further includes each device in the at least one device, and the number of devices separated by the first computing device in the topology where the first computing device is located.
在第三方面的一种可能的实施方式中,收发模块,还用于:从第一区块链设备中获取至少一个设备的参考信息,至少一个设备中的每个设备和第一计算设备属于不同的设备集群,其中,第三设备的参考信息是第三设备向第二区块链设备中写入的,以通过第二区块链设备将第三设备的参考信息同步到第二区块链设备维护的区块链中除第二区块链设备之外的其他区块链设备中,第一区块链设备是第二区块链设备维护的区块链中任意一个区块链设备,第三设备是至少一个设备中的任意一个设备。In a possible implementation manner of the third aspect, the transceiver module is further configured to: obtain reference information of at least one device from the first blockchain device, and each device in the at least one device and the first computing device belong to Different device clusters, where the reference information of the third device is written by the third device to the second block chain device, so that the reference information of the third device can be synchronized to the second block through the second block chain device Among the blockchain devices other than the second blockchain device in the blockchain maintained by the chain device, the first blockchain device is any blockchain device in the blockchain maintained by the second blockchain device , the third device is any one of the at least one device.
在第三方面的一种可能的实施方式中,处理模块,还用于:建立和第二计算设备之间的通信链路。收发模块,具体用于:通过通信链路向第二计算设备发送目标函数。处理模块,还用于:若获取到第一计算设备自身空闲算力资源充足,停止通过serverless系统向 第二计算设备转发第二部分任务请求。在指定时长后,断开通信链路。In a possible implementation manner of the third aspect, the processing module is further configured to: establish a communication link with the second computing device. The transceiver module is specifically configured to: send the target function to the second computing device through the communication link. The processing module is further configured to: stop forwarding the second part of the task request to the second computing device through the serverless system if it is obtained that the first computing device has sufficient free computing resources. After a specified amount of time, disconnect the communication link.
在第三方面的一种可能的实施方式中,收发模块,具体用于:若第一计算设备获取到自身空闲算力资源不充足,则第一计算设备向第二计算设备发送目标函数。In a possible implementation manner of the third aspect, the transceiver module is specifically configured to: if the first computing device obtains that its free computing resources are not sufficient, the first computing device sends the objective function to the second computing device.
第四方面,本申请提供一种任务处理的设备,包括:存储器,用于存储计算机可读指令。还包括,与存储器耦合的处理器,用于执行存储器中的计算机可读指令从而执行如上述第一方面或第一方面任意一种可能的实施方式中所描述的方法。In a fourth aspect, the present application provides a device for task processing, including: a memory configured to store computer-readable instructions. It also includes a processor coupled to the memory, configured to execute computer-readable instructions in the memory so as to execute the method as described in the first aspect or any possible implementation manner of the first aspect.
第五方面,本申请提供一种计算机可读存储介质,包括指令,当指令在计算机装置上运行时,使得计算机装置执行如上述第一方面或第一方面任意一种可能的实施方式中所描述的方法。In a fifth aspect, the present application provides a computer-readable storage medium, including instructions. When the instructions are run on a computer device, the computer device executes the above-mentioned first aspect or any possible implementation manner of the first aspect. Methods.
第六方面,本申请提供一种芯片,芯片与存储器耦合,用于执行存储器中存储的程序,以执行如上述第一方面或第一方面任意一种可能的实施方式中所描述的方法。In a sixth aspect, the present application provides a chip, the chip is coupled with a memory, and is used to execute a program stored in the memory, so as to execute the method described in the first aspect or any possible implementation manner of the first aspect.
第七方面,本申请实施例提供了一种包含计算机程序/指令的计算机程序产品,当其被处理器执行时,使得处理器执行上述第一方面或第一方面中的任一可选实施方式中的方法。In the seventh aspect, the embodiments of the present application provide a computer program product including computer programs/instructions, which, when executed by a processor, cause the processor to execute the first aspect or any optional implementation manner in the first aspect method in .
其中,第二方面至第七方面以及第二方面至第七方面的各个可能的实施方式方式所带来的的有益效果,可以参照第一方面以及第一方面各个可能的实施方式所带来的有益效果进行理解,这里不再重复赘述。Among them, the beneficial effects brought by the second aspect to the seventh aspect and each possible implementation manner of the second aspect to the seventh aspect can refer to the first aspect and the advantages brought by each possible implementation manner of the first aspect Beneficial effects are understood, and will not be repeated here.
附图说明Description of drawings
图1为本申请实施例提供的一种系统的架构示意图;FIG. 1 is a schematic structural diagram of a system provided by an embodiment of the present application;
图2为serverless的应用场景的示意图;Figure 2 is a schematic diagram of a serverless application scenario;
图3为本申请实施例提供的一种业务处理方法的流程示意图;FIG. 3 is a schematic flow diagram of a business processing method provided in an embodiment of the present application;
图4为本申请实施例提供的另一种业务处理方法的流程示意图;FIG. 4 is a schematic flowchart of another business processing method provided by the embodiment of the present application;
图5为本申请实施例提供的另一种业务处理方法的流程示意图;FIG. 5 is a schematic flowchart of another business processing method provided by the embodiment of the present application;
图6为本申请实施例提供的另一种业务处理方法的流程示意图;FIG. 6 is a schematic flowchart of another business processing method provided by the embodiment of the present application;
图7为本申请实施例提供的另一种业务处理方法的流程示意图;FIG. 7 is a schematic flowchart of another business processing method provided by the embodiment of the present application;
图8为本申请实施例提供的一种系统的架构示意图;FIG. 8 is a schematic structural diagram of a system provided by an embodiment of the present application;
图9为本申请实施例提供的一种业务处理装置的结构示意图;FIG. 9 is a schematic structural diagram of a service processing device provided by an embodiment of the present application;
图10为本申请实施例提供的另一种业务处理装置的结构示意图。Fig. 10 is a schematic structural diagram of another service processing device provided by the embodiment of the present application.
具体实施方式Detailed ways
下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。Embodiments of the present application are described below in conjunction with the accompanying drawings. Apparently, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Those of ordinary skill in the art know that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
如图1所示,为本申请实施例提供的一种系统100的架构示意图。如图1所示,系统100包括多个设备集群。每个设备集群中可以包括一个或者多个设备。为了便于说明,图1中展示了m个设备集群,每个设备集群中包括了n个设备,其中,m为大于1的正整数,n为正整数。为了便于展示,图1中展示的每个设备集群均包括n个设备,需要说明的是,本申请实施例中并不限定每个设备集群中包括的设备的数目,任意两个设备集群中包括的 设备的数目可能相同或者不同。As shown in FIG. 1 , it is a schematic structural diagram of a system 100 provided by an embodiment of the present application. As shown in FIG. 1 , the system 100 includes multiple device clusters. Each device cluster may include one or more devices. For ease of description, m device clusters are shown in FIG. 1, and each device cluster includes n devices, where m is a positive integer greater than 1, and n is a positive integer. For ease of presentation, each device cluster shown in Figure 1 includes n devices. It should be noted that the embodiment of the present application does not limit the number of devices included in each device cluster. Any two device clusters include The number of devices may be the same or different.
本申请实施例中描述的一个设备集群是指该一个设备集群中包括的全部设备统一对外提供服务。示例性的,下面给出几种一个设备集群可能具备的特征,通常一个设备集群具有独立的算力系统,任意两个不同的设备集群的算力系统不同。一个设备集群通常由同一个供电系统供电,此外,一个设备集群的全部设备通常部署在相同的地理位置。A device cluster described in the embodiment of the present application means that all devices included in the device cluster provide external services in a unified manner. As an example, several possible characteristics of a device cluster are given below. Usually, a device cluster has an independent computing power system, and any two different device clusters have different computing power systems. A device cluster is usually powered by the same power supply system, and in addition, all devices in a device cluster are usually deployed at the same geographical location.
一个设备集群通常由统一的管理平台进行管理,下面以一个设备集群中包括的管理平台和由该管理平台管理的多个设备为例,对管理平台和该管理平台管理的多个设备之间的关系进行说明。A device cluster is usually managed by a unified management platform. Taking the management platform included in a device cluster and the multiple devices managed by the management platform as an example, the communication between the management platform and the multiple devices managed by the management platform The relationship is explained.
管理平台可以向该管理平台所在的设备集群中的一个或者多个设备发送控制指令,以控制该设备集群中的设备;再比如,管理平台可以向该管理平台所在的设备集群中的一个或者多个设备发送配置资源信息,以配置该一个或者多个设备;再比如,管理平台可以接收该一个或者多个设备发送的数据,并基于该一个或者多个设备发送的数据进行处理,以获取处理结果。在一个可能的实施方式中,管理平台可以部署在云端。本申请有时也将管理平台成为管理设备,将由该管理设备管理的设备称为被管理设备。The management platform can send control instructions to one or more devices in the device cluster where the management platform is located to control the devices in the device cluster; A device sends configuration resource information to configure the one or more devices; for another example, the management platform can receive the data sent by the one or more devices and process it based on the data sent by the one or more devices to obtain processing result. In a possible implementation manner, the management platform can be deployed on the cloud. In this application, the management platform is sometimes referred to as a management device, and the devices managed by the management device are referred to as managed devices.
设备集群中的一个或者多个设备可以包括各种类型的传感设备、基站、接入点、交换机、路由器、网关、终端、音视频设备、控制器和检测设备等其他类型联网设备中的至少一种。在一些可能的实施方式中,可以针对每一个被管理设备分别进行配置,比如,配置其运算能力、联网方式、工作权限等等。在一些可能的实施方式中,被管理设备具备完整的数据采集、处理、运算、控制能力。在一个可能的实施方式中,被管理设备可以部署在终端。在一些可能的实施方式中,被管理设备可以为边缘设备或边缘场景端设备。One or more devices in the device cluster may include at least one of various types of sensing devices, base stations, access points, switches, routers, gateways, terminals, audio and video devices, controllers, detection devices, and other types of networked devices. A sort of. In some possible implementation manners, configurations may be performed for each managed device, for example, configuration of its computing capability, networking mode, work authority, and so on. In some possible implementation manners, the managed device has complete data collection, processing, calculation, and control capabilities. In a possible implementation manner, the managed device may be deployed on a terminal. In some possible implementation manners, the managed device may be an edge device or an edge scene end device.
被管理设备为边缘设备时,由于边缘设备多为轻量化设备,算力有限,如果按照该被管理设备的流量峰值部署该被管理设备的算力,则会大幅提升被管理设备的成本。为了解决这一问题,可以考虑跨集群借用算力。When the managed device is an edge device, because the edge device is mostly a lightweight device with limited computing power, if the computing power of the managed device is deployed according to the peak traffic of the managed device, the cost of the managed device will be greatly increased. In order to solve this problem, you can consider borrowing computing power across clusters.
然而,跨集群借用算力的过程较为繁琐,通常跨集群借用算力需要采用手工配置的方式,或者需要执行虚拟资源的镜像迁移操作等,导致跨集群借用算力需要消耗大量时长,业务切换不及时。However, the process of borrowing computing power across clusters is relatively cumbersome. Usually, cross-cluster computing power borrowing needs to be manually configured, or virtual resource mirroring migration operations need to be performed, etc., resulting in a large amount of time for cross-cluster borrowing of computing power and slow business switching. timely.
本申请实施例提供一种方案,利用无服务器(serverless)的服务架构,当一个设备集群中的设备需要向其他设备集群中的设备借用算力时,借用设备向被借用设备传送相关函数,获取了相关函数的被借用设备就可以分担借用设备的流量,以实现跨设备集群的设备之间快速借用算力的目的。The embodiment of the present application provides a solution that uses a serverless service architecture. When a device in a device cluster needs to borrow computing power from a device in another device cluster, the borrowing device transmits a related function to the borrowed device to obtain The borrowed device that has completed the relevant functions can share the traffic of the borrowed device, so as to achieve the purpose of quickly borrowing computing power between devices across the device cluster.
由于本申请涉及大量与serverless相关的概念,为了更好的理解本申请实施例提供的方案,下面对serverless进行介绍。Since this application involves a lot of concepts related to serverless, in order to better understand the solutions provided by the embodiments of this application, serverless is introduced below.
serverless架构是一种新型的互联网架构,其中应用开发不使用常规的服务进程,这为边缘计算场景中的应用程序提供了一种全新的体系架构。在serverless架构与边缘计算结合的模式下,serverless架构可将租户的服务器、数据库和中间件等服务端设施屏蔽,租户不再参与服务端设施的部署和维护,可大大简化租户的部署和运维难度。换句话说,serverless架构允许在服务部署级别而不是服务器部署级别来管理应用部署。serverless架构使得业务研发人员只需要关注业务逻辑,而无需考虑运维和容量,提高业务迭代的效 率。serverless服务架构通过将服务器管理、操作系统管理、资源分配、扩容等外包出去,由第三方提供服务,由事件触发。serverless能够在业务量较大的时候进行计算能力和容量的自动扩容,以承载更多的用户请求,而在业务量下降时,进行资源的收缩,以避免资源浪费,这种机制即为serverless的弹性扩缩容机制。当有业务申请时,serverless架构调入相关资源开始运行,运行完成后,卸载所有开销。serverless架构可以使开发者专注于产品而无需管理和操作云端或本地的服务器,无需考虑服务器的规格大小、存储类型、网络带宽、自动扩缩容等问题,也无需对服务器进行运维。The serverless architecture is a new type of Internet architecture, in which application development does not use conventional service processes, which provides a new architecture for applications in edge computing scenarios. In the combination of serverless architecture and edge computing, the serverless architecture can shield tenants' servers, databases, middleware and other server facilities, and tenants no longer participate in the deployment and maintenance of server facilities, which can greatly simplify tenant deployment and operation and maintenance difficulty. In other words, a serverless architecture allows application deployment to be managed at the service deployment level rather than the server deployment level. The serverless architecture enables business R&D personnel to only focus on business logic without considering O&M and capacity, improving the efficiency of business iteration. The serverless service architecture outsources server management, operating system management, resource allocation, capacity expansion, etc., and the services are provided by a third party and triggered by events. Serverless can automatically expand computing power and capacity when the business volume is large to carry more user requests, and shrink resources when the business volume drops to avoid resource waste. This mechanism is serverless. Elastic scaling mechanism. When there is a business application, the serverless architecture transfers relevant resources to start running, and after the running is completed, all overhead is offloaded. The serverless architecture allows developers to focus on products without managing and operating cloud or local servers, without having to consider server specifications, storage types, network bandwidth, automatic scaling, etc., and without operating and maintaining servers.
serverless架构下,服务器进行服务部署时创建得到的,是虚拟化出来的一个个的资源,可以以虚拟机的形式存在,本申请有时也将该虚拟化处理的一个个的资源称为容器。在创建容器时,会设置相应的request值和limit值,其中request值表示容器使用的最小资源需求,limit值表示容器能使用资源的最大值。这里的资源可以包括多个维度的资源,例如包括中央处理器(central processing unit,CPU)资源、网卡资源、内存资源等等。Under the serverless architecture, the virtualized resources created by the server during service deployment can exist in the form of virtual machines. In this application, the virtualized resources are sometimes referred to as containers. When creating a container, the corresponding request value and limit value will be set, where the request value represents the minimum resource requirement used by the container, and the limit value represents the maximum value of the resource that the container can use. The resources here may include resources of multiple dimensions, for example, central processing unit (central processing unit, CPU) resources, network card resources, memory resources, and the like.
下面结合图2对serverless的应用场景进行介绍。The following describes the application scenarios of serverless in combination with Figure 2.
图2为本申请实施例提供的一种应用场景示意图,如图2所示,包括服务器10,该服务器10可以创建多个虚拟资源并为每个虚拟资源分配相应的资源。FIG. 2 is a schematic diagram of an application scenario provided by the embodiment of the present application. As shown in FIG. 2 , it includes a server 10 that can create multiple virtual resources and allocate corresponding resources to each virtual resource.
在图2中,示例了服务器10创建了2个虚拟资源,分别为第一虚拟资源11和第二虚拟资源12,在创建第一虚拟资源11和第二虚拟资源12时,还会为第一虚拟资源11和第二虚拟资源12进行资源分配。其中,在服务器10创建第一虚拟资源11和第二虚拟资源12时,还会为第一虚拟资源11和第二虚拟资源12设置相应的参数,该参数包括虚拟资源使用的最小资源需求,即request值,还包括虚拟资源能使用的资源的最大值,即limit值。In Fig. 2, it is illustrated that the server 10 has created two virtual resources, which are respectively the first virtual resource 11 and the second virtual resource 12. When creating the first virtual resource 11 and the second virtual resource 12, the first The virtual resource 11 and the second virtual resource 12 perform resource allocation. Wherein, when the server 10 creates the first virtual resource 11 and the second virtual resource 12, corresponding parameters will also be set for the first virtual resource 11 and the second virtual resource 12, and the parameters include the minimum resource requirements used by the virtual resources, namely The request value also includes the maximum value of resources that can be used by the virtual resource, that is, the limit value.
不同的虚拟资源的request值和limit值可能均不同,其中request值可以作为虚拟资源调度时资源分配的判断依赖。The request value and the limit value of different virtual resources may be different, and the request value can be used as a judgment dependence of resource allocation during virtual resource scheduling.
服务器可以根据虚拟资源的request值为每个虚拟资源分配初始的资源,这些资源可能包括CPU、内存、网卡等等。The server may allocate initial resources to each virtual resource according to the request value of the virtual resource, and these resources may include CPU, memory, network card, and the like.
在分配了资源之后,部署了虚拟资源的设备可以接收业务请求,然后利用分配的资源处理这些业务请求。例如在图2中,向第一虚拟资源11发送业务请求,第一虚拟资源11根据分配的资源可以处理该业务请求指示的业务;向第二虚拟资源12发送业务请求,第二虚拟资源12根据分配的资源可以处理该业务请求指示的业务,等等。业务可以包括在线业务和离线业务,其中在线业务为需要及时处理的业务,离线业务为无需进行即时处理的业务,本申请实施例对此并不进行限定。其中,第一资源设备和第二虚拟资源可以部署在不同的设备上,比如图2中所示的第一虚拟资源部署在设备A上,第二虚拟资源部署在设备B上。在一个可能的实施方式中,可以直接向设备A或者设备B发送业务请求。在一个可能的实施方式中也可以通过客户端向虚拟资源发送请求,本申请实施例对此并不进行限定。此外,需要说明的是,图2中为了便于展示,仅示出了一个服务器,以及该服务器创建了两个虚拟资源,需要说明的是,本申请实施例中系统中设备的数目,以及配置虚拟资源的数目均不进行限定,以下对此不再重复赘述。此外,本申请有时也将图2中所描述的服务 器称为中心节点,或者管理设备,他们表示相同的意思。After the resources are allocated, the device on which the virtual resources are deployed can receive service requests, and then use the allocated resources to process these service requests. For example, in FIG. 2, a service request is sent to the first virtual resource 11, and the first virtual resource 11 can process the service indicated by the service request according to the allocated resources; The allocated resource can process the service indicated by the service request, and so on. Services may include online services and offline services, where online services are services that need to be processed in a timely manner, and offline services are services that do not need to be processed immediately, which is not limited in this embodiment of the present application. Wherein, the first resource device and the second virtual resource may be deployed on different devices, for example, as shown in FIG. 2 , the first virtual resource is deployed on device A, and the second virtual resource is deployed on device B. In a possible implementation manner, the service request may be directly sent to device A or device B. In a possible implementation manner, the client may also send a request to the virtual resource, which is not limited in this embodiment of the present application. In addition, it should be noted that, for ease of presentation, only one server is shown in Figure 2, and the server has created two virtual resources. It should be noted that the number of devices in the system in this embodiment of the application and the configuration The number of resources is not limited, which will not be repeated below. In addition, this application sometimes also refers to the server described in Figure 2 as a central node, or a management device, and they represent the same meaning.
基于上述图1和图2所描述的架构,下面对本申请实施例提供的方案进行介绍。Based on the architecture described above in FIG. 1 and FIG. 2 , the solutions provided by the embodiments of the present application are introduced below.
首先,先对本申请实施例提供的方案的研究思路进行介绍:First of all, the research idea of the scheme provided by the embodiment of this application is introduced:
本申请实施例提供的方案利用了serverless架构,由于目前serverless架构部署在一个设备集群内部,如图2所介绍的,在一个设备集群内部,serverless架构具备弹性扩缩容机制,一个设备集群内部不需要各个算子之间互相借用算力,本申请发现可以利用serverless架构支持设备之间互相传输算子/函数的能力,快速实现跨设备集群之间互相借用算力的目的。具体的,当一个设备获取了另一个设备发送的算子/函数,即可以利用该算子/函数执行对应的任务,进而实现设备之间借用算力的目的,比如A设备利用A算子执行A业务,B设备获取了A算子后,也可以执行A业务,则A设备的A业务也可以转移至B设备进行执行,进而实现A设备借用B设备的算力的目的。相比于传统的跨设备集群算力借用方案,设备之间需要进行虚拟资源的镜像迁移,才能实现跨设备集群之间的算力借用,本申请实施例提供的方案只需要设备之间只传输算子/函数,就可以实现跨设备集群之间的算力借用,将大大降低设备之间借用算力所需时长。具体的,由于虚拟资源一般最小也为几百兆以上,通常的数据量一般为GB级别,导致从一个设备将虚拟资源镜像迁移至另一个设备需要消耗很长时间,进而导致业务切换不及时,并且这种虚拟资源镜像迁移的方案需要人员参与,手动配置,部署起来非常复杂。而本申请实施例提供的方案,可以有效解决这些问题。The solution provided by the embodiment of this application utilizes the serverless architecture. Since the serverless architecture is currently deployed inside a device cluster, as shown in Figure 2, within a device cluster, the serverless architecture has an elastic expansion and contraction mechanism. Each operator needs to borrow computing power from each other. This application finds that the serverless architecture can be used to support the ability to transfer operators/functions between devices, and quickly achieve the purpose of cross-device clusters borrowing computing power from each other. Specifically, when a device obtains an operator/function sent by another device, it can use the operator/function to perform the corresponding task, thereby achieving the purpose of borrowing computing power between devices. For example, A device uses A operator to execute For business A, device B can also execute business A after acquiring the operator A, then the business A of device A can also be transferred to device B for execution, thereby achieving the purpose of device A borrowing the computing power of device B. Compared with the traditional cross-device cluster computing power borrowing scheme, virtual resources need to be mirrored and migrated between devices to realize computing power borrowing between cross-device clusters. The solution provided by the embodiment of this application only needs to transmit only Operators/functions can realize computing power borrowing between cross-device clusters, which will greatly reduce the time required to borrow computing power between devices. Specifically, since virtual resources are generally at least hundreds of megabytes in size, and the usual data volume is generally at the GB level, it takes a long time to migrate the virtual resource image from one device to another, resulting in untimely service switching. Moreover, this kind of virtual resource image migration solution requires personnel participation, manual configuration, and is very complicated to deploy. However, the solutions provided in the embodiments of the present application can effectively solve these problems.
此外,本申请实施例提供的方案允许一个或者多个集群中所有的设备将各自的算力、网络信息等与算力借用相关的信息发送至区块链中。当设备需要借用算力时,可以根据区块链中记载的信息,选择任意合适的设备来借用算力。通过这样的方式,本申请实施例提供的方案,能够效率更高的实现跨集群的设备之间互相借用算力,拓宽了算力借用的应用场景。In addition, the solution provided by the embodiment of the present application allows all the devices in one or more clusters to send their computing power, network information and other information related to computing power borrowing to the blockchain. When a device needs to borrow computing power, any suitable device can be selected to borrow computing power according to the information recorded in the blockchain. In this way, the solution provided by the embodiment of the present application can more efficiently implement cross-cluster devices to borrow computing power from each other, and broaden the application scenarios of computing power borrowing.
基于上述研究思路,下面对本申请实施例提供的方案进行介绍。Based on the above research ideas, the solutions provided in the embodiments of the present application are introduced below.
本申请实施例提供的一种数据处理的方法应用于serverless系统中,其中,serverless系统包括多个计算节点和区块链节点,具体的,下面结合图3对各个节点执行的步骤进行介绍:A data processing method provided by an embodiment of the present application is applied to a serverless system, wherein the serverless system includes multiple computing nodes and blockchain nodes. Specifically, the steps performed by each node are introduced in conjunction with FIG. 3 below:
301、第一计算节点向区块链节点写入第一计算节点的空闲算力资源。301. The first computing node writes the idle computing resource of the first computing node to the blockchain node.
其中,本申请实施例中描述的计算节点用于表示具有数据处理能力的节点,本申请有时也将其称为设备、虚拟机、待管理设备、节点、站点。Wherein, the computing node described in the embodiment of the present application is used to represent a node with data processing capability, which is sometimes referred to as a device, a virtual machine, a device to be managed, a node, or a site in this application.
节点的算力用于表示节点的计算能力,算力资源就是节点执行计算任务时所需要占用的资源,比如,可以包括硬件资源,或者网络资源,具体的,可以包括中央处理器(central processing unit,CPU)算力资源、图形处理器(graphics processing unit,GPU)算力资源、内存资源、网络带宽资源、磁盘资源等等。空闲算力资源就是指节点当前未被占用的资源。The computing power of a node is used to represent the computing power of the node. The computing power resource is the resource that the node needs to occupy when performing computing tasks. For example, it can include hardware resources or network resources. Specifically, it can include the central processing unit (central processing unit) , CPU) computing power resources, graphics processing unit (graphics processing unit, GPU) computing power resources, memory resources, network bandwidth resources, disk resources, etc. Idle computing power resources refer to resources that are not currently occupied by nodes.
在一个可能的实施方式中,可以预先规定一种或者多种算力资源的种类,以使第一计算节点根据预先规定的算力资源的种类,获取该种类算力资源的空闲算力资源。比如可以预先规定需要写入的算力资源包括CPU的空闲算力资源、GPU的空闲算力资源,则第一计 算节点只向区块链节点写入该第一计算节点的CPU的空闲算力资源以及GPU的空闲算力资源,不需要写入全部的空闲算力资源。在一个可能的实施方式中,也可以规定第一计算节点向区块链节点写入第一节点的全部空闲算力资源。In a possible implementation manner, one or more types of computing power resources may be pre-specified, so that the first computing node acquires idle computing power resources of the type of computing power resources according to the pre-specified types of computing power resources. For example, it can be pre-specified that the computing power resources that need to be written include the idle computing power resources of the CPU and the idle computing power resources of the GPU, then the first computing node only writes the idle computing power of the CPU of the first computing node to the blockchain node Resources and idle computing power resources of GPU do not need to write all idle computing power resources. In a possible implementation manner, it may also be stipulated that the first computing node writes all idle computing power resources of the first node to the blockchain node.
在一个可能的实施方式中,第一计算节点可以周期性的向区块链节点写入该第一计算节点的空闲算力资源,比如,每隔预设时长向区块链节点写入该第一计算节点当前的空闲算力资源。In a possible implementation, the first computing node can periodically write the idle computing power resources of the first computing node to the blockchain node, for example, write the first calculation node to the blockchain node every preset time A computing node's current idle computing resources.
在一个可能的实施方式中,第一计算节点还可以响应于指令,并基于该指令向区块链节点写入第一计算节点当前的空闲算力资源。其中,第一计算节点可以响应于区块链节点写入的指令,并基于该指令向区块链节点写入第一计算节点当前的空闲算力资源。第一计算节点还可以响应于其他节点写入的指令,并基于该指令向区块链节点写入第一计算节点当前的空闲算力资源。比如,第一计算节点响应于中心节点写入的指令,向区块链节点写入第一计算节点当前的空闲算力资源,本申请实施例对此并不进行限定。In a possible implementation manner, the first computing node may also respond to the instruction, and based on the instruction, write the current idle computing resources of the first computing node to the blockchain node. Wherein, the first computing node may respond to the instruction written by the blockchain node, and based on the instruction, write the current idle computing resources of the first computing node to the blockchain node. The first computing node may also respond to instructions written by other nodes, and based on the instruction, write the current idle computing resources of the first computing node to the blockchain node. For example, the first computing node writes the current idle computing resources of the first computing node to the blockchain node in response to the command written by the central node, which is not limited in this embodiment of the present application.
在一个可能的实施方式中,第一计算节点上部署有统计模块,用于统计第一计算节点的空闲算力资源,并向区块链节点写入第一计算节点的空闲算力资源。In a possible implementation manner, a statistical module is deployed on the first computing node, which is used to count the idle computing power resources of the first computing node, and write the idle computing power resources of the first computing node to the blockchain node.
在一个可能的实施方式中,第一计算节点可以是中心节点,第一计算节点还可以是中心节点管理的其他节点。在一个可能的实施方式中,第一计算节点是中心节点时,还可以由中心节点统一获取该中心节点管理的其他节点的空闲算力资源,并由中心节点向区块链节点写入该中心节点的空闲算力资源,以及该中心节点的其他节点的空闲算力资源。在一个可能的实施方式中,第一计算节点即为区块链节点,第一计算节点在本地写入第一计算节点的空闲算力资源。需要说明的是,本申请中描述的任意一种类型的节点都可以是区块链节点,以下对此不再重复赘述。In a possible implementation manner, the first computing node may be a central node, and the first computing node may also be other nodes managed by the central node. In a possible implementation, when the first computing node is a central node, the central node can also uniformly obtain the idle computing power resources of other nodes managed by the central node, and the central node can write the central node to the blockchain node. The idle computing resources of the node, and the idle computing resources of other nodes of the central node. In a possible implementation, the first computing node is a block chain node, and the first computing node locally writes the idle computing resources of the first computing node. It should be noted that any type of node described in this application can be a blockchain node, which will not be repeated below.
区块链节点获取了第一计算节点的空闲算力资源后,存储该第一计算节点的地址以及该第一计算节点的空闲算力资源。在一个可能的实施方式中,区块链节点可能提前获取到第一计算节点的地址,则当区块链节点获取了该第一计算节点的地址后,建立第一计算节点的地址和该第一计算节点的空闲算力资源之间的对应关系。After acquiring the idle computing resource of the first computing node, the blockchain node stores the address of the first computing node and the idle computing resource of the first computing node. In a possible implementation, the blockchain node may obtain the address of the first computing node in advance, then after the blockchain node obtains the address of the first computing node, the address of the first computing node and the address of the second computing node are established. A corresponding relationship between idle computing power resources of a computing node.
区块链是由一系列不断增长的记录组成,这些记录成为区块(Block)。这些区块通过密码学技术链接再一起,每一个区块包含前一个区块的哈希值,时间戳,和交易数据等。区块链本质上是一个分布式多备份的数据库,但是与数据库最大的不同之处是数据的存储是通过多方共识形成,并使用哈希链对历史数据进行保护,从而使得数据不可篡改。与传统的数据库技术相比,区块链数据不可以篡改的特征更容易获得用户的信任,因而能够更好地支持多方合作。本申请实施例中描述的区块链节点可以看做一个区块,当一个区块别写入新的数据后,可以根据区块链的分布式数据库性质,将该新的数据同步至区块链中的其他区块。在一个可能的实施方式中,也可以将该新的数据同步至serverless系统中的各个计算节点。A blockchain is made up of a growing series of records called blocks. These blocks are linked together through cryptography, and each block contains the hash value, timestamp, and transaction data of the previous block. The blockchain is essentially a distributed multi-backup database, but the biggest difference from the database is that the data storage is formed through multi-party consensus, and the hash chain is used to protect the historical data, so that the data cannot be tampered with. Compared with traditional database technology, the immutable feature of blockchain data is easier to gain the trust of users, so it can better support multi-party cooperation. The blockchain nodes described in the embodiments of this application can be regarded as a block. When new data is written in a block, the new data can be synchronized to the block according to the distributed database nature of the blockchain. other blocks in the chain. In a possible implementation manner, the new data may also be synchronized to each computing node in the serverless system.
302、第一计算节点获取第一计算节点和目标节点之间的时延信息。302. The first computing node acquires delay information between the first computing node and the target node.
目标节点是该第一计算节点所在的serverless系统中除该第一计算节点之外的任意一个计算节点。The target node is any computing node except the first computing node in the serverless system where the first computing node is located.
第一计算节点可以定期进行网络时延检测,以获取第一计算节点和目标节点之间的网 络时延。需要说明的是,本申请实施例对采用何种网络时延检测方式并不进行限定,任意一种网络时延检测方式,本申请实施例均可以采用。需要说明的是,第一计算节点也可以不定期的进行网络时延检测。The first computing node may regularly perform network delay detection to obtain the network delay between the first computing node and the target node. It should be noted that the embodiment of the present application does not limit which network delay detection method is used, any network delay detection method can be adopted in the embodiment of the present application. It should be noted that the first computing node may also periodically perform network delay detection.
在一个可能的实施方式中,第一计算节点可以从本地获取至少一个目标节点的互联网协议(internet protocol address,IP)地址,并基于该至少一个IP地址,获取第一计算节点和每一个IP地址对应的计算节点之间的时延,以获取至少一个检测结果,每个检测结果指示第一计算节点和一个目标节点之间的网络传输时延。In a possible implementation manner, the first computing node may obtain at least one target node's Internet protocol (internet protocol address, IP) address locally, and based on the at least one IP address, obtain the first computing node and each IP address Calculate the time delay between corresponding nodes to obtain at least one detection result, each detection result indicates a network transmission delay between the first calculation node and a target node.
在一个可能的实施方式中,第一计算节点可以从中心节点获取至少一个目标节点的IP地址,并基于该至少一个IP地址,获取第一计算节点和每一个IP地址对应的计算节点之间的时延,以获取至少一个检测结果,每个检测结果指示第一计算节点和一个目标节点之间的网络传输时延。In a possible implementation manner, the first computing node may obtain the IP address of at least one target node from the central node, and based on the at least one IP address, obtain the connection between the first computing node and the computing node corresponding to each IP address. Delay, to obtain at least one detection result, each detection result indicates a network transmission delay between the first computing node and a target node.
在一个可能的实施方式中,第一计算节点可以从区块链节点处获取至少一个目标节点的IP地址,并基于该至少一个IP地址,获取第一计算节点和每一个IP地址对应的计算节点之间的时延,以获取至少一个检测结果,每个检测结果指示第一计算节点和一个目标节点之间的网络传输时延。In a possible implementation, the first computing node can obtain at least one IP address of the target node from the blockchain node, and based on the at least one IP address, obtain the first computing node and the computing node corresponding to each IP address The time delay between them is used to obtain at least one detection result, each detection result indicates a network transmission delay between the first computing node and a target node.
303、第一计算节点向区块链节点写入获取到的时延信息。303. The first computing node writes the acquired delay information to the blockchain node.
区块链节点获取了该第一计算节点与至少一个目标节点之间的时延信息后,可以同步至区块链中的其他节点。在一个可能的实施方式中,区块链节点获取了该第一计算节点与至少一个目标节点之间的时延信息后,还可以同步至serverless系统中的各个计算节点。After the blockchain node obtains the delay information between the first computing node and at least one target node, it can synchronize to other nodes in the blockchain. In a possible implementation, after the blockchain node obtains the delay information between the first computing node and at least one target node, it can also synchronize to each computing node in the serverless system.
需要说明的是,除了步骤301和步骤302中提到的第一计算节点向区块链节点写入第一计算节点的空闲算力资源、第一计算节点获取到的时延信息、第一计算节点的地址之外,第一计算节点还可以向区块链节点写入其他类型的信息。比如,在一个可能的实施方式中,第一计算节点还可以向区块链节点写入第一计算节点获取的serverless系统的拓扑结构;在一个可能的实施方式中,第一计算节点还可以向区块链节点写入第一计算节点获取到的网络带宽等各种网络信息。再比如,在一个可能的实施方式中,可以将神经网络模型的预测结果向区块链节点写入。该预测结果指示预测的第一计算节点在某一个时间段/点的空闲算力资源、第一计算节点获取到的时延信息等算力资源信息。以该预测结果指示预测的第一计算节点在某一个时间段/点的空闲算力资源为例进行说明,可以将第一计算节点在历史时间段/点的空闲算力资源作为神经网络模型的训练数据,通过对神经网络模型进行迭代训练,以使训练后的神经网络模型可以预测第一计算节点在某一时间段/点的空闲算力资源。It should be noted that, except that the first computing node mentioned in step 301 and step 302 writes to the blockchain node the idle computing resources of the first computing node, the delay information obtained by the first computing node, the first computing node In addition to the address of the node, the first computing node can also write other types of information to the blockchain node. For example, in a possible implementation, the first computing node can also write to the blockchain node the topology of the serverless system obtained by the first computing node; in a possible implementation, the first computing node can also write to the blockchain node The blockchain node writes various network information such as the network bandwidth obtained by the first computing node. For another example, in a possible implementation, the prediction results of the neural network model can be written to the blockchain nodes. The prediction result indicates computing power resource information such as predicted idle computing resources of the first computing node at a certain time period/point, delay information obtained by the first computing node, and the like. Taking the prediction result indicating the predicted idle computing resources of the first computing node at a certain time period/point as an example, the idle computing resources of the first computing node at a historical time period/point can be used as the neural network model The training data is to iteratively train the neural network model, so that the trained neural network model can predict the idle computing resources of the first computing node at a certain time period/point.
304、第一计算节点接收业务访问请求。304. The first computing node receives the service access request.
本申请实施例中对业务访问请求的类型并不进行限定,比如该任务可能是人脸识别任务、目标检测任务、分类任务等等。In the embodiment of the present application, the type of service access request is not limited. For example, the task may be a face recognition task, an object detection task, a classification task, and the like.
在一个可能的实施方式中,第一计算节点的空闲算力资源充足,第一计算节点有能力独自执行完该业务,则第一计算节点不需要借用其他计算节点的算力资源,则第一计算节点在本地处理该任务请求。在一个可能的实施方式中,如果第一计算节点的空闲算力资源不充足,第一计算节点没有能力独自执行完该业务,则第一计算节点需要借用其他节点的算力资源,则需要执行步骤305,具体的将在步骤305中进行展开介绍。In a possible implementation, the idle computing resource of the first computing node is sufficient, and the first computing node is capable of executing the business independently, then the first computing node does not need to borrow computing power resources of other computing nodes, then the first Compute nodes process the task request locally. In a possible implementation, if the idle computing resources of the first computing node are not sufficient, and the first computing node is unable to complete the business by itself, then the first computing node needs to borrow the computing resources of other nodes, and it needs to execute Step 305, which will be described in detail in step 305.
第一节点接收了业务访问请求后,该业务访问请求触发第一计算节点部署的serverless触发器,serverless触发器被触发后,第一计算节点启动执行该业务的函数(function),比如启动function1,如果第一计算节点的空闲算力充足,第一计算节点将顺利启动该function1,并基于该function1执行该任务。After the first node receives the service access request, the service access request triggers a serverless trigger deployed by the first computing node. After the serverless trigger is triggered, the first computing node starts a function (function) for executing the service, such as starting function1, If the idle computing power of the first computing node is sufficient, the first computing node will successfully start the function1 and execute the task based on the function1.
305、第一计算节点借用第二计算节点的空闲算力资源,处理该业务访问请求。305. The first computing node borrows idle computing power resources of the second computing node to process the service access request.
如果第一计算节点的空闲算力资源不充足,第一计算节点没有能力独自执行完该业务,则第一计算节点需要借用其他节点的算力资源。其中,可以有多种方式判断第一计算节点的空闲算力资源是否不充足。比如,在一个可能的实施方式中,可以设定一个阈值,如果第一计算节点的空闲算力资源低于该阈值,则认为第一计算节点的空闲算力资源不足。再比如,在一个可能的实施方式中,如果第一计算节点无法顺利启动某个任务对应的函数,则认为该第一计算节点的空闲算力资源不充足。在一个可能的实施方式中,如果第一计算节点多次执行某个任务失败,则认为该第一计算节点的空闲算力资源不充足。If the idle computing resources of the first computing node are not sufficient, and the first computing node is unable to complete the business by itself, the first computing node needs to borrow computing resources of other nodes. Among them, there may be multiple ways to determine whether the idle computing resources of the first computing node are not sufficient. For example, in a possible implementation manner, a threshold may be set, and if the idle computing resource of the first computing node is lower than the threshold, it is considered that the idle computing resource of the first computing node is insufficient. For another example, in a possible implementation manner, if the first computing node cannot successfully start a function corresponding to a certain task, it is considered that the idle computing resources of the first computing node are insufficient. In a possible implementation manner, if the first computing node fails to execute a certain task multiple times, it is considered that the idle computing resources of the first computing node are not sufficient.
如果第一计算节点的算力资源不充足,则第一计算节点可以向其他节点借用算力资源,以处理第一计算节点接收的业务访问请求。在一个可能的实施方式中,第一计算节点可以从serverless系统中的多个计算节点中,选择一个或者多个计算节点来借用算力资源。具体的,可以基于区块链节点中存储的各个节点的空闲算力资源、时延信息等相关信息来选择一个或者多个适合的计算节点来借用算力资源。If the computing power resources of the first computing node are not sufficient, the first computing node may borrow computing power resources from other nodes to process the service access request received by the first computing node. In a possible implementation manner, the first computing node may select one or more computing nodes from multiple computing nodes in the serverless system to borrow computing power resources. Specifically, one or more suitable computing nodes can be selected to borrow computing power resources based on relevant information such as idle computing power resources and delay information of each node stored in the blockchain node.
由于本申请实施例提供的方案基于serverless系统,所以第一计算节点向其他计算节点发送某个业务对应的函数,获取了该业务对应的函数的计算节点,就可以处理该业务。示例性的,下面结合一个可能的实施方式对第一计算节点如何借用其他节点的算力资源进行说明。Since the solution provided by the embodiment of the present application is based on the serverless system, the first computing node sends a function corresponding to a certain service to other computing nodes, and the computing node that obtains the function corresponding to the service can process the service. Exemplarily, the following describes how the first computing node borrows computing power resources of other nodes in conjunction with a possible implementation manner.
(1)serverless管理模块调用最优节点选择模块的接口。(1) The serverless management module calls the interface of the optimal node selection module.
其中,serverless管理模块可以负责对第一计算节点的各个函数进行管理、调度和编排,同时负责在不同节点之间传递函数。在一个可能的实施方式中,serverless管理模块部署在第一计算节点上,在一个可能的实施方式中,serverless管理模块也可以部署在其他节点上。Wherein, the serverless management module may be responsible for managing, scheduling and orchestrating various functions of the first computing node, and at the same time responsible for transferring functions between different nodes. In a possible implementation manner, the serverless management module is deployed on the first computing node, and in a possible implementation manner, the serverless management module may also be deployed on other nodes.
(2)最优节点选择模块获取一个或者多个合适的第二计算节点。(2) The optimal node selection module obtains one or more suitable second computing nodes.
最优节点选择模块根据区块链节点中存储的各个节点的空闲算力资源、时延信息等相关信息,根据预先规定的规则,选择一个或者多个合适的第二计算节点。The optimal node selection module selects one or more suitable second computing nodes according to the relevant information such as idle computing power resources and delay information of each node stored in the blockchain nodes and according to predetermined rules.
在一个可能的实施方式中,可以定义各个不同类型的相关信息的优先级,比如,设定空闲算力资源的优先级最高,时延信息次之,带宽再次之,则最优节点选择模块会优先选择空闲算力资源最高的节点作为第二计算节点。In a possible implementation, the priority of different types of related information can be defined. For example, if the priority of idle computing resources is set to be the highest, followed by delay information and bandwidth, the optimal node selection module will The node with the highest idle computing resources is preferentially selected as the second computing node.
在一个可能的实施方式中,可以根据实际应用场景的需求,自定义规则,比如设定优选5G计算节点或有GPU的节点。In a possible implementation, the rules can be customized according to the requirements of actual application scenarios, such as setting the preferred 5G computing nodes or nodes with GPUs.
在一个可能的实施方式中,可以定义各个不同类型的相关信息的权重,比如,设定空闲算力资源的权重为0.5,时延信息的权重为0.3,带宽的权重为0.2,则最优节点选择模块会优先获取到的权重最高的节点作为第二计算节点。In a possible implementation, the weights of different types of related information can be defined. For example, if the weight of idle computing resources is set to 0.5, the weight of delay information to 0.3, and the weight of bandwidth to 0.2, the optimal node The selection module will give priority to the node with the highest weight obtained as the second computing node.
在一个可能的实施方式中,最优节点选择模块可以部署在第一计算节点上,也可以部 署在其他节点上。In a possible implementation manner, the optimal node selection module may be deployed on the first computing node, or may be deployed on other nodes.
(3)跨节点网络管理模块在第一计算节点与至少一个第二计算节点之间,建立通信网络。(3) The cross-node network management module establishes a communication network between the first computing node and at least one second computing node.
需要说明的是,本申请实施例提供的方案,可以采用任意一种建立节点之间通信网络的方式,来建立第一计算节点与每个第二计算节点之间的通信网络。示例性的,该通信网络可以是overlay通信网络或underlay通信网络。underlay是当前数据中心网路基础转发架构的网络,只要数据中心网络上任意两点路由可达即可,指的是物理基础层。overlay通信网络指的是一种网络架构上叠加的虚拟化技术模式,其大体框架是对基础网络不进行大规模修改的条件下,实现应用在网络上的承载,并能与其它网络业务分离,并且以基于IP的基础网络技术为主。It should be noted that, in the solution provided by the embodiment of the present application, any method of establishing a communication network between nodes may be used to establish a communication network between the first computing node and each second computing node. Exemplarily, the communication network may be an overlay communication network or an underlay communication network. The underlay is the network of the basic forwarding architecture of the current data center network. As long as any two points on the data center network are reachable, it refers to the physical base layer. The overlay communication network refers to a virtualization technology mode superimposed on the network architecture. Its general framework is to realize the bearer of the application on the network without large-scale modification of the basic network, and can be separated from other network services. And mainly based on IP-based network technology.
(4)serverless管理模块将待传输的函数从第一计算节点传输至第二计算节点。(4) The serverless management module transmits the function to be transmitted from the first computing node to the second computing node.
serverless管理模块通过跨节点网络管理模块建立的通信网络,将待传输的函数从第一计算节点传输至该至少一个第二计算节点。The serverless management module transmits the function to be transmitted from the first computing node to the at least one second computing node through the communication network established by the cross-node network management module.
其中,待传输的函数是第一计算节点请求分担的业务对应的函数。比如A业务对应的函数为A函数,通过执行A函数,以完成A业务,则第一计算节点的待分担处理业务为A业务,则待传输的函数为A函数。Wherein, the function to be transmitted is a function corresponding to the service that the first computing node requests to share. For example, the function corresponding to the A service is the A function. By executing the A function to complete the A service, the service to be shared and processed by the first computing node is the A service, and the function to be transmitted is the A function.
(5)第二计算节点利用获取到的函数执行对第一计算节点发起的业务。(5) The second computing node executes the service initiated to the first computing node by using the obtained function.
第二计算节点获取到步骤(4)中描述的带传输后,第一计算节点可以将部分本地访问流量路由至第二计算节点,由第二计算节点根据获取到的函数执行对第一计算节点发起的业务。After the second computing node acquires the belt transmission described in step (4), the first computing node can route part of the local access traffic to the second computing node, and the second computing node executes the initiated business.
在一个可能的实施方式方式中,还可能包括(6)获取到第一计算节点的空闲算力资源充足时,第一计算节点处理对第一计算节点发起的业务。In a possible implementation manner, it may further include (6) when it is obtained that the idle computing resources of the first computing node are sufficient, the first computing node processes the service initiated to the first computing node.
在这种实施方式中,如果第一计算节点获取到自己已经有充足的空闲算力资源可以处理对该第一计算节点发起的业务,则第一计算节点不需要借用第二计算节点的算力资源。第一计算节点可以停止路由业务流量至第二计算节点。在一个可能的实施方式中,可以在指定时长后,断开第一计算节点和第二计算节点之间的通信网络。In this implementation, if the first computing node obtains that it has sufficient idle computing power resources to process the business initiated by the first computing node, the first computing node does not need to borrow the computing power of the second computing node resource. The first computing node may stop routing traffic to the second computing node. In a possible implementation manner, the communication network between the first computing node and the second computing node may be disconnected after a specified period of time.
在一个可能的实施方式中,如果有多个第二计算节点时,第一计算节点还可以分批次停止路由业务流量至该一个或者多个第二计算节点。比如,第二计算节点包括三个,可以分成三个时间点,在第一个时间点,停止路由业务流量至一个第二计算节点,在第二个时间点,再停止路由业务流量至一个第二计算节点,此时停止路由业务流量至两个第二计算节点,在第三个时间点,再停止路由业务流量至一个第二计算节点,此时停止路由业务流量至三个第二计算节点。In a possible implementation manner, if there are multiple second computing nodes, the first computing node may also stop routing service traffic to the one or more second computing nodes in batches. For example, the second computing node includes three, which can be divided into three time points. At the first time point, stop routing service traffic to a second computing node, and stop routing service traffic to a second computing node at the second time point. Two computing nodes, stop routing business traffic to two second computing nodes at this time, stop routing business traffic to one second computing node at the third time point, and stop routing business traffic to three second computing nodes at this time .
需要说明的是,在实际应用的过程中,相比于上述步骤301至步骤305可以更多更少的步骤,此外,在实际应用的过程中,各个步骤的顺序可能发生调换。It should be noted that, in the actual application process, there may be more or fewer steps than the above steps 301 to 305, and in addition, in the actual application process, the order of the various steps may be exchanged.
由图3对应的实施例可知,不同于传统方案跨设备集群之间互相借用算力,需要人工配置耗费大量时长,效率低下,本申请实施例提供的方案,通过在不同设备集群中均部署serverless系统,使不同设备集群之间可以互相传输相关函数、获取了相关函数的设备,可以执行相关函数对应的任务,以达到高效实现跨设备集群借用算力的目的。From the embodiment corresponding to Figure 3, it can be seen that unlike the traditional solution of borrowing computing power between device clusters, which requires manual configuration and takes a lot of time and is inefficient, the solution provided by the embodiment of this application deploys serverless in different device clusters. The system enables different device clusters to transfer related functions to each other, and devices that have obtained related functions can perform tasks corresponding to related functions, so as to achieve the purpose of efficiently borrowing computing power across device clusters.
参阅图4,为本申请实施例提供的一种任务处理的方法的流程示意图,图4中所展示的第一节点和第二节点属于不同的设备集群,图4描述一种具体的第一节点向第二节点借用算力的流程。Referring to FIG. 4, it is a schematic flowchart of a task processing method provided by the embodiment of the present application. The first node and the second node shown in FIG. 4 belong to different device clusters. FIG. 4 describes a specific first node The process of borrowing computing power from the second node.
1、第一节点和第二节点都包括本地空闲算力资源实时统计模块。本地实时统计模块将本地CPU/GPU/内存等可用空闲算力,周期性写入区块链,利用区块链的分布式数据库性质,将CPU/GPU/内存等可用空闲算力同步至所有所有边缘节点,比如,在图4所示的方案中,边缘节点包括第一节点和第二节点。1. Both the first node and the second node include a real-time statistics module of local idle computing power resources. The local real-time statistics module periodically writes the available idle computing power of the local CPU/GPU/memory into the blockchain, and uses the distributed database nature of the blockchain to synchronize the available idle computing power of the CPU/GPU/memory to all The edge nodes, for example, in the solution shown in FIG. 4 , the edge nodes include a first node and a second node.
2、第一节点和第二节点还可以都包括网络检测模块。网络检测模块负责实时检测区块链模块中记录的各个节点与本节点的网络访问时延,以及节点间的网路连接健康情况,同时将本地网络与其他网络的网络连接带宽参数写入。网络检测模块根据区块链中所有节点网络信息(比如包括每个节点的IP地址),定期进行网络时延检测,并将检测结果、网络带宽、网络拓扑等参数写入区块链,利用区块链的分布式数据库性质,将网络检测模块获取的检测结果同步至所有所有边缘节点。2. Both the first node and the second node may also include a network detection module. The network detection module is responsible for real-time detection of the network access delay between each node and the node recorded in the blockchain module, as well as the health of the network connection between nodes, and at the same time writes the network connection bandwidth parameters of the local network and other networks. The network detection module regularly performs network delay detection according to the network information of all nodes in the blockchain (such as the IP address of each node), and writes the detection results, network bandwidth, network topology and other parameters into the blockchain. The distributed database nature of the block chain synchronizes the detection results obtained by the network detection module to all edge nodes.
3、边缘侧业务访问边缘节点上的服务。本申请实施例中对业务访问请求的类型并不进行限定,比如该任务可能是人脸识别任务、目标检测任务、分类任务等等。3. Edge-side services access services on edge nodes. In the embodiment of the present application, the type of service access request is not limited. For example, the task may be a face recognition task, an object detection task, a classification task, and the like.
4、业务访问请求触发serverless的触发器,如果没有业务请求指示的function正在运行,则在边缘站点,比如第一节点中启动对应的function,如图4中所示,启动了functionA-1和functionA-2,执行functionA-1和functionA-2均用于处理步骤3接收到的业务。4. The service access request triggers the serverless trigger. If no function indicated by the service request is running, start the corresponding function at the edge site, such as the first node. As shown in Figure 4, start functionA-1 and functionA -2, Execute both functionA-1 and functionA-2 to process the service received in step 3.
5、当访问业务数据数据流量增大。5. When accessing business data, the data traffic increases.
6、需要创建更多的function才能满足对任务的处理需求。6. More functions need to be created to meet the processing requirements of the task.
6、当前启动的function无法满足算力需求,由于资源不足,导致创建新的function失败。6. The currently activated function cannot meet the computing power requirements, and the creation of a new function fails due to insufficient resources.
7、第一节点和第二节点还可以都包括网络检测模块。serverless管理模块负责对算子进行管理、调度和编排,同时负责在节点间同步算子。如果当前启动的function无法满足算力需求,serverless管理模块调用最优节点选择模块接口,获取最佳节点。7. Both the first node and the second node may further include a network detection module. The serverless management module is responsible for managing, scheduling, and orchestrating operators, and is also responsible for synchronizing operators between nodes. If the currently activated function cannot meet the computing power requirement, the serverless management module calls the interface of the optimal node selection module to obtain the optimal node.
8、最优节点选择模块负责对serverless提供接口,为serverless的跨节点调度提供最优的站点信息。最优节点选择模块,根据区块链中记录的其他节点可用算力、网络时延、带宽、网络拓扑等参数,按照最优节点选择算法选择对应的最优节点,其中最优节点选择算法可以由用户自定义,具体的参照上文最优节点选择模块根据区块链节点中存储的各个节点的空闲算力资源、时延信息等相关信息,根据预先规定的规则,选择一个或者多个合适的第二计算节点进行理解,这里不再不再重复赘述。8. The optimal node selection module is responsible for providing an interface to serverless and providing optimal site information for serverless cross-node scheduling. The optimal node selection module selects the corresponding optimal node according to the optimal node selection algorithm according to the available computing power, network delay, bandwidth, network topology and other parameters recorded in the blockchain, and the optimal node selection algorithm can be Customized by the user, refer to the above optimal node selection module to select one or more suitable nodes based on the relevant information such as idle computing power resources and delay information of each node stored in the blockchain node and according to the pre-specified rules. The second computing node is understood, and will not be repeated here.
9、最优节点选择模块选择了最佳节点(比如选择了第二节点)后,serverless管理模块通知跨节点点网路管理模块建立跨节点传输网络。9. After the optimal node selection module selects the optimal node (for example, the second node is selected), the serverless management module notifies the cross-node network management module to establish a cross-node transmission network.
10、跨节点网络管理模块在第一节点与第二节点间,建立通信网络(overlay或underlay),并配置本地与远端目标站点间的路由。10. The cross-node network management module establishes a communication network (overlay or underlay) between the first node and the second node, and configures a route between the local and remote target sites.
11、跨节点通信网络建立后,第一节点的serverless管理模块将需要弹性的算子(或者说需要传输的算子)通过建立的网络同步到第二节点,并利用第二节点上的Serverless 管理模块启动function,比如在步骤4的基础上继续举例说明,在第二节点上运行functionA-3。11. After the cross-node communication network is established, the serverless management module of the first node will synchronize operators that require flexibility (or operators that need to be transmitted) to the second node through the established network, and use the serverless management on the second node The module starts the function, for example, continue to illustrate on the basis of step 4, and run functionA-3 on the second node.
12、当第一节点部署的serverless管理模块检测到业务流量降低时,可以通过跨节点路由模块停止路由业务流量至远端第二站点,并在指定周期后,参考步骤11通知第二节点停止运行FunctionA-3,并通知跨节点网络管理模块释放网络连接。12. When the serverless management module deployed on the first node detects a decrease in business traffic, it can stop routing business traffic to the remote second site through the cross-node routing module, and after a specified period, refer to step 11 to notify the second node to stop running FunctionA-3, and notify the cross-node network management module to release the network connection.
参阅图5,为本申请实施例提供的另一种任务处理的方法的流程示意图,可以包括以下步骤:Referring to FIG. 5 , it is a schematic flowchart of another task processing method provided by the embodiment of the present application, which may include the following steps:
501、第一计算设备通过serverless系统中的目标函数function接收多个任务请求。501. A first computing device receives multiple task requests through an objective function function in a serverless system.
该多个任务请求属于同一类型的任务,即该多个任务需要调用相同的目标函数来处理。The multiple task requests belong to the same type of task, that is, the multiple tasks need to be processed by calling the same target function.
本申请实施例对任务请求的类型并不进行限定,示例性的,可能是目标检测任务、分类任务、语义分割任务等等。The embodiment of the present application does not limit the type of the task request, for example, it may be a target detection task, a classification task, a semantic segmentation task, and the like.
502、第一计算设备向第二计算设备发送目标函数。502. The first computing device sends the objective function to the second computing device.
第二计算设备和第一计算设备属于不同的设备集群。The second computing device and the first computing device belong to different device clusters.
任务请求中指示执行该任务请求需要调用的目标函数,第一计算设备将该任务请求中指示的目标函数向第二计算设备发送。The task request indicates the target function that needs to be called to execute the task request, and the first computing device sends the target function indicated in the task request to the second computing device.
503、若第一计算设备获取到自身空闲算力资源不充足,通过目标function在第一设备中处理第一部分任务请求,并且向第二计算设备转发第二部分任务请求。503. If the first computing device obtains that its free computing resources are not sufficient, process the first part of the task request on the first device through the target function, and forward the second part of the task request to the second computing device.
多个任务请求中包括第一部分任务请求和第二部分任务请求。The multiple task requests include a first part of task requests and a second part of task requests.
若第一计算设备获取到自身空闲算力资源不充足,则第一计算设备选择进行负载分担,将一部分任务请求在第一计算设备本地处理,将一部分任务请求分担到第二计算设备处理,以满足对该多个任务请求的处理需求。If the first computing device obtains that its own free computing resources are not sufficient, the first computing device chooses to perform load sharing, processing part of the task requests locally on the first computing device, and sharing part of the task requests to the second computing device for processing. Satisfy the processing requirements of the multiple task requests.
504、第二计算设备通过接收到的目标function处理第二部分任务请求。504. The second computing device processes the second part of task requests by using the received target function.
第二计算设备所在的集群部署了serverless系统,第二计算设备可以基于serverless系统,对接收到的目标函数处理第二部分任务请求。The serverless system is deployed in the cluster where the second computing device is located, and the second computing device can process the second part of task requests for the received objective function based on the serverless system.
505、第一计算设备接收第二计算设备发送的第二部分任务请求的处理结果。505. The first computing device receives a processing result of the second part of the task request sent by the second computing device.
需要说明的是,本申请实施例提供的各个实施例之间是可以相互结合的,本申请对此不再重复赘述。It should be noted that the various embodiments provided in the embodiments of the present application can be combined with each other, which will not be repeated in the present application.
由图5对应的实施例可知,不同的设备集群均部署serverless系统,当一个集群内的设备算力资源不充足的时候,该设备可以向其他设备集群中的设备传输相关函数(目标函数),以指示接收到该相关函数的设备可以基于该相关函数,分担算力资源补充足的设备的任务请求。It can be seen from the embodiment corresponding to FIG. 5 that different device clusters deploy serverless systems. When the computing resources of a device in a cluster are insufficient, the device can transmit related functions (objective functions) to devices in other device clusters. To indicate that the device receiving the correlation function can share the task request of the device with sufficient computing power resources based on the correlation function.
在一些可能的实施方式中,还可以从不同的设备集群中选择一个或者多个最佳的设备来作为借用算力的设备,比如选择不同的设备集群中空闲算力资源最充足的设备为最佳的设备。下面结合一些具体的实施方式对此进行介绍。In some possible implementations, it is also possible to select one or more optimal devices from different device clusters as the device to borrow computing power, for example, to select the device with the most idle computing power resources in different device clusters as the most good equipment. This will be introduced below in combination with some specific implementation manners.
在一个可能的实施方式中,第一计算设备获取至少一个设备的参考信息;第一计算设备根据获取到的至少一个设备的参考信息确定第二计算设备,第二计算设备的参考信息获取满足预设需求。In a possible implementation manner, the first computing device acquires reference information of at least one device; the first computing device determines a second computing device according to the acquired reference information of at least one device, and the acquisition of the reference information of the second computing device satisfies the predetermined set demand.
在一个可能的实施方式中,至少一个设备的参考信息包括至少一个设备中的每个设备 的空闲算力资源。预设需求可以自定义,比如可以设定空闲算力资源超过阈值即认为满足预设需求。In a possible implementation manner, the reference information of at least one device includes idle computing resources of each device in the at least one device. The preset requirements can be customized. For example, it can be set that the idle computing power resources exceed the threshold and the preset requirements are considered to be met.
在一个可能的实施方式中,至少一个设备的参考信息还包括至少一个设备中的每个设备和第一计算设备之间的时延信息。In a possible implementation manner, the reference information of the at least one device further includes delay information between each device in the at least one device and the first computing device.
在一个可能的实施方式中,至少一个设备的参考信息还包括至少一个设备中的每个设备,和第一计算设备在第一计算设备所在的拓扑结构中间隔的设备数目。In a possible implementation manner, the reference information of the at least one device further includes each device in the at least one device, and the number of devices separated by the first computing device in the topology where the first computing device is located.
在一些可能的实施方式中,还可以引入区块链,实现跨集群节点间的度量信息的收集,其中,度量信息可以包括空闲算力资源、时延信息、带宽等。In some possible implementations, the blockchain can also be introduced to realize the collection of metric information across cluster nodes, where the metric information can include idle computing resources, delay information, bandwidth, and so on.
参阅图6,为本申请实施例提供的另一种任务处理的方法的流程示意图,可以包括以下步骤:Referring to FIG. 6, it is a schematic flowchart of another task processing method provided by the embodiment of the present application, which may include the following steps:
601、第一计算设备通过serverless系统中的目标函数function接收多个任务请求。601. The first computing device receives multiple task requests through an objective function function in a serverless system.
602、第一计算设备从第一区块链设备中获取至少一个设备的参考信息。602. The first computing device acquires reference information of at least one device from the first blockchain device.
至少一个设备中的每个设备和第一计算设备属于不同的设备集群,其中,第三设备的参考信息是第三设备向第二区块链设备中写入的,以通过第二区块链设备将第三设备的参考信息同步到第二区块链设备维护的区块链中除第二区块链设备之外的其他区块链设备中,第一区块链设备是第二区块链设备维护的区块链中任意一个区块链设备,第三设备是至少一个设备中的任意一个设备。Each of the at least one device and the first computing device belong to different device clusters, wherein the reference information of the third device is written by the third device into the second block chain device to pass the second block chain The device synchronizes the reference information of the third device to other blockchain devices except the second blockchain device in the blockchain maintained by the second blockchain device. The first blockchain device is the second block Any one of the blockchain devices in the blockchain maintained by the chain device, and the third device is any one of at least one device.
603、第一计算设备向第二计算设备发送目标函数。603. The first computing device sends the objective function to the second computing device.
第二计算设备的参考信息获取满足预设需求。The acquisition of reference information by the second computing device satisfies a preset requirement.
604、若第一计算设备获取到自身空闲算力资源不充足,则通过目标function在第一设备中处理第一部分任务请求,并且向第二计算设备转发第二部分任务请求。604. If the first computing device obtains that its free computing resources are not sufficient, process the first part of the task request on the first device through the target function, and forward the second part of the task request to the second computing device.
605、第二计算设备通过接收到的目标函数处理第二部分任务请求。605. The second computing device processes the second part of task requests by using the received objective function.
606、第一计算设备接收第二计算设备发送的第二部分任务请求的处理结果。606. The first computing device receives a processing result of the second part of the task request sent by the second computing device.
步骤601、步骤603至步骤606可以参照图5对应的实施例中的步骤501、步骤502至步骤505进行理解,这里不再重复赘述。Step 601 , step 603 to step 606 can be understood with reference to step 501 , step 502 to step 505 in the embodiment corresponding to FIG. 5 , and will not be repeated here.
参阅图7,为本申请实施例提供的另一种任务处理的方法的流程示意图,可以包括以下步骤:Referring to FIG. 7 , it is a schematic flowchart of another task processing method provided by the embodiment of the present application, which may include the following steps:
701、第一计算设备通过serverless系统中的目标函数function接收多个任务请求。701. The first computing device receives multiple task requests through an objective function function in a serverless system.
702、第一计算设备从第一区块链设备中获取至少一个设备的参考信息。702. The first computing device acquires reference information of at least one device from the first blockchain device.
703、第一计算设备建立和第二计算设备之间的通信链路。703. The first computing device establishes a communication link with the second computing device.
可以采用任意一种建立设备之间通信网络的方式,来建立第一计算设备与第二计算设备之间的通信网络。示例性的,该通信网络可以是overlay通信网络或underlay通信网络。The communication network between the first computing device and the second computing device may be established by any means of establishing a communication network between devices. Exemplarily, the communication network may be an overlay communication network or an underlay communication network.
704、第一计算设备通过通信链路向第二计算设备发送目标函数。704. The first computing device sends the objective function to the second computing device through a communication link.
705、若第一计算设备获取到自身空闲算力资源不充足,则通过目标function在第一设备中处理第一部分任务请求,并且向第二计算设备转发第二部分任务请求。705. If the first computing device obtains that its free computing resources are not sufficient, process the first part of the task request on the first device through the target function, and forward the second part of the task request to the second computing device.
706、第二计算设备通过接收到的目标函数处理第二部分任务请求。706. The second computing device processes the second part of task requests by using the received objective function.
707、第一计算设备接收第二计算设备发送的第二部分任务请求的处理结果。707. The first computing device receives a processing result of the second part of the task request sent by the second computing device.
708、若第一计算设备获取到自身空闲算力资源充足,第一计算设备停止通过 serverless系统向第二计算设备转发第二部分任务请求。708. If the first computing device obtains sufficient free computing resources, the first computing device stops forwarding the second part of task requests to the second computing device through the serverless system.
709、第一计算设备在指定时长后,断开通信链路。709. The first computing device disconnects the communication link after a specified time period.
在这种实施方式中,若第一计算设备获取到自身空闲算力资源充足,则第一计算设备可以不再将流量路由到第二计算设备,即第一计算设备可以停止通过serverless系统向第二计算设备转发部分任务请求。此外,为了保证第二计算设备已经处理的结果能够顺利传输至第一计算设备,第一计算设备在获取到自身空闲算力资源充足的情况下,不立即断开通信链路,而是在指定时长后再断开通信链路。In this implementation, if the first computing device obtains sufficient idle computing resources, the first computing device may no longer route traffic to the second computing device, that is, the first computing device may stop sending traffic to the second computing device through the serverless system. The second computing device forwards the partial task request. In addition, in order to ensure that the results processed by the second computing device can be smoothly transmitted to the first computing device, the first computing device does not immediately disconnect the communication link when it obtains sufficient idle computing resources, but After a long time, the communication link is disconnected.
如图8所示,为本申请实施例提供的一种业务处理系统的架构示意图。如图8所示,本申请实施例提供的系统适用于边缘化场景。边缘场景下,边缘节点多为算力有限的轻量化节点,当遇到突发流量时,由于本地算力不足,导致无法满足业务需求,如果按照峰值部署算力,则会导致边缘节点成本高昂,而此时边缘的中心节点以及相邻节点依然存在空余算力,此时通过快速借用临近边缘节点或中心节点的算力资源来满足突发流量需求。同时,利用serverless的轻量化能力(跨节点的同步信息只有几K大的function算子),即可将算子快速同步至目标节点,在目标节点毫秒级即可快速响应业务需求,在边缘节点与目标节点间自动建立虚拟资源间的二层或三层网络,实现边缘本地业务在访问业务时利用负载均衡方案分流至借用算力的节点,当峰值业务过去后,根据监控度量信息自动释放借用的算力。As shown in FIG. 8 , it is a schematic diagram of an architecture of a service processing system provided by an embodiment of the present application. As shown in FIG. 8 , the system provided by the embodiment of the present application is applicable to marginalized scenarios. In edge scenarios, most edge nodes are lightweight nodes with limited computing power. When encountering sudden traffic, due to insufficient local computing power, business needs cannot be met. If the computing power is deployed according to the peak value, the cost of edge nodes will be high , and at this time, the central node and adjacent nodes on the edge still have spare computing power. At this time, the computing power resources of the adjacent edge nodes or central nodes are quickly borrowed to meet the sudden traffic demand. At the same time, by using the lightweight capability of serverless (the cross-node synchronization information is only a few K functional operators), the operator can be quickly synchronized to the target node, and the target node can quickly respond to business needs in milliseconds. Automatically establish a layer-2 or layer-3 network between virtual resources with the target node, so that when the edge local business accesses the business, it uses the load balancing solution to distribute the computing power to the node that borrows the computing power. When the peak business has passed, the borrowing is automatically released according to the monitoring measurement information computing power.
前述对本申请提供的业务处理的方法的流程以及业务处理的系统进行了详细介绍,下面基于前述业务处理方法的流程,对本申请提供的业务处理装置进行介绍,该业务处理装置可以用于执行前述图3-7中的方法步骤。The foregoing has introduced in detail the flow of the business processing method and the business processing system provided by this application. Based on the flow of the foregoing business processing method, the business processing device provided by this application will be introduced below. The business processing device can be used to execute the aforementioned Method steps in 3-7.
参阅图9,本申请提供的一种业务处理装置的结构示意图。Referring to FIG. 9 , it is a schematic structural diagram of a service processing device provided by the present application.
该业务处理装置包括收发模块901、处理模块902。The service processing device includes a transceiver module 901 and a processing module 902 .
在一个可能的实施方式中,该业务处理装置是图3-7中的第一计算节点或者第二计算节点,还可能是区块链节点/设备,第一计算设备或者第二计算设备。In a possible implementation, the service processing device is the first computing node or the second computing node in Fig. 3-7, and may also be a block chain node/device, the first computing device or the second computing device.
在一个可能的实施方式中,收发模块901可以用于执行图3对应的实施例中的302、304、305以及其他与收发相关的步骤,可选的,还可以用于执行图3对应的实施例中的步骤302、303。处理模块902用于执行图3对应的实施例中的步骤302以及其他与处理相关的步骤。In a possible implementation, the transceiving module 901 can be used to perform 302, 304, 305 and other steps related to transceiving in the embodiment corresponding to FIG. 3 , and optionally, can also be used to perform the implementation corresponding to FIG. 3 Steps 302 and 303 in the example. The processing module 902 is configured to execute step 302 in the embodiment corresponding to FIG. 3 and other processing-related steps.
在一个可能的实施方式中,收发模块901可以用于执行图5对应的实施例中的步骤501、502、503、504、505以及其他与收发相关的步骤,处理模块902用于执行图5对应的实施例中的步骤503以及其他与处理相关的步骤。In a possible implementation, the transceiving module 901 can be used to execute steps 501, 502, 503, 504, 505 and other steps related to sending and receiving in the embodiment corresponding to FIG. Step 503 in the embodiment and other processing-related steps.
在一个可能的实施方式中,收发模块901可以用于执行图6对应的实施例中的步骤601、602、603、604、605、606以及其他与收发相关的步骤,处理模块902用于执行图6对应的实施例中的步骤604以及其他与处理相关的步骤。In a possible implementation, the transceiving module 901 can be used to execute steps 601, 602, 603, 604, 605, 606 and other steps related to sending and receiving in the embodiment corresponding to FIG. 6 corresponds to step 604 in the embodiment and other processing-related steps.
在一个可能的实施方式中,收发模块901可以用于执行图7对应的实施例中的步骤701、702、703、704、705、706、707以及其他与收发相关的步骤,处理模块902用于执行图6对应的实施例中的步骤705、708、709以及其他与处理相关的步骤。In a possible implementation, the transceiving module 901 can be used to execute steps 701, 702, 703, 704, 705, 706, 707 and other steps related to transceiving in the embodiment corresponding to FIG. Steps 705, 708, 709 and other processing-related steps in the embodiment corresponding to FIG. 6 are executed.
本申请实施例还提供一种业务处理装置,请参阅图10,图10为本申请实施例提供的业务处理装置的一种结构示意图。业务处理装置1800上可以部署有图9对应实施例中所描 述的业务处理装置,用于实现图3至图7对应实施例中第一计算节点或者第二计算节点,还可能是区块链节点/设备,第一计算设备或者第二计算设备的功能。具体的,业务处理装置1800可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器CPU1822(例如,一个或一个以上处理器)和存储器1832,一个或一个以上存储应用程序1842或数据1844的存储介质1830(例如一个或一个以上海量存储设备)。The embodiment of the present application also provides a service processing device, please refer to FIG. 10 , which is a schematic structural diagram of the service processing device provided in the embodiment of the present application. The business processing device 1800 can be deployed with the business processing device described in the embodiment corresponding to FIG. 9, which is used to implement the first computing node or the second computing node in the embodiments corresponding to FIG. 3 to FIG. 7, and may also be a blockchain node. /device, a function of the first computing device or the second computing device. Specifically, the business processing device 1800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units CPU1822 (for example, one or more processors) and memory 1832, and one or more storage applications A storage medium 1830 for programs 1842 or data 1844 (such as one or more mass storage devices).
其中,存储器1832和存储介质1830可以是短暂存储或持久存储。在一个实施例中,存储器1832为随机存储存储器(random access memory,RAM),可以与中央处理器1822直接交换数据,用于加载数据1844和应用程序1842和/或操作系统1841以供中央处理器1822直接运行与运用,通常作为操作系统或其他正在运行中的程序的临时数据存储媒介。存储在存储介质1830的程序可以包括一个或一个以上模块(图10中未示出),每个模块可以包括对业务处理装置中的一系列指令操作。Wherein, the memory 1832 and the storage medium 1830 may be temporary storage or persistent storage. In one embodiment, the memory 1832 is a random access memory (random access memory, RAM), which can directly exchange data with the central processing unit 1822 for loading data 1844 and application programs 1842 and/or operating system 1841 for the central processing unit 1822 runs and uses directly, usually as a temporary data storage medium for operating systems or other running programs. The program stored in the storage medium 1830 may include one or more modules (not shown in FIG. 10 ), and each module may include a series of instruction operations on the business processing device.
更进一步地,中央处理器1822可以设置为与存储介质1830通信,在业务处理装置1800上执行存储介质1830中的一系列指令操作。在一种可能的实施方式中,存储介质1830中存储了前述图3-图7中任一实施例所示的方法步骤对应的程序指令以及数据。Furthermore, the central processing unit 1822 may be configured to communicate with the storage medium 1830 , and execute a series of instruction operations in the storage medium 1830 on the service processing device 1800 . In a possible implementation manner, the storage medium 1830 stores program instructions and data corresponding to the method steps shown in any one of the foregoing embodiments shown in FIG. 3 to FIG. 7 .
业务处理装置1800还可以包括一个或一个以上电源1826,一个或一个以上有线或无线网络接口1850,一个或一个以上输入输出接口1858,和/或,一个或一个以上操作系统1841,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。The service processing device 1800 may also include one or more power sources 1826, one or more wired or wireless network interfaces 1850, one or more input and output interfaces 1858, and/or, one or more operating systems 1841, such as Windows Server™, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
本申请实施例还提供了一种业务处理装置,该业务处理装置也可以称为数字处理芯片或者芯片,芯片包括处理单元和通信接口,处理单元可以通过通信接口获取程序指令,程序指令被处理单元执行,处理单元用于执行前述图3-图7中任一实施例所示的业务处理装置执行的方法步骤。The embodiment of the present application also provides a business processing device. The business processing device can also be called a digital processing chip or a chip. The chip includes a processing unit and a communication interface. The processing unit can obtain program instructions through the communication interface, and the program instructions are processed by the processing unit. To execute, the processing unit is configured to execute the method steps performed by the service processing device shown in any one of the embodiments in FIG. 3 to FIG. 7 .
本申请实施例还提供一种数字处理芯片。该数字处理芯片中集成了用于实现上述处理器1801,或者处理器1801的功能的电路和一个或者多个接口。当该数字处理芯片中集成了存储器时,该数字处理芯片可以完成前述实施例中的任一个或多个实施例的方法步骤。当该数字处理芯片中未集成存储器时,可以通过通信接口与外置的存储器连接。该数字处理芯片根据外置的存储器中存储的程序代码来实现上述实施例中第一计算节点或者第二计算节点,还可能是区块链节点/设备,第一计算设备或者第二计算设备执行的动作。The embodiment of the present application also provides a digital processing chip. The digital processing chip integrates circuits and one or more interfaces for realizing the above processor 1801 or the functions of the processor 1801 . When a memory is integrated in the digital processing chip, the digital processing chip can complete the method steps in any one or more of the foregoing embodiments. When no memory is integrated in the digital processing chip, it can be connected to an external memory through a communication interface. The digital processing chip realizes the first computing node or the second computing node in the above embodiment according to the program code stored in the external memory, and may also be a blockchain node/device, and the first computing device or the second computing device executes Actions.
更详细地,当本申请实施例提供的业务处理装置为芯片时,该芯片具体包括:处理单元和通信单元,所述处理单元例如可以是处理器,所述通信单元例如可以是输入/输出接口、管脚或电路等。该处理单元可执行存储单元存储的计算机执行指令,以使服务器内的芯片执行上述图3-图7所示实施例描述的业务处理方法。In more detail, when the service processing device provided in the embodiment of the present application is a chip, the chip specifically includes: a processing unit and a communication unit, the processing unit may be, for example, a processor, and the communication unit may be, for example, an input/output interface , pins or circuits, etc. The processing unit can execute the computer-executable instructions stored in the storage unit, so that the chip in the server executes the service processing method described in the embodiments shown in FIGS. 3-7 .
可选地,前述的存储单元可以为芯片内的存储单元,如寄存器、缓存等,所述存储单元还可以是所述无线接入设备端内的位于所述芯片外部的存储单元,如只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器RAM等。Optionally, the aforementioned storage unit may be a storage unit in the chip, such as a register, a cache, etc., and the storage unit may also be a storage unit located outside the chip in the wireless access device, such as a read-only Memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, random access memory RAM, etc.
具体地,前述的处理单元或者处理器可以是中央处理器、网络处理器(neural-network processing unit,NPU)、图形处理器(graphics processing unit,GPU)、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated  circuit,ASIC)或现场可编程逻辑门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者也可以是任何常规的处理器等。Specifically, the aforementioned processing unit or processor may be a central processing unit, a network processing unit (neural-network processing unit, NPU), a graphics processing unit (graphics processing unit, GPU), a digital signal processor (digital signal processor, DSP) ), application specific integrated circuit (ASIC) or field programmable logic gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor or the like.
其中,上述任一处提到的处理器,可以是一个通用中央处理器,微处理器,ASIC,或一个或多个用于控制上述图3至图7的方法的程序执行的集成电路。Wherein, the processor mentioned above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the program execution of the above-mentioned methods in FIGS. 3 to 7 .
本申请实施例中还提供一种计算机可读存储介质,该计算机可读存储介质中存储有程序,当其在计算机上运行时,使得计算机执行如前述图3至图7所示实施例描述的方法中的步骤。The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a program, and when it runs on the computer, the computer executes the above-mentioned embodiment as described in Fig. 3 to Fig. 7 steps in the method.
本申请实施例中还提供一种计算机程序产品,当其在计算机上运行时,使得计算机执行如前述图3至图7所示实施例描述的方法中第一计算节点或者第二计算节点,还可能是区块链节点/设备,第一计算设备或者第二计算设备所执行的步骤。The embodiment of the present application also provides a computer program product, which, when running on a computer, causes the computer to execute the first computing node or the second computing node in the method described in the embodiments shown in FIGS. 3 to 7 , and also May be steps performed by blockchain nodes/devices, first computing device or second computing device.
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。In addition, it should be noted that the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be A physical unit can be located in one place, or it can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationship between the modules indicates that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。This application can be implemented by means of software plus necessary general-purpose hardware, and of course it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, and dedicated components. In general, all functions completed by computer programs can be easily realized by corresponding hardware, and the specific hardware structure used to realize the same function can also be varied, such as analog circuits, digital circuits or special-purpose circuit etc. However, for this application, software program implementation is a better implementation mode in most cases. Based on this understanding, the essence of the technical solution of this application or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, such as a floppy disk of a computer , U disk, mobile hard disk, read-only memory ROM, random access memory RAM, magnetic disk or optical disk, etc., including several instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute the application methods described in the various examples.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server, or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be stored by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and not necessarily Used to describe a specific sequence or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.

Claims (19)

  1. 一种任务处理的方法,其特征在于,包括:A method for task processing, characterized in that, comprising:
    第一计算设备通过无服务器serverless系统中的目标函数function接收多个任务请求;The first computing device receives multiple task requests through the target function function in the serverless system;
    所述第一计算设备向第二计算设备发送所述目标function,所述第二计算设备和所述第一计算设备分属于不同的设备集群;The first computing device sends the target function to a second computing device, and the second computing device and the first computing device belong to different device clusters;
    当所述第一计算设备空闲算力资源不充足,则所述第一计算设备通过所述目标function在所述第一计算设备中处理第一部分任务请求,并且向所述第二计算设备转发第二部分任务请求,以指示拥有空闲算力资源的所述第二计算设备通过接收到的所述目标function处理所述第二部分任务请求,所述多个任务请求中包括所述第一部分任务请求和所述第二部分任务请求;When the idle computing resources of the first computing device are insufficient, the first computing device processes the first part of task requests in the first computing device through the target function, and forwards the first part of task requests to the second computing device A two-part task request, to indicate that the second computing device with idle computing power resources processes the second part of the task request through the received target function, and the plurality of task requests includes the first part of the task request and said second part of the task request;
    所述第一计算设备接收所述第二计算设备发送的所述第二部分任务请求的处理结果。The first computing device receives a processing result of the second part of the task request sent by the second computing device.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    所述第一计算设备获取至少一个设备的参考信息;The first computing device acquires reference information of at least one device;
    所述第一计算设备根据获取到的所述至少一个设备的参考信息确定所述第二计算设备,所述第二计算设备的参考信息获取满足预设需求。The first computing device determines the second computing device according to the acquired reference information of the at least one device, and the acquisition of the reference information of the second computing device meets a preset requirement.
  3. 根据权利要求2所述的方法,其特征在于,所述至少一个设备的参考信息包括所述至少一个设备中的每个所述设备的空闲算力资源,或者所述至少一个设备中的每个所述设备的空闲算力资源和所述至少一个设备中的每个所述设备和所述第一计算设备之间的时延信息,或者所述至少一个设备中的每个所述设备的空闲算力资源和所述至少一个设备中的每个所述设备和所述第一计算设备在拓扑结构中间隔的设备数目。The method according to claim 2, wherein the reference information of the at least one device includes idle computing power resources of each of the at least one device, or each of the at least one device The idle computing resource of the device and the delay information between each of the at least one device and the first computing device, or the idle time of each of the at least one device The computing resources and the number of devices separated by each of the at least one device and the first computing device in a topology structure.
  4. 根据权利要求2或3所述的方法,其特征在于,所述方法还包括:The method according to claim 2 or 3, characterized in that the method further comprises:
    所述第一计算设备从第一区块链设备中获取所述至少一个设备的参考信息,所述至少一个设备中的每个所述设备和所述第一计算设备属于不同的设备集群,其中,第三计算设备的参考信息是所述第三计算设备向第二区块链设备中写入的,以通过所述第二区块链设备将所述第三计算设备的参考信息同步到所述第二区块链设备维护的区块链中除所述第二区块链设备之外的其他区块链设备中,所述第一区块链设备是所述第二区块链设备维护的区块链中任意一个区块链设备,所述第三计算设备是所述至少一个设备中的任意一个设备。The first computing device obtains the reference information of the at least one device from the first block chain device, and each of the devices in the at least one device and the first computing device belong to different device clusters, wherein , the reference information of the third computing device is written by the third computing device into the second blockchain device, so that the reference information of the third computing device is synchronized to the second blockchain device through the second blockchain device Among other blockchain devices in the blockchain maintained by the second blockchain device other than the second blockchain device, the first blockchain device is maintained by the second blockchain device Any one of the blockchain devices in the blockchain, the third computing device is any one of the at least one device.
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述第一计算设备向第二计算设备发送目标function,包括:The method according to any one of claims 1 to 4, wherein the first computing device sending the target function to the second computing device includes:
    当所述第一计算设备获取到自身空闲算力资源不充足,则所述第一计算设备向第二计算设备发送所述目标function。When the first computing device obtains that its free computing resources are not sufficient, the first computing device sends the target function to the second computing device.
  6. 一种任务处理的系统,其特征在于,所述系统中包括第一计算设备集群和第二计算设备集群,所述第一计算设备集群拥有包括第一计算设备在内的多个计算设备,所述第一计算设备集群拥有包括第二计算设备在内的多个计算设备;A task processing system, characterized in that the system includes a first computing device cluster and a second computing device cluster, the first computing device cluster has a plurality of computing devices including the first computing device, so The first computing device cluster has a plurality of computing devices including the second computing device;
    所述第一计算设备,用于:The first computing device is configured to:
    通过无服务器serverless系统中的目标函数function接收多个任务请求;Receive multiple task requests through the target function function in the serverless system;
    向第二计算设备发送所述目标function,所述第二计算设备和所述第一计算设备分属 于不同的设备集群;sending the target function to a second computing device, the second computing device and the first computing device belonging to different device clusters;
    当所述第一计算设备自身空闲算力资源不充足,则通过所述目标function在所述第一计算设备中处理第一部分任务请求,并且向拥有空闲算力资源的所述第二计算设备转发第二部分任务请求,所述多个任务请求中包括所述第一部分任务请求和所述第二部分任务请求;When the idle computing resources of the first computing device itself are not sufficient, the first part of the task request is processed in the first computing device through the target function, and forwarded to the second computing device with idle computing resources a second partial task request, wherein the multiple task requests include the first partial task request and the second partial task request;
    所述第二计算设备,用于:The second computing device is configured to:
    通过接收到的所述目标function处理所述第二部分任务请求;processing the second part of the task request through the received target function;
    向所述第一计算设备发送所述第二部分任务请求的处理结果。Sending a processing result of the second part of the task request to the first computing device.
  7. 根据权利要求6所述的系统,其特征在于,所述第一计算设备,还用于:The system according to claim 6, wherein the first computing device is further used for:
    获取至少一个设备的参考信息;obtain reference information of at least one device;
    根据获取到的所述至少一个设备的参考信息确定所述第二计算设备,所述第二计算设备的参考信息获取满足预设需求。The second computing device is determined according to the acquired reference information of the at least one device, and the acquisition of the reference information of the second computing device meets a preset requirement.
  8. 根据权利要求7所述的系统,其特征在于,所述至少一个设备的参考信息包括所述至少一个设备中的每个所述设备的空闲算力资源,或者所述至少一个设备中的每个所述设备的空闲算力资源和所述至少一个设备中的每个所述设备和所述第一计算设备之间的时延信息,或者所述至少一个设备中的每个所述设备的空闲算力资源和所述至少一个设备中的每个所述设备和所述第一计算设备在拓扑结构中间隔的设备数目。The system according to claim 7, wherein the reference information of the at least one device includes idle computing power resources of each of the at least one device, or each of the at least one device The idle computing resource of the device and the delay information between each of the at least one device and the first computing device, or the idle time of each of the at least one device The computing resources and the number of devices separated by each of the at least one device and the first computing device in a topology structure.
  9. 根据权利要求7或8所述的系统,其特征在于,所述系统中还包括第一区块链设备和第二区块链设备,所述第一计算设备,还用于:The system according to claim 7 or 8, wherein the system further includes a first blockchain device and a second blockchain device, and the first computing device is also used for:
    从所述第一区块链设备中获取所述至少一个设备的参考信息,所述至少一个设备中的每个所述设备和所述第一计算设备分属于不同的设备集群,其中,第三计算设备的参考信息是所述第三计算设备向所述第二区块链设备中写入的,以通过所述第二区块链设备将所述第三计算设备的参考信息同步到所述第二区块链设备维护的区块链中除所述第二区块链设备之外的其他区块链设备中,所述第一区块链设备是所述第二区块链设备维护的区块链中任意一个区块链设备,所述第三计算设备是所述至少一个设备中的任意一个设备。Obtain the reference information of the at least one device from the first block chain device, each of the devices in the at least one device and the first computing device belong to different device clusters, wherein the third The reference information of the computing device is written by the third computing device into the second block chain device, so as to synchronize the reference information of the third computing device to the second block chain device through the second block chain device Among other blockchain devices in the blockchain maintained by the second blockchain device except the second blockchain device, the first blockchain device is maintained by the second blockchain device Any one of the blockchain devices in the blockchain, the third computing device is any one of the at least one device.
  10. 根据根据权利要求6至9任一项所述的系统,其特征在于,所述第一计算设备,具体用于:According to the system according to any one of claims 6 to 9, wherein the first computing device is specifically used for:
    若获取到所述第一计算设备的自身空闲算力资源不充足,则所述第一计算设备向第二计算设备发送所述目标function。If it is obtained that the free computing resources of the first computing device are not sufficient, the first computing device sends the target function to the second computing device.
  11. 一种任务处理的设备,其特征在于,包括:A device for task processing, characterized in that it comprises:
    收发模块,用于:Transceiver module for:
    通过无服务器serverless系统中的目标函数function接收多个任务请求;Receive multiple task requests through the target function function in the serverless system;
    向第二计算设备发送所述目标函数,所述第二计算设备和所述第一计算设备分属于不同的设备集群;sending the objective function to a second computing device, where the second computing device and the first computing device belong to different device clusters;
    处理模块,用于当所述第一计算设备自身空闲算力资源不充足,则通过所述目标function在所述第一计算设备中处理第一部分任务请求,并且指示所述收发模块向所述第二计算设备转发第二部分任务请求,以指示拥有空闲算力资源的所述第二计算设备通过接收到的所述目标function处理所述第二部分任务请求,所述多个任务请求中包括所述第一 部分任务请求和所述第二部分任务请求;A processing module, configured to process a first part of task requests in the first computing device through the target function when the first computing device itself has insufficient free computing power resources, and instruct the transceiver module to send a request to the first computing device The second computing device forwards the second part of the task request to indicate that the second computing device with idle computing resources processes the second part of the task request through the received target function, and the multiple task requests include the The first part of the task request and the second part of the task request;
    所述收发模块,还用于接收所述第二计算设备发送的所述第二部分任务请求的处理结果。The transceiving module is further configured to receive a processing result of the second part of the task request sent by the second computing device.
  12. 根据权利要求11所述的设备,其特征在于,所述收发模块,还用于:The device according to claim 11, wherein the transceiver module is also used for:
    获取至少一个设备的参考信息;obtain reference information of at least one device;
    所述处理模块,还用于:The processing module is also used for:
    根据获取到的所述至少一个设备的参考信息确定所述第二计算设备,所述第二计算设备的参考信息获取满足预设需求。The second computing device is determined according to the acquired reference information of the at least one device, and the acquisition of the reference information of the second computing device meets a preset requirement.
  13. 根据权利要求12所述的设备,其特征在于,所述至少一个设备的参考信息包括所述至少一个设备中的每个所述设备的空闲算力资源,或者所述至少一个设备中的每个所述设备的空闲算力资源和所述至少一个设备中的每个所述设备和所述第一计算设备之间的时延信息,或者所述至少一个设备中的每个所述设备的空闲算力资源和所述至少一个设备中的每个所述设备和所述第一计算设备在拓扑结构中间隔的设备数目。The device according to claim 12, wherein the reference information of the at least one device includes idle computing power resources of each of the at least one device, or each of the at least one device The idle computing resource of the device and the delay information between each of the at least one device and the first computing device, or the idle time of each of the at least one device The computing resources and the number of devices separated by each of the at least one device and the first computing device in a topology structure.
  14. 根据权利要求12或13所述的设备,其特征在于,所述收发模块,还用于:The device according to claim 12 or 13, wherein the transceiver module is also used for:
    从第一区块链设备中获取所述至少一个设备的参考信息,所述至少一个设备中的每个所述设备和所述第一计算设备属于不同的设备集群,其中,第三计算设备的参考信息是所述第三计算设备向第二区块链设备中写入的,以通过所述第二区块链设备将所述第三计算设备的参考信息同步到所述第二区块链设备维护的区块链中除所述第二区块链设备之外的其他区块链设备中,所述第一区块链设备是所述第二区块链设备维护的区块链中任意一个区块链设备,所述第三计算设备是所述至少一个设备中的任意一个设备。Obtain the reference information of the at least one device from the first block chain device, each of the devices in the at least one device and the first computing device belong to different device clusters, wherein the third computing device's The reference information is written by the third computing device into the second block chain device, so as to synchronize the reference information of the third computing device to the second block chain device through the second block chain device In the block chain maintained by the device other than the second block chain device, the first block chain device is any block chain in the block chain maintained by the second block chain device A blockchain device, the third computing device is any one of the at least one device.
  15. 根据权利要求11至14任一项所述的设备,其特征在于,所述处理模块,还用于:The device according to any one of claims 11 to 14, wherein the processing module is further configured to:
    建立和所述第二计算设备之间的通信链路;establishing a communication link with the second computing device;
    所述收发模块,具体用于:The transceiver module is specifically used for:
    通过所述通信链路向所述第二计算设备发送所述目标函数;sending the objective function to the second computing device over the communication link;
    所述处理模块,还用于:The processing module is also used for:
    若获取到所述第一计算设备自身空闲算力资源充足,停止通过所述serverless系统向所述第二计算设备转发第二部分任务请求;Stop forwarding the second part of the task request to the second computing device through the serverless system if it is obtained that the first computing device itself has sufficient idle computing resources;
    在指定时长后,断开所述通信链路。After a specified period of time, the communication link is disconnected.
  16. 根据权利要求11至15任一项所述的设备,其特征在于,所述收发模块,具体用于:The device according to any one of claims 11 to 15, wherein the transceiver module is specifically used for:
    若所述第一计算设备获取到自身空闲算力资源不充足,则所述第一计算设备向第二计算设备发送目标function。If the first computing device obtains that its free computing resources are not sufficient, the first computing device sends the target function to the second computing device.
  17. 一种任务处理的设备,其特征在于,包括:A device for task processing, characterized in that it comprises:
    存储器,用于存储计算机可读指令;memory for storing computer readable instructions;
    还包括,与所述存储器耦合的处理器,用于执行所述存储器中的计算机可读指令从而执行如权利要求1至5任一项所描述的方法。It also includes a processor coupled to the memory, configured to execute computer-readable instructions in the memory so as to perform the method described in any one of claims 1 to 5.
  18. 一种计算机可读存储介质,其特征在于,包括指令,当所述指令在计算机装置上运行时,使得所述计算机装置执行如权利要求1至5任一项所描述的方法。A computer-readable storage medium, characterized by comprising instructions, which, when run on a computer device, cause the computer device to execute the method described in any one of claims 1 to 5.
  19. 一种芯片,其特征在于,所述芯片与存储器耦合,用于执行所述存储器中存储的程 序,以执行如权利要求1至5任一项所描述的方法。A chip, characterized in that the chip is coupled with a memory for executing a program stored in the memory to perform the method as described in any one of claims 1 to 5.
PCT/CN2022/096569 2021-11-02 2022-06-01 Service processing method, system and apparatus WO2023077791A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111290138.6A CN116069492A (en) 2021-11-02 2021-11-02 Service processing method, system and device
CN202111290138.6 2021-11-02

Publications (1)

Publication Number Publication Date
WO2023077791A1 true WO2023077791A1 (en) 2023-05-11

Family

ID=86172085

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/096569 WO2023077791A1 (en) 2021-11-02 2022-06-01 Service processing method, system and apparatus

Country Status (2)

Country Link
CN (1) CN116069492A (en)
WO (1) WO2023077791A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190026150A1 (en) * 2017-07-20 2019-01-24 Cisco Technology, Inc. Fpga acceleration for serverless computing
CN110537169A (en) * 2017-04-28 2019-12-03 微软技术许可有限责任公司 Cluster resource management in distributed computing system
US10915366B2 (en) * 2018-09-28 2021-02-09 Intel Corporation Secure edge-cloud function as a service
CN112671830A (en) * 2020-12-02 2021-04-16 武汉联影医疗科技有限公司 Resource scheduling method, system, device, computer equipment and storage medium
US20210232440A1 (en) * 2020-01-28 2021-07-29 Hewlett Packard Enterprise Development Lp Execution of functions by clusters of computing nodes

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110537169A (en) * 2017-04-28 2019-12-03 微软技术许可有限责任公司 Cluster resource management in distributed computing system
US20190026150A1 (en) * 2017-07-20 2019-01-24 Cisco Technology, Inc. Fpga acceleration for serverless computing
US10915366B2 (en) * 2018-09-28 2021-02-09 Intel Corporation Secure edge-cloud function as a service
US20210232440A1 (en) * 2020-01-28 2021-07-29 Hewlett Packard Enterprise Development Lp Execution of functions by clusters of computing nodes
CN112671830A (en) * 2020-12-02 2021-04-16 武汉联影医疗科技有限公司 Resource scheduling method, system, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN116069492A (en) 2023-05-05

Similar Documents

Publication Publication Date Title
WO2022021176A1 (en) Cloud-edge collaborative network resource smooth migration and restructuring method and system
Yi et al. Lavea: Latency-aware video analytics on edge computing platform
Wang et al. Edge cloud offloading algorithms: Issues, methods, and perspectives
US10728091B2 (en) Topology-aware provisioning of hardware accelerator resources in a distributed environment
CN110134495B (en) Container cross-host online migration method, storage medium and terminal equipment
CN105607954A (en) Stateful container online migration method and apparatus
US20130198755A1 (en) Apparatus and method for managing resources in cluster computing environment
WO2013163865A1 (en) Virtual machine hot migration and deployment method, server and cluster system
CN108182105A (en) Local dynamic station moving method and control system based on Docker container techniques
CN105308929A (en) Distributed load balancer
CN105264865A (en) Multipath routing in a distributed load balancer
WO2023039965A1 (en) Cloud-edge computing network computational resource balancing and scheduling method for traffic grooming, and system
CN112463366A (en) Cloud-native-oriented micro-service automatic expansion and contraction capacity and automatic fusing method and system
WO2018121201A1 (en) Distributed cluster service structure, node cooperation method and device, terminal and medium
CN106681839B (en) Elastic calculation dynamic allocation method
US20170293500A1 (en) Method for optimal vm selection for multi data center virtual network function deployment
CN104917805A (en) Load sharing method and equipment
CN109697120A (en) Method, electronic equipment for application migration
WO2021120633A1 (en) Load balancing method and related device
CN104539744A (en) Two-stage media edge cloud scheduling method and two-stage media edge cloud scheduling device
Singh et al. Survey on various load balancing techniques in cloud computing
WO2013016977A1 (en) Method and system for uniformly scheduling remote resources of cloud computing
US20230136612A1 (en) Optimizing concurrent execution using networked processing units
JPWO2019100984A5 (en)
CN106933654B (en) Virtual machine starting method based on cache

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22888827

Country of ref document: EP

Kind code of ref document: A1