Task scheduling method and device, electronic equipment and storage medium

By dynamically adjusting task scheduling, combining the remaining resources of the algorithm container and the needs of the tasks to be scheduled, the problem of data loss in cameras during dense target inference is solved, and the high success rate and system stability of video analysis tasks are achieved.

CN119987961APending Publication Date: 2025-05-13SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411975534.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

When the camera performs intensive target inference, if the default concurrent decoding and concurrent inference capabilities are insufficient, some target data will be lost, affecting the accuracy of AI analysis.

Method used

By dynamically adjusting the creation and scheduling of tasks, taking into account the remaining device capacity and inference coefficient of the algorithm container, as well as the total device capacity and task inference coefficient of the task to be scheduled, the task is created only when the task can be assigned to an algorithm container with sufficient inference capability.

Benefits of technology

Maximize the success rate of video analysis tasks, prevent the loss of analysis task data, and enhance the stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987961A_ABST
    Figure CN119987961A_ABST
Patent Text Reader

Abstract

The invention provides a task scheduling method, which comprises the following steps of: acquiring the residual equipment capacity and the residual reasoning coefficient of each algorithm container in a plurality of algorithm containers in a target time period; when the to-be-scheduled task in the target time period is created, the total equipment capacity and the total task reasoning coefficient of the to-be-scheduled task for each algorithm container are obtained; based on the total equipment capacity and the total task reasoning coefficient, matching is carried out in a plurality of algorithm containers, if matching succeeds, the to-be-scheduled task is created successfully, and a target algorithm container corresponding to the to-be-scheduled task is determined in the algorithm containers; and accessing the corresponding data acquisition device to the target algorithm container within the target time based on the device identifier of the to-be-scheduled task. According to the method, the analysis success rate of the video analysis task is guaranteed to the maximum extent, meanwhile, the problem of analysis task data loss caused by overload of the algorithm container is prevented, and the stability and reliability of the system are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a task scheduling method, device, electronic equipment and storage medium. Background Art

[0002] At present, algorithm platform applications are becoming more and more frequent. Most algorithm manufacturers provide default concurrent decoding capabilities and concurrent reasoning capabilities. However, since the default concurrent decoding capabilities and default concurrent reasoning capabilities are fixed settings, when the camera infers dense targets at a specific time and in a specific scenario, a large amount of computing power is required to cope with it. When the target density in the camera exceeds the concurrent decoding capability and concurrent reasoning capability, some target data will be lost, affecting the accuracy of AI analysis. Summary of the invention

[0003] The embodiment of the present invention provides a task scheduling method, which can dynamically adjust the creation and scheduling of tasks, maximize the success rate of video analysis task analysis, and prevent the loss of analysis task data. By comprehensively considering the remaining device capacity and remaining reasoning coefficient of the algorithm container, as well as the total device capacity and total task reasoning coefficient of the tasks to be scheduled, tasks are created only when the tasks can be assigned to algorithm containers with sufficient reasoning capabilities, maximizing the success rate of video analysis task analysis, and at the same time, preventing the loss of analysis task data due to overload of the algorithm container, thereby enhancing the stability and reliability of the system.

[0004] In a first aspect, an embodiment of the present invention provides a task scheduling method, the method comprising the following steps:

[0005] Obtaining the remaining device capacity and the remaining inference coefficient of each of the plurality of algorithm containers within the target time period, wherein the remaining device capacity is determined according to an accessed device identifier, and the accessed device identifier is the device identifier of the data acquisition device accessed to the algorithm container;

[0006] When creating a task to be scheduled within a target time period, the total device capacity and the total task reasoning coefficient of the task to be scheduled for each of the algorithm containers are obtained, the task to be scheduled includes at least one device identifier and a task reasoning coefficient corresponding to the device identifier one by one, the total device capacity is determined according to the device identifier, and the total task reasoning coefficient is determined according to the task reasoning coefficient;

[0007] Based on the total device capacity and the total task reasoning coefficient, matching is performed in several algorithm containers. If the matching is successful, the task to be scheduled is successfully created, and a target algorithm container corresponding to the task to be scheduled is determined in the algorithm container, the remaining device capacity of the target algorithm container is greater than or equal to the total device capacity of the task to be scheduled, and the remaining reasoning coefficient of the target algorithm container is greater than or equal to the total task reasoning coefficient of the task to be scheduled;

[0008] Based on the device identification of the task to be scheduled, the corresponding data acquisition device is connected to the target algorithm container within the target time.

[0009] Optionally, the obtaining of the remaining device capacity and the remaining inference coefficient of each of the plurality of algorithm containers within the target time period includes:

[0010] Obtaining an identifier of a connected device corresponding to each of the algorithm containers in the target time period;

[0011] Determining the remaining device capacity of the algorithm container based on the connected device identifier;

[0012] Acquire the task reasoning coefficient corresponding to the connected device identifier within the target time period, each of the connected device identifiers corresponds to one task reasoning coefficient;

[0013] Adding the task reasoning coefficients corresponding to all the device identifiers to obtain the occupied task reasoning coefficients of the algorithm container;

[0014] The preset inference coefficient of the algorithm container is subtracted from the occupied task inference coefficient of the algorithm container to obtain the remaining inference coefficient of the algorithm container.

[0015] Optionally, when creating the task to be scheduled within the target time period, obtaining the total device capacity and the total task inference coefficient of the task to be scheduled for each algorithm container includes:

[0016] When creating a task to be scheduled within a target time period, obtaining a device identifier of the task to be scheduled and an identifier of the connected device of each algorithm container;

[0017] For each of the algorithm containers, based on the device identifier of the task to be scheduled and the connected device identifier of the algorithm container, determine the total device capacity of the task to be scheduled for each of the algorithm containers;

[0018] Obtaining a set of task inference coefficients corresponding to the device identifier under each algorithm container, wherein for one device identifier, different algorithm containers correspond to different sets of task inference coefficients;

[0019] In the target time period, from a group of task reasoning coefficients corresponding to the device identification under each algorithm container, determine the task reasoning coefficients corresponding to each device identification, where each device identification corresponds to one task reasoning coefficient;

[0020] For each of the algorithm containers, the task inference coefficients corresponding to all the device identifiers are added together to obtain the total task inference coefficient of the task to be scheduled for each of the algorithm containers.

[0021] Optionally, the determining, based on the device identifier of the task to be scheduled and the connected device identifier of the algorithm container, the total device capacity of the task to be scheduled for each algorithm container includes:

[0022] Among all the device identifiers of the task to be scheduled, determine the device identifier that is different from the connected device identifier of the algorithm container as the device identifier to be connected to the algorithm container;

[0023] The number of the to-be-connected device identifiers is determined as the total device capacity of the to-be-scheduled tasks for the algorithm container.

[0024] Optionally, before obtaining a set of task inference coefficients corresponding to the device identifier in each algorithm container, the method further includes:

[0025] Use scheduled tasks to obtain the historical inference overhead of each data collection device in each algorithm container at different time periods;

[0026] Based on the historical reasoning overhead, it is determined that the data acquisition device corresponds to a group of task reasoning coefficients under each algorithm container, each group of task reasoning coefficients includes the task reasoning coefficients of multiple time periods, each time period corresponds to one task reasoning coefficient, and the greater the historical reasoning overhead in a time period, the greater the task reasoning coefficient of the time period.

[0027] Optionally, the matching among several algorithm containers based on the total device capacity and the total task inference coefficient includes:

[0028] If the total device capacity is less than or equal to the remaining device capacity of the algorithm container, and the total task reasoning coefficient is less than or equal to the remaining reasoning coefficient of the algorithm space, then it is determined that the match is successful;

[0029] If the total device capacity is greater than the remaining device capacity of the algorithm container, and / or the total task inference coefficient is greater than the remaining inference coefficient of the algorithm space, it is determined that the matching fails.

[0030] Optionally, determining in the algorithm container a target algorithm container corresponding to the task to be scheduled includes:

[0031] Determine the algorithm container whose remaining device capacity is greater than or equal to the total device capacity as the algorithm container that meets the condition;

[0032] If there is one algorithm container that meets the condition, the algorithm container that meets the condition is determined as the target algorithm container corresponding to the task to be scheduled;

[0033] If there are multiple algorithm containers that meet the conditions, one algorithm container that meets the conditions is selected from the multiple algorithm containers that meet the conditions according to a preset selection strategy and is determined as the target algorithm container corresponding to the task to be scheduled.

[0034] In a second aspect, an embodiment of the present invention further provides a task scheduling device, the task scheduling device comprising:

[0035] A first acquisition module is used to acquire the remaining device capacity and the remaining inference coefficient of each of the plurality of algorithm containers within the target time period, wherein the remaining device capacity is determined according to an accessed device identifier, and the accessed device identifier is the device identifier of the data acquisition device accessed to the algorithm container;

[0036] A second acquisition module is used to acquire the total device capacity and the total task reasoning coefficient of the task to be scheduled for each of the algorithm containers when creating the task to be scheduled within the target time period, wherein the task to be scheduled includes at least one device identifier and a task reasoning coefficient corresponding to the device identifier one by one, the total device capacity is determined according to the device identifier, and the total task reasoning coefficient is determined according to the task reasoning coefficient;

[0037] A first processing module is used to match in a plurality of the algorithm containers based on the total device capacity and the total task reasoning coefficient. If the match is successful, the task to be scheduled is successfully created, and a target algorithm container corresponding to the task to be scheduled is determined in the algorithm container, the remaining device capacity of the target algorithm container is greater than or equal to the total device capacity of the task to be scheduled, and the remaining reasoning coefficient of the target algorithm container is greater than or equal to the total task reasoning coefficient of the task to be scheduled;

[0038] The second processing module is used to connect the corresponding data acquisition device to the target algorithm container within the target time based on the device identification of the task to be scheduled.

[0039] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the task scheduling method provided in the embodiment of the present invention when executing the computer program.

[0040] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the task scheduling method provided in the embodiment of the invention are implemented.

[0041] In an embodiment of the present invention, the remaining device capacity and the remaining reasoning coefficient of each algorithm container in a plurality of algorithm containers within a target time period are obtained, and the remaining device capacity is determined according to the connected device identifier, and the connected device identifier is the device identifier of the data acquisition device connected to the algorithm container; when creating a task to be scheduled within the target time period, the total device capacity and the total task reasoning coefficient of the task to be scheduled for each algorithm container are obtained, and the task to be scheduled includes at least one device identifier and a task reasoning coefficient corresponding to the device identifier one by one, and the total device capacity is determined according to the device identifier, and the total task reasoning coefficient is determined according to the task reasoning coefficient; based on the total device capacity and the total task reasoning coefficient, matching is performed in a plurality of algorithm containers, and if the matching is successful, the task to be scheduled is successfully created, and a target algorithm container corresponding to the task to be scheduled is determined in the algorithm container, the remaining device capacity of the target algorithm container is greater than or equal to the total device capacity of the task to be scheduled, and the remaining reasoning coefficient of the target algorithm container is greater than or equal to the total task reasoning coefficient of the task to be scheduled; based on the device identifier of the task to be scheduled, the corresponding data acquisition device is connected to the target algorithm container within the target time. The present invention comprehensively considers the remaining device capacity and the remaining reasoning coefficient of the algorithm container, as well as the total device capacity and the total task reasoning coefficient of the tasks to be scheduled. It creates tasks only when the tasks can be assigned to the algorithm container with sufficient reasoning capability, thereby maximizing the success rate of the video analysis task analysis. At the same time, it prevents the loss of analysis task data due to overloading of the algorithm container, thereby enhancing the stability and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 is a flow chart of a task scheduling method provided by an embodiment of the present invention;

[0044] Figure 2 is a flow chart of a database construction method provided by an embodiment of the present invention;

[0045] Figure 3 is a flow chart of another task scheduling method provided by an embodiment of the present invention;

[0046] Figure 4 is a schematic diagram of a task scheduling system provided by an embodiment of the present invention;

[0047] Figure 5 is a structural diagram of a task scheduling device provided by an embodiment of the present invention;

[0048] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] like Figure 1 As shown, Figure 1 : is a flowchart of a task scheduling method provided by an embodiment of the present invention, the task scheduling method comprises the steps of:

[0051] 101. Obtain the remaining device capacity and the remaining inference coefficient of each algorithm container in a plurality of algorithm containers within a target time period.

[0052] In an embodiment of the present invention, the task scheduling method can be applied to a task scheduling platform. The task scheduling platform can be constructed based on a server or a distributed server. The task scheduling platform includes a device interface (for data acquisition devices to upload collected data), an algorithm container interface, a database, and a task scheduling program. The device interface can be used to obtain data (including device identification) of a data acquisition device, the algorithm container interface is used to obtain data (including connected device identification) of an algorithm container, the database is used to store the association between the device identification and the task inference coefficient, and the task scheduling program is used for task creation, task scheduling, and connecting the data acquisition device corresponding to the device identification to the corresponding algorithm container. The database can be a relational database, such as a MySQL database. The data acquisition device can be a data acquisition device such as a camera or a camera.

[0053] The target time period may be a time period specified by a user, and the time period may be divided into days, hours, minutes, and other time granularities.

[0054] The above algorithm container can be understood as a device that carries an algorithm, such as a chip or server. An algorithm container can carry an algorithm package, and an algorithm package can include multiple algorithm models. Among the multiple algorithm models, each algorithm model can perform reasoning on a certain event target alone, or they can be combined to perform reasoning on a certain event target. Different algorithm containers can carry the same algorithm package or different algorithm packages, which can be set according to the user's business needs.

[0055] An algorithm container may include a decoding part and a reasoning part. The decoding part may be understood as decoding the data uploaded by the data acquisition data, and the reasoning part may be understood as computing the data through the algorithm model and computing resources. It should be noted that the decoding capability of an algorithm container is limited. For example, if an algorithm container supports 20 decoding channels, the decoding capability can be quantified as 20. Each decoding channel corresponds to a data acquisition device, that is, an algorithm container with a decoding capability of 20 can support the access of 20 data acquisition devices and can decode the data uploaded by 20 data acquisition devices at the same time. The reasoning capability of an algorithm container is also limited, which may be related to the number of event targets, frame loss, insufficient video memory, and the coefficient of computing power and decoding occupied by the algorithm. Correspondingly, different tasks can be quantified according to the corresponding number of event targets, frame loss, insufficient video memory, and the coefficient of computing power and decoding occupied by the algorithm, so as to obtain the task reasoning coefficients corresponding to different tasks. For example, if the reasoning capability coefficient of an algorithm container is 20, the sum of the task reasoning coefficients of the tasks that the algorithm container can handle should not exceed 20.

[0056] The remaining device capacity of the above algorithm container can be understood as how many data acquisition devices the algorithm container can still connect to, and the remaining inference coefficient of the above algorithm container can be understood as how many tasks the algorithm container can still accept.

[0057] 102. When creating a task to be scheduled within a target time period, obtain the total device capacity and the total task inference coefficient of each algorithm container of the task to be scheduled.

[0058] In the embodiment of the present invention, the above-mentioned tasks to be scheduled are created according to time periods. When creating the tasks to be scheduled, the total device capacity and the total task inference coefficient of the tasks to be scheduled for each algorithm container may be obtained.

[0059] Taking into account that different algorithm containers have different remaining device capacities and remaining inference coefficients, and that different algorithm containers may have different connected data acquisition devices, the data acquisition device in the task to be scheduled may already be a data acquisition device that has been connected to a certain algorithm container and does not need to occupy additional decoding capabilities. Therefore, for a task to be scheduled, different algorithm containers require different total device capacities. By comparison, the decoding capacity of algorithm container 1 is 20, and data acquisition devices A1, A2, A3, and A4 have been connected to algorithm container 1. The data acquisition devices in the task 1 to be scheduled are A1, A5, and A9. The data acquisition device A1 already connected to algorithm container 1 and the data acquisition device A1 in the scheduling task 1 are the same data acquisition device, and no additional decoding function is required, that is, the remaining device capacity of algorithm container 1 is 20-4=16, and the total device capacity of the task 1 to be scheduled for algorithm container 1 is 4-1=3. The decoding capacity of algorithm container 2 is 20, and the data acquisition device already connected to algorithm container 2 is not the same as the data acquisition device in the scheduling task 1. Data acquisition devices B1, B2, B3, B4, and B5 have been connected to algorithm container 2. The remaining device capacity of algorithm container 2 is 20-5=15, and the total device capacity of the task 1 to be scheduled for algorithm container 2 is 5.

[0060] Similarly, since the algorithm models between different algorithm containers may be different, the task reasoning coefficients may be different. For example, if algorithm container 1 is for human target detection and algorithm container 2 is for vehicle target detection, for the same data acquisition device A1, the computing resources required for the corresponding task reasoning when connected to algorithm container 1 and when connected to algorithm container 2 are also different.

[0061] Therefore, in the embodiment of the present invention, when creating a task to be scheduled, the influence of each algorithm container on the task to be scheduled may be considered, that is, the requirements of the same task to be scheduled for different algorithm containers may be different.

[0062] The task to be scheduled includes at least one device identifier and a task inference coefficient corresponding to the device identifier. One device identifier corresponds to one data acquisition device. The total device capacity is determined according to the device identifier, and the total task inference coefficient is determined according to the task inference coefficient.

[0063] 103. Based on the total device capacity and the total task inference coefficient, matching is performed in several algorithm containers. If the matching is successful, the task to be scheduled is successfully created, and a target algorithm container corresponding to the task to be scheduled is determined in the algorithm container.

[0064] In an embodiment of the present invention, in order to ensure the success rate of video analysis task analysis, the remaining device capacity of the target algorithm container is greater than or equal to the total device capacity of the tasks to be scheduled, and the remaining inference coefficient of the target algorithm container is greater than or equal to the total task inference coefficient of the tasks to be scheduled.

[0065] For an algorithm container, the total device capacity of the tasks to be scheduled can be compared with the remaining device capacity of the algorithm container, and the total task inference coefficient of the tasks to be scheduled can be compared with the remaining inference coefficient of the algorithm container. If the total device capacity of the tasks to be scheduled is less than or equal to the remaining device capacity of the algorithm container, and the total task inference coefficient of the tasks to be scheduled is less than or equal to the remaining inference coefficient of the algorithm container, then it can be determined that the match is successful, otherwise it is determined that the match fails.

[0066] In the case of successful matching, the algorithm container may be determined as an algorithm container that meets the condition, and a target algorithm container may be determined based on the algorithm container that meets the condition.

[0067] In the case of a matching failure, that is, no algorithm container satisfies the task to be scheduled, at this time, the creation of the task to be scheduled can be canceled, and the data collection device and time period for which the creation failed can be rendered to the user for viewing.

[0068] In some possible embodiments, when the matching fails, the creation of the task to be scheduled can be delayed to a subsequent time period, and the task to be scheduled can be matched with the algorithm container in the subsequent time period. Alternatively, the task to be scheduled can be scheduled as an offline task, and the task to be scheduled can be inferred offline.

[0069] 104. Based on the device identification of the task to be scheduled, the corresponding data acquisition device is connected to the target algorithm container within the target time.

[0070] In an embodiment of the present invention, after determining the target algorithm container, the data acquisition device corresponding to the device identifier in the task to be scheduled can be connected to the target algorithm container. For the data acquisition device that has been connected to the task to be scheduled, it does not need to be connected again, and only the task identifier of the task to be scheduled needs to be marked.

[0071] The access time period between the above data acquisition device and the target algorithm container is the target time period, that is, within the target time period, the access status between the data acquisition device corresponding to the device identifier in the task to be scheduled and the target algorithm container will be maintained.

[0072] In an embodiment of the present invention, the remaining device capacity and the remaining reasoning coefficient of each algorithm container in a plurality of algorithm containers within a target time period are obtained, and the remaining device capacity is determined according to the connected device identifier, and the connected device identifier is the device identifier of the data acquisition device connected to the algorithm container; when creating a task to be scheduled within the target time period, the total device capacity and the total task reasoning coefficient of the task to be scheduled for each algorithm container are obtained, and the task to be scheduled includes at least one device identifier and a task reasoning coefficient corresponding to the device identifier one by one, and the total device capacity is determined according to the device identifier, and the total task reasoning coefficient is determined according to the task reasoning coefficient; based on the total device capacity and the total task reasoning coefficient, matching is performed in a plurality of algorithm containers, and if the matching is successful, the task to be scheduled is successfully created, and a target algorithm container corresponding to the task to be scheduled is determined in the algorithm container, the remaining device capacity of the target algorithm container is greater than or equal to the total device capacity of the task to be scheduled, and the remaining reasoning coefficient of the target algorithm container is greater than or equal to the total task reasoning coefficient of the task to be scheduled; based on the device identifier of the task to be scheduled, the corresponding data acquisition device is connected to the target algorithm container within the target time. The present invention comprehensively considers the remaining device capacity and the remaining reasoning coefficient of the algorithm container, as well as the total device capacity and the total task reasoning coefficient of the tasks to be scheduled. It creates tasks only when the tasks can be assigned to the algorithm container with sufficient reasoning capability, thereby maximizing the success rate of the video analysis task analysis. At the same time, it prevents the loss of analysis task data due to overloading of the algorithm container, thereby enhancing the stability and reliability of the system.

[0073] It can be understood that in the specific implementation of this application, related data such as image data, task data, equipment data, algorithm model data, etc. are involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data, as well as the training, deployment and calling of algorithm models, must comply with relevant laws, regulations and standards of relevant countries and regions.

[0074] Optionally, in the step of obtaining the remaining device capacity and the remaining reasoning coefficient of each of several algorithm containers within the target time period, the connected device identifier corresponding to each of the several algorithm containers within the target time period can be obtained; based on the connected device identifier, the remaining device capacity of the algorithm container is determined; the task reasoning coefficient corresponding to the connected device identifier within the target time period is obtained, and each connected device identifier corresponds to a task reasoning coefficient; the task reasoning coefficients corresponding to all device identifiers are added to obtain the occupied task reasoning coefficient of the algorithm container; and the occupied task reasoning coefficient of the algorithm container is subtracted from the preset reasoning coefficient of the algorithm container to obtain the remaining reasoning coefficient of the algorithm container.

[0075] In the embodiment of the present invention, the target time period may be a time period specified by a user, and the time period may be divided into time granularities such as days / hours / minutes.

[0076] In the above-mentioned several algorithm containers, each algorithm container corresponds to a connected device identification list, and the above-mentioned connected device identification list records the device identification corresponding to the data acquisition device connected to the algorithm container in different time periods. The above-mentioned device identification is a unique identification of the data acquisition device, which can be a device code or a device ID.

[0077] The task scheduling platform can obtain the connected device identification list of the algorithm container through the algorithm container interface, and determine the connected device identification of the algorithm container within the target time period in the connected device identification list of the algorithm container. Each connected device identification corresponds to a connected data acquisition device.

[0078] Each algorithm container has a preset device capacity and a preset inference coefficient according to its performance. For an algorithm container, the remaining device capacity of the algorithm container can be obtained by subtracting the number of connected device identifiers of the algorithm container from the preset device capacity of the algorithm container.

[0079] For an algorithm container, after obtaining the connected device identifiers corresponding to the algorithm container in the target time period, the task reasoning coefficients of each connected device identifier in the target time period can be queried in the database, and then the task reasoning coefficients corresponding to all device identifiers are added to obtain the occupied task reasoning coefficient of the algorithm container. The occupied task reasoning coefficient of the algorithm container is subtracted from the preset reasoning coefficient to obtain the remaining reasoning coefficient of the algorithm container.

[0080] By calculating the remaining device capacity and remaining inference coefficient of each algorithm container, it is possible to quickly determine whether the task to be scheduled matches each algorithm container. There is no need to query the computing resources of the algorithm container in real time, which improves the efficiency of task scheduling.

[0081] Optionally, when creating the tasks to be scheduled within the target time period, in the step of obtaining the total device capacity and the total task reasoning coefficient of the tasks to be scheduled for each algorithm container, the device identification of the tasks to be scheduled and the connected device identification of each algorithm container can be obtained when creating the tasks to be scheduled within the target time period; for each algorithm container, based on the device identification of the tasks to be scheduled and the connected device identification of the algorithm container, the total device capacity of the tasks to be scheduled for each algorithm container is determined; a set of task reasoning coefficients corresponding to the device identification under each algorithm container is obtained, and for one device identification, different algorithm containers correspond to different sets of task reasoning coefficients; within the target time period, from a set of task reasoning coefficients corresponding to the device identification under each algorithm container, the task reasoning coefficients corresponding to each device identification are determined, and each device identification corresponds to one task reasoning coefficient; for each algorithm container, the task reasoning coefficients corresponding to all device identifications are added to obtain the total task reasoning coefficient of the tasks to be scheduled for each algorithm container.

[0082] In an embodiment of the present invention, the above-mentioned tasks to be scheduled are created according to time periods. When creating the tasks to be scheduled, the total device capacity and the total task inference coefficient of the tasks to be scheduled for each algorithm container can be obtained. The above-mentioned target time period can be a time period specified by the user, and the above-mentioned time period can be divided into time granularities such as days / hours / minutes.

[0083] One task to be scheduled corresponds to at least one data acquisition device, that is, one task to be scheduled can have at least one device identification.

[0084] Considering that different algorithm containers have different remaining device capacities and remaining inference coefficients, and different algorithm containers may have different situations in which they have been connected to data acquisition devices. In the case where the data acquisition device in the task to be scheduled is already a data acquisition device that has been connected to a certain algorithm container, there is no need to occupy additional decoding capacity. For a task to be scheduled, different algorithm containers require different total device capacities. At the same time, since the algorithm models between different algorithm containers may be different, the task inference coefficients are different. Therefore, in an embodiment of the present invention, for the creation of a task to be scheduled, the impact of each algorithm container on the task to be scheduled can be considered, that is, the requirements of the same task to be scheduled for different algorithm containers may also be different.

[0085] When creating a task to be scheduled within the target time period, obtain the device ID of the task to be scheduled and the connected device ID of each algorithm container. For each algorithm container, compare the device ID of the task to be scheduled with the connected device ID of the algorithm container, determine the same device ID as jointly occupying one device capacity, and determine the different device ID as occupying one device capacity alone, so as to determine the total device capacity of the task to be scheduled for the algorithm container.

[0086] At the same time, a set of task reasoning coefficients corresponding to the device identification under each algorithm container is obtained from the database. A set of task reasoning coefficients records the task reasoning coefficients corresponding to all time periods. For a device identification, there are different sets of task reasoning coefficients for different algorithm containers. For a device identification and an algorithm container, a set of task reasoning coefficients corresponding to the algorithm container is obtained from the database. Within the target time period, the task reasoning coefficient corresponding to the device identification is determined from a set of task reasoning coefficients corresponding to the device identification under the algorithm container. For the algorithm container, the task reasoning coefficients corresponding to all device identifications are added together to obtain the total task reasoning coefficient of the task to be scheduled for the algorithm container.

[0087] Through the device identification of the task to be scheduled and the connected device identification of the algorithm container, when creating the task to be scheduled within the target time period, the total device capacity of the task to be scheduled for each algorithm container is obtained, so that the access requirements of the task to be scheduled for each algorithm container can be accurately determined. Through the device identification in the task to be scheduled and the corresponding set of task inference coefficients of the algorithm container, the total task inference coefficient of the task to be scheduled for each algorithm container is obtained, so that the inference requirements of the task to be scheduled for each algorithm container can be accurately determined.

[0088] Optionally, in the step of determining the total device capacity of the tasks to be scheduled for each algorithm container based on the device identifiers of the tasks to be scheduled and the device identifiers that have been connected to the algorithm container, among all the device identifiers of the tasks to be scheduled, device identifiers that are different from the device identifiers that have been connected to the algorithm container can be determined as the device identifiers to be connected to the algorithm container; and the number of device identifiers to be connected can be determined as the total device capacity of the tasks to be scheduled for the algorithm container.

[0089] In an embodiment of the present invention, for each algorithm container, the device identifier of the task to be scheduled can be compared with the connected device identifier of the algorithm container, and the same device identifier is determined as the connected device identifier, that is, the data acquisition device corresponding to the device identifier has been connected to the algorithm container within the target time period, and does not need to occupy a device capacity outside the window; a different device identifier is determined as the to-be-connected device identifier, that is, the data acquisition device corresponding to the device identifier has not been connected to the algorithm container during the target time period, and needs to be connected to the algorithm container during the target time period and occupy a separate device capacity. The number of to-be-connected device identifiers can be determined as the total device capacity for the algorithm container for the task to be scheduled.

[0090] Optionally, before the step of obtaining a set of task inference coefficients corresponding to the device identification under each algorithm container, the historical inference overhead of each data acquisition device in different time periods in each algorithm container can also be obtained through a scheduled task; based on the historical inference overhead, it is determined that the data acquisition device corresponds to a set of task inference coefficients under each algorithm container, each set of task inference coefficients includes task inference coefficients for multiple time periods, each time period corresponds to a task inference coefficient, and the greater the historical inference overhead in a time period, the greater the task inference coefficient of the time period.

[0091] In an embodiment of the present invention, the above-mentioned database stores the association relationship between the device identification and the task reasoning coefficient. One device identification corresponds to a set of task reasoning coefficients for one algorithm container. A set of task reasoning coefficients includes the task reasoning coefficients corresponding to all time periods, and one time period corresponds to one task reasoning coefficient.

[0092] The above historical inference overhead can be obtained by statistics based on the number of event targets, frame loss, insufficient video memory, and the coefficients of computing power and decoding occupied by the algorithm. For example, the number of event targets, frame loss, insufficient video memory, and the coefficients of computing power and decoding occupied by the algorithm in each dimension of the data collection device in days / hours / minutes can be counted.

[0093] Since there is no historical statistical data in the initial stage of system deployment, task creation and scheduling are completely based on the default concurrent decoding capability and concurrent reasoning capability to issue tasks. The algorithm container performs analysis and regularly reports coefficient data such as the computing power occupied, frame loss, and operating status of each heartbeat task. The system saves the relevant data in the database, groups and counts the data of various dimensions of the device through scheduled tasks, and finally saves it in the database to form historical statistical data. By analyzing and sorting the historical statistical data, the historical reasoning overhead can be obtained.

[0094] After obtaining the historical reasoning overhead of the data acquisition device under different algorithm containers, the historical reasoning overhead can be divided into time periods based on the historical reasoning overhead, and the historical reasoning overhead of each time period can be calculated. The historical reasoning overhead of each time period can be quantified into a numerical value, thereby obtaining the task reasoning coefficient corresponding to each time, and then a set of task reasoning coefficients corresponding to the data acquisition device under each algorithm container can be obtained. A set of task reasoning coefficients is associated with the device identification of the data acquisition device and stored in the database.

[0095] In a possible embodiment, in the subsequent stage of system deployment, task creation and scheduling are performed according to the task scheduling method in the embodiment of the present invention to create and issue tasks, the algorithm container performs analysis, and periodically reports coefficient data such as the computing power occupied, frame loss, and operating status of each heartbeat task. The system saves the relevant data in a database, groups and counts the data of various dimensions of the device through scheduled tasks, and finally saves them in the database. Based on the above data, a set of task inference coefficients corresponding to each algorithm container of the data acquisition device is continuously updated to dynamically adapt the task inference coefficients to the current scenario.

[0096] like Figure 2 As shown, Figure 2 is a flowchart of a database construction method provided by an embodiment of the present invention. Figure 2 In the method for constructing a database, the following steps are included:

[0097] Create a video analysis task.

[0098] It is sent to the algorithm container, which reports tasks regularly, reports data such as the number of lost frames, operating status, and computing power usage, and stores the data in the MySQL database; and, the algorithm container identifies events, stores the events in the MySQL database.

[0099] Start a scheduled task job, query data from the database, and regularly count the data of each dimension of the device, calculate and summarize the statistical results, and store the statistical results in the MySQL database.

[0100] Optionally, in the step of matching among several algorithm containers based on the total device capacity and the total task inference coefficient, if the total device capacity is less than or equal to the remaining device capacity of the algorithm container, and the total task inference coefficient is less than or equal to the remaining inference coefficient of the algorithm space, then the match is determined to be successful; if the total device capacity is greater than the remaining device capacity of the algorithm container, and / or the total task inference coefficient is greater than the remaining inference coefficient of the algorithm space, then the match is determined to have failed.

[0101] In an embodiment of the present invention, for an algorithm container, the total device capacity of the task to be scheduled can be compared with the remaining device capacity of the algorithm container, and the total task reasoning coefficient of the task to be scheduled can be compared with the remaining reasoning coefficient of the algorithm container. If the total device capacity of the task to be scheduled is less than or equal to the remaining device capacity of the algorithm container, and the total task reasoning coefficient of the task to be scheduled is less than or equal to the remaining reasoning coefficient of the algorithm container, it can be said that the algorithm container is successfully matched. If the total device capacity is greater than the remaining device capacity of the algorithm container, and / or the total task reasoning coefficient is greater than the remaining reasoning coefficient of the algorithm space, it means that the algorithm container fails to match, and the matching of the next algorithm container is continued until all algorithm containers are matched. If there is at least one algorithm container that is successfully matched, it is determined that the task to be scheduled is successfully matched. If no algorithm container is successfully matched, it is determined that the task to be scheduled is unsuccessful in matching.

[0102] Optionally, in the step of determining the target algorithm container corresponding to the task to be scheduled in the algorithm container, an algorithm container whose remaining device capacity is greater than or equal to the total device capacity can be determined as the algorithm container that meets the conditions; if there is one algorithm container that meets the conditions, then the algorithm container that meets the conditions is determined as the target algorithm container corresponding to the task to be scheduled; if there are multiple algorithm containers that meet the conditions, then according to a preset selection strategy, one algorithm container that meets the conditions is selected from the multiple algorithm containers that meet the conditions and determined as the target algorithm container corresponding to the task to be scheduled.

[0103] In an embodiment of the present invention, in order to ensure the success rate of video analysis task analysis, the remaining device capacity of the target algorithm container is greater than or equal to the total device capacity of the tasks to be scheduled, and the remaining inference coefficient of the target algorithm container is greater than or equal to the total task inference coefficient of the tasks to be scheduled.

[0104] If there are multiple algorithm containers that meet the conditions, one algorithm container that meets the conditions can be randomly selected from the multiple algorithm containers that meet the conditions to be determined as the target algorithm container corresponding to the task to be scheduled. Alternatively, the algorithm container with the smallest remaining inference coefficient can be selected from the multiple algorithm containers that meet the conditions to be determined as the target algorithm container corresponding to the task to be scheduled.

[0105] In a possible embodiment, the matching can be started from the algorithm container corresponding to the smallest total device capacity of the task to be scheduled. The algorithm container with the smallest total device capacity of the task to be scheduled can be understood as the task to be scheduled has more device identifiers that are connected device identifiers in the algorithm container. If there are multiple algorithm containers with the smallest total device capacity of the task to be scheduled, the matching can be started from the algorithm container with the smallest total task inference coefficient of the task to be scheduled. In this case, the first algorithm container that meets the conditions can be determined as the target algorithm container corresponding to the task to be scheduled, and no subsequent matching will be performed.

[0106] like Figure 3 As shown, Figure 3 is a flowchart of another task scheduling method provided by an embodiment of the present invention. Figure 3 When creating a task, first select the device and analysis algorithm. After the pre-calculation process, query the MySQL database for statistical data on each dimension of the device. Through business calculation, obtain the target density and computing power usage in each time period. Combined with the created task list, calculate whether the algorithm resources meet the task requirements. If not, return the situation of which device and which time period have insufficient resources, and present it to the system user for adjustment. Tasks can only be issued when resources are met. Figure 3 The task scheduling method includes the following steps:

[0107] Create a task and pass the device ID (data acquisition device) and algorithm ID (algorithm container).

[0108] Precompute,query the task inference coefficients of statistical tasks in the database.

[0109] Determine whether the algorithm resources of the algorithm container are sufficient. If so, the task is sent to the algorithm container. If not, the task is recreated.

[0110] In the embodiment of the present invention, whether the system resources are sufficient is divided into two dimensions, namely the reasoning capability coefficient (task reasoning coefficient) and the decoding capability coefficient (device capacity). When the same device performs video analysis in the same container, it can share one decoding capability, while the reasoning capability is related to the type of analysis algorithm, and different algorithms occupy different reasoning coefficients. Figure 4 As shown, Figure 4 is a schematic diagram of a task scheduling system provided by an embodiment of the present invention. Figure 4 In the figure, algorithm container 1 contains devices A1, A2, A3, and A4; algorithm container 2 contains devices A5, A6, A7, and A8; and algorithm container 3 contains devices A9, A10, A11, and A12. When creating task 1, the system will give priority to allocating algorithm containers with the same devices, and then calculate whether the reasoning capacity is sufficient in each time period based on the assigned task list. When creating task 2, the system will directly calculate whether the reasoning capacity of each container is sufficient.

[0111] Decoding calculation formula:

[0112] The total number of preset decodings in the algorithm container (preset device capacity) >= the number of cameras in the container (the same device shares decoding) + the number of devices with unique task allocation (the number of device identifiers to be connected).

[0113] Inference calculation formula:

[0114] The total number of preset inferences of the algorithm container (preset task inference coefficient)>=the inference coefficient of the tasks in the container at each time (the occupied task inference coefficient of the algorithm container) + the inference coefficient of the newly allocated device at each time (the total task inference coefficient of the tasks to be scheduled).

[0115] Detailed example of inference coefficient:

[0116] The algorithm container for analyzing the human body has a preset task inference coefficient of 20.

[0117] For device A1 (a non-ordinary device installed at an intersection), the coefficient is 3.0 for time periods 8-9 and 17-18 (peak hours), and 1.5-2 for other time periods.

[0118] Normally, for the 14 devices A2-A15 (ordinary devices installed at non-intersections), the coefficients for all time periods are 1.0.

[0119] The remaining inference coefficient of the algorithm container is: 20-1.0*14-(1.5-3.0)=3.0-4.5.

[0120] If the current task creation selects A16, A17, A18 devices, and A16, A17, A18 devices are all normal devices, the task can be created successfully. If one of A16, A17, A18 devices is a non-normal device during the peak period, the task creation will fail.

[0121] like Figure 5 As shown, an embodiment of the present invention provides a task scheduling device, which includes:

[0122] The first acquisition module 501 is used to obtain the remaining device capacity and the remaining inference coefficient of each of the algorithm containers in the target time period, wherein the remaining device capacity is determined according to the connected device identifier, and the connected device identifier is the device identifier of the data acquisition device connected to the algorithm container;

[0123] A second acquisition module 502 is used to acquire the total device capacity and the total task reasoning coefficient of the task to be scheduled for each algorithm container when creating the task to be scheduled within the target time period, wherein the task to be scheduled includes at least one device identifier and a task reasoning coefficient corresponding to the device identifier one by one, the total device capacity is determined according to the device identifier, and the total task reasoning coefficient is determined according to the task reasoning coefficient;

[0124] The first processing module 503 is used to match in a plurality of the algorithm containers based on the total device capacity and the total task reasoning coefficient. If the match is successful, the task to be scheduled is successfully created, and a target algorithm container corresponding to the task to be scheduled is determined in the algorithm container, the remaining device capacity of the target algorithm container is greater than or equal to the total device capacity of the task to be scheduled, and the remaining reasoning coefficient of the target algorithm container is greater than or equal to the total task reasoning coefficient of the task to be scheduled;

[0125] The second processing module 504 is used to connect the corresponding data acquisition device to the target algorithm container within the target time based on the device identification of the task to be scheduled.

[0126] Optionally, the first acquisition module 501 is also used to obtain the connected device identifier corresponding to each of several algorithm containers within the target time period; determine the remaining device capacity of the algorithm container based on the connected device identifier; obtain the task reasoning coefficient corresponding to the connected device identifier within the target time period, each connected device identifier corresponds to one task reasoning coefficient; add the task reasoning coefficients corresponding to all the device identifiers to obtain the occupied task reasoning coefficient of the algorithm container; subtract the occupied task reasoning coefficient of the algorithm container from the preset reasoning coefficient of the algorithm container to obtain the remaining reasoning coefficient of the algorithm container.

[0127] Optionally, the second acquisition module 502 is also used to obtain the device identification of the task to be scheduled and the connected device identification of each algorithm container when creating the task to be scheduled within the target time period; for each algorithm container, based on the device identification of the task to be scheduled and the connected device identification of the algorithm container, determine the total device capacity of the task to be scheduled for each algorithm container; obtain a set of task reasoning coefficients corresponding to the device identification under each algorithm container, for one device identification, different algorithm containers correspond to different sets of task reasoning coefficients; within the target time period, determine the task reasoning coefficients corresponding to each device identification from a set of task reasoning coefficients corresponding to the device identification under each algorithm container, each device identification corresponds to one task reasoning coefficient; for each algorithm container, add the task reasoning coefficients corresponding to all the device identifications to obtain the total task reasoning coefficient of the task to be scheduled for each algorithm container.

[0128] Optionally, the second acquisition module 502 determines, among all the device identifiers of the task to be scheduled, the device identifier that is different from the connected device identifier of the algorithm container as the device identifier to be connected of the algorithm container; and determines the number of the device identifiers to be connected as the total device capacity of the task to be scheduled for the algorithm container.

[0129] Optionally, the device further comprises:

[0130] The third acquisition module is used to obtain the historical reasoning overhead of each data acquisition device in each algorithm container in different time periods through a scheduled task;

[0131] The third processing module is used to determine, based on the historical reasoning overhead, that the data acquisition device corresponds to a group of task reasoning coefficients under each algorithm container, each group of task reasoning coefficients includes the task reasoning coefficients of multiple time periods, each time period corresponds to one task reasoning coefficient, and the greater the historical reasoning overhead in a time period, the greater the task reasoning coefficient of the time period.

[0132] Optionally, the first processing module 503 is also used to determine that the match is successful if the total device capacity is less than or equal to the remaining device capacity of the algorithm container, and the total task inference coefficient is less than or equal to the remaining inference coefficient of the algorithm space; if the total device capacity is greater than the remaining device capacity of the algorithm container, and / or the total task inference coefficient is greater than the remaining inference coefficient of the algorithm space, determine that the match has failed.

[0133] Optionally, the first processing module 503 determines the algorithm container whose remaining device capacity is greater than or equal to the total device capacity as the algorithm container that meets the conditions; if there is one algorithm container that meets the conditions, then the algorithm container that meets the conditions is determined as the target algorithm container corresponding to the task to be scheduled; if there are multiple algorithm containers that meet the conditions, then according to a preset selection strategy, one algorithm container that meets the conditions is selected from the multiple algorithm containers that meet the conditions and determined as the target algorithm container corresponding to the task to be scheduled.

[0134] like Figure 6 As shown, an embodiment of the present invention further provides an electronic device, including a processor, and the processor can execute any one of the above-mentioned task scheduling methods.

[0135] Specifically, it includes a processor 601 and a memory 602, and a computer program for executing the task scheduling method which is stored in the memory 602 and can be run on the processor 601, wherein:

[0136] The processor 601 runs the computer program of the task scheduling method stored in the memory 602 and performs the following steps:

[0137] Obtaining the remaining device capacity and the remaining inference coefficient of each of the plurality of algorithm containers within the target time period, wherein the remaining device capacity is determined according to an accessed device identifier, and the accessed device identifier is the device identifier of the data acquisition device accessed to the algorithm container;

[0138] When creating a task to be scheduled within a target time period, the total device capacity and the total task reasoning coefficient of the task to be scheduled for each of the algorithm containers are obtained, the task to be scheduled includes at least one device identifier and a task reasoning coefficient corresponding to the device identifier one by one, the total device capacity is determined according to the device identifier, and the total task reasoning coefficient is determined according to the task reasoning coefficient;

[0139] Based on the total device capacity and the total task reasoning coefficient, matching is performed in several algorithm containers. If the matching is successful, the task to be scheduled is successfully created, and a target algorithm container corresponding to the task to be scheduled is determined in the algorithm container, the remaining device capacity of the target algorithm container is greater than or equal to the total device capacity of the task to be scheduled, and the remaining reasoning coefficient of the target algorithm container is greater than or equal to the total task reasoning coefficient of the task to be scheduled;

[0140] Based on the device identification of the task to be scheduled, the corresponding data acquisition device is connected to the target algorithm container within the target time.

[0141] Optionally, the obtaining, performed by the processor 601, of a remaining device capacity and a remaining inference coefficient of each of the plurality of algorithm containers within the target time period includes:

[0142] Obtaining an identifier of a connected device corresponding to each of the algorithm containers in the target time period;

[0143] Determining the remaining device capacity of the algorithm container based on the connected device identifier;

[0144] Acquire the task reasoning coefficient corresponding to the connected device identifier within the target time period, each of the connected device identifiers corresponds to one task reasoning coefficient;

[0145] Adding the task reasoning coefficients corresponding to all the device identifiers to obtain the occupied task reasoning coefficients of the algorithm container;

[0146] The preset inference coefficient of the algorithm container is subtracted from the occupied task inference coefficient of the algorithm container to obtain the remaining inference coefficient of the algorithm container.

[0147] Optionally, when creating the task to be scheduled within the target time period, the processor 601 obtains the total device capacity and the total task inference coefficient of the task to be scheduled for each algorithm container, including:

[0148] When creating a task to be scheduled within a target time period, obtaining a device identifier of the task to be scheduled and an identifier of the connected device of each algorithm container;

[0149] For each of the algorithm containers, based on the device identifier of the task to be scheduled and the connected device identifier of the algorithm container, determine the total device capacity of the task to be scheduled for each of the algorithm containers;

[0150] Obtaining a set of task inference coefficients corresponding to the device identifier under each algorithm container, wherein for one device identifier, different algorithm containers correspond to different sets of task inference coefficients;

[0151] In the target time period, from a group of task reasoning coefficients corresponding to the device identification under each algorithm container, determine the task reasoning coefficients corresponding to each device identification, wherein each device identification corresponds to one task reasoning coefficient;

[0152] For each of the algorithm containers, the task inference coefficients corresponding to all the device identifiers are added together to obtain the total task inference coefficient of the task to be scheduled for each of the algorithm containers.

[0153] Optionally, the determining, by the processor 601, based on the device identifier of the task to be scheduled and the connected device identifier of the algorithm container, the total device capacity of the task to be scheduled for each of the algorithm containers includes:

[0154] Among all the device identifiers of the task to be scheduled, determine the device identifier that is different from the connected device identifier of the algorithm container as the device identifier to be connected to the algorithm container;

[0155] The number of the to-be-connected device identifiers is determined as the total device capacity of the to-be-scheduled tasks for the algorithm container.

[0156] Optionally, before obtaining a set of task inference coefficients corresponding to the device identifier under each algorithm container, the method executed by the processor 601 further includes:

[0157] Use scheduled tasks to obtain the historical inference overhead of each data collection device in each algorithm container at different time periods;

[0158] Based on the historical reasoning overhead, it is determined that the data acquisition device corresponds to a group of task reasoning coefficients under each algorithm container, each group of task reasoning coefficients includes the task reasoning coefficients of multiple time periods, each time period corresponds to one task reasoning coefficient, and the greater the historical reasoning overhead in a time period, the greater the task reasoning coefficient of the time period.

[0159] Optionally, the matching among the plurality of algorithm containers based on the total device capacity and the total task inference coefficient performed by the processor 601 includes:

[0160] If the total device capacity is less than or equal to the remaining device capacity of the algorithm container, and the total task reasoning coefficient is less than or equal to the remaining reasoning coefficient of the algorithm space, then it is determined that the match is successful;

[0161] If the total device capacity is greater than the remaining device capacity of the algorithm container, and / or the total task inference coefficient is greater than the remaining inference coefficient of the algorithm space, it is determined that the matching fails.

[0162] Optionally, the determining, in the algorithm container, a target algorithm container corresponding to the task to be scheduled, performed by the processor 601 includes:

[0163] Determine the algorithm container whose remaining device capacity is greater than or equal to the total device capacity as the algorithm container that meets the condition;

[0164] If there is one algorithm container that meets the condition, the algorithm container that meets the condition is determined as the target algorithm container corresponding to the task to be scheduled;

[0165] If there are multiple algorithm containers that meet the conditions, one algorithm container that meets the conditions is selected from the multiple algorithm containers that meet the conditions according to a preset selection strategy and is determined as the target algorithm container corresponding to the task to be scheduled.

[0166] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the task scheduling method provided by the embodiment of the present invention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0167] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0168] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A task scheduling method, characterized in that: The method comprises the following steps: Obtaining the remaining device capacity and the remaining inference coefficient of each of the plurality of algorithm containers within the target time period, wherein the remaining device capacity is determined according to an accessed device identifier, and the accessed device identifier is the device identifier of the data acquisition device accessed to the algorithm container; When creating a task to be scheduled within a target time period, the total device capacity and the total task reasoning coefficient of the task to be scheduled for each of the algorithm containers are obtained, the task to be scheduled includes at least one device identifier and a task reasoning coefficient corresponding to the device identifier one by one, the total device capacity is determined according to the device identifier, and the total task reasoning coefficient is determined according to the task reasoning coefficient; Based on the total device capacity and the total task reasoning coefficient, matching is performed in several algorithm containers. If the matching is successful, the task to be scheduled is successfully created, and a target algorithm container corresponding to the task to be scheduled is determined in the algorithm container, the remaining device capacity of the target algorithm container is greater than or equal to the total device capacity of the task to be scheduled, and the remaining reasoning coefficient of the target algorithm container is greater than or equal to the total task reasoning coefficient of the task to be scheduled; Based on the device identification of the task to be scheduled, the corresponding data acquisition device is connected to the target algorithm container within the target time.

2. The task scheduling method according to claim 1, characterized in that: The obtaining of the remaining device capacity and the remaining inference coefficient of each of the plurality of algorithm containers within the target time period includes: Obtaining an identifier of a connected device corresponding to each of the algorithm containers in the target time period; Determining the remaining device capacity of the algorithm container based on the connected device identifier; Acquire the task reasoning coefficient corresponding to the connected device identifier within the target time period, each of the connected device identifiers corresponds to one task reasoning coefficient; Adding the task reasoning coefficients corresponding to all the device identifiers to obtain the occupied task reasoning coefficients of the algorithm container; The preset inference coefficient of the algorithm container is subtracted from the occupied task inference coefficient of the algorithm container to obtain the remaining inference coefficient of the algorithm container.

3. The task scheduling method according to claim 1, characterized in that: When creating the task to be scheduled within the target time period, obtaining the total device capacity and the total task inference coefficient of the task to be scheduled for each algorithm container includes: When creating a task to be scheduled within a target time period, obtaining a device identifier of the task to be scheduled and an identifier of the connected device of each algorithm container; For each of the algorithm containers, based on the device identifier of the task to be scheduled and the connected device identifier of the algorithm container, determine the total device capacity of the task to be scheduled for each of the algorithm containers; Obtaining a set of task inference coefficients corresponding to the device identifier under each algorithm container, wherein for one device identifier, different algorithm containers correspond to different sets of task inference coefficients; In the target time period, from a group of task reasoning coefficients corresponding to the device identification under each algorithm container, determine the task reasoning coefficients corresponding to each device identification, where each device identification corresponds to one task reasoning coefficient; For each of the algorithm containers, the task inference coefficients corresponding to all the device identifiers are added together to obtain the total task inference coefficient of the task to be scheduled for each of the algorithm containers.

4. The task scheduling method according to claim 3, characterized in that: The determining, based on the device identifier of the task to be scheduled and the connected device identifier of the algorithm container, the total device capacity of the task to be scheduled for each algorithm container includes: Among all the device identifiers of the task to be scheduled, determine the device identifier that is different from the connected device identifier of the algorithm container as the device identifier to be connected to the algorithm container; The number of the to-be-connected device identifiers is determined as the total device capacity of the to-be-scheduled tasks for the algorithm container.

5. The task scheduling method according to claim 3, characterized in that: Before obtaining a set of task inference coefficients corresponding to the device identifier under each algorithm container, the method further includes: Use scheduled tasks to obtain the historical inference overhead of each data collection device in each algorithm container at different time periods; Based on the historical reasoning overhead, it is determined that the data acquisition device corresponds to a group of task reasoning coefficients under each algorithm container, each group of task reasoning coefficients includes the task reasoning coefficients of multiple time periods, each time period corresponds to one task reasoning coefficient, and the greater the historical reasoning overhead in a time period, the greater the task reasoning coefficient of the time period.

6. The task scheduling method according to any one of claims 1 to 5, characterized in that: The matching among a plurality of the algorithm containers based on the total device capacity and the total task inference coefficient includes: If the total device capacity is less than or equal to the remaining device capacity of the algorithm container, and the total task reasoning coefficient is less than or equal to the remaining reasoning coefficient of the algorithm space, then it is determined that the match is successful; If the total device capacity is greater than the remaining device capacity of the algorithm container, and / or the total task inference coefficient is greater than the remaining inference coefficient of the algorithm space, it is determined that the matching fails.

7. The task scheduling method according to any one of claims 1 to 5, characterized in that: The step of determining, in the algorithm container, a target algorithm container corresponding to the task to be scheduled, comprises: Determine the algorithm container whose remaining device capacity is greater than or equal to the total device capacity as the algorithm container that meets the condition; If there is one algorithm container that meets the condition, the algorithm container that meets the condition is determined as the target algorithm container corresponding to the task to be scheduled; If there are multiple algorithm containers that meet the conditions, one algorithm container that meets the conditions is selected from the multiple algorithm containers that meet the conditions according to a preset selection strategy and is determined as the target algorithm container corresponding to the task to be scheduled.

8. A task scheduling device, characterized in that: The task scheduling device comprises: A first acquisition module is used to acquire the remaining device capacity and the remaining inference coefficient of each of the plurality of algorithm containers within the target time period, wherein the remaining device capacity is determined according to an accessed device identifier, and the accessed device identifier is the device identifier of the data acquisition device accessed to the algorithm container; A second acquisition module is used to acquire the total device capacity and the total task reasoning coefficient of the task to be scheduled for each of the algorithm containers when creating the task to be scheduled within the target time period, wherein the task to be scheduled includes at least one device identifier and a task reasoning coefficient corresponding to the device identifier one by one, the total device capacity is determined according to the device identifier, and the total task reasoning coefficient is determined according to the task reasoning coefficient; A first processing module is used to match in a plurality of the algorithm containers based on the total device capacity and the total task reasoning coefficient. If the match is successful, the task to be scheduled is successfully created, and a target algorithm container corresponding to the task to be scheduled is determined in the algorithm container, the remaining device capacity of the target algorithm container is greater than or equal to the total device capacity of the task to be scheduled, and the remaining reasoning coefficient of the target algorithm container is greater than or equal to the total task reasoning coefficient of the task to be scheduled; The second processing module is used to connect the corresponding data acquisition device to the target algorithm container within the target time based on the device identification of the task to be scheduled.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the task scheduling method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the task scheduling method according to any one of claims 1 to 7 are implemented.