Monitoring equipment algorithm deployment method and device, equipment and storage medium
By dynamically deploying monitoring device algorithms using monitoring relationships within the network system, the problem of monitoring device algorithm deployment affecting existing business operations in existing technologies is solved, achieving efficient algorithm deployment without impacting existing business logic.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIVIEW TECH CO LTD
- Filing Date
- 2024-11-22
- Publication Date
- 2026-05-22
AI Technical Summary
In existing technologies, the deployment of monitoring equipment algorithms requires manually identifying idle devices and establishing communication links, which affects existing business logic and makes it impossible to achieve dynamic deployment without affecting existing business.
By acquiring the available resources and resource requirements of the target monitoring device, and utilizing the monitoring relationships in the network system, the algorithm is dynamically deployed to candidate monitoring devices that meet the resource requirements, thus avoiding modifications to the existing network system.
It enables the dynamic deployment of monitoring device algorithms without affecting existing business logic, ensuring the availability and reliability of algorithm deployment.
Smart Images

Figure CN122073604A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for deploying algorithms for monitoring equipment. Background Technology
[0002] With the continuous development and rapid application of deep learning technology, more and more intelligent algorithms based on deep learning have emerged. These intelligent algorithms can solve various data processing needs and problems. In the field of surveillance, many intelligent algorithms are currently deployed on surveillance equipment to achieve monitoring functions.
[0003] In related technologies, when deploying algorithms (such as image detection algorithms, target detection algorithms, target tracking algorithms, etc.) on monitoring equipment, users typically deploy the corresponding data processing algorithms to the monitoring equipment according to its data processing requirements to achieve the corresponding data processing functions. However, if the monitoring equipment cannot perform data processing, the user needs to manually find an idle device and re-establish the communication link between the monitoring equipment and the idle device. Then, by deploying the relevant algorithms on the idle device and transmitting the monitoring equipment's data and instructions through the newly established communication link, the user can achieve the data processing function for the monitoring equipment's corresponding data.
[0004] However, the aforementioned technologies may affect existing business operations. Therefore, how to achieve dynamic deployment of monitoring equipment algorithms without affecting existing business operations has become an urgent technical problem to be solved. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and storage medium for deploying monitoring equipment algorithms, which solves the problem in the prior art where users manually find idle devices and deploy algorithms, while establishing new communication links to transmit data and instructions from the monitoring equipment to achieve data processing functions, thus affecting existing business logic. The invention achieves the goal of dynamically deploying monitoring equipment algorithms without affecting existing business operations.
[0006] This invention provides a method for deploying monitoring device algorithms, comprising: Obtain the available resources of the target monitoring device and the resource requirements for executing the target algorithm; If the available resources of the target monitoring device do not meet the resource requirements for executing the target algorithm, then obtain the monitoring relationship of the target monitoring device in the network system; the network system includes the target monitoring device and other monitoring devices after networking. Based on the monitoring relationship, candidate monitoring devices in the network system are identified whose available resources meet the resource requirements for executing the target algorithm; the aforementioned candidate monitoring devices are monitoring devices that have a direct or indirect monitoring relationship with the target monitoring device. Deploy the target algorithm to candidate monitoring devices.
[0007] According to a monitoring device algorithm deployment method provided by the present invention, the monitoring relationship includes the direct or indirect data transmission relationship between the target monitoring device and other monitoring devices after networking. The method for determining candidate monitoring devices in the networking system that have available resources sufficient to meet the resource requirements for executing the target algorithm, based on the monitoring relationship, includes: Based on the data transmission relationship, the first monitoring device that has a data transmission relationship with the target monitoring device is identified in the networking system, and it is determined whether the available resources of the first monitoring device meet the resource requirements for executing the target algorithm. If the available resources of any of the first monitoring devices meet the resource requirements for executing the target algorithm, then any of the first monitoring devices will be identified as a candidate monitoring device.
[0008] According to the monitoring device algorithm deployment method provided by the present invention, the aforementioned monitoring relationship also includes the direct or indirect signaling interaction relationship between the target monitoring device and other monitoring devices after networking, and the method further includes: If the available resources of all the first monitoring devices in the first monitoring device do not meet the resource requirements for executing the target algorithm, then according to the signaling interaction relationship, the second monitoring device that has a signaling interaction relationship with the target monitoring device is determined in the networking system, and it is determined whether the available resources of the second monitoring device meet the resource requirements for executing the target algorithm. If the available resources of any of the second monitoring devices meet the resource requirements for executing the target algorithm, then any of the second monitoring devices will be identified as a candidate monitoring device.
[0009] According to a monitoring device algorithm deployment method provided by the present invention, the method involves determining a first monitoring device with a data transmission relationship to a target monitoring device in a network system, and determining whether the available resources of the first monitoring device meet the resource requirements for executing the target algorithm, including: In the networking system, identify the first-level first monitoring device that has a direct data transmission relationship with the target monitoring device, and determine whether the available resources of the first-level first monitoring device meet the resource requirements for executing the target algorithm; If the available resources of all first-level first-level first-level first-level monitoring devices do not meet the resource requirements for executing the target algorithm, then the second-level first-level first-level monitoring devices that have a direct data transmission relationship with the first-level first-level first-level monitoring devices are identified in the network system, and the second-level first-level first-level monitoring devices are used as new first-level first-level first-level monitoring devices. The step of judging whether the available resources of the first-level first-level first-level monitoring devices meet the resource requirements for executing the target algorithm is returned to iteratively until the preset iteration cutoff condition is met. The above iteration cutoff conditions include any of the following: the current iteration count reaches the preset iteration count, the current iteration finds a first monitoring device with available resources that meet the resource requirements for executing the target algorithm, or there is no next-level first monitoring device.
[0010] According to a monitoring device algorithm deployment method provided by the present invention, the first monitoring device includes multiple first monitoring devices, and the determination of whether the available resources of the first monitoring device meet the resource requirements for executing the target algorithm includes: Obtain the deployment priority corresponding to each first monitoring device; the above deployment priority is determined according to the network type between the first monitoring device and the target monitoring device, or according to the available resource size of the first monitoring device; Based on the deployment priority from high to low, determine in turn whether the available resources of each first monitoring device meet the resource requirements for executing the target algorithm.
[0011] According to a monitoring device algorithm deployment method provided by the present invention, the determination of whether the available resources of the first monitoring device meet the resource requirements for executing the target algorithm includes: Obtain the first chip type corresponding to the first monitoring device and the available resources of the first monitoring device; Based on the first chip type, a first algorithm package corresponding to the first chip type is determined in a preset correspondence; the correspondence includes different chip types and algorithm packages corresponding to each chip type, and the algorithm packages are algorithm packages of different chip types corresponding to the target algorithm; The first algorithm package is parsed to obtain the first resource requirements required to execute the first algorithm package, and it is determined whether the available resources of the first monitoring device meet the first resource requirements.
[0012] According to a monitoring device algorithm deployment method provided by the present invention, the method further includes: If the third monitoring device in the network system stops executing the algorithm, then obtain the end monitoring device on the communication link corresponding to the third monitoring device in the network system and obtain the available resources corresponding to the end monitoring device; The corresponding second algorithm package is determined based on the chip type of the third monitoring device; the aforementioned second algorithm package is the algorithm package corresponding to the algorithm executed on the terminal monitoring device; The second algorithm package is parsed to obtain the second resource requirements required by the third monitoring device to execute the second algorithm package, and the remaining available resources of the third monitoring device are determined based on the second resource requirements and all resources of the third monitoring device. If the remaining available resources of the third monitoring device after executing the second algorithm package are greater than the available resources of the corresponding end monitoring device, then the second algorithm package will be deployed to the third monitoring device.
[0013] The present invention also provides a monitoring device algorithm deployment apparatus, comprising the following modules: The resource acquisition module is used to acquire the available resources of the target monitoring device and the resource requirements for executing the target algorithm. The relationship acquisition module is used to acquire the monitoring relationship of the target monitoring device in the network system if the available resources of the target monitoring device do not meet the resource requirements for executing the target algorithm; the network system includes the target monitoring device and other monitoring devices after networking. The device determination module is used to determine, based on the monitoring relationship, candidate monitoring devices in the network system whose available resources meet the resource requirements for executing the target algorithm; the aforementioned candidate monitoring devices are monitoring devices that have a direct or indirect monitoring relationship with the target monitoring device; The algorithm deployment module is used to deploy the target algorithm to candidate monitoring devices.
[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a monitoring device algorithm deployment method as described above.
[0015] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a monitoring device algorithm deployment method as described above.
[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a monitoring device algorithm deployment method as described above.
[0017] The present invention provides a method, apparatus, device, and storage medium for deploying monitoring device algorithms. By acquiring the available resources of the target monitoring device and the resource requirements for executing the target algorithm, if the available resources of the target monitoring device do not meet the resource requirements for executing the target algorithm, the method acquires the corresponding monitoring relationship of the target monitoring device in the network system. Based on this monitoring relationship, it determines candidate monitoring devices in the network system whose available resources meet the resource requirements for executing the target algorithm, and then deploys the target algorithm to the candidate monitoring devices. The network system includes the target monitoring device and other monitoring devices after network formation, and the candidate monitoring devices are monitoring devices with direct or indirect monitoring relationships with the target monitoring device. In this method, when the available resources of the target monitoring device do not meet the resource requirements for executing the target algorithm, the existing monitoring relationship of the target monitoring device can be acquired through the network system. Based on this existing monitoring relationship, monitoring devices with sufficient resources to deploy the target algorithm can be determined in the network system to deploy the target algorithm. This method finds monitoring devices with sufficient resources to deploy the algorithm through existing monitoring relationships without modifying the existing network system, thus avoiding impact on existing business logic. Therefore, dynamic deployment of the algorithm can be achieved without affecting existing business logic, ensuring the availability and reliability of the algorithm deployment. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the networking system architecture provided by the present invention.
[0020] Figure 2 This is one of the flowcharts illustrating the algorithm deployment method for monitoring equipment provided by this invention.
[0021] Figure 3 This is the second flowchart illustrating the algorithm deployment method for monitoring equipment provided by this invention.
[0022] Figure 4 This is the third flowchart illustrating the algorithm deployment method for monitoring equipment provided by this invention.
[0023] Figure 5 This is a schematic diagram of the structure of the monitoring equipment algorithm deployment device provided by the present invention.
[0024] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this 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 this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0026] The following is combined Figures 1-4 This invention describes a method for deploying monitoring device algorithms according to an embodiment of the present invention.
[0027] First, the networking system of this embodiment of the invention will be described, see [link to previous section]. Figure 1 The diagram illustrates a network system architecture. This network system includes multiple monitoring devices, such as cameras, switches, network video recorders, cloud storage systems, cloud management platforms, local storage devices, upper-level domain management platforms, and lower-level domain management platforms. These monitoring devices establish communication links through data flow, signaling flow, and the Internet to form the network system. All monitoring devices within this network system run unified standard algorithm scheduling rules, including a unified algorithm scheduling API (Application Programming Interface), unified algorithm task parameter specifications, and unified algorithm task analysis result specifications.
[0028] Understandable Figure 1 The networking system shown is only an example; actual networking systems can also be based on... Figure 1 The networking system in the middle can be combined with more monitoring devices to form a networking system (for example, it can also include network video recorders, which can also be simply referred to as network recorders), or it can be more than Figure 1 A network system can be formed with fewer monitoring devices, such as cameras directly connected to a network video recorder, cameras directly connected to a lower-level domain management platform, or cameras directly connected to a cloud management platform via the Internet. Both network systems with fewer or more monitoring devices are essentially part of the network system of this invention.
[0029] In addition, this embodiment of the invention also provides an algorithm scheduling platform. This platform is responsible for managing and storing algorithm packages and distributing algorithm packages to monitoring devices, as well as obtaining relevant information about each monitoring device (such as available resources, chip type, etc.). It should be noted that the algorithm scheduling platform must at least ensure network connectivity with the monitoring device receiving the algorithm service to enable data transmission and / or signaling between them. This algorithm scheduling platform can be deployed independently on a separate device, or it can be deployed on a server-type monitoring device in the aforementioned network system, such as on a cloud management platform.
[0030] Based on the above-described networking system, it should be noted that the execution subject of the embodiments of the present invention can be a monitoring device algorithm deployment device, an algorithm scheduling platform, an electronic device in the algorithm scheduling platform, an electronic device in the monitoring device, or a monitoring device. No specific limitation is made here. The following embodiments will use the algorithm scheduling platform as the execution subject for illustration.
[0031] Figure 2 This is one of the flowcharts illustrating the algorithm deployment method for monitoring equipment provided by this invention, such as... Figure 2 As shown, the method includes the following steps: S102, Obtain the available resources of the target monitoring device and the resource requirements required to execute the target algorithm.
[0032] When it is necessary to process or monitor certain data from a specific monitoring device, the user can select the monitoring device to which the target algorithm needs to be deployed in the algorithm scheduling platform, denoted as the target monitoring device (DEV). target Simultaneously, you can select certain data from the monitoring device that you wish to process (such as the audio and video data from monitoring device 1), and denote it as the target data DATA. target And you can choose which algorithm to use to process the target data; the algorithm chosen here can be denoted as the target algorithm ALGO. target .
[0033] Specifically, through the above Figure 1 As can be seen from the network system, the target monitoring device and the algorithm scheduling platform are interconnected. Therefore, the algorithm scheduling platform can communicate with the target monitoring device through the API interface. The target monitoring device can obtain its own available resources and send them to the algorithm scheduling platform through this communication link. These available resources may include, but are not limited to, CPU (Central Processing Unit), media memory, system memory, disk space, GPU (graphics processing unit), etc.
[0034] Simultaneously, the target monitoring device can also obtain its own chip type and send it to the algorithm scheduling platform. The chip type here can be the type of chip used by the available resources within the target monitoring device.
[0035] Furthermore, the algorithm scheduling platform can pre-configure different algorithm packages and resource requirements for executing each algorithm package based on different chip types. These resource requirements can be set in the algorithm package's description file. It is understandable that the resource requirements for executing algorithm packages of the same algorithm on different chip types can be the same or different.
[0036] By using pre-configured algorithm packages for different chip types and the resource requirements for executing those packages within the algorithm scheduling platform, after obtaining the chip type of the target monitoring device, the platform first locates the target algorithm. Then, it matches the algorithm package corresponding to the target chip type from among the various algorithm packages for different chip types. Finally, it parses the description file of the matched algorithm package to obtain the resource requirements for executing it. These resource requirements may include, but are not limited to, CPU, media memory, system memory, disk space, and GPU.
[0037] S104. If the available resources of the target monitoring device do not meet the resource requirements for executing the target algorithm, then obtain the monitoring relationship of the target monitoring device in the networking system; the networking system includes the target monitoring device and other monitoring devices after networking.
[0038] In this step, after obtaining the available resources of the target monitoring device and the resource requirements of the algorithm package for executing the target algorithm, it can be determined whether the available resources of the target monitoring device meet the resource requirements of the algorithm package. For example, it can be determined whether the CPU resources of the target monitoring device are greater than the CPU resources required for executing the algorithm package, and whether the media memory of the target monitoring device is greater than the media memory required for executing the algorithm package. It should be noted that this resource determination requires a one-to-one comparison between all the available resources of the target monitoring device and all the resource requirements of the algorithm package for executing the target algorithm to obtain the resource determination result.
[0039] After obtaining the resource assessment results, if all available resources of the target monitoring device are greater than or can meet all resource requirements of the algorithm package required to execute the target algorithm, it means that the available resources of the target monitoring device are sufficient to run the target algorithm. The algorithm scheduling platform can then send the matched target algorithm package to the target monitoring device through the unified API interface set in the networking system, so that the target monitoring device can deploy the algorithm package and process the target data.
[0040] Furthermore, if at least one of the available resources of the target monitoring device does not meet the resource requirements for executing the algorithm package of the target algorithm, then it is determined that the available resources of the target monitoring device do not meet the resource requirements for executing the target algorithm. In this case, it is necessary to find other monitoring devices with available resources that can meet the requirements. During this search, the network system established above and the target monitoring device can be used to locate the monitoring relationships of the target monitoring device, with the target monitoring device as the center. This monitoring relationship refers to the direct or indirect data transmission relationship (data flow relationship) or signaling interaction relationship (signaling flow relationship) between the target monitoring device and other devices, for example... Figure 1 The camera and the network recorder have data transmission and signaling interaction relationships, while the network recorder and the local storage device only have data transmission relationships and no signaling interaction relationships.
[0041] S106. Based on the monitoring relationship, determine the candidate monitoring devices in the network system whose available resources meet the resource requirements for executing the target algorithm; the aforementioned candidate monitoring devices are monitoring devices that have a direct or indirect monitoring relationship with the target monitoring device.
[0042] In this step, after obtaining the monitoring relationship of the target monitoring device, the monitoring devices that have direct or indirect data transmission or signaling interaction relationships with the target monitoring device can be obtained in the networking system. Then, the available resources of these monitoring devices can be obtained in sequence, and it can be determined whether the available resources of these monitoring devices meet the resource requirements for executing the target algorithm. Then, the monitoring devices whose available resources meet the resource requirements for executing the target algorithm are selected and recorded as candidate monitoring devices.
[0043] S108, deploy the target algorithm to the candidate monitoring devices.
[0044] In this step, after identifying the candidate monitoring devices, the algorithm scheduling platform communicates with them through the established network system to obtain their chip types. It then matches the algorithm package corresponding to the target algorithm's chip type from among various algorithm packages for different chip types. This matched algorithm package is then sent to the candidate monitoring device for deployment. This chip type-matching method ensures that the algorithm package deployed to the candidate monitoring device matches its own chip type, thereby improving the deployment and operational efficiency and accuracy of the target algorithm.
[0045] In this embodiment, by acquiring the available resources of the target monitoring device and the resource requirements for executing the target algorithm, if the available resources of the target monitoring device do not meet the resource requirements for executing the target algorithm, the monitoring relationship of the target monitoring device in the network system is acquired. Based on the monitoring relationship, candidate monitoring devices with available resources that meet the resource requirements for executing the target algorithm are determined in the network system, and then the target algorithm is deployed to the candidate monitoring devices. The network system includes the target monitoring device and other monitoring devices after networking, and the candidate monitoring devices are monitoring devices with direct or indirect monitoring relationships with the target monitoring device. In this method, since the existing monitoring relationship of the target monitoring device can be acquired through the network system when the available resources of the target monitoring device do not meet the resource requirements for executing the target algorithm, and the existing monitoring relationship is used to determine the monitoring devices with available resources that meet the resource requirements for executing the target algorithm to deploy the target algorithm, this method finds monitoring devices with sufficient resources to deploy the algorithm through existing monitoring relationships without modifying the existing network system. Therefore, it does not affect the existing business logic, and thus allows for dynamic deployment of the algorithm without affecting the existing business logic, ensuring the availability and reliability of the algorithm deployment.
[0046] The following examples illustrate the specific process of finding candidate monitoring devices through monitoring relationships.
[0047] Figure 3 This is the second flowchart illustrating the monitoring device algorithm deployment method provided by this invention. See also... Figure 3 As shown, the aforementioned monitoring relationship includes the direct or indirect data transmission relationship between the target monitoring device and other monitoring devices after networking, and also includes the direct or indirect signaling interaction relationship between the target monitoring device and other monitoring devices after networking. S106 may include the following steps: S202, Based on the data transmission relationship, determine the first monitoring device that has a data transmission relationship with the target monitoring device in the network system, and determine whether the available resources of the first monitoring device meet the resource requirements for executing the target algorithm.
[0048] Among them, data transmission relationship refers to the data flow relationship between the target monitoring device and other monitoring devices. Other monitoring devices can be monitoring devices that receive data transmitted by the target monitoring device, and / or monitoring devices that transmit data to the target monitoring device.
[0049] In this step, as described above Figure 1 Taking the networking system in the example, assuming the target monitoring device is a camera, the monitoring devices that have a direct or indirect data transmission relationship with the camera can include cloud storage systems, network video recorders, and local storage devices. These monitoring devices can all be referred to as the first monitoring device.
[0050] The algorithm scheduling platform can interact with each of the first monitoring devices through the aforementioned network system to obtain the available resources and chip types of each device. Simultaneously, it can obtain the corresponding algorithm package for each first monitoring device by using algorithm packages for various chip types of the target algorithm. This allows it to determine the resource requirements for each first monitoring device to execute the corresponding chip type algorithm package. Then, the available resources of each first monitoring device can be compared with the resource requirements for executing the corresponding chip type algorithm package to determine whether the available resources of each first monitoring device meet the resource requirements for executing the corresponding chip type algorithm package.
[0051] S204, if the available resources of any of the first monitoring devices meet the resource requirements for executing the target algorithm, then any of the first monitoring devices is determined as a candidate monitoring device.
[0052] In this step, if the available resources of any one of the aforementioned first monitoring devices (denoted as any first monitoring device) meet the resource requirements for executing the algorithm package of the corresponding chip type, then that any first monitoring device can be identified as a candidate monitoring device. Since the multiple first monitoring devices are evaluated sequentially, with only one monitoring device evaluated at a time, once it is determined that the available resources of a certain monitoring device meet the requirements, it is selected as a candidate monitoring device, and subsequent monitoring devices are not evaluated. Therefore, generally only one candidate monitoring device will be identified here.
[0053] Optionally, in the actual judgment process, there may be a situation where the available resources of all the first monitoring devices that have data transmission relationships with the target monitoring device are insufficient to meet the requirements. In this case, the process of selecting candidate monitoring devices can be carried out using the following steps: S206, if the available resources of all the first monitoring devices in the first monitoring device do not meet the resource requirements for executing the target algorithm, then according to the signaling interaction relationship, the second monitoring device that has a signaling interaction relationship with the target monitoring device is determined in the networking system, and it is determined whether the available resources of the second monitoring device meet the resource requirements for executing the target algorithm.
[0054] Among them, the signaling interaction relationship refers to the signaling flow relationship between the target monitoring device and other monitoring devices. Other monitoring devices can be monitoring devices that receive signaling transmitted by the target monitoring device, and / or monitoring devices that transmit signaling to the target monitoring device.
[0055] In this step, continue as described above. Figure 1 Taking the networking system in the example, assuming the target monitoring device is a camera, the monitoring devices that have direct or indirect signaling interaction with the camera can include cloud management platform, switch, network video recorder, lower-level domain management platform and upper-level domain management platform. These monitoring devices can all be referred to as second monitoring devices.
[0056] When the algorithm scheduling platform determines that the available resources of all the aforementioned first monitoring devices do not meet the requirements, it can interact with each of the second monitoring devices through the aforementioned network system to obtain the available resources and chip types of each second monitoring device. Simultaneously, it obtains the corresponding algorithm package for each second monitoring device through various algorithm packages for different chip types of the target algorithm, thereby obtaining the resource requirements required for each second monitoring device to execute the corresponding chip type algorithm package. Then, the available resources of each second monitoring device can be compared with the resource requirements required to execute the corresponding chip type algorithm package to determine whether the available resources of each second monitoring device meet the resource requirements for executing the corresponding chip type algorithm package.
[0057] S208, if the available resources of any second monitoring device meet the resource requirements for executing the target algorithm, then any second monitoring device is determined as a candidate monitoring device.
[0058] In this step, if the available resources of any one of the aforementioned second monitoring devices (denoted as any second monitoring device) meet the resource requirements for executing the algorithm package of the corresponding chip type, then that any second monitoring device can be identified as a candidate monitoring device. Since the multiple second monitoring devices are evaluated sequentially, with only one device evaluated at a time, once the available resources of a particular monitoring device meet the requirements, it is selected as a candidate monitoring device, and subsequent monitoring devices are not evaluated. Therefore, generally only one candidate monitoring device is identified here.
[0059] If, after searching all monitoring devices in the monitoring relationships of the target monitoring device in the network system, no monitoring device with available resources that meets the requirements can be found, then the target algorithm task deployment will fail.
[0060] In this embodiment, if a candidate monitoring device (i.e., an algorithm running device that meets the conditions) is found through the above steps, the algorithm scheduling platform can match the corresponding algorithm package from the various algorithm packages of different chip types of the target algorithm according to the chip type of the candidate monitoring device, and send the matched algorithm package to the candidate monitoring device. At the same time as sending the algorithm package, the platform also needs to specify the target data DATA of the target monitoring device that needs to be processed / detected to the candidate monitoring device. target .
[0061] For the specified target data DATA target This method is related to the monitoring relationship between the candidate monitoring device and the target monitoring device. If there is a data transmission relationship between the candidate monitoring device and the target monitoring device, due to the target data DATA target The data will be transmitted to the candidate monitoring device through this data transmission relationship, so you only need to specify the target data DATA to the candidate monitoring device. target The source device code is sufficient; candidate monitoring devices can then use this source device code to find and filter the target data from the data they receive. target This saves bandwidth for transmitting target data. If there is only signaling interaction between the candidate monitoring device and the target monitoring device, since the target data DATA target The target data (DATA) of the target monitoring device will not be transmitted to the candidate monitoring device through this signaling interaction. target Since the target data itself will not pass through the candidate monitoring device, the algorithm scheduling platform needs to send the target data through the target monitoring device. target The target data is sent to the candidate monitoring devices where the final target algorithm will be run / deployed, or the algorithm scheduling platform notifies the candidate monitoring devices of the target data. target The URL address is used by the candidate monitoring device to obtain the target data (DATA) via a URL (e.g., RTSP protocol). target This allows candidate monitoring devices to process the target monitoring device's data promptly after the target algorithm is deployed.
[0062] Additionally, it should be noted that the reason for prioritizing the determination of data transmission relationships before determining signaling interaction relationships to find candidate monitoring devices is that candidate monitoring devices in terms of data transmission relationships do not need to transmit the processing data of the target monitoring device. This avoids excessively consuming the bandwidth resources of the target monitoring device, thereby saving the bandwidth resources of the target monitoring device.
[0063] Through the above process, the algorithm scheduling platform can complete the dynamic deployment of the target algorithm.
[0064] Meanwhile, after identifying candidate monitoring devices, the algorithm scheduling platform can record the DEV of the target monitoring device.target Target Algorithm ALGO target And the monitoring device DEV that ultimately runs the target algorithm. final The relationship between them.
[0065] In this embodiment, the target algorithm is deployed by finding monitoring devices with sufficient available resources through the data transmission relationships of the target monitoring devices. This avoids excessive bandwidth consumption of the target monitoring devices, thus saving bandwidth resources. Furthermore, if no candidate monitoring devices can be found through the data transmission relationships, sufficient candidate monitoring devices with available resources can be found through signaling interaction relationships. This allows for dynamic deployment of the target algorithm without affecting existing services.
[0066] The following embodiments illustrate the specific process of searching for candidate monitoring devices among the first monitoring devices through data transmission relationships.
[0067] In some embodiments, S202 above may include the following steps: Step A1: In the network system, identify the first-level first monitoring device that has a direct data transmission relationship with the target monitoring device, and determine whether the available resources of the first-level first monitoring device meet the resource requirements for executing the target algorithm.
[0068] In this step, continue as described above. Figure 1 Taking a network system as an example, assuming the target monitoring device is a camera, the monitoring devices that have direct or indirect data transmission relationships with the camera can include cloud storage systems, network video recorders, local storage devices, etc., as the first level of monitoring devices. Among them, cloud storage systems and network video recorders are the first level of monitoring devices that directly interact with the camera, and can be referred to as the first-level first monitoring device DEV. first .
[0069] Then, the algorithm scheduling platform can prioritize determining whether the available resources of these two first-level first-monitoring devices meet the requirements. For multiple first-level first-monitoring devices (hereinafter referred to as first-monitoring devices), i.e., when the aforementioned first-monitoring devices include multiple first-monitoring devices, the specific process for determining available resources can be carried out using the following steps: Obtain the deployment priority corresponding to each first monitoring device; the above deployment priority is determined according to the network type between the first monitoring device and the target monitoring device, or according to the available resource size of the first monitoring device; Based on the deployment priority from high to low, determine in turn whether the available resources of each first monitoring device meet the resource requirements for executing the target algorithm.
[0070] The network topology includes LAN (Local Area Network) and WAN (Wide Area Network) connections. For example, the network recorder (VR) and the camera are connected via a LAN, while the cloud storage system and the camera are connected via a WAN. Generally, LAN connections have higher data transmission efficiency and therefore higher priority. Therefore, the VRVR can be set to a higher deployment priority than the cloud storage system. Alternatively, the deployment priority can be set by obtaining the available resources of both the VRVR and the cloud storage system, and the amount of available resources can be used to determine the deployment priority; for example, devices with more available resources have higher deployment priority. Of course, other methods can also be used to set the deployment priority of each primary monitoring device relative to the target monitoring device, as long as the deployment priority of each primary monitoring device can be determined.
[0071] After determining the deployment priority of each first monitoring device, the devices can be ordered from highest to lowest priority. First, the first monitoring device with the highest deployment priority is checked to see if its available resources meet the requirements. If the available resources of the first monitoring device with the highest deployment priority do not meet the requirements, the next first monitoring device will be checked.
[0072] By prioritizing deployments to determine available resources, the efficiency and accuracy of resource assessment can be improved, thereby enhancing the efficiency and accuracy of selecting candidate monitoring devices.
[0073] Step A2: If the available resources of all first-level first-monitoring devices in the first-level first-monitoring device do not meet the resource requirements for executing the target algorithm, then the second-level first-monitoring device with a direct data transmission relationship with the first-level first-monitoring device is determined in the network system, and the second-level first-monitoring device is taken as the new first-level first-monitoring device. The step of judging whether the available resources of the first-level first-monitoring device meet the resource requirements for executing the target algorithm is returned to iteratively until the preset iteration cutoff condition is met.
[0074] In this step, if the available resources of any first-level first-monitoring device meet the requirements, then the first-level first-monitoring device that meets the requirements can be used as a candidate monitoring device for algorithm deployment.
[0075] If the available resources of all first-level monitoring devices are insufficient, it is necessary to continue searching for monitoring devices that have an indirect data transmission relationship with the target monitoring device, i.e., first-level monitoring devices that have a direct data transmission relationship with the first-level monitoring device. These can be referred to as second-level first-level monitoring devices. For example, the local storage device is a second-level first-level monitoring device (DEV) that directly transmits data with the network video recorder, which is a first-level first-level monitoring device. second .
[0076] After obtaining the second-level first-level monitoring device, if there are multiple second-level first-level monitoring devices, one can be selected according to the deployment priority method described above and used as the new first-level first-level monitoring device. Then, the judgment process in step A1 above is continued, that is, the available resources of the new first-level first-level monitoring device are determined to meet the requirements. If there is only one second-level first-level monitoring device, it can be directly used as the new first-level first-level monitoring device for judgment.
[0077] If the available resources of any second-level first-monitoring device meet the requirements, then that second-level first-monitoring device is used as a candidate monitoring device for algorithm deployment. If the available resources of all second-level first-monitoring devices do not meet the requirements, then it is necessary to continue searching for monitoring devices that have an indirect data transmission relationship with the target monitoring device, i.e., first-monitoring devices that have a direct data transmission relationship with the second-level first-monitoring devices, which can be denoted as third-level first-monitoring devices. Then, the third-level first-monitoring device is used as a new first-level first-monitoring device, and the judgment process of step A1 above is iteratively executed until the iteration cutoff condition is met.
[0078] Optionally, the iteration cutoff condition includes any of the following: the current iteration count reaches a preset iteration count, the current iteration finds a first monitoring device with available resources that meet the resource requirements for executing the target algorithm, or there is no next-level first monitoring device. The preset iteration count can be set according to actual conditions. If no first monitoring device with available resources that meet the resource requirements for executing the target algorithm is found when the iteration cutoff condition is met, the algorithm deployment fails.
[0079] It is understandable that the available resources of the second monitoring device in the signaling interaction relationship can also be determined in the same way as described above, so it will not be elaborated here.
[0080] In this embodiment, by iteratively searching for candidate monitoring devices with available resources that meet the requirements, layer by layer, according to the hierarchical relationship between the data transmission relationship and the target monitoring device, the candidate monitoring device search can be conducted in an orderly manner, ensuring the stability of the device search process. Furthermore, when multiple monitoring devices exist, the availability of resources can be determined by prioritizing their deployment, which improves the efficiency and accuracy of resource assessment, thereby enhancing the efficiency and accuracy of candidate monitoring device selection.
[0081] The following embodiments illustrate the specific process of determining the chip type when searching for candidate monitoring devices among the first monitoring devices through data transmission relationships.
[0082] In some embodiments, the step of "determining whether the available resources of the first monitoring device meet the resource requirements for executing the target algorithm" in S202 above may further include the following steps: Obtain the first chip type corresponding to the first monitoring device and the available resources of the first monitoring device.
[0083] Based on the first chip type, a first algorithm package corresponding to the first chip type is determined in a preset correspondence; the correspondence includes different chip types and algorithm packages corresponding to each chip type, and the algorithm packages are algorithm packages of different chip types corresponding to the target algorithm.
[0084] The first algorithm package is parsed to obtain the first resource requirements required to execute the first algorithm package, and it is determined whether the available resources of the first monitoring device meet the first resource requirements.
[0085] In this embodiment, the algorithm scheduling platform can pre-configure algorithm packages for different chip types for each algorithm, and then bind the chip type of each algorithm to its corresponding algorithm package to establish a correspondence between chip type and algorithm package.
[0086] Simultaneously, the algorithm scheduling platform can interact with the first monitoring device to obtain its chip type and available resources. Then, it can first find the correspondence between the target algorithm and the chip type of the first monitoring device, denoted as the first algorithm package. Next, it parses the description file of the first algorithm package to obtain the resource requirements for executing it, denoted as the first resource requirement. Then, it can determine whether the available resources of the first monitoring device meet the first resource requirement, i.e., whether the first monitoring device can deploy or run the first algorithm package / target algorithm. For the specific determination process, please refer to the explanation of the above embodiments, which will not be repeated here.
[0087] It is understandable that the second monitoring device in the signaling interaction relationship can also perform algorithm packet matching and available resource judgment in the same way as described above, so it will not be elaborated here.
[0088] In this embodiment, the appropriate algorithm package is matched with the chip type of the monitoring device in a pre-established correspondence and the available resources are judged. In this way, the algorithm package obtained by the chip type can be used to obtain the corresponding resource requirements more accurately, thereby improving the effectiveness, accuracy and efficiency of the available resource judgment.
[0089] In some embodiments, if the algorithm scheduling platform is unable to directly interact with the finally determined candidate monitoring devices due to network issues, it needs to be relayed through a front-end device. For example, if the final algorithm running device is determined to be DEV. second If the algorithm scheduling platform cannot communicate directly with the device, it can do so by communicating with the DEV. firstThe device first establishes communication, and then the DEV... first Device forwarding and DEV second The devices communicate data to achieve network interoperability. If the algorithm scheduling platform and DEV... first If the devices are not interoperable, then use DEV. target The equipment is transferred, and then via DEV target The device notifies the DEVfirst device, and ultimately notifies DEV. second Equipment. It should be noted that the algorithm scheduling platform is generally integrated with the target monitoring equipment DEV. target They maintain interoperability. By using devices in the network system as relay devices, the target algorithm can be rapidly and dynamically deployed without changing the current network system's services.
[0090] The following example illustrates the process of dynamically adjusting the algorithm deployment balance in the entire network system after a certain algorithm is stopped running on a monitoring device.
[0091] Figure 4 This is the third flowchart of the monitoring equipment algorithm deployment method provided by the present invention. See also... Figure 4 As shown, the above method may further include the following steps: S302, If the third monitoring device in the network system stops executing the algorithm, then obtain the end monitoring device on the communication link corresponding to the third monitoring device in the network system and obtain the available resources corresponding to the end monitoring device.
[0092] The third monitoring device can be any monitoring device in the network system that is currently not executing an algorithm. The third monitoring device stopping the execution of an algorithm may include situations such as the user uninstalling the algorithm deployed on the third monitoring device; in these cases, the third monitoring device stops running its own algorithm.
[0093] In this case, after the algorithm scheduling platform learns that the third monitoring device has stopped executing the algorithm, it can obtain the communication link corresponding to the third monitoring device through the current network system. The communication link here can be a communication path formed by monitoring devices that have data transmission relationship with the third monitoring device, or it can be a communication path formed by monitoring devices that have signaling interaction relationship with the third monitoring device. Either one can be selected in this embodiment.
[0094] After determining the communication link corresponding to the third monitoring device, the monitoring device located at the end can be identified according to the data flow or signaling flow, and denoted as the end monitoring device. Simultaneously, the algorithm scheduling platform can directly or indirectly interact with this end monitoring device to obtain its available resources.
[0095] S304, determine the corresponding second algorithm package according to the chip type of the third monitoring device; the aforementioned second algorithm package is the algorithm package corresponding to the algorithm executed on the terminal monitoring device.
[0096] In this step, the algorithm scheduling platform can obtain the chip type of the third monitoring device through current or previous interactions. Simultaneously, it can obtain the algorithms deployed on the end-monitoring device through the aforementioned process of deploying algorithms on the end-monitoring device. Then, through the established correspondence between chip type and algorithm package, it can obtain the correspondence between the algorithm pairs deployed on the end-monitoring device. Finally, it can match the corresponding algorithm package based on the chip type of the third monitoring device, denoted as the second algorithm package.
[0097] S306, parse the second algorithm package to obtain the second resource requirements required by the third monitoring device to execute the second algorithm package, and determine the remaining available resources of the third monitoring device after executing the second algorithm package based on the second resource requirements and all resources of the third monitoring device.
[0098] In this step, after obtaining the second algorithm package, the resource requirements for executing the algorithm package can be obtained by parsing its description file, denoted as the second resource requirement. Simultaneously, all resources of the third monitoring device (i.e., the resources remaining after the algorithm is stopped) can also be obtained. Then, the corresponding resources from the second resource requirement are subtracted from these all resources to obtain the remaining available resources, thus determining the remaining available resources after executing the second algorithm package on the third monitoring device.
[0099] S308. If the remaining available resources of the third monitoring device after executing the second algorithm package are greater than the available resources of the end monitoring device, then the second algorithm package will be deployed to the third monitoring device.
[0100] In this step, the remaining available resources of the third monitoring device after assuming the second algorithm package is run can be compared with the available resources of the terminal monitoring device. If the remaining available resources of the third monitoring device after assuming the second algorithm package is run are larger, it means that running the second algorithm package on the third monitoring device will be more effective and the network system will be more balanced. In this case, the second algorithm package can be deployed to the third monitoring device for running, while the algorithm corresponding to the second algorithm package running on the terminal monitoring device is unloaded.
[0101] Alternatively, as an optional embodiment, if the third monitoring device stops executing the algorithm, it can also query whether there is an algorithm task (let's call it a task) running on the next-level monitoring device. If so, it can obtain the available resources of the next-level monitoring device and compare them with the remaining available resources of the third monitoring device after it is assumed to be running the task. If the third monitoring device has more available resources, the task can be deployed / run on the third monitoring device, and the next-level monitoring device can unload the task. Similarly, the scheduling of the task will also cause the algorithm scheduling of the next-level monitoring device to be adjusted, all of which can be adjusted according to the above process, ultimately realizing the algorithm deployment adjustment of the monitoring devices on the entire communication link.
[0102] In this embodiment, by deploying the algorithm on the communication link end device of a monitoring device that has stopped running an algorithm to run on the monitoring device, this back-to-foreign algorithm scheduling / deployment strategy can avoid invalid algorithm scheduling / deployment logic, improve algorithm scheduling / deployment efficiency, and enhance the balance of algorithm deployment in the network system.
[0103] The monitoring equipment algorithm deployment device provided by the present invention is described below. The monitoring equipment algorithm deployment device described below and the monitoring equipment algorithm deployment method described above can be referred to in correspondence.
[0104] Figure 5 This is a schematic diagram of the structure of the monitoring equipment algorithm deployment device provided by the present invention. See also: Figure 5 As shown, the device may include: The resource acquisition module 410 is used to acquire the available resources of the target monitoring device and the resource requirements required to execute the target algorithm. The relationship acquisition module 420 is used to acquire the monitoring relationship of the target monitoring device in the network system if the available resources of the target monitoring device do not meet the resource requirements for executing the target algorithm; the network system includes the target monitoring device and other monitoring devices after networking. The device determination module 430 is used to determine, based on the monitoring relationship, candidate monitoring devices in the network system whose available resources meet the resource requirements for executing the target algorithm; the aforementioned candidate monitoring devices are monitoring devices that have a direct or indirect monitoring relationship with the target monitoring device; The algorithm deployment module 440 is used to deploy the target algorithm to the candidate monitoring devices.
[0105] In some embodiments, the monitoring relationship includes the direct or indirect data transmission relationship between the target monitoring device and other monitoring devices after networking. The device determination module 430 includes: The first judgment unit is used to determine, based on the data transmission relationship, the first monitoring device that has a data transmission relationship with the target monitoring device in the networking system, and to determine whether the available resources of the first monitoring device meet the resource requirements for executing the target algorithm. The first device determination unit is configured to determine any first monitoring device as a candidate monitoring device if the available resources of any first monitoring device meet the resource requirements for executing the target algorithm.
[0106] Optionally, the aforementioned monitoring relationship also includes direct or indirect signaling interaction between the target monitoring device and other monitoring devices after networking, and the aforementioned device further includes: The second judgment unit is used to determine, based on the signaling interaction relationship, the second monitoring device that has a signaling interaction relationship with the target monitoring device in the networking system if the available resources of all the first monitoring devices in the first monitoring device do not meet the resource requirements required to execute the target algorithm, and to determine whether the available resources of the second monitoring device meet the resource requirements required to execute the target algorithm. The second device determination unit is used to determine any second monitoring device as a candidate monitoring device if the available resources of any second monitoring device meet the resource requirements for executing the target algorithm.
[0107] In some embodiments, the device determination module 430 includes: The first-level device determination unit is used to determine the first-level first monitoring device that has a direct data transmission relationship with the target monitoring device in the networking system, and to determine whether the available resources of the first-level first monitoring device meet the resource requirements for executing the target algorithm. The iteration unit is used to determine, in the network system, a second-level first monitoring device that has a direct data transmission relationship with the first-level first monitoring device if the available resources of all first-level first monitoring devices in the first-level first monitoring device do not meet the resource requirements required to execute the target algorithm, and to take the second-level first monitoring device as a new first-level first monitoring device, and return to iteratively execute the step of judging whether the available resources of the first-level first monitoring device meet the resource requirements required to execute the target algorithm, until the preset iteration cutoff condition is met; The above iteration cutoff conditions include any of the following: the current iteration count reaches the preset iteration count, the current iteration finds a first monitoring device with available resources that meet the resource requirements for executing the target algorithm, or there is no next-level first monitoring device.
[0108] In some embodiments, the first monitoring device includes a plurality of first monitoring devices, and the first judgment unit is specifically used for Obtain the deployment priority corresponding to each first monitoring device; the deployment priority is determined according to the network type between the first monitoring device and the target monitoring device, or according to the available resource size of the first monitoring device; in order of deployment priority from high to low, determine whether the available resources of each first monitoring device meet the resource requirements for executing the target algorithm.
[0109] In some embodiments, the first determination unit described above is specifically used for Obtain the first chip type corresponding to the first monitoring device and the available resources of the first monitoring device; determine the first algorithm package corresponding to the first chip type in a preset correspondence according to the first chip type; the correspondence includes different chip types and the algorithm package corresponding to each chip type, and the algorithm package is an algorithm package of different chip types corresponding to the target algorithm; parse the first algorithm package to obtain the first resource requirement required to execute the first algorithm package, and determine whether the available resources of the first monitoring device meet the first resource requirement.
[0110] In some embodiments, the above-described apparatus further includes: The device acquisition module is used to acquire the end monitoring device on the communication link corresponding to the third monitoring device in the network system and the available resources corresponding to the end monitoring device if the third monitoring device in the network system stops executing the algorithm. The algorithm package determination module is used to determine the corresponding second algorithm package based on the chip type of the third monitoring device; the second algorithm package is the algorithm package corresponding to the algorithm executed on the end monitoring device. The resource determination module is used to parse the second algorithm package, obtain the second resource requirements required by the third monitoring device to execute the second algorithm package, and determine the remaining available resources of the third monitoring device after executing the second algorithm package based on the second resource requirements and all resources of the third monitoring device. The algorithm adjustment module is used to deploy the second algorithm package to the third monitoring device if the remaining available resources after the third monitoring device executes the second algorithm package are greater than the available resources corresponding to the end monitoring device.
[0111] It should be noted that the apparatus provided in this embodiment of the invention can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.
[0112] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, communications interface 520, and memory 530 communicate with each other through the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute a monitoring device algorithm deployment method. This method includes: obtaining the available resources of the target monitoring device and the resource requirements for executing the target algorithm; if the available resources of the target monitoring device do not meet the resource requirements for executing the target algorithm, obtaining the monitoring relationship of the target monitoring device in the network system; the network system includes the target monitoring device after networking and other monitoring devices; based on the monitoring relationship, determining candidate monitoring devices in the network system whose available resources meet the resource requirements for executing the target algorithm; the candidate monitoring devices are monitoring devices that have a direct or indirect monitoring relationship with the target monitoring device; and deploying the target algorithm to the candidate monitoring devices.
[0113] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, 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 a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0114] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the monitoring device algorithm deployment method provided by the above methods. The method includes: obtaining the available resources of the target monitoring device and the resource requirements required to execute the target algorithm; if the available resources of the target monitoring device do not meet the resource requirements required to execute the target algorithm, obtaining the monitoring relationship of the target monitoring device in the network system; the network system includes the target monitoring device after networking and other monitoring devices; determining, according to the monitoring relationship, candidate monitoring devices in the network system whose available resources meet the resource requirements required to execute the target algorithm; the candidate monitoring devices are monitoring devices that have a direct or indirect monitoring relationship with the target monitoring device; and deploying the target algorithm to the candidate monitoring devices.
[0115] In another aspect, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for deploying monitoring device algorithms provided by the above methods. This method includes: acquiring the available resources of a target monitoring device and the resource requirements for executing a target algorithm; if the available resources of the target monitoring device do not meet the resource requirements for executing the target algorithm, acquiring the monitoring relationship of the target monitoring device in a network system; the network system includes the target monitoring device after networking and other monitoring devices; based on the monitoring relationship, determining candidate monitoring devices in the network system whose available resources meet the resource requirements for executing the target algorithm; the candidate monitoring devices are monitoring devices that have a direct or indirect monitoring relationship with the target monitoring device; and deploying the target algorithm to the candidate monitoring devices.
[0116] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0117] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for deploying algorithms for monitoring equipment, characterized in that, include: Obtain the available resources of the target monitoring device and the resource requirements for executing the target algorithm; If the available resources of the target monitoring device do not meet the resource requirements for executing the target algorithm, then the monitoring relationship of the target monitoring device in the network system is obtained; the network system includes the target monitoring device and other monitoring devices after networking; Based on the monitoring relationship, candidate monitoring devices in the network system whose available resources meet the resource requirements for executing the target algorithm are identified. The candidate monitoring device is a monitoring device that has a direct or indirect monitoring relationship with the target monitoring device; The target algorithm is deployed to the candidate monitoring device.
2. The monitoring equipment algorithm deployment method according to claim 1, characterized in that, The monitoring relationship includes the direct or indirect data transmission relationship between the target monitoring device and other monitoring devices after networking. The step of determining candidate monitoring devices in the networking system whose available resources meet the resource requirements for executing the target algorithm, based on the monitoring relationship, includes: Based on the data transmission relationship, a first monitoring device with a data transmission relationship with the target monitoring device is identified in the networking system, and it is determined whether the available resources of the first monitoring device meet the resource requirements for executing the target algorithm. If the available resources of any of the first monitoring devices meet the resource requirements for executing the target algorithm, then that first monitoring device is determined as the candidate monitoring device.
3. The monitoring equipment algorithm deployment method according to claim 2, characterized in that, The monitoring relationship also includes the direct or indirect signaling interaction relationship between the target monitoring device and other monitoring devices after networking, and the method further includes: If the available resources of all the first monitoring devices in the first monitoring device do not meet the resource requirements required to execute the target algorithm, then according to the signaling interaction relationship, a second monitoring device that has a signaling interaction relationship with the target monitoring device is determined in the networking system, and it is determined whether the available resources of the second monitoring device meet the resource requirements required to execute the target algorithm. If the available resources of any of the second monitoring devices meet the resource requirements for executing the target algorithm, then that second monitoring device is identified as the candidate monitoring device.
4. The monitoring equipment algorithm deployment method according to claim 2, characterized in that, The step of determining a first monitoring device in the network system that has a data transmission relationship with the target monitoring device, and determining whether the available resources of the first monitoring device meet the resource requirements for executing the target algorithm, includes: In the network system, a first-level first monitoring device with a direct data transmission relationship with the target monitoring device is identified, and it is determined whether the available resources of the first-level first monitoring device meet the resource requirements for executing the target algorithm. If the available resources of all first-level first-monitoring devices in the first-level first-monitoring device do not meet the resource requirements required for executing the target algorithm, then a second-level first-monitoring device with a direct data transmission relationship with the first-level first-monitoring device is determined in the network system, and the second-level first-monitoring device is taken as a new first-level first-monitoring device. The step of judging whether the available resources of the first-level first-monitoring device meet the resource requirements required for executing the target algorithm is returned to iteratively until the preset iteration cutoff condition is met. The iteration cutoff condition includes any one of the following: the current iteration count reaches the preset iteration count, the current iteration finds a first monitoring device with available resources that meet the resource requirements of the target algorithm, or there is no next-level first monitoring device.
5. The monitoring equipment algorithm deployment method according to claim 2, characterized in that, The first monitoring device includes multiple first monitoring devices, and the step of determining whether the available resources of the first monitoring devices meet the resource requirements for executing the target algorithm includes: Obtain the deployment priority corresponding to each of the first monitoring devices; the deployment priority is determined according to the network type between the first monitoring device and the target monitoring device, or according to the available resource size of the first monitoring device; In descending order of deployment priority, the available resources of each of the first monitoring devices are sequentially determined to meet the resource requirements for executing the target algorithm.
6. The monitoring equipment algorithm deployment method according to claim 2, characterized in that, The step of determining whether the available resources of the first monitoring device meet the resource requirements for executing the target algorithm includes: Obtain the first chip type corresponding to the first monitoring device and the available resources of the first monitoring device; Based on the first chip type, a first algorithm package corresponding to the first chip type is determined in a preset correspondence; the correspondence includes different chip types and algorithm packages corresponding to each chip type, and the algorithm packages are algorithm packages of different chip types corresponding to the target algorithm; The first algorithm package is parsed to obtain the first resource requirement required to execute the first algorithm package, and it is determined whether the available resources of the first monitoring device meet the first resource requirement.
7. The monitoring equipment algorithm deployment method according to any one of claims 1 to 6, characterized in that, The method further includes: If the third monitoring device in the network system stops executing the algorithm, then obtain the end monitoring device on the communication link corresponding to the third monitoring device in the network system and obtain the available resources corresponding to the end monitoring device; The corresponding second algorithm package is determined based on the chip type of the third monitoring device; the second algorithm package is the algorithm package corresponding to the algorithm executed on the terminal monitoring device. The second algorithm package is parsed to obtain the second resource requirements required by the third monitoring device to execute the second algorithm package, and the remaining available resources of the third monitoring device after executing the second algorithm package are determined based on the second resource requirements and all resources of the third monitoring device. If the remaining available resources of the third monitoring device after executing the second algorithm package are greater than the available resources of the terminal monitoring device, then the second algorithm package will be deployed to the third monitoring device.
8. A monitoring equipment algorithm deployment device, characterized in that, include: The resource acquisition module is used to acquire the available resources of the target monitoring device and the resource requirements for executing the target algorithm. The relationship acquisition module is used to acquire the monitoring relationship of the target monitoring device in the network system if the available resources of the target monitoring device do not meet the resource requirements for executing the target algorithm; the network system includes the target monitoring device and other monitoring devices after networking; The device determination module is used to determine, based on the monitoring relationship, candidate monitoring devices in the network system whose available resources meet the resource requirements required to execute the target algorithm; The candidate monitoring device is a monitoring device that has a direct or indirect monitoring relationship with the target monitoring device; The algorithm deployment module is used to deploy the target algorithm to the candidate monitoring device.
9. An electronic 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 monitoring device algorithm deployment method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the monitoring device algorithm deployment method as described in any one of claims 1 to 7.