A computing power allocation method and device, computer equipment and storage medium

CN117234715BActive Publication Date: 2026-10-16WUHAN WANWUYUN DIGITAL OPERATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311173298.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-12
Publication Date
2026-10-16
Estimated Expiration
2043-09-12

AI Technical Summary

Technical Problem

[0004]本发明的目的是提供一种算力分配方法、装置、计算机设备及存储介质,旨在解决目前AI盒子算力能力受限,摄像头连续抽帧任务占用资源,分配效率低下的问题

Benefits of technology

[0017] This invention provides a computing power allocation method, apparatus, computer device, and storage medium. The method sets different frame-drawing tasks and the relationship between the sum of newly added cameras per minute within the corresponding frame-drawing time interval to obtain constraints. Based on the constraints, a reasonable device frame-drawing task allocation scheme is provided, and the maximum total number of cameras to be allocated is calculated, thereby maximizing the utilization of the AI ​​box's computing power resources and alleviating the resource occupation problem caused by continuous frame-drawing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117234715B_ABST
    Figure CN117234715B_ABST
Patent Text Reader

Abstract

The application discloses a computing power allocation method and device, computer equipment and a storage medium, and the method comprises the following steps: defining parameters for a timing frame extraction task; setting different p i The relationship between the sum of newly added cameras in each minute within the corresponding frame extraction time interval of the task is obtained as a constraint condition; according to the constraint condition and the maximum number of tasks in each minute, the relationship between the number of all to-be-processed frame extraction tasks in each minute within the frame extraction time interval of the target frame extraction task, the relationship between the number of newly added cameras, and the relationship between the number of tasks and the number of newly added cameras are inferred to obtain a computing power allocation result. The method sets different frame extraction tasks and the relationship between the sum of newly added cameras in each minute within the corresponding frame extraction time interval to obtain a constraint condition, and calculates the maximum number of cameras required for allocation according to the constraint condition, thereby solving the problem of continuous frame extraction resource occupation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart city technology, and in particular to a computing power allocation method, apparatus, computer equipment, and storage medium. Background Technology

[0002] With the continuous advancement of technology, the application of AI (Artificial Intelligence) boxes is becoming increasingly widespread. Currently, AI security patrols based on fixed cameras in communities are realizing the automation and intelligent transformation of community property management operations. However, considering the issues that arise in community command centers, such as hardware and software deployment, environmental heat dissipation, system stability maintenance, and the effectiveness of AI applications, edge computing AI boxes are typically used as the product carrier.

[0003] However, the architecture and size of the AI ​​box itself limit its computing power. Assuming an average of 200 cameras per community, AI inspection functions need to be configured for more than 80% of these cameras, which poses a significant challenge to the computing power of the AI ​​boxes deployed in the command centers of each community. Summary of the Invention

[0004] The purpose of this invention is to provide a computing power allocation method, apparatus, computer equipment, and storage medium, aiming to solve the problems of limited computing power in current AI boxes, resource consumption in continuous frame-taking tasks of cameras, and low allocation efficiency.

[0005] In a first aspect, embodiments of the present invention provide a method for allocating computing power to edge servers based on a timed frame extraction task, comprising:

[0006] The parameters for the timed frame extraction task are defined, including the frame extraction task sequence p. i Time series t j At the t j p within minutes i Number of tasks, at the tth j p within minutes i The number of new cameras added to the task

[0007] Set different p based on business attributes i The task's relationship with the sum of newly added cameras per minute within the corresponding frame extraction time interval is used to obtain the constraints.

[0008] Select the frame extraction task sequence p in sequence i One of them is taken as the target frame extraction task, and all frame extraction tasks within the frame extraction time interval of the target frame extraction task are identified as frame extraction tasks to be processed.

[0009] Based on the constraints and the maximum number of tasks per minute, the relationships between the number of all pending frame extraction tasks per minute within the frame extraction time interval of the target frame extraction task, the relationship between the number of newly added cameras, and the relationship between the number of tasks and the number of newly added cameras are inferred to obtain the computing power allocation result, wherein the computing power allocation result includes the maximum total number of cameras to be allocated.

[0010] Secondly, embodiments of the present invention also provide an apparatus for edge server computing power allocation based on a timed frame extraction task, comprising:

[0011] The parameter definition unit is used to define parameters for the timed frame extraction task, wherein the parameters include the frame extraction task sequence p. i Time series t j At the t j p within minutes i Number of tasks, at the tth j p within minutes i The number of new cameras added to the task

[0012] The constraint setting unit is used to set different p based on business attributes. i The task's relationship with the sum of newly added cameras per minute within the corresponding frame extraction time interval is used to obtain the constraints.

[0013] Determine the target frame extraction task unit, used to sequentially select the frame extraction task sequence p. i One of them is taken as the target frame extraction task, and all frame extraction tasks within the frame extraction time interval of the target frame extraction task are identified as frame extraction tasks to be processed.

[0014] The inference computing unit is used to infer, based on the constraints and the maximum number of tasks per minute, the relationship between the number of all pending frame extraction tasks in each minute within the frame extraction time interval of the target frame extraction task, the relationship between the number of newly added cameras and the relationship between the number of tasks and the number of newly added cameras, to obtain the computing power allocation result, wherein the computing power allocation result includes the maximum total number of cameras to be allocated.

[0015] Thirdly, embodiments of the present invention provide a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the edge server computing power allocation method based on timed frame extraction tasks described in the first aspect.

[0016] Fourthly, embodiments of the present invention also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to perform the edge server computing power allocation method based on timed frame extraction tasks described in the first aspect.

[0017] This invention provides a computing power allocation method, apparatus, computer device, and storage medium. The method sets different frame-drawing tasks and the relationship between the sum of newly added cameras per minute within the corresponding frame-drawing time interval to obtain constraints. Based on the constraints, a reasonable device frame-drawing task allocation scheme is provided, and the maximum total number of cameras to be allocated is calculated, thereby maximizing the utilization of the AI ​​box's computing power resources and alleviating the resource occupation problem caused by continuous frame-drawing. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the edge server computing power allocation method based on a timed frame extraction task provided in an embodiment of the present invention.

[0020] Figure 2 This is a schematic diagram of a sub-process of the edge server computing power allocation method based on a timed frame extraction task provided in an embodiment of the present invention.

[0021] Figure 3 This is a schematic diagram of another sub-process of the edge server computing power allocation method based on timed frame extraction task provided in the embodiments of the present invention;

[0022] Figure 4 This is a schematic diagram of another sub-process of the edge server computing power allocation method based on timed frame extraction task provided in the embodiments of the present invention;

[0023] Figure 5 A schematic diagram of an edge server computing power allocation device based on a timed frame extraction task provided in an embodiment of the present invention;

[0024] Figure 6 A schematic diagram of a subunit of the edge server computing power allocation device based on a timed frame extraction task provided in an embodiment of the present invention;

[0025] Figure 7 This is a schematic diagram of another sub-unit of the edge server computing power allocation device based on timed frame extraction tasks provided in an embodiment of the present invention.

[0026] Figure 8 A schematic diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0029] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0030] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0031] Please see Figure 1 , Figure 1 This is a flowchart illustrating an edge server computing power allocation method based on a timed frame extraction task provided in an embodiment of the present invention. The method includes steps S101 to S104:

[0032] S101. Define parameters for the timed frame extraction task, the parameters including the frame extraction task sequence p. i Time series t j At the t j p within minutes i Number of tasks, at the tth j p within minutes i The number of new cameras added to the task

[0033] In this embodiment, in order to make full use of the AI ​​box's computing power without wasting it, a timed task frame extraction method is proposed to balance and allocate computing power, so as to maximize the use of the box's computing power. At the same time, in order to facilitate the derivation and calculation of the number of timed frame extraction tasks and the number of new cameras, parameters are defined for the timed frame extraction tasks, including time series parameters, task quantity parameters, and the number of new cameras.

[0034] Specifically, such as Figure 2 As shown, step S101 includes S201 to S204:

[0035] S201. Define a frame extraction task sequence, which is represented as: p i i = 1, 2, 3…;

[0036] In this embodiment, to facilitate the derivation and calculation of the number of timed frame extraction tasks and the number of newly added cameras, parameters for the timed frame extraction task are defined. First, a frame extraction task sequence is defined, representing each interval p. i The task of extracting one image per minute from a camera video stream is called frame extraction.

[0037] S202. Define a time series, wherein the time series is represented as: t j ={1, 2, 3, ...}, representing the t-th... j minute;

[0038] Where t1=1, t2=2, t3=3, represents the t-th... j In this embodiment, it should be noted that since all tasks will restart and loop after 30 minutes, the situation after 30 minutes is not considered. The time dimension is t. 30 The timed frame extraction task was investigated within the specified time period.

[0039] S203. Define the number of tasks, wherein the number of tasks is expressed as: Indicates the t-th j p within minutes i The number of tasks;

[0040] in, This indicates the number of tasks within the first minute for which the frame extraction interval is 1 minute.

[0041] S204. Define the number of newly added cameras, whereby the number of newly added cameras is expressed as... Indicates the t-th j p within minutes i The task adds the number of cameras.

[0042] in, This indicates the number of new cameras added in the first minute of a task with a frame skipping interval of 1 minute.

[0043] S102. Set different p according to business attributes. i The task's relationship with the sum of newly added cameras per minute within the corresponding frame extraction time interval is used to obtain the constraints.

[0044] In this embodiment, it is assumed that there is a frame extraction task sequence p. i ={1, 3, 5, 10, 30}, where p1=1, p2=3, p3=5, p4=10, p5=30. In actual business scenarios, p5=30 corresponds to the scenario of missing fire extinguishers in the equipment room. One image is extracted from the video stream every 30 minutes for AI inference and recognition analysis. Optionally, a reasonable equipment frame extraction task allocation scheme can also be applied to various scenarios such as outdoor garbage dumping behavior detection, security systems of fireworks and gunpowder production enterprises, and intelligent drone inspection of power distribution lines, ensuring normal use of AI inspection services in various scenarios.

[0045] Furthermore, such as Figure 3 As shown, step S102 includes steps S301 to S303:

[0046] S301, Get the p with the most tasks i ;

[0047] S302, the p that obtains the most tasks i The sum of the number of cameras added per minute within the corresponding frame-sampling time interval;

[0048] S303, Obtain other p based on business attributes i p with the most tasks i The relationship between p determines all p i The ratio of the sum of newly added cameras per minute within the corresponding frame-sampling time interval is used as a constraint condition.

[0049] In this embodiment, based on business attributes, it is assumed that all p i The proportion of newly added cameras per minute within the corresponding frame extraction time interval, considering actual business scenarios, shows that p3 (5-minute interval) has the most frame extraction tasks, followed by p2 (3-minute interval) and p4 (10-minute interval), while p1 (1-minute interval) and p5 (30-minute interval) have the fewest tasks. Therefore, the following is the result for all p... i The proportional relationship of the sum of newly added cameras per minute within the corresponding frame-sampling time interval, i.e., the constraint:

[0050]

[0051] Specifically, this means that the number of cameras added in the first 5 minutes of a task with a frame interval of 5 minutes is equal to the number of cameras added in the first 30 minutes of a task with a frame interval of 30 minutes. It is also 4 times the number of cameras added in the first minute of a task with a frame interval of 1 minute, twice the number of cameras added in the first 3 minutes of a task with a frame interval of 3 minutes, and twice the number of cameras added in the first 10 minutes of a task with a frame interval of 10 minutes.

[0052] S103, Select the frame extraction task sequence p in sequence. i One of them is taken as the target frame extraction task, and all frame extraction tasks within the frame extraction time interval of the target frame extraction task are identified as frame extraction tasks to be processed.

[0053] In this embodiment, based on the needs of the business scenario, a frame extraction task can be selected as the target frame extraction task, and the frame extraction time interval range of the target frame extraction task can be determined. Next, all frame extraction tasks within the time interval range of the target frame extraction task are processed as frame extraction tasks to be processed. This facilitates comparison of the target frame extraction task with other tasks and allows for processing of frame extraction tasks to be processed according to different scenario requirements.

[0054] S104. Based on the constraints and the maximum number of tasks per minute, reason about the relationship between the number of all pending frame extraction tasks per minute within the frame extraction time interval of the target frame extraction task, the relationship between the number of newly added cameras and the relationship between the number of tasks and the number of newly added cameras, and obtain the computing power allocation result, wherein the computing power allocation result includes the maximum total number of cameras to be allocated.

[0055] In this embodiment, the frame extraction task sequence p is selected. i One of the tasks, p2, is selected as the target frame-skipping task. All frame-skipping tasks within the time interval of this target task are identified as pending frame-skipping tasks. For example, if p2 is a frame-skipping task with a 3-minute time interval, all frame-skipping tasks p1 and p2 within the first 3 minutes are identified as pending frame-skipping tasks. Similarly, p3 is selected as the target frame-skipping task, and all frame-skipping tasks within the time interval of this target task are identified as pending frame-skipping tasks. For example, if p3 is a frame-skipping task with a 5-minute time interval, all frame-skipping tasks p1, p2, and p3 within the first 5 minutes are identified as pending frame-skipping tasks. This process continues until all pending frame-skipping tasks within the first 30 minutes are identified.

[0056] Specifically, in this embodiment, during the actual testing of the timed frame extraction task, it was found that the longest time from task start to image acquisition is 5 seconds, with a period T = 5s. This means that it takes 5 seconds from starting the timed task to extracting the image, and the next timed frame extraction task starts after 5 seconds. Therefore, in order to balance resource utilization, according to the interpolation concept, the optimal solution is to arrange 12 timed tasks within a 1-minute time series, which is the maximum number of tasks.

[0057] In one embodiment, such as Figure 4 As shown, step S104 further includes steps S401 to S403:

[0058] S401. Obtain the number of all pending frame extraction tasks per minute;

[0059] S402. Calculate the sum of the number of tasks for all pending frame extraction tasks in each minute.

[0060] S403. Based on the relationship between the sum of the number of tasks in each minute and the maximum number of tasks in each minute, the task quantity constraint relationship is obtained.

[0061] Furthermore, step S104 also includes:

[0062] Based on the equality of the number of tasks and the number of newly added cameras in each minute of the corresponding frame extraction time interval for each task to be processed, the task-camera constraint relationship is obtained.

[0063] In this embodiment, p2 is selected as the target frame extraction task. p2 is a frame extraction task with a time interval of 3 minutes. All frame extraction tasks within the first 3 minutes are identified, and p1 and p2 are selected as frame extraction tasks to be processed. Inference... and and Computing power allocation formulas for two scenarios:

[0064] Based on the parameters defined in step S101, infer p1 and p2, which are the two frame extraction tasks with frame extraction intervals within the first 3 minutes, and the maximum number of cameras in the three time periods t1 to t3.

[0065] The expression for the sum of the number of all pending frame extraction tasks in time period t1 is:

[0066]

[0067] The expression for the sum of the number of all pending frame extraction tasks in time period t2 is:

[0068]

[0069] The expression for the sum of the number of all pending frame extraction tasks in time period t3 is:

[0070]

[0071] Based on the relationship between the sum of the number of tasks per minute and the maximum number of tasks per minute, the task quantity constraint relationship is obtained:

[0072] Since task p1 cycles every minute, the following constraints apply: task quantity constraint and task camera constraint.

[0073]

[0074] Since task p2 will have additional cameras during time periods t1, t2, and t3, therefore:

[0075]

[0076] According to the constraints in step S303, we have:

[0077]

[0078] The final solution for this application scenario is: The computing power was evenly distributed among 21 cameras, resulting in a total of 35 frame extraction tasks.

[0079] Furthermore, select p3 as the target frame extraction task. p3 is a frame extraction task with a time interval of 5 minutes. Determine all frame extraction tasks within the first 5 minutes. p1, p2, and p3 are frame extraction tasks to be processed. Infer the maximum number of cameras in the five time periods t1 to t5 for the three frame extraction tasks with a time interval of 5 minutes.

[0080] The expression for the sum of the number of all pending frame extraction tasks in time period t1 is:

[0081]

[0082] The expression for the sum of the number of all pending frame extraction tasks in time period t2 is:

[0083]

[0084] The expression for the sum of the number of all pending frame extraction tasks in time period t3 is:

[0085]

[0086] The expression for the sum of the number of all pending frame extraction tasks in time period t4 is:

[0087]

[0088] The expression for the sum of the number of all pending frame extraction tasks in time period t5 is:

[0089]

[0090] Based on the relationship between the sum of the number of tasks per minute and the maximum number of tasks per minute, the task quantity constraint relationship is obtained:

[0091] Since task p1 cycles every minute, the following constraints apply: task quantity constraint and task camera constraint.

[0092]

[0093] Task p2 will have incremental camera access during the time interval t1 to t5. Since the frame extraction interval is 3 minutes, the frame extraction task from minute 1 will repeat starting from minute 4. Therefore, the following constraints exist: task quantity constraint and task camera constraint.

[0094]

[0095] Task p3 will have an incremental number of cameras during the time period from t1 to t5, therefore the following constraints apply: task quantity constraint and task-camera constraint.

[0096]

[0097] According to the constraints in step S303, we have:

[0098]

[0099] The final solution for this application scenario is: The computing power is evenly distributed among 24 cameras, with a maximum of 60 frame extraction tasks associated with them.

[0100] Furthermore, in this embodiment, based on the two specific reasoning processes in step S104, the reasoning for p continues. i The maximum number of cameras calculated for different tasks with i = 1, 2, 3, 4, 5, with the time dimension in t. 30 Conduct investigations within a specific timeframe; for example, infer p i i = 1, 2, 3, 4, that is, four frame-skipping tasks with frame-skipping intervals of 1 minute, 3 minutes, 5 minutes, and 10 minutes, respectively, in the range t1 to t2. 10The maximum number of cameras in 10 time periods, and so on, finally, based on the above reasoning process, we can summarize as follows:

[0101]

[0102]

[0103] In this business scenario, different ps are summarized and analyzed. i By understanding the relationship between the tasks and the sum of new cameras added per minute within the corresponding frame extraction time interval, constraints were obtained. Based on these constraints and the maximum number of tasks per minute, the computing power allocation result, i.e., the maximum total number of cameras to be allocated, can be deduced.

[0104] Furthermore, an edge server computing power allocation method based on timed frame extraction tasks also includes:

[0105] The frame extraction tasks are classified into continuous frame extraction tasks and timed frame extraction tasks, and the continuous frame extraction tasks and the timed frame extraction tasks are separated using a decoupling method.

[0106] In this embodiment, frame extraction tasks can be classified according to different task triggering methods, mainly into continuous frame extraction tasks and timed frame extraction tasks.

[0107] Continuous frame extraction refers to tasks that require extraction within a continuous time period, such as processing or monitoring real-time video. Specifically, after the video stream is pulled from the monitoring device, one frame of the image is extracted at a second interval. Continuous frame extraction will continuously occupy the AI ​​box's memory resources, and the real-time requirements are very high. In scenarios such as congestion at entrances and exits, or intrusion into the perimeter of a community, the AI ​​needs to generate an alert and handle the problem in real time after 3-5 seconds. In such scenarios, the video stream from the camera will be continuously pulled and extracted without interruption, and the frames will remain resident in the memory resources.

[0108] A timed frame extraction task refers to a task that extracts frames at predetermined time intervals, such as extracting one frame from a video at regular intervals and closing the task after extracting one frame. Timed frame extraction will intermittently occupy memory resources and has relatively low real-time requirements. In scenarios such as overflowing trash cans or litter in public areas, AI can handle the problem within 20 minutes after detecting it. In such scenarios, it is only necessary to pull the camera video stream and complete the frame extraction action at certain intervals (e.g., every 30 seconds). Memory resources are only occupied during frame extraction.

[0109] To separate continuous frame extraction tasks from timed frame extraction tasks, a decoupling method can be adopted. By decoupling the continuous frame extraction task module and the timed frame extraction task module, the frame extraction tasks can be better managed and controlled, allowing the tasks to be independently adjusted and optimized according to requirements.

[0110] Furthermore, this invention relates to an edge server computing power allocation method based on timed frame extraction tasks. A specific business scenario involves AI inspections using fixed community camera equipment. When the algorithm model deployed in the AI ​​edge computing box performs inference, it consumes the box's CPU and memory resources. Observations from actual projects show that memory usage is the bottleneck limiting algorithm inference performance. Compared to continuous frame extraction tasks, timed frame extraction tasks are only activated when frames are needed and closed once an image is extracted. This short-duration action allows for better balanced use of machine resources. Therefore, to maximize the allocation and utilization of AI box memory resources, this invention designs a task allocation target optimization scheme based on actual business scenarios. It infers the relationship between the number of timed tasks and the number of newly added cameras based on different needs, deriving the maximum configurable number of cameras. This alleviates the resource consumption problem caused by continuous frame extraction, thus scientifically and fully utilizing the computing power of the AI ​​box.

[0111] like Figure 5 As shown, this embodiment of the invention also provides an edge server computing power allocation device 500 based on a timed frame extraction task, including: a parameter definition unit 501, a constraint setting unit 502, a target frame extraction task determination unit 503, and an inference calculation unit 504.

[0112] Parameter definition unit 501 is used to define parameters for a timed frame extraction task, wherein the parameters include the frame extraction task sequence p. i Time series t j At the t j p within minutes i Number of tasks, at the tth j p within minutes i The number of new cameras added to the task

[0113] The constraint condition unit 502 is used to set different p based on business attributes. i The task's relationship with the sum of newly added cameras per minute within the corresponding frame extraction time interval is used to obtain the constraints.

[0114] The target frame extraction task unit 503 is determined to select the frame extraction task sequence p sequentially. i One of them is taken as the target frame extraction task, and all frame extraction tasks within the frame extraction time interval of the target frame extraction task are identified as frame extraction tasks to be processed.

[0115] The inference computing unit 504 is used to infer the relationship between the number of all pending frame extraction tasks in each minute within the frame extraction time interval of the target frame extraction task, the relationship between the number of newly added cameras and the relationship between the number of tasks and the number of newly added cameras, based on the constraints and the maximum number of tasks in each minute, to obtain the computing power allocation result, wherein the computing power allocation result includes the maximum total number of cameras to be allocated.

[0116] In one embodiment, such as Figure 6 As shown, the constraint setting unit 502 includes:

[0117] The first acquisition unit 601 is used to acquire the task with the largest number of tasks, p. i ;

[0118] The second acquisition unit 602 is used to acquire the task with the largest number of tasks, p. i The sum of the number of cameras added per minute within the corresponding frame-sampling time interval;

[0119] The proportional relationship determination unit 603 is used to obtain other p based on business attributes. i p with the most tasks i The relationship between p determines all p i The ratio of the sum of newly added cameras per minute within the corresponding frame-sampling time interval is used as a constraint condition.

[0120] In one embodiment, such as Figure 7 As shown, the inference calculation unit 504 includes:

[0121] The task quantity acquisition unit 701 is used to acquire the number of all pending frame extraction tasks per minute.

[0122] The calculation unit 702 is used to calculate the sum of the number of tasks of all pending frame extraction tasks in each minute in turn;

[0123] The constraint relationship setting unit 703 is used to obtain the task quantity constraint relationship based on the relationship between the sum of the number of tasks in each minute and the maximum number of tasks in each minute.

[0124] The device sets up a relationship between the sum of newly added cameras per minute within the corresponding frame extraction time interval for different frame extraction tasks, obtains constraints, and calculates the maximum total number of cameras to be allocated using an AI box based on the constraints.

[0125] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned device and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.

[0126] The aforementioned edge server computing power allocation device based on timed frame extraction tasks can be implemented as a computer program, which can be used in, for example... Figure 8 It runs on the computer device shown.

[0127] Please see Figure 8 , Figure 8 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. The computer device 800 is a server, which can be a standalone server or a server cluster composed of multiple servers.

[0128] See Figure 8 The computer device 800 includes a processor 802, a memory, and a network interface 805 connected via a system bus 801. The memory may include a non-volatile storage medium 803 and internal memory 804.

[0129] The non-volatile storage medium 803 can store an operating system 8031 ​​and a computer program 8032. When the computer program 8032 is executed, it enables the processor 802 to execute an edge server computing power allocation method based on a timed frame-skipping task.

[0130] The processor 802 provides computing and control capabilities to support the operation of the entire computer device 800.

[0131] The internal memory 804 provides an environment for the operation of the computer program 8032 in the non-volatile storage medium 803. When the computer program 8032 is executed by the processor 802, the processor 802 can execute the edge server computing power allocation method based on the timed frame extraction task.

[0132] This network interface 805 is used for network communication, such as providing data transmission. Those skilled in the art will understand that... Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device 800 to which the present invention is applied. The specific computer device 800 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0133] Those skilled in the art will understand that Figure 8 The embodiments of the computer device shown do not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. For example, in some embodiments, the computer device may include only memory and a processor. In such embodiments, the structure and function of the memory and processor are different from those shown. Figure 8The embodiments shown are consistent and will not be described again here.

[0134] It should be understood that, in this embodiment of the invention, the processor 802 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0135] In another embodiment of the invention, a computer-readable storage medium is provided. This computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when executed by a processor, the computer program implements the edge server computing power allocation method based on a timed frame-skipping task according to embodiments of the present invention.

[0136] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code.

[0137] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0138] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for allocating computing power to edge servers based on timed frame extraction tasks, characterized in that, include: The parameters for the timed frame extraction task are defined, including the frame extraction task sequence p. i Time series t j At the t j p within minutes i Number of tasks, at the tth j p within minutes i The number of new cameras added to the task Set different p based on business attributes i The task's relationship with the sum of newly added cameras per minute within the corresponding frame extraction time interval is used to obtain the constraints. Select the frame extraction task sequence p in sequence i One of them is taken as the target frame extraction task, and all frame extraction tasks within the frame extraction time interval of the target frame extraction task are identified as frame extraction tasks to be processed. Based on the constraints and the maximum number of tasks per minute, the relationships between the number of all pending frame extraction tasks per minute within the frame extraction time interval of the target frame extraction task, the relationship between the number of newly added cameras, and the relationship between the number of tasks and the number of newly added cameras are inferred to obtain the computing power allocation result, wherein the computing power allocation result includes the maximum total number of cameras to be allocated.

2. The edge server computing power allocation method based on timed frame extraction tasks according to claim 1, characterized in that, The parameter definition for the timed frame extraction task includes: Define a frame extraction task sequence, which is represented as: p i , i = 1, 2, 3...; Define a time series, which is represented as: t j ={1,2,3,...}, representing the t-th... j minute; Define the number of tasks, which is expressed as: Indicates the t-th j p within minutes i The number of tasks; Define the number of newly added cameras, whereby the number of newly added cameras is expressed as... Indicates the t-th j p within minutes i The task adds the number of cameras.

3. The edge server computing power allocation method based on timed frame extraction tasks according to claim 1, characterized in that, The above describes setting different p based on business attributes. i The relationship between the sum of newly added cameras per minute within the corresponding frame extraction time interval is used to derive constraints, including: Get the p with the most tasks i ; Get the p with the most tasks i The sum of the number of cameras added per minute within the corresponding frame-sampling time interval; Obtain other p based on business attributes i p with the most tasks i The relationship between p determines all p i The ratio of the sum of newly added cameras per minute within the corresponding frame-sampling time interval is used as a constraint condition.

4. The edge server computing power allocation method based on timed frame extraction tasks according to claim 1, characterized in that, Based on the constraints and the maximum number of tasks per minute, the process infers the relationships between the number of all pending frame extraction tasks per minute within the frame extraction time interval of the target frame extraction task, the number of newly added cameras, and the number of tasks and the number of newly added cameras, to obtain the computing power allocation result, including: Get the number of all pending frame extraction tasks per minute; Calculate the sum of the number of tasks for all pending frame extraction tasks in each minute; The task quantity constraint relationship is obtained by considering the relationship between the sum of the number of tasks in each minute and the maximum number of tasks in each minute.

5. The edge server computing power allocation method based on timed frame extraction tasks according to claim 4, characterized in that, The process of reasoning about the relationships between the number of all pending frame extraction tasks within each minute of the frame extraction time interval of the target frame extraction task, the number of newly added cameras, and the number of tasks and the number of newly added cameras, based on the constraints and the maximum number of tasks per minute, to obtain the computing power allocation result, also includes: Based on the equality of the number of tasks and the number of newly added cameras in each minute of the corresponding frame extraction time interval for each task to be processed, the task-camera constraint relationship is obtained.

6. The edge server computing power allocation method based on timed frame extraction tasks according to claim 1, characterized in that, Also includes: The frame extraction tasks are classified into continuous frame extraction tasks and timed frame extraction tasks, and the continuous frame extraction tasks and the timed frame extraction tasks are separated using a decoupling method.

7. An edge server computing power allocation device based on a timed frame extraction task, characterized in that, include: The parameter definition unit is used to define parameters for the timed frame extraction task, wherein the parameters include the frame extraction task sequence p. i Time series t j At the t j p within minutes i Number of tasks, at the tth j p within minutes i The number of new cameras added to the task The constraint setting unit is used to set different p based on business attributes. i The task's relationship with the sum of newly added cameras per minute within the corresponding frame extraction time interval is used to obtain the constraints. Determine the target frame extraction task unit, used to sequentially select the frame extraction task sequence p. i One of them is taken as the target frame extraction task, and all frame extraction tasks within the frame extraction time interval of the target frame extraction task are identified as frame extraction tasks to be processed. The inference computing unit is used to infer, based on the constraints and the maximum number of tasks per minute, the relationship between the number of all pending frame extraction tasks in each minute within the frame extraction time interval of the target frame extraction task, the relationship between the number of newly added cameras and the relationship between the number of tasks and the number of newly added cameras, to obtain the computing power allocation result, wherein the computing power allocation result includes the maximum total number of cameras to be allocated.

8. The edge server computing power allocation device based on timed frame extraction task according to claim 7, characterized in that, The constraint setting unit includes: The first acquisition unit is used to acquire the task with the largest number of tasks, p. i ; The second acquisition unit is used to acquire the p with the largest number of tasks. i The sum of the number of cameras added per minute within the corresponding frame-sampling time interval; The unit for determining proportional relationships is used to obtain other p based on business attributes. i p with the most tasks i The relationship between p determines all p i The ratio of the sum of newly added cameras per minute within the corresponding frame-sampling time interval is used as a constraint condition.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the edge server computing power allocation method based on timed frame extraction task as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the edge server computing power allocation method based on a timed frame extraction task as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Computing power distribution method of patrol robot and related equipment

    CN113823011A

  • Distributed edge fusion computing power deployment system

    CN115981873A