Video stream task multi-level scheduling method and device, electronic equipment and medium

Through the multi-level scheduling method of video streaming tasks, the coordinated work of national central management nodes and provincial analysis nodes is used to solve the problem of timeliness of video streaming scheduling and alarm in the existing technology, and efficient video streaming task management and unified resource control are achieved. , improves system performance and equipment control capabilities.

CN118963959APending Publication Date: 2024-11-15CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411096042.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing video stream scheduling inference technology has pressure on the timeliness of large-scale equipment analysis and timely alarm push, and it is difficult to meet the needs of rapid growth of video streaming data across the country and complex algorithm tasks.

Method used

A multi-level scheduling method for video streaming tasks is proposed. Tasks are created through the national central management nodes, and tasks are sent to the analysis nodes of the target provinces based on task information, and scheduling services and algorithm services are used for processing, and nodes are managed through the national central management nodes. Push processing results to realize unified management and nearby analysis of national equipment resources.

Benefits of technology

It improves the efficient scheduling and management capabilities of video streaming tasks, meets the analysis needs of large-scale equipment, improves alarm timeliness, saves labor costs, and supports the expansion of heterogeneous computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118963959A_ABST
    Figure CN118963959A_ABST
Patent Text Reader

Abstract

The invention discloses a video stream task multi-level scheduling method and device, electronic equipment and a medium, and the method comprises the steps: calling a national central management node to create a video stream task in response to a calling instruction of a target application; the calling instruction and the video stream task carry task information and a task time range; issuing the video stream task to a target analysis node of the target provincial region based on the task information; the target analysis node comprises a scheduling service and an algorithm service; the video stream task is saved through the scheduling service, and then the scheduling state of the video stream task is set based on the task time range; and performing operation processing on the task of which the scheduling state is the to-be-scheduled state in the scheduling service through the algorithm service, and further pushing a processing result of the operation processing to the target application. The method can efficiently realize multi-level scheduling of video stream tasks, and can be widely applied to the technical field of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic equipment and medium for multi-level scheduling of video stream tasks. Background Art

[0002] With the rapid development of science and technology, video stream AI analysis technology has become an important tool for global governance. Global governance covers a wide range of areas, including public safety, traffic management, environmental protection and other fields. In these fields, important information support is provided to decision makers through means such as video stream analysis and reasoning technology. However, with the rapid growth of video stream data across the country and the complexity of algorithm tasks, scheduling and managing algorithm tasks such as video stream devices in various provinces and cities has become an urgent problem to be solved. However, the existing video stream scheduling and reasoning technology is mainly distributed to specific computing power pools through scheduling services. If the number of running equipment in the analysis center exceeds 10,000, the pressure on the precise scheduling of the scheduling service is very high, and it is difficult to meet the timeliness of large-scale equipment simultaneous analysis and timely alarm push. Summary of the invention

[0003] The present invention proposes a method, device, electronic device and medium for multi-level scheduling of video stream tasks, aiming to solve one of the technical problems in the related art at least to a certain extent. The embodiments of the present invention can efficiently implement multi-level scheduling of video stream tasks.

[0004] On the one hand, an embodiment of the present invention provides a multi-level scheduling method for video stream tasks, including:

[0005] In response to the call instruction of the target application, the national central management node is called to create a video stream task; the call instruction and the video stream task carry task information and task time range;

[0006] Based on the task information, the video stream task is sent to the target parsing node in the target province; the target parsing node includes scheduling service and algorithm service;

[0007] Save the video stream task through the scheduling service, and then set the scheduling status of the video stream task based on the task time range;

[0008] The algorithm service is used to run the tasks in the scheduling service whose scheduling status is pending, and then the processing results of the running processing are pushed to the target application.

[0009] Optionally, in response to the calling instruction of the target application, before the step of calling the central management node to create a video stream task, the method further includes the following steps:

[0010] The target application receives the task information input by the target object, and then generates a calling instruction based on the task information.

[0011] Optionally, the task information includes information about the province to which the task belongs and target devices and algorithm information involved in the video stream task; based on the task information, the video stream task is sent to a target parsing node in a target province, including the following steps:

[0012] Determine the target provincial area corresponding to the video stream task based on the provincial information to which the task belongs, and send the video stream task to the target area node corresponding to the target provincial area;

[0013] Obtain the device region and tenant information of the target device; obtain the resource adequacy of all resolution nodes in the target region node;

[0014] Based on the device's region, tenant information, algorithm information, and resource sufficiency, the target resolution node is matched in the target region node;

[0015] Send the video stream task of the target area node to the target parsing node.

[0016] Optionally, based on the region to which the device belongs, tenant information, and resource sufficiency, matching a target resolution node in a target region node includes the following steps:

[0017] Determine the preset range based on the device's region and tenant information;

[0018] Marking the parsing nodes within a preset range in the target area nodes as parsing nodes to be selected;

[0019] Based on the resource adequacy of all candidate parsing nodes and the computing power resource requirements of the algorithm information, the target parsing node is matched among all candidate parsing nodes.

[0020] Optionally, the task information includes target devices and algorithm information involved in the video stream task; saving the video stream task through the scheduling service includes the following steps:

[0021] Based on the different target devices and algorithm information involved in the video streaming task, the video streaming task is split into multiple scheduling subtasks;

[0022] The scheduling service calls the preset remote dictionary service to save the cache data of each scheduling subtask;

[0023] The scheduling service calls the preset relational database to save the persistent data of each scheduling subtask.

[0024] Optionally, the scheduling state includes a waiting-to-be-scheduled state and a suspended-sleep state; setting the scheduling state of the video stream task based on the task time range includes the following steps:

[0025] The current time node is continuously updated. If the current time node is within the task time range, the scheduling state of the video stream task is set to the waiting state. Otherwise, the scheduling state of the video stream task is set to the suspended sleep state.

[0026] Optionally, pushing the processing result of the running process to the target application includes the following steps:

[0027] The processing results are returned to the national central management node through the target parsing node, and then pushed to the target application through the national central management node.

[0028] On the other hand, an embodiment of the present invention provides a multi-level scheduling device for video stream tasks, including:

[0029] The first module is used to respond to the call instruction of the target application and call the national central management node to create a video stream task; the call instruction and the video stream task carry task information and task time range;

[0030] The second module is used to send the video stream task to the target parsing node in the target province based on the task information; the target parsing node includes a scheduling service and an algorithm service;

[0031] The third module is used to save the video stream task through the scheduling service, and then set the scheduling status of the video stream task based on the task time range;

[0032] The fourth module is used to run the tasks in the scheduling service whose scheduling status is to be scheduled through the algorithm service, and then push the processing results of the running processing to the target application.

[0033] Optionally, the device further comprises:

[0034] The fifth module is used to receive task information input by the target object through the target application, and then generate a call instruction based on the task information; the fifth module is executed before the first module.

[0035] Optionally, the task information includes information about the province to which the task belongs and information about the target device and algorithm involved in the video stream task; the second module is specifically used for:

[0036] Determine the target provincial area corresponding to the video stream task based on the provincial information to which the task belongs, and send the video stream task to the target area node corresponding to the target provincial area;

[0037] Obtain the device region and tenant information of the target device; obtain the resource adequacy of all resolution nodes in the target region node;

[0038] Based on the device's region, tenant information, algorithm information, and resource sufficiency, the target resolution node is matched in the target region node;

[0039] Send the video stream task of the target area node to the target parsing node.

[0040] Optionally, the task information includes target devices and algorithm information involved in the video stream task; the third module is specifically used for:

[0041] Based on the different target devices and algorithm information involved in the video streaming task, the video streaming task is split into multiple scheduling subtasks;

[0042] The scheduling service calls the preset remote dictionary service to save the cache data of each scheduling subtask;

[0043] The scheduling service calls the preset relational database to save the persistent data of each scheduling subtask.

[0044] Optionally, the scheduling state includes a waiting-to-be-scheduled state and a suspended-sleep state; and the third module is further specifically used for:

[0045] The current time node is continuously updated. If the current time node is within the task time range, the scheduling state of the video stream task is set to the waiting state. Otherwise, the scheduling state of the video stream task is set to the suspended sleep state.

[0046] Optionally, the fourth module is specifically used for:

[0047] The processing results are returned to the national central management node through the target parsing node, and then pushed to the target application through the national central management node.

[0048] On the other hand, an embodiment of the present invention provides an electronic device, including: a processor and a memory; the memory is used to store programs; the processor executes the program to implement the above-mentioned multi-level scheduling method for video stream tasks.

[0049] On the other hand, an embodiment of the present invention provides a computer storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the above-mentioned multi-level scheduling method of video stream tasks.

[0050] The embodiment of the present invention calls the national central management node to create a video stream task in response to the call instruction of the target application; the call instruction and the video stream task carry the task information and the task time range; based on the task information, the video stream task is sent to the target parsing node of the target provincial area; the target parsing node includes a scheduling service and an algorithm service; the video stream task is saved through the scheduling service, and the scheduling status of the video stream task is set based on the task time range; the algorithm service is used to run the task in the scheduling service with the scheduling status to be scheduled, and then the processing result of the running processing is pushed to the target application. The embodiment of the present invention uses the national central management node as the overall coordination center to realize national centralized management, and then distributes the video stream task to the parsing nodes of each provincial area through the national central management node, and manages the computing power resource clusters of each provincial area to realize multi-level scheduling. The embodiment of the present invention can uniformly manage the national equipment resources, facilitate the nearby access parsing, and have the overall management and control capabilities of the national equipment. The present invention can efficiently realize multi-level scheduling of video stream tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.

[0052] Figure 1 A schematic diagram of an implementation environment for multi-level scheduling of video stream tasks provided by an embodiment of the present invention;

[0053] Figure 2 A schematic diagram of a flow chart of a multi-level scheduling method for video stream tasks provided by an embodiment of the present invention;

[0054] Figure 3 A schematic diagram of the expanded process of sending a video stream task to a target parsing node provided by an embodiment of the present invention;

[0055] Figure 4 A schematic diagram of a process of obtaining a moving speed of a mobile terminal provided by an embodiment of the present invention;

[0056] Figure 5 A schematic diagram of the timing of the process architecture of multi-level scheduling of video stream tasks provided by an embodiment of the present invention;

[0057] Figure 6 A schematic diagram of a task calling process for multi-level scheduling of video stream tasks provided by an embodiment of the present invention;

[0058] Figure 7 A schematic diagram of an application architecture for multi-level scheduling of video stream tasks provided by an embodiment of the present invention;

[0059] Figure 8A schematic diagram of an application architecture example of multi-level scheduling of video stream tasks provided by an embodiment of the present invention;

[0060] Fig. 9 A schematic diagram of the structure of a multi-level scheduling device for video stream tasks provided by an embodiment of the present invention;

[0061] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0063] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100", "second / S200", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0064] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0065] To facilitate the understanding of the technical solution of the present invention, the technical feature terms that may appear in the embodiments of the present invention are first explained:

[0066] AI application for video stream analysis in all-domain governance: AI application for video stream analysis in multiple scenarios such as urban governance, campus governance, rental housing safety, kitchen safety, etc.

[0067] Multi-center multi-level scheduling: It is a scheduling strategy applied in a multi-center multi-computer room distributed system or network environment. It combines the concepts of national, provincial, municipal, district and county multi-center and multi-level scheduling (i.e., tasks are divided into multiple regions for scheduling according to different local resource requirements);

[0068] Video stream algorithm tasks: Video stream algorithm tasks usually involve the compression, transmission, decoding, encoding, etc. of video data, and then use computing power to infer and analyze the frame images and push the results to the outside.

[0069] Redis (Remote Dictionary Server): Remote dictionary service, is an open source log-type, Key-Value database written in ANSI C language, supports the network, can be based on memory or persistence, and provides APIs in multiple languages.

[0070] It is understandable that the multi-level scheduling method for video stream tasks provided in the embodiment of the present invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various types of terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal is a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this.

[0071] like Figure 1 FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present invention. Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected to a network wirelessly or wired to complete data transmission and exchange.

[0072] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0073] In addition, the server 101 can also be a node server in the blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.

[0074] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal 102 and the server 101 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present invention.

[0075] Based on the example Figure 1 In the implementation environment shown, an embodiment of the present invention provides a multi-level scheduling method for video stream tasks. The multi-level scheduling method for video stream tasks is applied to the server 101 as an example for explanation below. It can be understood that the multi-level scheduling method for video stream tasks can also be applied to the terminal 102.

[0076] Reference Figure 2 , Figure 2 The flowchart of the multi-level scheduling method for video stream tasks applied to a terminal provided by an embodiment of the present invention, the execution subject of the multi-level scheduling method for video stream tasks can be any of the aforementioned computer devices (including a server or a terminal). Figure 2 , the method comprises the following steps:

[0077] S100, in response to a call instruction of a target application, calling a national central management node to create a video stream task;

[0078] Among them, the call instruction and the video stream task carry the task information and the task time range;

[0079] In some embodiments, before the step of calling the central management node to create a video stream task in response to a call instruction of the target application, the method may further include the following steps: receiving task information input by the target object through the target application, and then generating a call instruction based on the task information.

[0080] For example, in some specific implementations, based on the target application, the upper-layer application developer only needs to connect to the unified SDK to implement nationwide video stream algorithm task scheduling. Specifically, each application platform can create a video stream task by calling the national central management node.

[0081] S200: Based on the task information, the video stream task is sent to the target parsing node in the target provincial area;

[0082] Among them, the target parsing node includes scheduling service and algorithm service;

[0083] Exemplarily, in some specific implementations, the national central management node calls the provincial API service for distribution according to the provincial information of the task. The provincial API service matches the appropriate computing power resolution node according to a certain strategy based on the device's region, tenant information, algorithm information, resource sufficiency, etc., and then distributes it to the corresponding resolution node according to the device algorithm.

[0084] It should be noted that the task information includes the province information to which the task belongs and the target device and algorithm information involved in the video stream task; in some embodiments, such as Figure 3As shown, based on the task information, sending the video stream task to the target parsing node of the target provincial area can include the following steps: S201, determining the target provincial area corresponding to the video stream task based on the provincial information to which the task belongs, and sending the video stream task to the target area node corresponding to the target provincial area; S202, obtaining the device area and tenant information of the target device; obtaining the resource sufficiency of all parsing nodes in the target area node; S203, matching the target parsing node in the target area node based on the device area, tenant information, algorithm information and resource sufficiency; S204, sending the video stream task of the target area node to the target parsing node.

[0085] Among them, in some embodiments, such as Figure 4 As shown, based on the area to which the device belongs, tenant information and resource sufficiency, matching the target resolution node in the target area node can include the following steps: S2031, determining a preset range based on the area to which the device belongs and tenant information; S2032, marking the resolution nodes in the target area node within the preset range as candidate resolution nodes; S2033, based on the resource sufficiency of all candidate resolution nodes, combining the computing power resource requirements of the algorithm information to match the target resolution node in all candidate resolution nodes.

[0086] S300, saving the video stream task through the scheduling service, and then setting the scheduling status of the video stream task based on the task time range;

[0087] It should be noted that the task information includes the target device and algorithm information involved in the video stream task; in some embodiments, saving the video stream task through the scheduling service may include the following steps: based on the different target devices and algorithm information involved in the video stream task, splitting the video stream task into multiple scheduling subtasks; calling the preset remote dictionary service through the scheduling service to save the cache data of each scheduling subtask; calling the preset relational database through the scheduling service to save the persistent data of each scheduling subtask.

[0088] It should be noted that the scheduling status includes a waiting state and a suspended sleep state; in some embodiments, setting the scheduling status of the video stream task based on the task time range may include the following steps: continuously updating the current time node, if the current time node is within the task time range, setting the scheduling status of the video stream task to a waiting state, otherwise, setting the scheduling status of the video stream task to a suspended sleep state.

[0089] Exemplarily, in some specific implementations, the corresponding resolution node scheduling service receives the task, saves the task details (cached data can be saved through the preset Redis, and persistent data can be saved through the preset relational database to ensure transaction consistency), and sets the scheduling status according to the task time range. If it is within the time period, the scheduling status is set to pending scheduling, otherwise it is set to a suspended sleep state.

[0090] S400: Performing operation processing on the tasks in the scheduling service whose scheduling status is to be scheduled through the algorithm service, and then pushing the processing result of the operation processing to the target application.

[0091] It should be noted that, in some embodiments, pushing the processing results of the running process to the target application may include the following steps: returning the processing results to the national central management node through the target parsing node, and then pushing the processing results to the target application through the national central management node.

[0092] For example, in some specific implementations, the algorithm service queries the scheduling service in the current cluster for the tasks to be scheduled based on the algorithm coding information, and after obtaining the tasks, sends them to the computing power card for execution, and at the same time changes the scheduling status to running. The computing power card reasoning results are pushed to the event center through the message middleware and distributed to the application layer. Among them, the computing power card reasoning can be performed through the preset GPU or Atlas reasoning.

[0093] Specifically, in some specific implementations, the task execution process may include the following stages: algorithm service startup, algorithm instance information registration, task acquisition from the scheduling service, video stream algorithm task execution, alarm push and event center distribution.

[0094] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.

[0095] First of all, it should be noted that with the rapid growth of national video streaming data and the complexity of algorithm tasks, how to efficiently schedule and manage the algorithm task scheduling of video streaming devices in various provinces and cities has become an urgent problem to be solved.

[0096] In view of this, the purpose of the present invention is to realize the multi-level scheduling technology of the algorithm task of the video stream in the whole area. Specifically, large-scale equipment analysis is generally based on the principle of local analysis, so it is necessary to design a set of complex multi-level scheduling strategies and priority strategies to meet the algorithm scheduling capabilities of different areas. Specifically, the invention is based on the following creation purpose:

[0097] 1. It is necessary to design a national video streaming algorithm task multi-level scheduling platform to ensure centralized management and scheduling;

[0098] 2. The computing resources in each province and city are relatively scattered, with multiple sets of computing resource nodes, which need to be centrally managed and dispatched;

[0099] 3. Video devices are distributed in various provinces, cities, districts and counties. Video stream transmission has bottlenecks and requires a large bandwidth, so local analysis is required;

[0100] 4. Generally, task management is implemented by sending tasks to computing power cards, which puts great pressure on scheduling services. At the same time, there are concurrency bottlenecks, so it is necessary to design a high-concurrency and high-performance scheduling solution to meet the scheduling of algorithm resources.

[0101] In a specific application scenario, refer to Figure 5 and Figure 6 The embodiment of the present invention proposes a multi-level scheduling method for global governance video stream algorithm tasks, which may include the following process:

[0102] 1) Each application platform calls the national central management node to create a video streaming task;

[0103] 2) The national central management node calls the provincial API service to issue the task according to the provincial information of the task;

[0104] 3) The provincial API service matches the appropriate computing power analysis node according to a certain strategy based on the device's region, tenant information, algorithm information, resource adequacy, etc., and then sends it to the corresponding analysis node according to the device algorithm;

[0105] 4) The corresponding parsing node scheduling service receives the task, saves the task details, and sets the scheduling status according to the task time range. If it is within the time period, the scheduling status is set to pending scheduling, otherwise it is set to suspended sleep state;

[0106] 5) The algorithm service queries the scheduling service in the current cluster for the tasks to be scheduled based on the algorithm coding information. After obtaining the tasks, it sends them to the computing power card for execution and changes the scheduling status to running at the same time;

[0107] 6) The inference results of the computing power card are pushed to the event center through the message middleware and distributed to the application layer.

[0108] Among them, the task running process may include the following stages: algorithm service startup, algorithm instance information registration, task acquisition from the scheduling service, video stream algorithm task execution, alarm push and event center distribution. In some application scenarios, before sending tasks to the provincial API service (provincial API node) and specific computing power resolution nodes (regional resolution scheduling center nodes), first determine whether the provincial resolution center (i.e., the corresponding computing power resolution node) corresponding to the provincial information of the task exists. If not, the corresponding task ends directly. Specifically, to ensure transaction consistency, when saving detailed task information, cached data can be saved through the preset Redis, and persistent data can be saved through the preset relational database.

[0109] In another specific application scenario, the implementation scheme of the embodiment of the present invention is based on Figure 7 The design architecture shown in the figure is implemented, and the specific implementation case structure is as follows Figure 8 As shown:

[0110] 1. This platform relies on PaaS components including Mysql, Redis, and Kafka;

[0111] 2. This platform relies on the registration center Nacos to ensure the management of service discovery algorithm service instances;

[0112] 3. The management service, API service, and scheduling service of this platform provide Docker images and helm resource files, which can be directly uploaded to the image warehouse and then started with one click through helminstall;

[0113] 4. The algorithm service is sent to the regional nodes through the central node algorithm warehouse with one click. The regional nodes are deployed with one click based on the sent algorithm image and default startup configuration parameters.

[0114] In summary, the technical solution of the present invention is achieved through the following technical points:

[0115] 1.1. Unify the video stream algorithm task open platform to achieve national centralized management and multi-level scheduling;

[0116] 1.2. Manage the computing resource clusters in each province, including GPU and Atlas heterogeneous capabilities. According to local information, support the scheduling service management cluster and support one-click deployment of algorithm services;

[0117] 1.3. After the algorithm service is automatically deployed, it obtains tasks from the scheduling service in the cluster. The scheduling service mainly provides the ability to query tasks and manage the state machine of scheduling tasks, which can improve the overall performance and alarm timeliness;

[0118] 1.4. Unified management of national equipment resources, convenient access and analysis nearby, and the ability to control the overall equipment nationwide.

[0119] Compared with the prior art, the embodiments of the present invention have at least the following beneficial effects:

[0120] 2.1. Save a lot of manpower costs. For upper-level application developers, they only need to connect to the unified SDK to realize nationwide video stream algorithm task scheduling;

[0121] 2.2. When the resources of a computing cluster of a provincial node are insufficient, a new computing cluster can be quickly expanded and some tasks can be scheduled to the new cluster;

[0122] 2.3. It can support the expansion of heterogeneous computing resources to meet the needs of different regions;

[0123] 2.4. Improve the timeliness of alarms.

[0124] On the other hand, Fig. 9 As shown, the embodiment of the present invention provides a multi-level scheduling device 900 for video stream tasks, including:

[0125] The first module 910 is used to call the national central management node to create a video stream task in response to a call instruction of the target application; the call instruction and the video stream task carry task information and task time range;

[0126] The second module 920 is used to send the video stream task to the target parsing node in the target province based on the task information; the target parsing node includes a scheduling service and an algorithm service;

[0127] The third module 930 is used to save the video stream task through the scheduling service, and then set the scheduling state of the video stream task based on the task time range;

[0128] The fourth module 940 is used to perform operation processing on the tasks in the scheduling service whose scheduling status is the waiting-to-be-scheduled status through the algorithm service, and then push the processing results of the operation processing to the target application.

[0129] In some embodiments, the apparatus may further include:

[0130] The fifth module is used to receive task information input by the target object through the target application, and then generate a call instruction based on the task information; the fifth module is executed before the first module.

[0131] In some embodiments, the task information includes the provincial information to which the task belongs and the target device and algorithm information involved in the video stream task; the second module can be specifically used to: determine the target provincial area corresponding to the video stream task based on the provincial information to which the task belongs, and send the video stream task to the target area node corresponding to the target provincial area; obtain the device area and tenant information of the target device; obtain the resource sufficiency of all parsing nodes in the target area node; based on the device area, tenant information, algorithm information and resource sufficiency, match the target parsing node in the target area node; send the video stream task of the target area node to the target parsing node.

[0132] In some embodiments, the task information includes the target device and algorithm information involved in the video streaming task; the third module can be specifically used to: split the video streaming task into multiple scheduling subtasks based on the different target devices and algorithm information involved in the video streaming task; call the preset remote dictionary service through the scheduling service to save the cache data of each scheduling subtask; call the preset relational database through the scheduling service to save the persistent data of each scheduling subtask.

[0133] In some embodiments, the scheduling status includes a waiting-to-be-scheduled status and a suspended-sleep status; the third module can also be specifically used to: continuously update the current time node, if the current time node is within the task time range, set the scheduling status of the video stream task to the waiting-to-be-scheduled status, otherwise, set the scheduling status of the video stream task to the suspended-sleep status.

[0134] In some embodiments, the fourth module can be specifically used to: return the processing result to the national central management node through the target parsing node, and then push the processing result to the target application through the national central management node.

[0135] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0136] On the other hand, an embodiment of the present invention further provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above sensitive information method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0137] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0138] like Fig.10 As shown, Fig.10A specific example of the hardware structure of an electronic device 1000 according to an embodiment is shown. The electronic device 1000 includes:

[0139] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.

[0140] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the network node population optimization method of the embodiment of the present invention;

[0141] Input / output interface 1003, used to implement information input and output;

[0142] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0143] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );

[0144] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .

[0145] The electronic device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0146] The contents of the method embodiments of the present invention are all applicable to the electronic device embodiments. The functions specifically implemented by the electronic device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0147] Another aspect of an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.

[0148] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read to Only Memory, CD to ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0149] The contents of the method embodiments of the present invention are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0150] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0151] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0152] It should be noted that, although several modules of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0153] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD to ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present invention.

[0154] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0155] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0156] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0157] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution device, apparatus or device (such as a computer-based device, a device including a processor, or other device that can fetch instructions from an instruction execution device, apparatus or device and execute the instructions), or in conjunction with such instruction execution device, apparatus or device. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution device, apparatus or device, or in conjunction with such instruction execution device, apparatus or device.

[0158] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0159] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0160] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0161] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0162] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. A multi-level scheduling method for video stream tasks, characterized in that: The following steps are involved: In response to the call instruction of the target application, the national central management node is called to create a video stream task; the call instruction and the video stream task carry task information and task time range; Based on the task information, the video stream task is sent to a target parsing node in a target province; the target parsing node includes a scheduling service and an algorithm service; Saving the video stream task through the scheduling service, and then setting the scheduling state of the video stream task based on the task time range; The algorithm service is used to execute the task in the scheduling service whose scheduling status is to be scheduled, and then the processing result of the execution processing is pushed to the target application.

2. The multi-level scheduling method for video stream tasks according to claim 1, characterized in that: Before the step of calling the central management node to create a video stream task in response to the calling instruction of the target application, the method further includes the following steps: The target application receives the task information input by the target object, and then generates the calling instruction based on the task information.

3. The multi-level scheduling method for video stream tasks according to claim 1, characterized in that: The task information includes information about the province to which the task belongs and target devices and algorithm information involved in the video stream task; based on the task information, the video stream task is sent to a target parsing node in a target province, including the following steps: Determine the target provincial area corresponding to the video stream task based on the provincial information to which the task belongs, and send the video stream task to the target area node corresponding to the target provincial area; Obtaining the device region and tenant information of the target device; obtaining resource sufficiency of all resolution nodes in the target region node; Based on the region to which the device belongs, the tenant information, the algorithm information and the resource sufficiency, the target resolution node is obtained by matching in the target region node; The video stream task of the target area node is sent to the target parsing node.

4. The multi-level scheduling method for video stream tasks according to claim 3 is characterized in that: The step of matching the target resolution node in the target area node based on the area to which the device belongs, the tenant information, and the resource sufficiency includes the following steps: Determine a preset range based on the area to which the device belongs and the tenant information; Marking the parsing nodes in the target area nodes within the preset range as parsing nodes to be selected; Based on the resource sufficiency of all the candidate resolution nodes and the computing power resource requirements of the algorithm information, the target resolution node is obtained by matching all the candidate resolution nodes.

5. The multi-level scheduling method for video stream tasks according to claim 1, characterized in that: The task information includes target devices and algorithm information involved in the video stream task; and saving the video stream task through the scheduling service includes the following steps: Based on the different target devices and the algorithm information involved in the video stream task, split the video stream task into a plurality of scheduling subtasks; Calling a preset remote dictionary service through the scheduling service to save cache data of each of the scheduling subtasks; The scheduling service calls a preset relational database to save the persistent data of each scheduling subtask.

6. The multi-level scheduling method for video stream tasks according to claim 1, characterized in that: The scheduling state includes the waiting-to-be-scheduled state and the suspended-sleep state; and setting the scheduling state of the video stream task based on the task time range includes the following steps: The current time node is continuously updated. If the current time node is within the task time range, the scheduling state of the video stream task is set to the waiting-to-be-scheduled state; otherwise, the scheduling state of the video stream task is set to the suspended sleep state.

7. The multi-level scheduling method for video stream tasks according to claim 1, characterized in that: The step of pushing the processing result of the running process to the target application comprises the following steps: The processing result is returned to the national central management node through the target parsing node, and then the processing result is pushed to the target application through the national central management node.

8. A multi-level scheduling device for video stream tasks, characterized in that: include: The first module is used to call the national central management node to create a video stream task in response to a call instruction of the target application; the call instruction and the video stream task carry task information and task time range; The second module is used to send the video stream task to the target parsing node in the target provincial area based on the task information; the target parsing node includes a scheduling service and an algorithm service; A third module is used to save the video stream task through the scheduling service, and then set the scheduling state of the video stream task based on the task time range; The fourth module is used to perform operation processing on the tasks in the scheduling service whose scheduling status is the waiting-to-be-scheduled status through the algorithm service, and then push the processing results of the operation processing to the target application.

9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 7.

10. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 7 when executed by the processor.

Citation Information

Cited By

  • Computing power server detection method and device, computer equipment and storage medium

    CN119544539A

  • Computing power server detection method and device, computer device, and storage medium

    CN119544539B