Intelligent service task allocation method and device

By allocating tasks based on the available computing capacity of the computing unit, the problem of low efficiency of intelligent services in edge intelligent servers is solved, achieving faster processing speed and higher efficiency.

CN115168054BActive Publication Date: 2026-03-13ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-03
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In existing technologies, edge intelligent servers with multi-chip cascade architectures cannot allocate tasks based on the performance of computing units, resulting in low efficiency of intelligent services.

Method used

By obtaining the available computing capacity of each computing unit and allocating tasks according to the computing capacity, the computing time of each computing unit meets the preset conditions, thus achieving reasonable task allocation.

Benefits of technology

It improves the processing speed and efficiency of intelligent services, makes full use of hardware resources, and enhances the speed and efficiency of image search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115168054B_ABST
    Figure CN115168054B_ABST
Patent Text Reader

Abstract

This invention provides a task allocation method and apparatus for intelligent services, comprising: acquiring M tasks to be allocated; acquiring the available computing power of each computing unit in N groups of computing units; and allocating the M tasks to be allocated to the N groups of computing units according to the available computing power of each computing unit in the N groups of computing units. This invention solves the problem of low efficiency in intelligent services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and more specifically, to a task allocation method and apparatus for intelligent services. Background Technology

[0002] In related technologies, servers using a multi-chip cascaded architecture, such as edge intelligent servers, can provide basic intelligent services, such as image search, facial recognition, and data structuring in security scenarios.

[0003] Edge intelligent servers employ a master-slave heterogeneous architecture in their hardware, with multiple chips dynamically expandable on the PCIe bus, integrating storage and intelligent computing. Each chip can implement different types of intelligent services, such as image search, facial recognition, and data structuring. Each chip in the edge intelligent server has multiple computing units, and tasks are assigned to these units to complete the intelligent services. However, due to differences in performance among the computing units (e.g., load capacity, idle space, memory size), their computing capabilities vary. Current technologies cannot allocate tasks based on the performance of the computing units, leading to low efficiency in intelligent services.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This invention provides a task allocation method and apparatus for intelligent services, which at least solves the problem of low efficiency of intelligent services in related technologies.

[0006] According to an embodiment of the present invention, a task allocation method for intelligent services is provided, comprising: obtaining M tasks to be allocated, wherein M is greater than 1; obtaining the available computing power of each computing unit in N groups of computing units, wherein N is greater than or equal to 1, and each group of computing units includes at least one computing unit; and allocating the M tasks to be allocated to the N groups of computing units according to the available computing power of each computing unit in the N groups of computing units.

[0007] In an exemplary embodiment, the step of allocating the M tasks to be assigned to the N groups of computing units according to the available computing margin of each computing unit includes: obtaining the computing time of each computing unit according to the available computing margin of each computing unit, wherein the computing time is obtained based on the number of tasks assigned to each computing unit; obtaining the number of tasks assigned to each computing unit when the computing time of all computing units in the N groups of computing units meets a preset condition; and allocating the corresponding number of tasks from the M tasks to be assigned to the corresponding computing units.

[0008] In an exemplary embodiment, obtaining the computation time of each computing unit based on the available computational margin of each computing unit includes: performing the following operations on each of the N groups of computing units, wherein each computing unit performing the following operations is the current computing unit: determining the current computation time of the current computing unit as the ratio of the number of tasks assigned to the current computing unit to the available computational margin of the current computing unit; and determining the computation time of the current computing unit as the sum of the current computation time and the communication time of the current computing unit.

[0009] In one exemplary embodiment, obtaining the available computing margin of each computing unit in N groups of computing units includes: performing the following operations on each computing unit in the N groups of computing units, wherein each computing unit is the current computing unit during the operation: obtaining the performance margin of the current computing unit, wherein the performance margin is used to represent the idle level of the current computing unit; and determining the available computing margin of the current computing unit based on the performance margin of the current computing unit.

[0010] In an exemplary embodiment, determining the available computing margin of the current computing unit based on the performance margin of the current computing unit includes: obtaining the usage weight of the current computing unit and the performance coefficient of the current computing unit, wherein the usage weight is a weight pre-allocated to the current computing unit based on the performance margin of the current computing unit, and the performance coefficient is a coefficient allocated to the current computing unit based on the performance of the current computing unit; and determining the available computing margin of the current computing unit as the product of the performance margin of the current computing unit, the usage weight, and the performance coefficient.

[0011] In one exemplary embodiment, each of the N sets of computing units is a computing unit on a corresponding smart chip in an edge intelligent server, wherein the edge intelligent server includes multiple smart chips, and each smart chip includes a set of computing units.

[0012] In one exemplary embodiment, obtaining M tasks to be assigned includes: obtaining M image sets, wherein each of the M image sets includes an image to be searched and a subset of historical images; and assigning the M tasks to be assigned to the N sets of computing units includes assigning the M image sets to the N sets of computing units.

[0013] In an exemplary embodiment, after assigning the M image sets to the N groups of computing units, the method further includes: performing the following operations in each of the N groups of computing units, wherein each computing unit performing the following operations is referred to as the current computing unit, the image set assigned to the current computing unit is the current image set, the image to be searched in the current image set is the current image to be searched, and the historical image subset in the current image set is the current historical image subset: the current computing unit searches for a target image that matches the current image to be searched in the current historical image subset.

[0014] According to another embodiment of the present invention, a task allocation device for intelligent services is provided, comprising: a first acquisition module, configured to acquire M tasks to be allocated, wherein M is greater than 1; a second acquisition module, configured to acquire the available computing power of each computing unit in N groups of computing units, wherein N is greater than or equal to 1, and each group of computing units includes at least one computing unit; and an allocation module, configured to allocate the M tasks to be allocated to the N groups of computing units according to the available computing power of each computing unit in the N groups of computing units.

[0015] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the preceding claims.

[0016] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0017] This invention allocates M tasks to the N groups of computing units based on the available computing capacity of each unit. By systematically and in real-time managing the available computing capacity of each chip's computing units, the number of tasks allocated to each computing unit matches its available computing capacity. Under the same hardware resources, this achieves faster processing speed and higher efficiency for intelligent services. Therefore, it solves the problem of low efficiency in intelligent services. Attached Figure Description

[0018] Figure 1 This is a hardware structure block diagram of a mobile terminal for a task allocation method for intelligent services according to an embodiment of the present invention.

[0019] Figure 2 This is a flowchart of a task allocation method for intelligent services according to an embodiment of the present invention;

[0020] Figure 3 This is a hardware architecture diagram of an edge intelligent server according to an embodiment of the present invention;

[0021] Figure 4 This is a schematic diagram of the master chip and slave chip computing unit according to an embodiment of the present invention;

[0022] Figure 5 This is an architecture diagram according to an embodiment of the present invention;

[0023] Figure 6 This is an overall flowchart according to an embodiment of the present invention;

[0024] Figure 7 This is a framework diagram of the task management module allocating tasks according to an embodiment of the present invention;

[0025] Figure 8 This is a structural block diagram of a task allocation device for intelligent services according to an embodiment of the present invention. Detailed Implementation

[0026] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.

[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0028] The methods and embodiments provided in this application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a task allocation method for intelligent services according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0029] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the task allocation method of the intelligent service in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0030] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0031] This embodiment provides a task allocation method for intelligent services running on the aforementioned mobile terminal. Figure 2 This is a flowchart of a task allocation method for intelligent services according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0032] Step S202: Obtain M tasks to be assigned, where M is greater than 1;

[0033] Step S204: Obtain the available computing margin for each computing unit in N groups of computing units, where N is greater than or equal to 1, and each group of computing units includes at least one computing unit.

[0034] Step S206: Based on the available computing capacity of each of the N groups of computing units, the M tasks to be assigned are allocated to the N groups of computing units.

[0035] Optionally, the entity performing the above steps may be a background processor or other devices with similar processing capabilities, or a machine that integrates at least an image acquisition device and a data processing device. The image acquisition device may include an image acquisition module such as a camera, and the data processing device may include a terminal such as a computer or a mobile phone, but is not limited thereto.

[0036] Through the above steps, based on the available computing power of each of the N groups of computing units, the M tasks to be assigned are distributed to the N groups of computing units. By systematically and in real-time managing the available computing power of each computing unit in the chip, the number of tasks assigned to each computing unit matches its available computing power. Under the same hardware resources, this achieves faster processing speed and higher efficiency for intelligent services. Therefore, the problem of low efficiency in intelligent services can be solved.

[0037] As an optional implementation, the edge intelligent server employs a hardware architecture consisting of a master chip and slave chips. The master chip is responsible for data storage (e.g., video data storage, image data storage), process communication (IPC) device management, decoding, and display output. The slave chips are used for decoding, encoding, and intelligent analysis. Multiple slave chips can be expanded by connecting them to the PCIe bus. The hardware architecture is shown below. Figure 3 As shown in the figure, the main CPU is the master chip, and the slave chips include smart card 1, smart card 2... smart card N, as shown in the figure.

[0038] like Figure 4 The diagram shows the main chip and slave chip computing units. The main chip contains a CPU, GPU, NPU, and DSP, while the slave chip contains a CPU, GPU, NPU, and DSP. Each chip's computing units correspond to a set of computing units; that is, one main chip corresponds to one set of computing units, and one slave chip corresponds to one set of computing units. If the number of main and slave chips is N, then there are N sets of computing units. Each set of computing units can include a CPU, GPU, NPU, and DSP. The basic business functions of the edge intelligent server can run on different computing units. For example, real-time acquisition of video streams, real-time storage of the streams to storage media, and intelligent event management mainly consume the CPU resources of the main chip; preview decoding in the output screen mainly consumes the GPU resources of the main chip; and intelligent video analysis mainly consumes the CPU and NPU resources of the slave chips. Different computing units on the main and slave chips have different levels of available computing margin. Furthermore, different computing units have different computing capabilities. This application utilizes the performance margin of multiple hardware computing units to improve the processing speed and efficiency of intelligent services.

[0039] As an optional implementation, such as Figure 5 The architecture diagram shown may include a configuration module, a computing unit management module, an image search task management module, and a communication module.

[0040] The configuration module is used to configure the usage weight W for each computing unit, where W ∈ [0,1]. Specifically, the usage weight can be assigned to computing units based on their idle time; for example, computing units with higher idle time are assigned a larger usage weight. Alternatively, the priority and consumption of critical business operations within a particular computing unit can be considered to reduce resource contention and minimize impact on critical business operations. For instance, the storage business of an edge intelligent server product primarily consumes CPU resources; this storage business is a core business and requires priority in resource allocation.

[0041] The computing unit management module acquires the performance coefficients of computing units in real time. These performance coefficients can be preset, specifically set according to the performance of each computing unit. Higher-performing computing units have higher performance coefficients. The performance of a computing unit can be determined by factors such as its load capacity, available free space, and memory size. The performance coefficient can be represented by the character Ck, where k ∈ [0, L], and L represents the number of computing units in the N groups. The performance coefficient can range from 0 to 100, and can be set according to specific circumstances.

[0042] The task management module can control the computing units in the master and slave chips to execute corresponding tasks, such as image search tasks.

[0043] The communication module supports communication within the chip, as well as communication between chips (e.g., communication between a master chip and a slave chip), and can send tasks to the computing unit within the chip.

[0044] In the above embodiments, the number of M can be determined according to the actual situation, and the above task can be a task in an intelligent service. For example, image-based target search becomes possible in image search. The image containing the target is detected, and the feature vector of the target is extracted. The feature vector of the target is compared with the previously extracted feature vectors one by one, thereby achieving efficient search for the target in the image.

[0045] The aforementioned M tasks can be image-based image search tasks. Taking searching for images matching the image to be searched in M ​​historical image libraries as an example, the image to be searched and the M historical image libraries can be considered as M tasks. Each task includes matching the image to be searched and a historical image library. The M tasks are allocated to N sets of computing units in the N chips of the edge intelligent server. Since the task allocation is based on the available computing capacity of each computing unit, the available computing capacity of the edge intelligent server can be fully utilized under the same hardware resources, thereby improving the speed and efficiency of image search.

[0046] In an exemplary embodiment, the step of allocating the M tasks to be assigned to the N groups of computing units according to the available computing margin of each computing unit includes: obtaining the computing time of each computing unit according to the available computing margin of each computing unit, wherein the computing time is obtained based on the number of tasks assigned to each computing unit; obtaining the number of tasks assigned to each computing unit when the computing time of all computing units in the N groups of computing units meets a preset condition; and allocating the corresponding number of tasks from the M tasks to be assigned to the corresponding computing units.

[0047] As an optional implementation, the above-mentioned preset condition can be that the computation time of all computing units in the N groups of computing units is equal, and the number of tasks assigned to each computing unit is obtained.

[0048] Ck represents the performance coefficient of the k-th computing unit, where k ∈ [0, L]. This performance coefficient represents the performance of the computing unit and can be set according to actual conditions. The higher the performance of the computing unit, the larger the performance coefficient. The performance of the computing unit includes, but is not limited to, the load capacity, idle margin, and memory size of the computing unit. The performance coefficient can be any value from 0 to 100, for example, the performance coefficient of a single computing unit can be abstracted as 100. L indicates that there are L computing units in N groups of computing units, that is, the edge computing server includes N chips (master chip plus slave chip), and there are L computing units in N chips.

[0049] Rk represents the performance margin of the k-th computing unit, where k∈[0,L] and Rk∈(0,L). This performance margin indicates the idle level of the computing unit; for example, a performance margin of 20% indicates an idle level of 20%.

[0050] Wk represents the usage weight of the k-th computing unit, which can be preset according to the idle level of the computing unit. The greater the idle level of the computing unit, the greater the usage weight. This weight can be used to represent the percentage of the computing unit's performance margin used to process tasks. Wk∈[0,1].

[0051] (Ck*Rk) represents the computational margin of the k-th computational unit.

[0052] (Wk*Ck*Rk) represents the available computational margin for the k-th computational unit.

[0053] Pk represents the proportion coefficient of the tasks assigned to the k-th computing unit, where k∈[0,L]. M represents the total number of tasks. Pk*M represents the number of tasks assigned to the k-th computing unit.

[0054] tk represents the communication time of the kth computing unit. The communication time within the same single chip is 0, and the communication time of all computing units within the same chip can be the same or different.

[0055] Tk represents the computation time of the k-th computation unit, Tk = (Pk*M) / (Wk*Ck*Rk) + tk

[0056] In the above formula, M, Wk, Ck, Rk, and tk are constants, while Pk and Tk are variables that need to be calculated using the following formula:

[0057] Tk=(Pk*M) / (Wk*Ck*Rk)+tk

[0058] T k =T k+1 =T k+2 =…=T k+L-1

[0059]

[0060] Using the above formulas, Pk and Tk are calculated. Theoretically, each computing unit has a consistent time consumption level, the highest concurrency, and is the optimal solution in terms of efficiency. Pk*M can be used to obtain the number of tasks assigned to each computing unit.

[0061] In an exemplary embodiment, obtaining the computation time of each computing unit based on the available computational margin of each computing unit includes: performing the following operations on each of the N groups of computing units, wherein each computing unit performing the following operations is the current computing unit: determining the current computation time of the current computing unit as the ratio of the number of tasks assigned to the current computing unit to the available computational margin of the current computing unit; and determining the computation time of the current computing unit as the sum of the current computation time and the communication time of the current computing unit.

[0062] As an optional implementation, taking the k-th computing unit as an example, (Pk*M) is the number of tasks assigned to the current computing unit, (Wk*Ck*Rk) is the available computing capacity of the current computing unit, and (Pk*M) / (Wk*Ck*Rk) is the current time consumed by the current computing unit. Tk=(Pk*M) / (Wk*Ck*Rk)+tk is the computing time consumed by the current computing unit.

[0063] In one exemplary embodiment, obtaining the available computing margin of each computing unit in N groups of computing units includes: performing the following operations on each computing unit in the N groups of computing units, wherein each computing unit is the current computing unit during the operation: obtaining the performance margin of the current computing unit, wherein the performance margin is used to represent the idle level of the current computing unit; and determining the available computing margin of the current computing unit based on the performance margin of the current computing unit.

[0064] As an optional implementation, taking the k-th computing unit as an example, Rk represents the performance margin of the k-th computing unit, where k∈[0,L] and Rk∈(0,L). This performance margin represents the idle level of the computing unit; for example, a performance margin of 20% indicates an idle level of 20%. (Ck*Rk) represents the computational margin of the k-th computing unit. (Wk*Ck*Rk) represents the available computational margin of the k-th computing unit.

[0065] In an exemplary embodiment, determining the available computing margin of the current computing unit based on the performance margin of the current computing unit includes: obtaining the usage weight of the current computing unit and the performance coefficient of the current computing unit, wherein the usage weight is a weight pre-allocated to the current computing unit based on the performance margin of the current computing unit, and the performance coefficient is a coefficient allocated to the current computing unit based on the performance of the current computing unit; and determining the available computing margin of the current computing unit as the product of the performance margin of the current computing unit, the usage weight, and the performance coefficient.

[0066] As an optional implementation, taking the k-th computing unit as an example, Ck represents the performance coefficient of the k-th computing unit, Rk represents the performance margin of the k-th computing unit, and Wk represents the utilization weight of the k-th computing unit. (Ck*Rk) represents the computational margin of the k-th computing unit. (Wk*Ck*Rk) represents the available computational margin of the k-th computing unit.

[0067] In one exemplary embodiment, each of the N sets of computing units is a computing unit on a corresponding smart chip in an edge intelligent server, wherein the edge intelligent server includes multiple smart chips, and each smart chip includes a set of computing units.

[0068] As an optional implementation, taking an edge intelligent server comprising N intelligent chips as an example, each intelligent chip contains a set of computing units, and the number of computing units on each intelligent chip can be determined according to the actual situation. The aforementioned N intelligent chips include master chips and slave chips.

[0069] In one exemplary embodiment, obtaining M tasks to be assigned includes: obtaining M image sets, wherein each of the M image sets includes an image to be searched and a subset of historical images; and assigning the M tasks to be assigned to the N sets of computing units includes assigning the M image sets to the N sets of computing units.

[0070] The aforementioned M tasks can be image-based image search tasks. Taking searching for images matching the image to be searched in M ​​historical image libraries as an example, the image to be searched and the M historical image libraries can be considered as M tasks. Each task includes matching the image to be searched and a historical image library. The M tasks are allocated to N sets of computing units in the N chips of the edge intelligent server. Since the task allocation is based on the available computing capacity of each computing unit, the available computing capacity of the edge intelligent server can be fully utilized under the same hardware resources, thereby improving the speed and efficiency of image search.

[0071] In an exemplary embodiment, after assigning the M image sets to the N groups of computing units, the method further includes: performing the following operations in each of the N groups of computing units, wherein each computing unit performing the following operations is referred to as the current computing unit, the image set assigned to the current computing unit is the current image set, the image to be searched in the current image set is the current image to be searched, and the historical image subset in the current image set is the current historical image subset: the current computing unit searches for a target image that matches the current image to be searched in the current historical image subset.

[0072] As an optional implementation, taking the kth computing unit as an example, the current image set assigned to the kth computing unit is a set of k images. The kth image set includes the image to be searched and a subset of the current historical images. The kth computing unit searches the subset of the current historical images for an image that matches the image to be searched, so as to achieve image search by image.

[0073] As an optional implementation, such as Figure 6 The overall flowchart shown may include the following steps:

[0074] 601: The user configures the performance margin of the computing unit using weight Wk, and the parameter is passed to the task management module.

[0075] 602: Computing Unit Management Module, which obtains the performance margin Rk of each computing unit in real time and passes the results to the Task Management Module.

[0076] 603: The task management module distributes tasks based on configured weights, performance margins of computing units, and performance coefficients of computing units. Note the amount of tasks distributed to each computing unit; this ensures that each unit outputs calculation results within approximately the same timeframe, achieving optimal task concurrency and efficiency. The task management module's task allocation framework is as follows: Figure 7 As shown.

[0077] 604: The communication module is responsible for intra-chip communication, cross-chip communication, and data transmission and reception.

[0078] 605: The computing unit receives the task and configuration information, performs time-sharing computation, and outputs the processing results upon completion.

[0079] Through the above embodiments, a systematic and real-time management of the resource reserves of each chip is achieved for multi-chip cascaded hardware solutions. Without adding new hardware modules, task processing speed and efficiency can be further improved. The task management module differentiates the weights of resource reserves for different computing units, improving task processing efficiency without affecting existing product functionality, thus enhancing overall product performance.

[0080] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0081] This embodiment also provides an apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0082] Figure 8 This is a structural block diagram of a task allocation device for intelligent services according to an embodiment of the present invention, such as... Figure 8As shown, the device includes: a first acquisition module 82, used to acquire M tasks to be assigned, wherein M is greater than 1; a second acquisition module 84, used to acquire the available computing capacity of each computing unit in N groups of computing units, wherein N is greater than or equal to 1, and each group of computing units includes at least one computing unit; and an allocation module 86, used to allocate the M tasks to be assigned to the N groups of computing units according to the available computing capacity of each computing unit in the N groups of computing units.

[0083] In an exemplary embodiment, the above-described apparatus is further configured to obtain the computation time of each computing unit based on the available computational margin of each computing unit, wherein the computation time is obtained based on the number of tasks assigned to each computing unit; and, if the computation time of all computing units in the N groups of computing units meets a preset condition, obtain the number of tasks assigned to each computing unit; and assign the corresponding number of tasks from the M tasks to be assigned to the corresponding computing units.

[0084] In an exemplary embodiment, the above-described apparatus is further configured to perform the following operations on each of the N sets of computing units, wherein each computing unit is a current computing unit when performing the following operations: determining the current time consumption of the current computing unit as the ratio of the number of tasks assigned to the current computing unit to the available computing capacity of the current computing unit; and determining the computing time consumption of the current computing unit as the sum of the current time consumption and the communication time consumption of the current computing unit.

[0085] In an exemplary embodiment, the above-described apparatus is further configured to perform the following operations on each of the N sets of computing units, wherein each computing unit is a current computing unit when performing the following operations: obtaining the performance margin of the current computing unit, wherein the performance margin is used to represent the idle level of the current computing unit; and determining the available computing margin of the current computing unit based on the performance margin of the current computing unit.

[0086] In an exemplary embodiment, the above-described apparatus is further configured to obtain the usage weight of the current computing unit and the performance coefficient of the current computing unit, wherein the usage weight is a weight pre-allocated to the current computing unit based on the performance margin of the current computing unit, and the performance coefficient is a coefficient allocated to the current computing unit based on the performance of the current computing unit; the product of the performance margin of the current computing unit, the usage weight, and the performance coefficient is determined as the available computing margin of the current computing unit.

[0087] In one exemplary embodiment, each of the N sets of computing units is a computing unit on a corresponding smart chip in an edge intelligent server, wherein the edge intelligent server includes multiple smart chips, and each smart chip includes a set of computing units.

[0088] In one exemplary embodiment, the above-described apparatus is further configured to acquire M image sets, wherein each of the M image sets includes an image to be searched and a subset of historical images; and to assign the M tasks to be assigned to the N sets of computing units, including assigning the M image sets to the N sets of computing units.

[0089] In an exemplary embodiment, the above-described apparatus is further configured to, after allocating the M image sets to the N groups of computing units, perform the following operations in each of the N groups of computing units: each computing unit performing the following operations is referred to as the current computing unit; the image set allocated to the current computing unit is the current image set; the image to be searched in the current image set is the current image to be searched; and the historical image subset in the current image set is the current historical image subset: the current computing unit searches for a target image in the current historical image subset that matches the current image to be searched.

[0090] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0091] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the preceding claims.

[0092] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0093] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0094] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0095] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0096] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0097] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for task assignment of intelligent services, characterized in that, A server applied to a multi-chip cascading architecture, comprising: obtaining M tasks to be allocated, wherein M is greater than 1; obtaining an available computing margin of each computing unit in N groups of computing units, wherein N is greater than or equal to 1, each group of computing units comprises at least one computing unit, and each chip of the server comprises a group of the computing units; obtaining a computing time consumption of each computing unit according to the available computing margin of each computing unit, wherein the computing time consumption is obtained according to the number of tasks allocated to each computing unit; in a case where the computing time consumptions of all computing units in the N groups of computing units are equal, obtaining the number of tasks allocated to each computing unit; allocating a corresponding number of tasks in the M tasks to be allocated to a corresponding computing unit.

2. The method of claim 1, wherein, obtaining a computing time consumption of each computing unit according to the available computing margin of each computing unit, comprises: performing the following operations on each computing unit in the N groups of computing units, and each computing unit in the operations is a current computing unit: determining a current time consumption of the current computing unit as a ratio of the number of tasks allocated to the current computing unit to the available computing margin of the current computing unit; determining the computing time consumption of the current computing unit as a sum of the current time consumption and a communication time consumption of the current computing unit.

3. The method according to claim 1 or 2, characterized in that, obtaining an available computing margin of each computing unit in N groups of computing units, comprises: performing the following operations on each computing unit in the N groups of computing units, and each computing unit in the operations is a current computing unit: obtaining a performance margin of the current computing unit, wherein the performance margin is used to represent an idle degree of the current computing unit; determining the available computing margin of the current computing unit according to the performance margin of the current computing unit.

4. The method of claim 3, wherein, determining the available computing margin of the current computing unit according to the performance margin of the current computing unit, comprises: obtaining a use weight of the current computing unit and a performance coefficient of the current computing unit, wherein the use weight is a weight pre-allocated to the current computing unit according to the performance margin of the current computing unit, and the performance coefficient is a coefficient allocated to the current computing unit according to a performance of the current computing unit; determining the available computing margin of the current computing unit as a product of the performance margin of the current computing unit, the use weight and the performance coefficient.

5. The method of claim 1, wherein, each group of computing units in the N groups of computing units is a computing unit on a corresponding intelligent chip in an edge intelligent server, wherein the edge intelligent server comprises a plurality of intelligent chips, and each intelligent chip comprises a group of computing units.

6. The method of claim 1, wherein obtaining M tasks to be allocated comprises: obtaining M image sets, wherein each image set in the M image sets comprises a to-be-searched image and a historical image subset; allocating the M tasks to be allocated to the N groups of computing units comprises: allocating the M image sets to the N groups of computing units.

7. The method of claim 6, wherein, After the M image sets are assigned to the N groups of computing units, the method further comprises: performing the following operations in each of the N groups of computing units, each computing unit in which is referred to as a current computing unit, the image set assigned to the current computing unit is referred to as a current image set, the image to be searched in the current image set is referred to as a current to-be-searched image, and the historical image subset in the current image set is referred to as a current historical image subset: the current computing unit searches for a target image matching the current to-be-searched image in the current historical image subset.

8. An intelligent service task allocation apparatus characterized by comprising: A server applied to a multi-chip cascade architecture, comprising: a first obtaining module configured to obtain M tasks to be assigned, wherein M is greater than 1; a second obtaining module configured to obtain an available computing margin of each computing unit in N groups of computing units, wherein N is greater than or equal to 1, each group of computing units comprises at least one computing unit, and each chip of the server comprises a group of the computing units; an assigning module configured to assign the M tasks to be assigned to the N groups of computing units according to the available computing margin of each computing unit in the N groups of computing units. The assigning module is further configured to obtain a computing time consumption of each computing unit according to the available computing margin of each computing unit, wherein the computing time consumption is obtained according to a number of tasks assigned to each computing unit; in a case where the computing time consumption of all computing units in the N groups of computing units is equal, the number of tasks assigned to each computing unit is obtained; and a corresponding number of tasks in the M tasks to be assigned are assigned to a corresponding computing unit.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, wherein the computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7. 10.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to run the computer program to execute the method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Calculation task assignment method, device, electronic device and computer storage medium

    CN109298940A

  • Task scheduling method and device between terminal and server and scheduler

    CN111651246A