Cloud AI monitoring camera multi-algorithm simultaneous opening method and device and storage medium

By integrating cloud-based middleware into cloud AI surveillance cameras, the fusion algorithm detection module is acquired and loaded, solving the problem that cloud AI surveillance cameras only support the operation of a single algorithm. This enables multiple algorithms to run collaboratively, meets the requirements of multi-task concurrency, and ensures the real-time performance and stability of detection results.

CN120856902AInactive Publication Date: 2025-10-28E SURFING VISION TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511359588.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2025-10-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing cloud AI surveillance cameras only support a single algorithm running at the same time, which is insufficient to meet the business needs of multi-algorithm parallel processing in cloud scenarios.

Method used

By integrating cloud-based middleware into the camera equipment, the cloud-based operation and management platform is used to obtain additional algorithm business modules and fusion algorithm detection modules, uninstall the existing algorithm detection modules and load the fusion algorithm detection modules, and use the existing and additional algorithm business modules to obtain detection results, thus enabling multiple algorithms to be used simultaneously.

Benefits of technology

Without affecting the continuity of existing business, it supports the collaborative operation of multiple AI algorithms, meets the intelligent needs of multi-task concurrency in security monitoring scenarios, reduces the impact of technology upgrades on existing network services, and ensures the real-time performance and stability of multi-algorithm detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120856902A_ABST
    Figure CN120856902A_ABST
Patent Text Reader

Abstract

The invention relates to a cloud AI monitoring camera multi-algorithm simultaneous opening method and device and a storage medium, the cloud AI monitoring camera multi-algorithm simultaneous opening method is applied to camera shooting equipment integrated with cloud middleware, the camera shooting equipment is connected with a cloud operation management platform, and the cloud AI monitoring camera multi-algorithm simultaneous opening method comprises the following steps: responding to an additional algorithm instruction of the cloud operation management platform; analyzing to obtain algorithm demand information; under the condition that the camera equipment is loaded with an existing algorithm service module and an existing algorithm detection module, obtaining an additional algorithm service module and a fusion algorithm detection module from the cloud operation management platform based on the algorithm demand information by using the cloud middleware; unloading an existing algorithm detection module and loading a fusion algorithm detection module; and obtaining a detection result generated by running the fusion algorithm detection module by using the existing algorithm service module and the additional algorithm service module. According to the method and the device, the problem that a cloud AI monitoring camera is difficult to meet the multi-algorithm parallel processing service requirement in a clouded scene in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart security technology, and in particular to a method, device and storage medium for simultaneously operating multiple algorithms in a cloud AI surveillance camera. Background Art

[0002] With the continuous development of computer hardware and software technologies, various embedded devices, mobile devices, and smart devices have been widely adopted. Cloud AI surveillance cameras are emerging smart home security devices. By deploying AI algorithms on the cloud, users can configure and download AI algorithms to the camera as needed, such as for passenger flow statistics, area intrusion detection, and face capture. However, in related technologies, cloud AI surveillance cameras can only support a single algorithm running on the device at a time, making it difficult to meet the business needs of multi-algorithm parallel processing in cloud-based scenarios.

[0003] Currently, no effective solution has been proposed to address the issue that cloud AI surveillance cameras cannot meet the business needs of multi-algorithm parallel processing in cloud-based scenarios. Summary of the Invention

[0004] This application provides a method, apparatus, and storage medium for simultaneously running multiple algorithms in a cloud AI surveillance camera, to at least solve the problem in related technologies that cloud AI surveillance cameras cannot meet the business needs of parallel processing of multiple algorithms in cloud-based scenarios.

[0005] In a first aspect, embodiments of this application provide a method for simultaneously enabling multiple algorithms in a cloud AI surveillance camera, applied to a camera device integrated with cloud-based middleware; the camera device is connected to a cloud-based operation and management platform, and the method includes:

[0006] In response to the additional algorithm command from the cloud-based operation and management platform, the algorithm requirement information is parsed and obtained;

[0007] When the camera device is loaded with an existing algorithm business module and an existing algorithm detection module, the cloud middleware is used to obtain an additional algorithm business module and a fusion algorithm detection module from the cloud operation management platform based on the algorithm requirement information; the fusion algorithm detection module includes the detection algorithm corresponding to the existing algorithm detection module and the detection algorithm corresponding to the algorithm requirement information.

[0008] Uninstall the existing algorithm detection module and load the fusion algorithm detection module;

[0009] Using the existing algorithm business module and the additional algorithm business module, the detection results generated by running the fusion algorithm detection module are obtained.

[0010] In some embodiments, the step of utilizing the cloud-based middleware to obtain additional algorithm business modules and fusion algorithm detection modules from the cloud-based operation management platform based on the algorithm requirement information includes:

[0011] Using the cloud-based middleware, the additional algorithm business module is obtained from and loaded from the cloud-based operation and management platform based on the algorithm requirement information;

[0012] After the additional algorithm business module is successfully loaded, the cloud middleware is used to obtain the fusion algorithm detection module from the cloud operation management platform.

[0013] In some embodiments, the step of obtaining the fusion algorithm detection module from the cloud-based operation management platform using the cloud-based middleware includes:

[0014] The additional algorithm business module initiates a request to the cloud middleware to obtain the fusion algorithm detection module, and the cloud middleware forwards the request to the cloud operation management platform.

[0015] In response to the model download instruction from the cloud-based operation and management platform, the fusion algorithm detection module is acquired and loaded.

[0016] In some embodiments, obtaining the detection results generated by running the fusion algorithm detection module using the existing algorithm service module and the additional algorithm service module includes:

[0017] The existing algorithm service module and the additional algorithm service module obtain the detection results generated by running the fusion algorithm detection module through a preset shared memory mechanism;

[0018] The detection results are transmitted to the cloud middleware, and the cloud middleware is used to report the detection results to the cloud operation management platform.

[0019] Secondly, embodiments of this application provide a method for simultaneously enabling multiple algorithms in a cloud AI surveillance camera, applied to a cloud-based operation and management platform; the cloud-based operation and management platform connects to camera devices integrated with cloud middleware, and the method includes:

[0020] Obtain the available memory and available flash memory reported by the camera device;

[0021] In response to the user's order for additional algorithms, the peak memory usage and the size of the additional algorithm package are obtained from the algorithm repository of the cloud-based operation management platform.

[0022] With the cloud-based operation and management platform storing the user's existing algorithm subscription information, an algorithm decision is obtained based on the existing algorithm subscription information, the peak memory usage of the additional algorithm, the size of the additional algorithm package, the available memory, and the available flash memory.

[0023] Based on the algorithm decision, an additional algorithm instruction is sent to the camera device;

[0024] The cloud middleware is issued an additional algorithm service module and a fusion algorithm detection module; the fusion algorithm detection module includes a detection algorithm corresponding to the existing algorithm ordering information and a detection algorithm corresponding to the additional algorithm ordering instruction.

[0025] The cloud-based middleware is used to obtain the detection results reported by the camera device.

[0026] In some embodiments, the process of obtaining algorithm decisions based on the existing algorithm ordering information, the peak memory usage of the appended algorithm, the size of the appended algorithm package, the available memory, and the available flash memory includes:

[0027] Based on the existing algorithm ordering information, the peak memory usage and package size of the existing algorithm are obtained;

[0028] Based on the peak memory usage of the existing algorithm, the peak memory usage of the append algorithm, and the available memory, a memory assessment result is obtained;

[0029] Based on the existing algorithm package size, the appended algorithm package size, and the available flash memory, the flash memory determination result is obtained;

[0030] The algorithm decision is obtained based on the memory judgment result and the flash memory judgment result.

[0031] In some embodiments, obtaining the algorithm decision based on the memory determination result and the flash memory determination result includes:

[0032] If both the memory judgment result and the flash memory judgment result are passed, then the algorithm decision is passed.

[0033] In some embodiments, based on the algorithm decision, an additional algorithm command is issued to the camera device, including:

[0034] If the algorithm decision is successful, the additional algorithm instruction is sent to the camera device;

[0035] If the algorithm decides to reject the request, the user is notified that the number of simultaneous multi-path algorithms has reached the device resource limit.

[0036] Thirdly, this application provides a device for simultaneously enabling multiple algorithms in a cloud AI surveillance camera, the device comprising:

[0037] The algorithm requirement parsing module is used to respond to the additional algorithm command from the cloud-based operation and management platform and parse the algorithm requirement information.

[0038] The algorithm package acquisition module is used to acquire additional algorithm business modules and fusion algorithm detection modules from the cloud operation management platform based on the algorithm requirement information when the camera device is loaded with existing algorithm business modules and existing algorithm detection modules. The fusion algorithm detection module includes the detection algorithm corresponding to the existing algorithm detection module and the detection algorithm corresponding to the algorithm requirement information.

[0039] An algorithm detection switching module is used to unload the existing algorithm detection module and load the fusion algorithm detection module;

[0040] The detection result acquisition module uses the existing algorithm business module and the additional algorithm business module to acquire the detection results generated by the fusion algorithm detection module.

[0041] Fourthly, embodiments of this application provide a storage medium storing a computer program that, when executed by a processor, implements the method for simultaneously operating multiple algorithms in a cloud AI surveillance camera as described in the first and second aspects above.

[0042] Compared to related technologies, the multi-algorithm simultaneous operation method, apparatus, and storage medium provided in this application embodiment for cloud AI surveillance cameras are applied to camera devices integrated with cloud middleware. These camera devices are connected to a cloud-based operation and management platform. By responding to the platform's additional algorithm instructions, they parse and obtain algorithm requirement information. When the camera device already has an existing algorithm business module and an existing algorithm detection module loaded, the cloud middleware is used to obtain the additional algorithm business module and the fusion algorithm detection module from the cloud-based operation and management platform based on the algorithm requirement information. The fusion algorithm detection module includes the detection algorithm corresponding to the existing algorithm detection module and the detection algorithm corresponding to the algorithm requirement information. The existing algorithm detection module is unloaded, and the fusion algorithm detection module is loaded. Using the existing algorithm business module and the additional algorithm business module, the detection results generated by running the fusion algorithm detection module are obtained. This solves the problem that cloud AI surveillance cameras cannot meet the business requirements of multi-algorithm parallel processing in cloud scenarios.

[0043] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0044] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0045] Figure 1 This is a hardware structure block diagram of a terminal for a cloud AI surveillance camera multi-algorithm simultaneous operation method according to an embodiment of this application;

[0046] Figure 2 This is a schematic diagram of the system architecture of a cloud AI surveillance camera multi-algorithm simultaneous operation method according to this embodiment;

[0047] Figure 3 This is a flowchart of a method for simultaneously enabling multiple algorithms in a cloud AI surveillance camera according to an embodiment of this application;

[0048] Figure 4 This is a schematic diagram of the scheduling of each module of the user-activated single-path algorithm according to an embodiment of this application;

[0049] Figure 5 This is a schematic diagram illustrating the scheduling of each module of the user-enabled multipath algorithm according to an embodiment of this application;

[0050] Figure 6 This is a flowchart of another method for simultaneously operating multiple algorithms in a cloud AI surveillance camera according to an embodiment of this application;

[0051] Figure 7 This is a structural block diagram of a cloud AI surveillance camera multi-algorithm simultaneous operation device according to an embodiment of this application. DETAILED DESCRIPTION

[0052] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application. Furthermore, it is understood that although the efforts made in such a development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, modifications to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.

[0053] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0054] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application means two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The terms “first,” “second,” “third,” etc., used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

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

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

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

[0058] With the continuous development of computer hardware and software technologies, various embedded devices, mobile devices, and smart devices have been widely adopted. Cloud AI surveillance cameras are emerging smart home security devices. By deploying AI algorithms on the cloud, users can configure and download AI algorithms to run on the camera as needed, such as for passenger flow statistics, area intrusion detection, and face capture. Currently, commercially available cloud AI surveillance cameras only support a single algorithm running on the device at a time. As security monitoring scenarios become increasingly complex and intelligent, modern AI cameras need to evolve from single-function to multi-functional integration. The single-algorithm mode of cloud AI surveillance cameras cannot meet the concurrent demands of multiple tasks, such as real-time area intrusion prevention and accurate facial recognition.

[0059] Currently available cloud AI surveillance cameras use non-decoupled algorithm packages (i.e., the algorithm business module and the algorithm detection module are packaged into one algorithm package), which only supports running one AI algorithm at a time and cannot achieve multiple algorithms running simultaneously. The main reasons are as follows:

[0060] (1) Each package and AI service activation entry on the client interface is independent and cannot be combined. Due to the large workload and long time required for client modification, the only option is to decouple the algorithm without modifying the client logic.

[0061] (2) Each coupled algorithm has its own complete model. Running them simultaneously will compete for device resources. However, embedded devices such as cameras have very limited resources. Sending out multiple coupled algorithms will cause abnormal operation.

[0062] To address the aforementioned issues, this embodiment provides a method for simultaneously enabling multiple algorithms in a cloud AI surveillance camera. This method is applied to camera devices integrated with cloud-based middleware, which are connected to a cloud-based operation and management platform. For example, Figure 2 This is a system architecture diagram of a method for simultaneously operating multiple algorithms in a cloud AI surveillance camera according to this embodiment. It includes a cloud-based operation management platform, cloud-based middleware, algorithm business modules, and an algorithm detection module. The cloud-based middleware includes an HTTPS module, a SOCKET communication module, a file download management module, an encryption / decryption module, and a device resource management module. Before implementing this method, a unified coding standard for the algorithm detection module needs to be established, covering AI scenarios such as area intrusion and face capture currently integrated with the platform. This step is mainly to unify the detection module tags in the cloud-based operation management platform, cloud-based middleware, algorithm business modules, and algorithm detection modules. Table 1 shows the correspondence between detection module names and detection module tags.

[0063] Table 1

[0064]

[0065] Secondly, it is necessary to define the message interaction format and data packet type codes between the cloud middleware and the algorithm business modules of the camera equipment. Data packets should uniformly adopt JSON format. Cross-process communication should be established between the cloud middleware and the algorithm business modules using TCP sockets. The SDK acts as the server, continuously listening on a fixed port, while the algorithm business modules act as clients, actively connecting to the cloud middleware. Data packets should uniformly adopt JSON format. The plaintext message interaction format and data packet type codes between the SDK and the AI ​​algorithm business modules should also be defined. Data packets should begin with SDC and end with \r\n. Receiving data packets requires checking the "header and tail" to determine if the data packet is complete.

[0066] Secondly, it is necessary to define the cross-process communication method, message interaction format, and alarm result data format between the algorithm detection module and the algorithm business module. The detection module acts as a server, using a local SOCKET for communication. The detection module stores detection results in shared memory, and the algorithm business module supports algorithm result subscription by providing the shared memory key. The alarm result specification for the AI ​​algorithm detection module should be defined, with the specific data format using a face capture algorithm as an example:

[0067] {

[0068] "frameId": 121345,

[0069] "objNum": 1,

[0070] "objInfoList": [

[0071] {

[0072] "objId": 001,

[0073] "conf": 89,

[0074] "class": "face",

[0075] "bbox": [

[0076] 100,

[0077] 110,

[0078] 200, 300

[0080] ],

[0081] "attribute": [

[0082] {

[0083] "attrValue": "18",

[0084] "attrDesc": "age

[0085] } ]

[0087] }

[0088] ],

[0089] "imageInfo": {

[0090] format: "jpg",

[0091] "width": 1920,

[0092] "height": 1080

[0093] }

[0094] }

[0095] Here, `frameId` is used to label video frames, `objNum` represents the number of detected targets, `objId` represents the ID of the detected target, `conf` represents the detection confidence score, `class` represents the type of the detected target, and `bbox` represents the region of the detected target. `attribute` is an array of detected target attributes, and `imageInfo` is an array of result image information.

[0096] Finally, it is necessary to define the packaging format for the algorithm detection module and the algorithm business module. Algorithm developers should package the algorithm business module and detection module involved in the AI ​​scenarios they have integrated with according to the specifications, and then upload them to the platform's algorithm repository and record the peak memory usage of the algorithm. and algorithm package size The packaging format is as follows:

[0097] └──DX_T40P_REGIONINVADE_V1.0.0_20250612

[0098] ├── algo_config.json

[0099] ├── Bin

[0100] │ ├── AlgApp

[0101] │ ├── config

[0102] │ │ └── setup.config

[0103] │ ├── lib

[0104] ├── models

[0105] The `bin` directory contains the executable program for the algorithm and its related configuration files; `bin / lib` contains the dependency libraries of the executable program; `bin / config` contains the configuration files for the executable program; and `models` contains two parts: model files and a JSON file with model configuration parameters. `algo_config.json` describes the configuration of the algorithm package, such as the algorithm version number, the name of the algorithm executable file, and the name of the algorithm model file. The cloud-based middleware reads `algo_config.json` to understand the algorithm packaging structure and starts the algorithm.

[0106] It is understandable that the algorithm business module and the cloud middleware have a socket communication link, the algorithm detection module and the algorithm business module exchange alarm messages across processes through shared memory, and the cloud operation management platform only interacts with the cloud middleware.

[0107] Figure 3 This is a flowchart illustrating a method for simultaneously operating multiple algorithms in a cloud AI surveillance camera according to an embodiment of this application. The method is applied to a camera device integrated with cloud-based middleware; the camera device is connected to a cloud-based operation and management platform, such as... Figure 3 As shown, the process includes the following steps:

[0108] Step S301: In response to the additional algorithm instruction from the cloud-based operation and management platform, the algorithm requirement information is parsed and obtained.

[0109] First, the additional algorithm command initiated by the cloud-based operation and management platform is not an isolated command, but rather generated based on the additional algorithm subscription request initiated by the user through a mobile client or other terminal (for example, the user has already run a regional intrusion algorithm on the camera device, and subsequently subscribes to an additional face capture algorithm to achieve a composite monitoring requirement of "regional intrusion prevention + intruder face recognition"). Before generating the command, the platform has completed preliminary judgments such as verifying the user's subscription information and matching the current algorithm running status of the device (confirming the existing algorithm type). When the cloud AI monitoring camera integrated with the cloud middleware receives the command, it will decompose and analyze the command through the command parsing module built into the cloud middleware, and finally obtain the algorithm requirement information. This algorithm requirement information mainly includes the target algorithm business module that the user is subscribing to this time.

[0110] Step S302: If the camera device has an existing algorithm business module and an existing algorithm detection module loaded, the cloud middleware is used to obtain an additional algorithm business module and a fusion algorithm detection module from the cloud operation management platform based on the algorithm requirement information. The fusion algorithm detection module includes the detection algorithm corresponding to the existing algorithm detection module and the detection algorithm corresponding to the algorithm requirement information.

[0111] Specifically, if the cloud AI surveillance camera already has existing algorithm business modules (such as implementing regional intrusion detection function) and existing algorithm detection modules (such as a detection module containing only regional intrusion detection logic and labeled "TYAI_REGION_INTRUSION") that meet the current basic monitoring needs, it will rely on the cloud middleware embedded in the cloud AI surveillance camera to obtain the required additional algorithm business modules and fusion algorithm detection modules from the cloud operation and management platform based on the algorithm requirement information.

[0112] First, the cloud-based middleware loads the additional algorithm business module. After the additional algorithm business module is successfully loaded, it requests the corresponding detection algorithm type from the cloud-based middleware. The cloud-based middleware then requests a fusion algorithm detection module from the platform based on the algorithm requirement information and the detection algorithm type corresponding to the currently loaded existing algorithm detection module. This fusion algorithm detection module is not an independent new algorithm module, but a module pre-deployed by the platform that integrates two types of detection logic. It includes both the original detection algorithms in the existing algorithm detection module (such as the regional intrusion detection algorithm to ensure that the original monitoring function is not interrupted) and the additional detection algorithms corresponding to the algorithm requirement information (such as the face capture detection algorithm to realize the new monitoring requirements). For example, the inference logic of regional intrusion detection and face capture detection is integrated into the same model file, and the model label is associated with the two types of algorithm identifiers to ensure that it can be adapted to both the existing algorithm business module and the additional algorithm business module, providing a foundation for subsequent multi-algorithm collaborative detection.

[0113] Step S303: Unload the existing algorithm detection module and load the fusion algorithm detection module.

[0114] Specifically, after acquiring the additional algorithm business module and the fusion algorithm detection module, in order to avoid conflicts between the existing algorithm detection module and the fusion algorithm detection module in terms of device resource occupation and detection logic execution, it is necessary to first perform an uninstallation operation on the existing algorithm detection module: the cloud middleware actively initiates an uninstallation command, terminates the running process corresponding to the existing algorithm detection module through the process management mechanism, and releases the device resources occupied by the module, including clearing the detection model data loaded in memory, releasing the cache space in shared memory that interacts with the existing algorithm business module, and deleting the module running log temporarily stored in flash memory, to ensure that the uninstallation process is thorough and to avoid residual resources interfering with the loading of subsequent modules. After confirming that the existing algorithm detection module has been completely uninstalled, the loading process of the fusion algorithm detection module is initiated: The cloud middleware first reads the packaged configuration file (algo_config.json) of the fusion algorithm detection module, clarifying the executable program path (algorithm inference program under Bin directory), model file location (model data integrating existing and additional detection algorithms under models directory), and dependency library information (related libraries under Bin / lib directory), etc. Then, it completes the linking of dependency libraries, memory mapping of model files, and process startup of detection program according to the preset loading logic. During the loading process, the cloud middleware will monitor the module's running status in real time. If problems such as model loading failure or process startup abnormality occur, it will immediately report error information to the cloud middleware and attempt to reacquire the fusion algorithm detection module. After the fusion algorithm detection module is successfully loaded (process status is "running normally"), the cloud middleware will notify the algorithm business module of the loading status of the fusion algorithm detection module. This can be understood as follows: if the system is running normally, the cloud middleware will notify the algorithm business module that it can establish shared memory communication with the algorithm detection module; if the system crashes abnormally, it can request the cloud middleware to re-download and restart the algorithm detection module; if the system still crashes after restarting, it will notify the algorithm business module that it has stopped after frequent crashes, and the cloud middleware will report the error to the platform at the same time.

[0115] Step S304: Using the existing algorithm service module and the additional algorithm service module, obtain the detection results generated by running the fusion algorithm detection module.

[0116] Specifically, after the fusion algorithm detection module is successfully loaded and enters normal operation, the fusion algorithm detection module will store the detection results generated by the existing algorithm detection logic (such as area intrusion detection) and the additional algorithm detection logic (such as face capture detection) running at the same time into a preset shared memory space according to a unified alarm result data format (such as a JSON structure containing fields such as frameId video frame marker, objNum target quantity, objInfoList target information array). This shared memory is created by the fusion algorithm detection module and generates a unique shared memory KEY. The shared memory KEY will be synchronized to the existing algorithm business module and the additional algorithm business module respectively to ensure that the two types of business modules can accurately locate the memory address where the detection results are stored.

[0117] Next, for existing algorithm business modules (such as the regional intrusion algorithm business module), it will use the shared memory key synchronized by the fusion algorithm detection module to monitor the update status of the shared memory. Once it detects that new detection results have been written (such as the bounding box coordinates and confidence scores of regional intrusion targets), it will extract the detection results related to the existing algorithm according to its own business logic. At the same time, it will verify the results by combining the user-preset business parameters (such as the detection area coordinates of regional intrusion and the alarm frequency threshold) and filter out the data that meets the alarm conditions. Similarly, for the append algorithm business module (such as the face capture algorithm business module), it will also use the shared memory key as an index to extract the detection results corresponding to the append algorithm from the shared memory (such as the objId of the face target and the age information in the attribute array), and filter the results and match attributes according to the face control features, monitoring time period and other business parameters set by the user.

[0118] Finally, the existing algorithm business module and the additional algorithm business module will report the filtered detection results to the cloud middleware via TCP socket communication. The cloud middleware will then report to the cloud operation and management platform in real time, which will ensure the continuous operation of the existing algorithm business and the accurate output of the detection data of the additional algorithm business.

[0119] Currently, all algorithm services on the live network support independent operation, meaning they are the coupled algorithm packages already deployed on the platform. If a high-frequency usage scenario requires face capture and license plate capture to be running simultaneously, the firmware of the user's Model A monitoring device is first upgraded via OTA to a version supporting multi-instance algorithm scheduling. Then, the coupled algorithm packages for face capture and license plate capture are modified according to the multi-instance solution, decoupling them into a face capture service package, a license plate capture service package, and a face capture / license plate capture fusion model package, which are then deployed to the platform. Other unmodified algorithms remain in their coupled versions. If a user, after enabling face capture and license plate capture, then attempts to access an undecoupled area intrusion algorithm, a prompt will appear indicating that both face capture and license plate capture algorithms are simultaneously disabled, and the coupled version of the area intrusion algorithm package will be downloaded.

[0120] Through steps S301 to S304, on the one hand, relying on the scheduling capabilities of the cloud middleware, by acquiring and loading a fusion algorithm detection module that integrates existing and additional detection algorithms, the detection function of the original algorithm is retained, while the additional algorithm functions required by the user are added (such as adding face capture detection on the basis of regional intrusion detection). This meets the intelligent requirements of multi-task concurrency in security monitoring scenarios, is compatible with existing algorithm business models, and reduces the impact of technology upgrades on existing network services. On the other hand, by unloading the existing algorithm detection module before loading the fusion module, the resource contention caused by multiple detection modules running simultaneously is avoided. Furthermore, by leveraging the existing and additional algorithm business modules... The mechanism of acquiring detection results through shared memory ensures that the detection results of multiple algorithms can be accurately and efficiently reported to the cloud-based operation and management platform, balancing the stability of multi-algorithm operation and the real-time nature of detection data. Furthermore, the algorithm business package functionality is universal; subsequent algorithm iterations only require updating the algorithm detection module (i.e., the model package), reducing the complexity of algorithm developers' updates and code maintenance, and eliminating the need to modify existing client logic. Model combinations can be updated step-by-step according to user needs. For example, in more than ten existing AI scenarios, users currently only need to enable face capture and area intrusion algorithms simultaneously. Like updating an application in an app store, users can first modify these two algorithm business packages and model packages, providing flexibility. These steps effectively solve the problem in related technologies where cloud AI surveillance cameras only support the operation of a single algorithm at a time, making it difficult to meet the business needs of multi-algorithm parallel processing in cloud scenarios. This enables cloud AI surveillance cameras to support the collaborative operation of multiple AI algorithms without affecting the continuity of existing business operations.

[0121] To better understand this application, the above embodiments will be described below in conjunction with application scenarios. Figure 4 This is a schematic diagram illustrating the scheduling of each module in the user-initiated single-path algorithm according to an embodiment of this application. For example... Figure 4 As shown, the process includes the following steps:

[0122] Step S401: Issue the regional intrusion algorithm. The cloud-based operation and management platform issues the regional intrusion algorithm.

[0123] Step S402: Load and run the regional intrusion service. After receiving the data, the cloud middleware loads and runs the regional intrusion service module.

[0124] Step S403: Request the regional intrusion detection model. The regional intrusion service module requests the regional intrusion detection model from the cloud middleware;

[0125] Step S404: Report regional intrusion model tags. The cloud middleware reports regional intrusion model tags to the cloud operation and management platform;

[0126] Step S405: Receive instructions from the intrusion detection model. The cloud-based middleware receives instructions from the intrusion detection model;

[0127] Step S406: Download and decompress the intrusion detection model resources. The cloud-based middleware downloads and decompresses the intrusion detection model resources.

[0128] Step S407: Notify the intrusion detection algorithm detection module path. The cloud middleware notifies the regional intrusion business module of the algorithm detection module path, completing the deployment process of the regional intrusion detection model from the platform to the business module and the detection module.

[0129] Figure 5 This is a schematic diagram illustrating the scheduling of various modules in a user-initiated multipath algorithm according to an embodiment of this application. For example... Figure 5 As shown, the process includes the following steps:

[0130] Step S501: Deploy the face capture algorithm (additional to the existing regional intrusion detection algorithm). The cloud-based operation and management platform deploys the face capture algorithm.

[0131] Step S502: Load and run the face capture service. After receiving the data, the cloud middleware loads and runs the face capture service module.

[0132] Step S503: Request a face detection model. The face capture service module requests a face detection model from the cloud middleware;

[0133] Step S504: Report the model labels for area intrusion and face capture. The cloud-based middleware reports the model labels for area intrusion and face capture to the cloud-based operation and management platform;

[0134] Step S505: Receive instructions from the hybrid model of face capture and region intrusion. The cloud-based middleware receives instructions from the hybrid model of face capture and region intrusion.

[0135] Step S506: Download and decompress the hybrid model resources for face capture and region intrusion. The cloud-based middleware downloads and decompresses the hybrid model resources for face capture and region intrusion.

[0136] Step S507: Notify the resource path of the hybrid model for face capture and region intrusion. The cloud middleware notifies each algorithm business module of the resource path of the hybrid model for face capture and region intrusion.

[0137] In some embodiments, cloud-based middleware is used to obtain additional algorithm business modules and fusion algorithm detection modules from the cloud-based operation and management platform based on algorithm requirement information, including:

[0138] Using cloud-based middleware, additional algorithm business modules are obtained and loaded from the cloud-based operation and management platform based on algorithm requirement information;

[0139] After the additional algorithm business module is successfully loaded, the fusion algorithm detection module is obtained from the cloud operation management platform using cloud middleware.

[0140] The process utilizes cloud-based middleware to retrieve additional algorithm business modules and fusion algorithm detection modules from the cloud-based operation and management platform based on algorithm requirement information. This process follows an ordered logic of loading the algorithm business modules first, followed by retrieving the algorithm detection modules, and relies on the full-process scheduling capabilities of the cloud-based middleware. Specifically, the cloud-based middleware first retrieves the additional algorithm business modules from the cloud-based operation and management platform based on the algorithm requirement information. After receiving the additional algorithm business modules, the middleware completes the loading operation and monitors the loading status in real time to ensure the normal startup of the business module process. After the algorithm business modules are successfully loaded and launched, they report a 3001 online message code according to the prescribed protocol, carrying the algorithm business process ID (procId). Upon receiving the algorithm business module launch message, the cloud-based middleware replies with a 3000 message response code. The 3000 message response code carries the configPath, which is the configuration file that the algorithm needs to manage. This mainly contains the business parameters issued by the platform, such as the user-defined areas to be detected and alarm frequencies for regional intrusion algorithms. The cloud-based middleware manages the AI ​​algorithm business using the algorithm business process ID.

[0141] After the additional algorithm business module is successfully loaded (i.e., the cloud middleware confirms through its process management mechanism that the business module process is in a "normal running" state, and the business module has reported the 3001 online message code and its own process ID according to the protocol), since the additional algorithm business module needs to rely on the corresponding detection algorithm to implement its function, it will send a request to the cloud middleware to obtain the fusion algorithm detection module. The request will carry the tag of the detection module it needs. After receiving the request, the cloud middleware will combine the algorithm requirement information with the existing algorithm detection module types already loaded on the current camera device to form a fusion requirement of "existing detection algorithm + additional detection algorithm". Then, it will forward the fusion algorithm detection module acquisition request corresponding to this requirement to the cloud operation management platform (the request includes the model tags of the existing algorithm and the additional algorithm). Based on the request, the cloud-based operation and management platform retrieves the pre-deployed fusion algorithm detection module from the algorithm repository (this module includes detection algorithms corresponding to existing algorithm detection modules, such as the original area intrusion detection algorithm, and additional detection algorithms corresponding to the algorithm requirement information, such as the face capture detection algorithm), and sends it to the cloud AI surveillance camera. The cloud middleware completes the reception, laying the foundation for subsequent detection module switching and multi-algorithm collaborative operation.

[0142] Through the above steps, cloud-based middleware enables an orderly process of first acquiring and loading the additional algorithm business module, and then acquiring the fusion algorithm detection module. This step-by-step acquisition of modules avoids device resource conflicts caused by simultaneous transmission and loading of multiple modules, ensuring the stability of the camera equipment. Furthermore, the scheduling capabilities of the cloud-based middleware ensure that the additional algorithm business module accurately matches the algorithm requirement information (such as specific AI scenarios like face capture and area intrusion detection) and is successfully loaded. Only after the business module is successfully loaded is the fusion algorithm detection module (including existing and additional detection algorithms) acquired. This preserves the continuity of existing algorithm functions while enabling the implementation of new algorithm functions, meeting the core requirement of simultaneous development of multiple algorithms. Moreover, by decoupling the algorithm packages, no modification to the client logic is required, ensuring compatibility with existing network business models and reducing the complexity of algorithm updates and maintenance. This lays a reliable foundation for subsequent detection module switching and multi-algorithm collaborative operation.

[0143] In some embodiments, the step of obtaining the fusion algorithm detection module from the cloud-based operation management platform using the cloud-based middleware includes:

[0144] The additional algorithm business module initiates a request to the cloud middleware to obtain the fusion algorithm detection module, and the cloud middleware forwards the request to the cloud operation management platform.

[0145] In response to the model download instruction from the cloud-based operation and management platform, the fusion algorithm detection module is acquired and loaded.

[0146] Specifically, after the additional algorithm business module has been successfully loaded, since the additional algorithm business module requires corresponding detection algorithm support functions (such as the face capture business module requiring a face detection algorithm, and the regional intrusion business module requiring a regional intrusion detection algorithm), it will send a 2201 message request to the cloud middleware to obtain the fusion algorithm detection module. This request will carry a clear detection module requirement identifier (i.e., detection module tag) to ensure that the cloud middleware can accurately integrate the fusion requirements. After receiving the request, the cloud middleware will verify the module tag, business process legality, and other information in the request (such as confirming that the request initiator is a registered additional algorithm business module process). After the verification is passed, the request will be processed in a preset format. The middleware forwards the signaling (in the agreed-upon format with the cloud-based operation and management platform) to the cloud-based operation and management platform. The cloud-based middleware responds with a 2200 protocol code from the algorithm business module based on the loading result. Subsequently, the cloud-based operation and management platform, based on the forwarded request, retrieves the matching fusion algorithm detection module (this module is pre-deployed and includes detection algorithms corresponding to existing algorithm detection modules and detection algorithms corresponding to additional algorithm requirements, such as a regional intrusion face capture fusion detection module) from its own algorithm repository and sends a model download command to the cloud-based middleware. The cloud-based middleware responds to this model download command by obtaining the data packet of the fusion algorithm detection module from the cloud-based operation and management platform via an HTTPS communication link and completes the loading of the fusion algorithm detection module. After the algorithm detection module is loaded, it notifies the cloud-based middleware. The cloud-based middleware then notifies the algorithm business module of the loading status of the algorithm detection module via a 2203 / 2202 response code. If the loading is successful, it indicates that the algorithm business module can begin establishing shared memory communication with the algorithm detection module, forwarding business parameters, and subscribing to alarm results. This can be understood as follows: the algorithm business package and the model package are two independent processes, both child processes started by the cloud middleware via fork. The SDK acts as the parent process, and only the cloud middleware knows the running status of each algorithm process. Due to the independent isolation of these processes, the algorithm business module is unaware of the actual process status of the algorithm detection module. Only after obtaining the status of the algorithm detection module from the cloud middleware can it determine whether to forward business parameters and subscribe to alarm results. Codes 2203 / 2202 are the socket communication interaction protocol codes between the cloud middleware and the algorithm business module. Essentially, after the cloud middleware starts the algorithm detection module, if it runs normally, it tells the algorithm business module that it can establish shared memory communication with the algorithm detection module; if it crashes abnormally, it can request the cloud middleware to re-download and start the algorithm detection module; if it still crashes after restarting, it will notify the algorithm business module to stop due to frequent crashes, and the cloud middleware will simultaneously report the error to the platform. If the user actively closes the AI ​​service during normal use, the cloud middleware will notify the algorithm business that the detection module has stopped normally and that it needs to stop subscribing to alarm reports.

[0147] In some embodiments, obtaining the detection results generated by running the fusion algorithm detection module using the existing algorithm service module and the additional algorithm service module includes:

[0148] The existing algorithm service module and the additional algorithm service module obtain the detection results generated by running the fusion algorithm detection module through a preset shared memory mechanism;

[0149] The detection results are transmitted to the cloud middleware, and the cloud middleware is used to report the detection results to the cloud operation management platform.

[0150] Specifically, the fusion algorithm detection module, according to a preset alarm result data format (such as a JSON structure containing fields like frameId video frame marker, objNum target quantity, objInfoList target information array, and imageInfo image information), uniformly stores the detection results generated by simultaneously running existing detection algorithms (such as area intrusion detection) and additional detection algorithms (such as face capture detection) into a preset shared memory space. This shared memory is created by the fusion algorithm detection module, which generates a shared memory key. The fusion algorithm detection module also synchronizes this key to both the existing algorithm business modules and the additional algorithm business modules, ensuring that both types of business modules can accurately locate the memory address where the detection results are stored. The existing algorithm business modules and the additional algorithm business modules use this shared memory key... The system monitors the shared memory update status in real time. Once a new detection result is detected, it extracts the corresponding dimension's result according to its own business logic (e.g., the existing regional intrusion algorithm business module extracts target data with class "intrusion" from objInfoList, and the face capture algorithm business module extracts target data with class "face"). Simultaneously, user business parameters (such as the detection area coordinates for regional intrusion and the feature threshold for face capture) are used to verify and filter the results, removing data that does not meet the alarm conditions. The shared memory key can be understood as a handle agreed upon by both parties; it can be a static value or a fixed file path. Maintaining a key in shared memory can be done through broadcast notification + independent index or multi-queue replication (requiring the management of a set of dynamic keys). Among these, broadcast notification + independent index is the most classic and efficient SPMC pattern. The core idea is: the producer writes messages to a shared circular queue, and each consumer maintains its own independent read index, notifying consumers of new message arrivals via semaphores. The shared memory approach is like creating a whiteboard; the producer writes content to the whiteboard, and when someone reads it, the notification to the consumer is typically done using semaphores.

[0151] Subsequently, the existing algorithm business module and the additional algorithm business module respectively transmit the filtered detection results to the cloud middleware via TCP socket communication links. The cloud middleware summarizes and verifies the format of the results reported by the two types of business modules. After confirming the completeness of the results, it then reports the detection results to the cloud operation management platform via HTTPS communication, completing the entire process of multi-algorithm detection results from generation, extraction to feedback. This can be understood as the alarm chain: the algorithm detection module detects and infers alarm messages -> notifies the algorithm business module to read them -> the algorithm business module reports to the cloud middleware via socket communication links -> the cloud middleware reports to the cloud operation management platform.

[0152] Through the above steps, on the one hand, existing algorithm business modules and additional algorithm business modules can accurately obtain the detection results generated by the fusion algorithm detection module through shared memory. The design of the detection module storing the results in shared memory and the business modules subscribing to the results with shared memory keys avoids the latency and resource consumption of direct communication between multiple modules. It also allows the two types of business modules to extract the detection data of the corresponding algorithms as needed (such as the existing regional intrusion business module extracting intrusion target information and the additional face capture business module extracting face feature information), ensuring the accuracy and real-time nature of the multi-algorithm detection results. On the other hand, by transmitting the detection results to the cloud middleware and having the middleware uniformly report them to the cloud operation management platform, the interaction link between the business modules and the platform is simplified, avoiding communication chaos caused by direct reporting by multiple business modules. The cloud middleware can also summarize and verify the results, ensuring the integrity and format standardization of the data reported to the platform. At the same time, it realizes the centralized feedback of multi-algorithm detection results, allowing the platform to monitor the multi-algorithm operation status of the device in real time. This further supports the stable implementation of multi-channel AI algorithm operation of cloud AI surveillance cameras and is compatible with the iteration requirements of decoupled algorithm packages, reducing subsequent maintenance costs.

[0153] Figure 6 This is a flowchart of another method for simultaneously operating multiple algorithms in a cloud AI surveillance camera according to an embodiment of this application. This method is applied to a cloud-based operation and management platform; the cloud-based operation and management platform connects to camera devices integrated with cloud middleware, such as… Figure 6 As shown, the process includes the following steps:

[0154] Step S601: Obtain the available memory and available flash memory reported by the camera device;

[0155] Specifically, after the cloud AI surveillance camera completes its network connection and power-on initialization, the cloud middleware will automatically start the device resource detection program to collect the camera's current available memory data (such as the remaining RAM capacity, excluding memory resources already occupied by system operation and basic monitoring functions) and available flash memory data (such as the remaining FLASH storage space, excluding flash memory resources occupied by installed algorithm packages, system configuration files, etc.) in real time. Subsequently, the cloud middleware will report the collected available memory and available flash memory data to the cloud operation management platform through a pre-established HTTPS secure communication link with the cloud operation management platform.

[0156] Step S602: In response to the user's order for additional algorithms, obtain the peak memory usage and the size of the additional algorithm package from the algorithm repository of the cloud-based operation management platform.

[0157] Specifically, users initiate additional algorithm subscription commands via mobile clients or other terminals (such as subscribing to a face capture algorithm in addition to an existing regional intrusion algorithm). After the command is encrypted and transmitted to the cloud-based operation and management platform, the platform first verifies the legality and completeness of the command (e.g., verifying the association between the user account and the bound camera device, confirming whether the subscribed additional algorithm is within the scope of AI scenarios already integrated with the platform). Once the verification is successful, the platform retrieves the pre-registration information of the additional algorithm from its own algorithm repository based on the explicitly specified additional algorithm identifier in the command. This information is generated by the algorithm developers packaging the algorithm's business module and detection module according to a prescribed packaging format and uploading it to the platform. The algorithm repository synchronously registers key parameters, including "peak memory usage for the added algorithm," which refers to the maximum memory capacity required for the algorithm to run at full load on the device, and "size of the added algorithm package," which refers to the total storage space occupied by the business module and detection module (including model files, dependency libraries, configuration files, etc.) corresponding to the algorithm. By extracting these two parameters and combining them with the previously obtained data on available memory and available flash memory reported by the camera device, the platform can accurately determine whether the device resources meet the running requirements of the added algorithm. This provides key data basis for subsequent algorithm generation decisions and the decision on whether to issue the added algorithm module, avoiding algorithm loading failure or device malfunction due to resource estimation errors.

[0158] Step S603: If the cloud-based operation management platform stores the user's existing algorithm subscription information, an algorithm decision is obtained based on the existing algorithm subscription information, the peak memory usage of the additional algorithm, the size of the additional algorithm package, available memory, and available flash memory.

[0159] Specifically, when the cloud-based operation and management platform stores users' existing algorithm subscription information, the platform extracts this information from its stored user subscription data. This information includes the types of algorithms previously subscribed to and running on the camera equipment. Simultaneously, it retrieves the pre-registered parameters corresponding to the existing algorithm from the algorithm repository, namely the peak memory usage and package size of the existing algorithm. Then, the platform adds the peak memory usage of the existing algorithm to the peak memory usage of the additional algorithm to obtain the total memory requirement for multiple algorithms running simultaneously. Next, it adds the package size of the existing algorithm to the package size of the additional algorithm to obtain the total flash memory requirement for multiple algorithms. Then, the platform compares the calculated total memory requirement with the previously reported available memory from the camera equipment to determine if the available memory can cover the total memory requirement. Simultaneously, it compares the total flash memory requirement with the available flash memory to determine if the available flash memory can support the total flash memory requirement. If the available memory is greater than or equal to the total memory requirement, and the available flash memory is greater than or equal to the total flash memory requirement, the algorithm decides "pass," allowing the issuance of the additional algorithm-related modules to the camera equipment.

[0160] Step S604: Based on the algorithm decision, send an additional algorithm command to the camera device;

[0161] Specifically, if the algorithm decides "pass", the cloud-based operation and management platform will generate additional algorithm instructions and send them through the HTTPS secure communication link established with the cloud-based middleware of the camera equipment to ensure the security and integrity of the instruction transmission.

[0162] Step S605: Issue the additional algorithm business module and the fusion algorithm detection module to the cloud middleware; the fusion algorithm detection module includes the detection algorithm corresponding to the existing algorithm ordering information and the detection algorithm corresponding to the additional algorithm ordering instruction;

[0163] Specifically, the cloud-based operation and management platform will accurately retrieve the additional algorithm business module corresponding to the user's additional algorithm subscription instruction from its own algorithm repository. This module is only responsible for parsing user business parameters (such as the deployment characteristics and alarm frequency of the face capture algorithm) and processing detection results, and does not contain core inference logic. At the same time, the platform will retrieve the pre-deployed fusion algorithm detection module. This module contains both the detection algorithm corresponding to the user's existing algorithm subscription information (such as the previously running area intrusion detection algorithm) to ensure that the original monitoring function is not interrupted, and the detection algorithm corresponding to the additional algorithm subscription instruction (such as the face capture detection algorithm added this time) to meet the requirements of the new function. Moreover, the model file in the module has completed the integration and optimization of the inference logic of the two types of algorithms to avoid resource conflicts caused by multiple detection modules running independently. Subsequently, the platform will distribute the additional algorithm business module and the fusion algorithm detection module in a preset order (business module first, detection module later) through the HTTPS communication link established with the camera device cloud middleware.

[0164] Step S606: Use cloud middleware to obtain the detection results reported by the camera device.

[0165] Specifically, after the camera device loads the fusion algorithm detection module and realizes multi-algorithm collaborative operation, the existing algorithm business modules (such as the previously running regional intrusion algorithm business module) and the additional algorithm business modules (such as the newly added face capture algorithm business module) will extract the detection results of the corresponding dimensions from the fusion algorithm detection module through a preset shared memory mechanism. Combined with the prescribed alarm result data format, the detection results are filtered and formatted. Subsequently, the two types of algorithm business modules report the formatted detection results to the cloud middleware through a TCP socket communication link pre-established with the cloud middleware. During the reporting process, each business process ID (procId) will be carried to ensure that the cloud middleware can accurately identify the algorithm type corresponding to the result. After receiving the detection results, the cloud middleware will first verify the integrity and legality of the data, then summarize and classify the results according to the business attributes of the two types of algorithms, and finally encapsulate the summarized detection results in the HTTPS communication format agreed with the cloud operation management platform and report them to the cloud operation management platform.

[0166] Through steps S601 to S606, the system relies on obtaining the available memory and flash memory reported by the camera device, extracting additional algorithm resource parameters (peak memory usage, packet size), and combining them with existing algorithm ordering information to perform resource matching analysis and derive algorithm decisions. This prevents algorithm loading failures or operational anomalies caused by insufficient device resources from the outset, ensuring the stability of multiple algorithms running simultaneously. Furthermore, by issuing additional algorithm commands based on these decisions and accurately issuing fusion algorithm detection modules containing existing and additional detection algorithms, as well as corresponding additional algorithm business modules, the system retains the continuity of the original algorithm functions while implementing the new algorithm functions. It also utilizes cloud middleware to obtain the detection results reported by the camera device, ensuring that multi-algorithm detection data can be efficiently and accurately fed back to the platform. Ultimately, this effectively solves the problem in related technologies where cloud AI surveillance cameras only support single-algorithm operation, enabling multi-AI algorithm collaborative operation in cloud scenarios. At the same time, it reduces the complexity of algorithm iteration and maintenance, as well as the cost of client-side modification, while balancing functional expansion and compatibility with existing network services.

[0167] In some embodiments, the process of obtaining algorithm decisions based on the existing algorithm ordering information, the peak memory usage of the appended algorithm, the size of the appended algorithm package, the available memory, and the available flash memory includes:

[0168] Based on the existing algorithm ordering information, the peak memory usage and package size of the existing algorithm are obtained;

[0169] Based on the peak memory usage of the existing algorithm, the peak memory usage of the append algorithm, and the available memory, a memory assessment result is obtained;

[0170] Based on the existing algorithm package size, the appended algorithm package size, and the available flash memory, the flash memory determination result is obtained;

[0171] The algorithm decision is obtained based on the memory judgment result and the flash memory judgment result.

[0172] Specifically, the cloud-based operation and management platform extracts the types of algorithms previously ordered and run on camera devices from the user's existing algorithm order information stored in its own database. It then associates this information with the resource parameters registered in the platform's algorithm repository when the algorithm developer uploaded the algorithm package, thereby obtaining the peak memory usage and size of the existing algorithm package. Next, the platform adds the peak memory usage of the existing algorithm to the peak memory usage of the additional algorithm to obtain the total memory requirement for multiple algorithms running simultaneously. This total memory requirement is then compared with the available memory reported by the camera device. If the available memory is greater than or equal to the total memory requirement, the memory determination result is "passed"; otherwise, it is "failed". Subsequently, following the same logic, the existing algorithm package size is added to the size of the additional algorithm package to obtain the total flash memory requirement for multiple algorithms. This is then compared with the available flash memory reported by the camera device. If the available flash memory is greater than or equal to the total flash memory requirement, the flash memory determination result is "passed"; otherwise, it is "failed". Based on the memory and flash memory determination results, an algorithm decision is made.

[0173] Through the above steps, the peak memory usage and algorithm package size of existing algorithms are first obtained by associating existing algorithm ordering information. This ensures that resource assessment covers all existing and added algorithms, avoiding resource estimation bias caused by only considering new algorithms. Then, by comparing total memory requirements with available memory and total flash memory requirements with available flash memory, independent memory and flash memory judgment results are formed, achieving refined verification of resource dimensions and eliminating the risk of omissions in single-dimensional judgment. Finally, algorithm decisions are made based on the combined results of the two-dimensional judgment. Subsequent algorithm deployment is only allowed when both memory and flash memory requirements are met. This strictly matches the resource constraints of algorithm operation, ensuring that the camera equipment will not experience operational abnormalities or algorithm loading failures due to resource overload. It also provides a scientific and reliable decision-making basis for the stable deployment of multiple AI algorithms simultaneously, while avoiding network resource waste and equipment computing power loss caused by invalid algorithm deployment, thus balancing technical feasibility and resource utilization efficiency.

[0174] In some embodiments, obtaining the algorithm decision based on the memory determination result and the flash memory determination result includes:

[0175] If both the memory judgment result and the flash memory judgment result are passed, then the algorithm decision is passed.

[0176] In the above steps, the algorithm decision is only deemed "passed" when both the memory and flash memory judgment results are passed—that is, when the device can cover the full requirements of "existing algorithms + additional algorithms" in both core resource dimensions of memory and flash memory. This judgment logic ensures that after additional algorithm business modules and fusion algorithm detection modules are subsequently issued to the camera device, the device can stably support the collaborative operation of multiple algorithms, avoiding algorithm process crashes due to insufficient memory or module loading failures due to insufficient flash memory. This lays a crucial foundation for the stability of subsequent algorithm deployment and operation.

[0177] In some embodiments, based on the algorithm decision, an additional algorithm command is issued to the camera device, including:

[0178] If the algorithm decision is successful, the additional algorithm instruction is sent to the camera device;

[0179] If the algorithm decides to reject the request, the user is notified that the number of simultaneous multi-path algorithms has reached the device resource limit.

[0180] In the above steps, if the algorithm decision is approved, the cloud-based operation and management platform will generate additional algorithm instructions according to the preset signaling format and send them to the camera equipment. If the algorithm decision is rejected, the platform will generate a notification message containing specific reasons and provide feedback to the user through user terminals such as mobile clients, clearly informing them that "the number of simultaneous multi-algorithm activations has reached the device resource limit." This avoids users waiting without their knowledge and provides them with directions for resource optimization (such as disabling some unnecessary algorithms), improving the user experience. The entire process strictly follows the technical logic of "resource matching first," ensuring that algorithm deployment is compatible with the device's carrying capacity. Through differentiated instruction issuance and notification mechanisms, it achieves the effect of precise implementation when deployment is possible and clear notification when deployment is not possible, balancing technical feasibility and user-friendliness, and providing a guarantee for the orderly implementation of simultaneous multi-algorithm activation for cloud AI surveillance cameras.

[0181] This embodiment also provides a device for simultaneously enabling multiple algorithms in a cloud AI surveillance camera. This device is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0182] Figure 7This is a structural block diagram of a cloud AI surveillance camera multi-algorithm simultaneous operation device according to an embodiment of this application, such as... Figure 7 As shown, the device includes:

[0183] The algorithm requirement parsing module 71 is used to respond to the additional algorithm command of the cloud-based operation management platform and parse the algorithm requirement information.

[0184] The algorithm package acquisition module 72 is used to acquire additional algorithm business modules and fusion algorithm detection modules from the cloud operation management platform based on the algorithm requirement information when the camera device has an existing algorithm business module and an existing algorithm detection module loaded. The fusion algorithm detection module includes the detection algorithm corresponding to the existing algorithm detection module and the detection algorithm corresponding to the algorithm requirement information.

[0185] Algorithm detection switching module 73 is used to unload the existing algorithm detection module and load the fusion algorithm detection module;

[0186] The detection result acquisition module 74 uses the existing algorithm business module and the additional algorithm business module to acquire the detection results generated by running the fusion algorithm detection module.

[0187] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination. Specific examples in this embodiment can be found in the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.

[0188] Furthermore, in conjunction with the cloud AI surveillance camera multi-algorithm simultaneous operation method in the above embodiments, this application embodiment can provide a storage medium for implementation. This storage medium stores a computer program; when executed by a processor, the computer program implements any of the cloud AI surveillance camera multi-algorithm simultaneous operation methods in the above embodiments.

[0189] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0190] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0191] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0192] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for simultaneously enabling multiple algorithms in a cloud AI surveillance camera, characterized in that, Applied to camera equipment with integrated cloud middleware; The camera device is connected to a cloud-based operation and management platform, and the method includes: In response to the additional algorithm command from the cloud-based operation and management platform, the algorithm requirement information is parsed and obtained; When the camera device is loaded with an existing algorithm business module and an existing algorithm detection module, the cloud middleware is used to obtain an additional algorithm business module and a fusion algorithm detection module from the cloud operation management platform based on the algorithm requirement information; the fusion algorithm detection module includes the detection algorithm corresponding to the existing algorithm detection module and the detection algorithm corresponding to the algorithm requirement information. Uninstall the existing algorithm detection module and load the fusion algorithm detection module; Using the existing algorithm business module and the additional algorithm business module, the detection results generated by running the fusion algorithm detection module are obtained.

2. The method for simultaneous operation of multiple algorithms in a cloud AI surveillance camera according to claim 1, characterized in that, The step of using the cloud-based middleware to obtain additional algorithm business modules and fusion algorithm detection modules from the cloud-based operation and management platform based on the algorithm requirement information includes: Using the cloud-based middleware, the additional algorithm business module is obtained from and loaded from the cloud-based operation and management platform based on the algorithm requirement information; After the additional algorithm business module is successfully loaded, the cloud middleware is used to obtain the fusion algorithm detection module from the cloud operation management platform.

3. The method for simultaneously operating multiple algorithms in a cloud AI surveillance camera according to claim 2, characterized in that, The step of obtaining the fusion algorithm detection module from the cloud-based operation and management platform using the cloud-based middleware includes: The additional algorithm business module initiates a request to the cloud middleware to obtain the fusion algorithm detection module, and the cloud middleware forwards the request to the cloud operation management platform. In response to the model download instruction from the cloud-based operation and management platform, the fusion algorithm detection module is acquired and loaded.

4. The method for simultaneously enabling multiple algorithms in a cloud AI surveillance camera according to claim 1, characterized in that, The step of using the existing algorithm service module and the additional algorithm service module to obtain the detection results generated by running the fusion algorithm detection module includes: The existing algorithm service module and the additional algorithm service module obtain the detection results generated by running the fusion algorithm detection module through a preset shared memory mechanism; The detection results are transmitted to the cloud middleware, and the cloud middleware is used to report the detection results to the cloud operation management platform.

5. A method for simultaneously enabling multiple algorithms in a cloud AI surveillance camera, characterized in that, The method is applied to a cloud-based operations management platform; the cloud-based operations management platform connects to camera devices integrated with cloud-based middleware, and the method includes: Obtain the available memory and available flash memory reported by the camera device; In response to the user's order for additional algorithms, the peak memory usage and the size of the additional algorithm package are obtained from the algorithm repository of the cloud-based operation management platform. With the cloud-based operation and management platform storing the user's existing algorithm subscription information, an algorithm decision is obtained based on the existing algorithm subscription information, the peak memory usage of the additional algorithm, the size of the additional algorithm package, the available memory, and the available flash memory. Based on the algorithm decision, an additional algorithm instruction is sent to the camera device; The cloud middleware is issued an additional algorithm service module and a fusion algorithm detection module; the fusion algorithm detection module includes a detection algorithm corresponding to the existing algorithm ordering information and a detection algorithm corresponding to the additional algorithm ordering instruction. The cloud-based middleware is used to obtain the detection results reported by the camera device.

6. The method for simultaneously enabling multiple algorithms in a cloud AI surveillance camera according to claim 5, characterized in that, The algorithm decision, based on the existing algorithm ordering information, the peak memory usage of the appended algorithm, the size of the appended algorithm package, the available memory, and the available flash memory, includes: Based on the existing algorithm ordering information, the peak memory usage and package size of the existing algorithm are obtained; Based on the peak memory usage of the existing algorithm, the peak memory usage of the append algorithm, and the available memory, a memory assessment result is obtained; Based on the existing algorithm package size, the appended algorithm package size, and the available flash memory, the flash memory determination result is obtained; The algorithm decision is obtained based on the memory judgment result and the flash memory judgment result.

7. The method for simultaneously operating multiple algorithms in a cloud AI surveillance camera according to claim 6, characterized in that, The algorithm decision, based on the memory assessment result and the flash memory assessment result, includes: If both the memory judgment result and the flash memory judgment result are passed, then the algorithm decision is passed.

8. The method for simultaneously enabling multiple algorithms in a cloud AI surveillance camera according to claim 5, characterized in that, Based on the algorithm decision, an additional algorithm command is sent to the camera device, including: If the algorithm decision is successful, the additional algorithm instruction is sent to the camera device; If the algorithm decides to reject the request, the user is notified that the number of simultaneous multi-path algorithms has reached the device resource limit.

9. A device for simultaneously enabling multiple algorithms in a cloud AI surveillance camera, characterized in that, Applied to camera equipment with integrated cloud middleware; The camera device is connected to a cloud-based operation and management platform, and the device includes: The algorithm requirement parsing module is used to respond to the additional algorithm command from the cloud-based operation and management platform and parse the algorithm requirement information. The algorithm package acquisition module is used to acquire additional algorithm business modules and fusion algorithm detection modules from the cloud operation management platform based on the algorithm requirement information when the camera device is loaded with existing algorithm business modules and existing algorithm detection modules. The fusion algorithm detection module includes the detection algorithm corresponding to the existing algorithm detection module and the detection algorithm corresponding to the algorithm requirement information. An algorithm detection switching module is used to unload the existing algorithm detection module and load the fusion algorithm detection module; The detection result acquisition module uses the existing algorithm business module and the additional algorithm business module to acquire the detection results generated by the fusion algorithm detection module.

10. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the cloud AI surveillance camera multi-algorithm simultaneous operation method according to any one of claims 1 to 8 when running.

Citation Information

Patent Citations

  • Management warehouse for scheduling intelligent analysis algorithm in complex scene, and scheduling method

    CN111126895A

  • Algorithm updating method, system and equipment

    CN113568630A

  • Data deployment method and device based on dynamic memory application and storage medium

    CN119356595A