WO2021218384A1 - 算法更新的方法、系统及设备 - Google Patents

算法更新的方法、系统及设备 Download PDF

Info

Publication number
WO2021218384A1
WO2021218384A1 PCT/CN2021/079430 CN2021079430W WO2021218384A1 WO 2021218384 A1 WO2021218384 A1 WO 2021218384A1 CN 2021079430 W CN2021079430 W CN 2021079430W WO 2021218384 A1 WO2021218384 A1 WO 2021218384A1
Authority
WO
WIPO (PCT)
Prior art keywords
algorithm
modules
module
computing device
chain
Prior art date
Application number
PCT/CN2021/079430
Other languages
English (en)
French (fr)
Inventor
徐青
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021218384A1 publication Critical patent/WO2021218384A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources

Definitions

  • This application relates to the field of communications, and in particular to methods, systems and equipment for algorithm updating.
  • This application provides an algorithm update method, system, and equipment to solve the problem of consuming a lot of human resources and time in the current camera upgrade process.
  • a method for camera upgrade includes the following steps:
  • the computing device receives the first service requirement, and then generates a first algorithm chain for realizing the first service requirement.
  • the first algorithm chain is used to describe the execution sequence of multiple first algorithm modules that execute the first service requirement, and then ,
  • the computing device obtains a part of the algorithm modules in the multiple first algorithm modules locally, and obtains other algorithm modules in the multiple first algorithm modules from the remote algorithm pool, and obtains the multiple first algorithm modules required by the first algorithm chain.
  • the computing device sends the first algorithm chain and multiple first algorithm modules to the terminal device, so that the terminal device executes the multiple first algorithm modules according to the first algorithm chain to realize the first service requirement.
  • the algorithm update method provided in this application, first generate an algorithm chain based on business requirements through a computing device, and download the algorithm module required by the algorithm chain from the algorithm pool, and then send the algorithm chain and algorithm module to the terminal device.
  • the device can execute the above algorithm module according to the algorithm chain to achieve business requirements and complete the algorithm update of the terminal device.
  • the algorithm update method provided in this application can make the algorithm update process of the camera unnecessary
  • the computing device can directly adjust the algorithm chain according to the new business requirements, and then implement the adjusted algorithm chain by calling the module to achieve the business requirements, which greatly reduces the time and human resources required for the camera upgrade process, and has greater scalability.
  • the applicable business scenarios are more extensive.
  • the computing device After the computing device receives a service request that needs to be executed by a terminal device (such as a camera), it generates an algorithm chain that implements the service request.
  • a terminal device such as a camera
  • some of the algorithm modules directly use the local algorithm modules of the computing device.
  • Another part of the algorithm modules (for example, the algorithm modules that cannot be provided locally by the computing device) are obtained from the remote server, so that the algorithm of the camera can be updated, and the existing algorithm module resources of the computing device can be used.
  • the developer generates a complete algorithm package for executing the service request, and then updates the camera from the remote server with the entire algorithm package. Therefore, the prior art neither generates an algorithm chain, nor does it reasonably utilize the local algorithm modules of the computing device. Compared with the prior art, this solution reduces the time and bandwidth resource occupation required for the algorithm update process of the computing device.
  • the foregoing terminal device is a camera
  • the first service requirement includes one of person recognition, face recognition, vehicle recognition, and license plate recognition.
  • the terminal device is a camera
  • the business requirement of camera 1 can be to identify a speeding vehicle and record its license plate number
  • the business requirement of camera 2 can be to identify a vehicle running a red light, and Record its license plate number
  • the remote algorithm pool includes a first algorithm subpool and a second algorithm subpool
  • the computing device obtains other algorithm modules in the multiple first algorithm modules from the remote algorithm pool. Including: First, the computing device sends an acquisition request to the first algorithm sub-pool to acquire other algorithm modules among the multiple first algorithm modules.
  • the computing device receives other algorithm modules in the multiple first algorithm modules sent by the first algorithm subpool, and the other algorithm modules in the multiple first algorithm modules are the first algorithm subpool directly obtained locally from the first algorithm subpool Or, other modules in the multiple first algorithm modules are obtained by the first algorithm sub-pool from the second algorithm sub-pool, or, some of the other algorithm modules in the other algorithm modules in the multiple first algorithm modules are the first
  • the algorithm sub-pool is locally obtained from the first algorithm sub-pool, and some algorithm modules are obtained from the second algorithm sub-pool by the first algorithm sub-pool.
  • the distance between the first algorithm subpool and the foregoing terminal device may also be smaller than the distance between the second algorithm subpool and the foregoing terminal device.
  • the storage device deploying the second algorithm subpool is a cloud server
  • the storage device deploying the first algorithm subpool is an edge computing device.
  • the computing device is connected to the edge computing device, and the edge computing device is connected to the cloud server.
  • the camera algorithm orchestration module can obtain algorithm modules faster, improve the upgrade speed of the entire algorithm update system, and enable the camera to obtain more types of algorithm modules and adapt to business scenarios. More abundant.
  • each algorithm module has multiple versions. Therefore, the foregoing computing device obtains a part of the multiple first algorithm modules locally, and obtains other algorithm modules of the multiple first algorithm modules from the remote algorithm pool, including: the computing device determines the parameter information of the terminal device; The device obtains a part of the plurality of first algorithm modules corresponding to the parameter information from the local At least one of the first algorithm modules has multiple versions.
  • the way to manually edit the algorithm update package according to the business needs to complete the replacement version of the terminal equipment to achieve the business needs is often prone to various hardware conflicts. It requires multiple debugging and modification of the algorithm update package, which consumes a lot of manpower and time.
  • the remote algorithm pool can directly return the parameter information of the terminal device to the algorithm module of the appropriate version, which can ensure that when the calling module on the terminal device executes the above-mentioned multiple first algorithm modules according to the first algorithm chain, There will be no hardware conflicts, which avoids the manpower and time resources consumed by multiple debugging, and improves the efficiency of algorithm updates.
  • the storage device deploying the second algorithm subpool is a cloud server
  • the storage device deploying the first algorithm subpool is an edge computing device
  • the computing device is connected to the edge computing device
  • the edge computing The device is connected to the cloud server.
  • the computing device may maintain a corresponding relationship database, which includes multiple business requirements and the corresponding relationship between the algorithm chains, such as the correspondence between business requirements 1 and business requirements 2.
  • Algorithm chain 1 business requirement 3 corresponds to algorithm chain 2
  • business requirement 4 corresponds to algorithm chain 3 or algorithm chain 4, etc.
  • the computing device can directly query the correspondence database to determine the first algorithm chain corresponding to the first service requirement.
  • the multiple correspondences in the correspondence database may be pre-standardized or generated by machine learning.
  • the advance specification means that developers can understand the business requirements in different business scenarios through questionnaires, role-playing, use of plots, and data statistics, and then design algorithm chains corresponding to various business requirements to obtain a Correspondence library of correspondence between business requirements and algorithm chains.
  • Machine learning refers to the above-mentioned multiple correspondences generated by prior specification as training data, through decision tree algorithm, genetic algorithm, neural network method, Bayesian network method, rough set method, rule induction method, database method and visualization
  • One or more algorithms in the method and so on obtain more correspondences, and generate a correspondence library containing more correspondences.
  • the above-mentioned algorithm examples are for illustration only, and should not constitute a specific limitation.
  • the terminal device executes the above-mentioned multiple first algorithm modules according to the first algorithm chain to achieve the first service requirement, the service scenario of the terminal device changes, and the computing device receives the user Enter the second business requirement, the computing device can continue to generate the second algorithm chain for realizing the second business requirement, and then obtain the multiple second algorithm modules from the multiple first algorithm modules acquired locally and last time Part of the algorithm modules of the second algorithm module is obtained from the remote algorithm pool, and finally the second algorithm chain and multiple second algorithm modules are sent to the terminal device for the terminal device to follow the second algorithm The chain executes multiple second algorithm modules to achieve the second business requirement.
  • the first business requirement before camera 2 is the recognition of the license plate number of the vehicle running through the red light.
  • the first algorithm chain is vehicle detection algorithm module-tracking algorithm module-location recognition algorithm module-license plate recognition algorithm module. It is assumed that both computing equipment and terminal equipment are It is camera 2. As there are always accidents of pedestrians running red lights in this area, camera 2 needs to have the additional function of monitoring and identifying pedestrians running red lights. At this time, there are two second business requirements, namely, red light vehicle license plate number recognition and red light pedestrian identification Recognition.
  • the camera 2 After the camera 2 queries the corresponding relation database, it can obtain the second algorithm chain 1: Vehicle detection algorithm module-tracking algorithm module-location recognition algorithm module-license plate recognition algorithm module, pedestrian identity of the red light vehicle license plate number recognition service
  • the second algorithm chain 2 pedestrian detection algorithm module-tracking algorithm module-face recognition algorithm module.
  • camera 2 already contains multiple first algorithm modules required by algorithm chain 1, so camera 2 You can only obtain the algorithm module corresponding to the algorithm chain 2 from the first algorithm subpool (ie, the edge computing device in Figure 2), so as to load the new algorithm with minimal changes, reduce the communication consumption when the algorithm is updated, and improve the algorithm update s efficiency.
  • the implementation of the above implementation method is compared with the way that developers package all the modules required by the changed business scenario into an algorithm upgrade package, and then implement the algorithm update by performing a complete replacement version of the camera.
  • This application provides The algorithm update method is more convenient and faster, avoiding the waste of human resources and time.
  • an algorithm update system is provided to update the algorithms run by terminal devices.
  • the system includes an algorithm orchestration module, a remote algorithm pool, and a calling module.
  • the algorithm orchestration module is used to receive the first service requirement.
  • the algorithm orchestration module is used to generate a first algorithm chain for realizing the first business requirements, the first algorithm chain is used to describe the execution sequence of multiple first algorithm modules that execute the first business requirements, and the algorithm orchestration module is used to locally Obtain a part of the algorithm modules in the multiple first algorithm modules, and obtain other algorithm modules in the multiple first algorithm modules from the remote algorithm pool.
  • the algorithm orchestration module is used to send the first algorithm chain and multiple first algorithm modules to the calling module.
  • the algorithm module, the calling module is used to execute a plurality of first algorithm modules according to the first algorithm chain, so that the terminal device can realize the first service requirement according to the terminal device.
  • the remote algorithm pool includes a first algorithm subpool and a second algorithm subpool
  • the algorithm orchestration module is configured to send an acquisition request to the first algorithm subpool to acquire multiple second algorithm subpools.
  • Other algorithm modules in an algorithm module the algorithm arrangement module is used to receive other algorithm modules in the plurality of first algorithm modules sent by the first algorithm subpool, where other algorithm modules in the plurality of first algorithm modules are the first
  • the algorithm sub-pool is directly obtained locally from the first algorithm sub-pool, or other modules in the multiple first algorithm modules are obtained from the second algorithm sub-pool by the first algorithm sub-pool, or multiple first algorithm modules
  • Some of the algorithm modules in the other algorithm modules are obtained locally by the first algorithm subpool from the first algorithm subpool, and some algorithm modules are obtained by the first algorithm subpool from the second algorithm subpool.
  • the algorithm orchestration module is used to determine the parameter information of the terminal device; the algorithm orchestration module is used to obtain locally the algorithm modules of a part of the plurality of first algorithm modules corresponding to the parameter information. , Obtain other algorithm modules corresponding to the parameter information in the multiple first algorithm modules from the remote algorithm pool, wherein at least one of the multiple first algorithm modules has multiple versions.
  • the second algorithm subpool is deployed on the cloud server, the first algorithm subpool is deployed on the edge computing device, and the edge computing device is connected to the cloud server; the algorithm orchestration module and the calling module are deployed on The camera, the camera is connected to the edge computing device; or, the algorithm orchestration module is deployed on the edge computing device, and the calling module is deployed on the camera, where the camera is connected to the edge computing device; or, the algorithm orchestration module and the calling module are deployed on the edge computing device.
  • the algorithm orchestration module is also used to receive the second service requirement after sending the algorithm chain and multiple first algorithm modules to the calling module; the algorithm orchestration module is also used to generate The second algorithm chain that realizes the second business requirement.
  • the second algorithm chain is used to describe the execution order of multiple second algorithm modules that execute the second business requirement; the algorithm orchestration module is also used to select from the local and multiple first algorithm modules. Obtain part of the algorithm modules in the multiple second algorithm modules, and obtain other algorithm modules in the multiple second algorithm modules from the remote algorithm pool; the algorithm orchestration module is also used to send the second algorithm chain and multiple first algorithm modules to the calling module Two algorithm modules; the calling module is used to execute multiple second algorithm modules according to the second algorithm chain to achieve the second business requirement.
  • a computer program product including a computer program.
  • the computer program When the computer program is read and executed by a computing device, the method described in the first aspect is implemented.
  • a computer-readable storage medium including instructions, which when run on a computing device, cause the computing device to implement the method described in the first aspect.
  • an electronic device including a processor and a memory, and the processor executes code in the memory to implement the method described in the first aspect.
  • Figure 1 is a schematic structural diagram of an algorithm update system provided by the present application.
  • Figure 2 is an algorithm orchestration module, a calling module, and a remote algorithm pool in an application scenario provided by this application;
  • Figure 3 is a network topology diagram between cameras, edge nodes and central nodes in another application scenario provided by this application;
  • FIG. 4 is a schematic flowchart of an algorithm update method provided by the present application.
  • FIG. 5 is a schematic flowchart of an algorithm update method provided by this application in an application scenario
  • FIG. 6 is a schematic flowchart of the algorithm update method provided by this application in another application scenario
  • Fig. 7 is a schematic structural diagram of an electronic device provided by the present application.
  • smart cameras in the field of video surveillance are constantly evolving towards the direction of intelligence.
  • intelligent analysis is the core function of a smart camera, and its function and performance depend entirely on its embedded algorithms, such as license plate recognition algorithms, traffic behavior analysis algorithms, video quality diagnosis algorithms, and so on.
  • smart cameras in different business scenarios need to load different algorithms. For example, smart cameras at intersections need algorithms that can detect illegal parking, yellow lines, and retrogrades based on the images captured by the camera.
  • the developer When the camera loads the algorithm required by the business scenario for the first time, the developer needs to manually edit the algorithm update package according to the business requirements of the business scenario, and then use the algorithm update package to load the algorithm of the smart camera. This process Not only will it consume a lot of human resources, it will also consume a lot of time.
  • the developer is also required to re-design according to the new business requirements. Write an algorithm update package, and then use the algorithm update package to replace the algorithm package of the original scene of the camera, resulting in a waste of human resources.
  • a road section previously set a no-stop sign.
  • the business needs of the smart camera on this road section include detecting illegal parking, detecting the identity of pedestrians running red lights, and detecting the license plate numbers of vehicles running red lights.
  • the smart camera no longer needs to detect illegal parking, but other requirements (detection of the identity of the pedestrian running the red light and the license plate number of the vehicle running the red light) are still retained.
  • the developer will update the algorithm of the smart camera on the road.
  • the process lacks scalability and cannot directly modify and adjust the original algorithm package, which not only causes a waste of human resources and time.
  • the present application provides an algorithm update system 100.
  • the algorithm orchestration module in the system can generate an algorithm chain according to business requirements, and perform local and remote algorithms.
  • the pool obtains multiple algorithm modules required by the algorithm chain, and then calls the modules to execute the multiple algorithm modules according to the algorithm chain to achieve business requirements and complete the algorithm update of the camera.
  • the algorithm update system Compared with manually generating an algorithm update package according to new business requirements, and using the algorithm update package to replace the algorithm package of the original scene of the camera, the algorithm update system provided in this application can make the algorithm update process of the camera no longer necessary With manual intervention, the algorithm orchestration module can directly adjust the algorithm chain according to the new business needs, and then implement the new business needs by calling the module to execute the adjusted algorithm chain, which greatly reduces the time and human resources required for the camera algorithm update.
  • FIG. 1 is a schematic structural diagram of an algorithm update system 100 provided by the present application.
  • the algorithm update system 100 includes an algorithm orchestration module 110, a remote algorithm pool 120 (for example, an algorithm pool server), and a calling module 130.
  • the system 100 is used to update the algorithms run by the terminal device.
  • the terminal device can be a camera or It can be other embedded devices.
  • the terminal device can also be a chip, a single-chip computer, etc. This application is not specifically limited.
  • the algorithm update system 100 The description of will uniformly take an application scenario where the terminal device is a camera and the algorithm update system 100 is used to update the algorithm of the camera as an example.
  • each module in the algorithm update system 100 can be divided into various types.
  • Each module can be a software module, a hardware module, or a part of a software module and a part of a hardware module.
  • Figure 1 is only an exemplary division. Method, this application does not restrict it.
  • the algorithm orchestration module 110 is configured to receive a first business requirement, and then generate a first algorithm chain for realizing the first business requirement, and the first algorithm chain is used to describe the execution of multiple first algorithm modules that execute the business requirement Sequentially, a part of the algorithm modules of the plurality of first algorithm modules are obtained locally, and other algorithm modules of the plurality of first algorithm modules are obtained from the remote algorithm pool 120. After the algorithm orchestration module 110 obtains the multiple first algorithm modules required by the first algorithm chain through the local and remote algorithm pools 120, it may send the foregoing first algorithm chain and multiple first algorithm modules to the calling module 130 to The calling module executes multiple first algorithm modules according to the first algorithm chain to achieve the first business requirement.
  • the first algorithm chain is a combination of a series of algorithms composed of multiple first algorithm modules, and is used to complete the complete algorithm function of the first business requirement.
  • Algorithm Module is the smallest unit that completes the function of a single algorithm. For example, if the first business requirement is to monitor vehicles on the road and identify the license plate number of the speeding vehicle, then the first algorithm chain can be vehicle detection algorithm module-tracking algorithm module-location recognition algorithm module-license plate recognition algorithm module And so on, that is, first detect the vehicles in each frame of image, and then detect the trajectory of each vehicle, calculate whether it is speeding, and then identify the position of the license plate of the speeding vehicle, and then identify the license plate number. It should be understood that the above algorithm chain is used for illustration and does not constitute a specific limitation.
  • the remote algorithm pool 120 is used to store various algorithm modules.
  • the algorithm orchestration module 110 may return the above-mentioned first algorithm module to the algorithm orchestration module.
  • Other algorithm modules in an algorithm module Still taking the above example as an example, if the business requirement is to monitor vehicles on the road and identify the license plate number of the speeding vehicle, the algorithm orchestration module 110 generates an algorithm chain: vehicle detection algorithm module-tracking algorithm module-location recognition algorithm module-license plate Recognition algorithm module. If the algorithm orchestration module 110 does not have these four algorithm modules locally, the algorithm orchestration module 110 will send to the remote algorithm pool 120 to obtain vehicle detection algorithm modules, tracking algorithm modules, location recognition algorithm modules, and license plate recognition algorithm modules. Upon request, the remote algorithm pool 120 may return the aforementioned vehicle detection algorithm module, tracking algorithm module, position recognition algorithm module, and license plate recognition algorithm module to the algorithm orchestration module 110 according to the request.
  • the remote algorithm pool 120 not only stores multiple algorithm modules, which are suitable for various application scenarios, and each algorithm module also has multiple versions, and each version is suitable for different hardware environments, such as vehicle detection.
  • the algorithm modules of can include high/low precision version, high/low resource overhead version, high/low accuracy version, high/low stability version, etc.
  • Table 1 shows a remote algorithm pool 120 storage It should be understood that Table 1 is only for illustration, and this application does not limit the possible versions of algorithm modules.
  • the algorithm orchestration module 110 when it obtains some of the above-mentioned multiple first algorithm modules from the remote algorithm pool 120, it can also send the parameter information of the terminal device where the calling module 130 is located to the remote algorithm pool 120 at the same time.
  • the remote algorithm pool 120 may return a proper version of the algorithm module according to the above parameter information.
  • the first business requirement is to monitor vehicles on the road and identify the license plate numbers of speeding vehicles.
  • the first algorithm chain is vehicle detection algorithm module-tracking algorithm module-location recognition algorithm module-license plate recognition algorithm module If the calling module 130 is deployed on a camera A, the chip in the camera A is a low-end chip, and the hardware processing capability is very poor.
  • the algorithm modules in the remote algorithm pool 120 are as shown in Table 1, then the remote algorithm pool 120
  • the algorithm modules finally returned to the algorithm orchestration module 110 may be: low-precision version vehicle detection algorithm module V1.2, low-precision version tracking algorithm module V5.2, low-overhead version location recognition algorithm module V3.4, and low-overhead version license plate Recognition algorithm module V4.4.
  • the remote algorithm pool 120 returns a proper version of the algorithm module according to the parameter information of the terminal device where the calling module is located, which can ensure that when the calling module executes the algorithm chain, the problem of hardware conflicts after the algorithm update is avoided, and the efficiency of the algorithm update is improved.
  • the above examples are only for illustration, and do not constitute a specific limitation.
  • Table 1 An example table of algorithm modules stored in the remote algorithm pool 120
  • the algorithm module can be stored in the remote algorithm pool 120 and the algorithm orchestration module 110 locally in the form of various dynamic link libraries (DLL) and configuration files, such as executable and linkable formats (Executable and Linkable). Format (ELF) dynamic link library, XML configuration file, shared object (Shared Object, SO) format dynamic link library, etc., may also include other formats of dynamic link library, and this application does not specifically limit it.
  • DLL dynamic link libraries
  • configuration files such as executable and linkable formats (Executable and Linkable).
  • ELF executable and linkable formats
  • XML configuration file such as shared object (Shared Object, SO) format dynamic link library, etc.
  • SO shared Object
  • the calling module 130 is configured to receive the first algorithm chain and multiple first algorithm modules sent by the algorithm orchestration module 110, and execute the multiple first algorithm modules according to the above first algorithm chain to realize the first service requirement and complete the algorithm update.
  • the calling module can execute multiple first algorithm modules in series according to the first algorithm chain to achieve business requirements, or execute multiple algorithm modules in parallel to achieve business requirements, or it can execute multiple first algorithm modules in series or partially in parallel to achieve business requirements.
  • multiple first algorithm modules can be executed according to the execution order in the algorithm chain, which is not specifically limited in this application.
  • the calling module 130 is a module that implements business requirements and is also a module that actually executes algorithms.
  • each module in the algorithm update system 100 provided in the present application is flexible.
  • the deployment principles of the three modules are described below: the algorithm orchestration module 110 can be deployed on any camera or node that can input service requirements; the algorithm pool 120 can be deployed on a camera or node with sufficient storage capacity; the calling module 130 needs to be deployed on On the camera or node that actually executes the algorithm. Therefore, in combination with the actual situation of the business scenario, each module can be deployed on the same camera, or on the same node, or partly on the camera and partly on the node, which is not specifically limited in this application.
  • the calling module 130 needs to be deployed on the camera. If the business requirement is that the camera sends the captured image to the node for face recognition, Then the calling module 130 needs to be deployed on the node that executes the face recognition algorithm.
  • the algorithm programming module 110 can also be deployed on the camera; when the calling module 130 is on a certain node, the algorithm programming module can also be deployed on the node, thereby reducing algorithm programming.
  • the communication overhead of the first algorithm chain and multiple first algorithm modules is transmitted between the module 110 and the calling module 130, so as to improve the speed of the camera algorithm update.
  • the algorithm orchestration module 110 can be located On the node, the calling module 130 is located on the camera. It should be understood that the above examples are only for illustration and cannot constitute a specific limitation.
  • nodes can be general physical servers, such as X86 servers, etc., or virtual machines (Virtual Machines, VMs) based on general physical servers combined with Network Functions Virtualization (NFV) technology.
  • VMs Virtual Machines
  • NFV Network Functions Virtualization
  • the virtual machine refers to a function of a complete hardware system, a complete computer system running software simulation in a completely isolated environment, the present application is not specifically defined.
  • nodes can be divided into edge nodes and central nodes.
  • the edge node is connected to the central node.
  • the edge node may be an edge computing device that is geographically close to the computing device used to deploy the algorithm orchestration module 110 and used to provide computing, storage, and communication resources, such as edge computing devices located on both sides of a road.
  • the central node 130 may be a single computing device or a cluster of computing devices, such as a cloud server, that is far away from the computing device used to deploy the algorithm orchestration module 110 in terms of geographic location, and used to provide computing, storage, and communication resources, such as a cloud server.
  • the software system can be distributed on multiple servers, or Distributed deployment on multiple virtual machines, or distributed deployment on virtual machines and servers.
  • two cameras, camera 1 and camera 2 are installed at the intersection to monitor the intersection.
  • the edge node can be an edge computing device closer to the intersection as shown in Figure 2.
  • the node may be a cloud server in a data center far away from the intersection. It should be understood that the above example is only for illustration and does not constitute a specific limitation.
  • the algorithm pool 120 includes a first algorithm subpool and a second algorithm subpool.
  • the first algorithm subpool is deployed on the aforementioned edge node, such as an edge computing device
  • the second algorithm subpool is deployed on the aforementioned central node, such as Cloud server, after the algorithm orchestration module 110 generates the first algorithm chain, it can first obtain other algorithm modules in the first algorithm module from the edge computing device. If the edge computing device does not have the algorithm modules required by the algorithm orchestration module 110, the edge The computing device may then obtain other algorithm modules in the above-mentioned first algorithm module from the cloud server, and then return the obtained algorithm modules to the algorithm orchestration module 110.
  • the edge computing device of the edge computing device can directly return the above four modules to the algorithm orchestration module to complete the rapid upgrade of the camera; if the edge computing device has only the edge computing device Algorithm modules A and D, then the edge computing device can also go to the central node, which is far away from the camera.
  • the server in a certain data center in Figure 2 obtains the algorithm modules C and D, and then obtains the obtained algorithm modules C and D. Together with the local algorithm modules A and B, they are sent to the algorithm orchestration module on camera 1.
  • the algorithm orchestration module sends the algorithm chain ABCD and algorithm modules A, B, C, and D to the calling module, so that the calling module on camera 1 is based on
  • the algorithm chain and algorithm module connect multiple algorithm modules in series according to the algorithm chain and start the algorithm chain, so as to realize the business requirements and complete the upgrade of camera 1. Similarly, the upgrade of camera 2 can be completed, so I will not repeat it here.
  • the second algorithm subpool deployed on the central node can store all the algorithm modules that may be used in the camera's business scenarios, and the first algorithm subpool deployed on the edge node can be based on the location of the camera communicating with it.
  • Business scenario storing some algorithm modules commonly used in the business scenario.
  • the multi-level deployment of algorithm sub-pools can make the algorithm orchestration module 110 obtain algorithm modules faster, improve the upgrade speed of the entire algorithm update system, and enable the algorithm orchestration module 110 to obtain more types of algorithm modules. , The applicable business scenarios are more abundant.
  • a central node with a larger storage capacity and a distance from the camera can be used to deploy the second algorithm subpool 3.
  • the second algorithm subpool 3 stores all possible services of cameras 1 to 4 All the algorithm modules required by demand, edge node 1 and edge node 2 with smaller storage capacity and closer to the camera can be used to deploy the first algorithm subpool 1 and the first algorithm subpool 2.
  • the first algorithm subpool 1 And the first algorithm subpool 2 stores part of the algorithm modules in the second algorithm subpool 3.
  • the first algorithm subpool 1 can be based on the business scenario A of the camera 1 and camera 2 connected to it, from the second algorithm subpool Some algorithm modules related to business scenario A are downloaded and stored in pool 3.
  • the first algorithm subpool 2 can be based on the business scenario B of camera 3 and camera 4 connected to it, download and store some from the second algorithm subpool 3 Algorithm module related to business scenario B.
  • the algorithm on the camera 1 may first obtain the multiple first algorithm modules from the edge node 1 that is closer to the camera 1. If the first algorithm subpool 1 on the edge node 1 stores the multiple first algorithm modules, the edge node 1 may Return the above-mentioned multiple first algorithm modules directly to the camera 1.
  • the edge node 1 can obtain from the central node, the edge node 1 For some algorithm modules that are not on the above, finally the edge node 1 can send the multiple first algorithm modules to the algorithm orchestration module 110 of the camera 1, so that it can send the multiple first algorithm modules and the first algorithm chain to the camera 1.
  • the algorithm update system 100 can flexibly deploy the algorithm orchestration module 110, the first algorithm subpool, the second algorithm subpool, and the invoking module 130 in combination with specific application scenarios, so that the algorithm orchestration module 110 can obtain the information of the algorithm modules.
  • the speed is faster, and the upgrade speed of the entire algorithm update system 100 is improved.
  • the second algorithm sub-pool is usually deployed at a central node, such as a cloud server, and the first algorithm sub-pool is usually deployed at the edge. Nodes, such as edge computing devices.
  • the algorithm orchestration module 110 and the invocation module 130 can both be deployed on the camera, which is connected to the edge computing device, or the algorithm orchestration module 110 can be deployed on the edge computing device, and the invocation module 130 can be deployed on the camera, where the camera is connected to the edge computing device. If the edge computing device is connected, the algorithm orchestration module 110 and the calling module 130 can all be deployed on the edge computing device.
  • Table 2 below shows the possible deployment schemes of the algorithm orchestration module 110, the first algorithm subpool, the second algorithm subpool, and the calling module 130. It should be understood that Table 2 is only used for illustrative purposes and satisfies the deployment principles described in the foregoing content. Any scheme belongs to the protection scope of the scheme of this application, and will not be listed here.
  • the algorithm orchestration module 110 receives the second service requirement after the invoking module 130 executes the multiple first algorithm modules according to the first algorithm chain to achieve the first service requirement
  • the algorithm orchestration module 110 is also used for Generate a second algorithm chain for realizing the above-mentioned second business requirements, and then obtain part of the above-mentioned multiple second algorithm modules from the above-mentioned multiple first algorithm modules obtained locally and from the remote algorithm
  • the pool acquires other algorithm modules in the multiple second algorithm modules, and finally sends the second algorithm chain and the multiple second algorithm modules to the invoking module 130, so that the invoking module 130 executes the multiple second algorithm modules in accordance with the second algorithm chain.
  • the second algorithm module realizes the second business requirement.
  • the algorithm orchestration module 110 since the algorithm orchestration module 110 has already acquired multiple first algorithm modules before receiving the second service requirement, if the previously acquired multiple first algorithm modules happen to include the foregoing multiple second algorithm modules, the algorithm orchestration module 110 The module 110 may no longer obtain algorithm modules from the remote algorithm pool 120, and directly send the above-mentioned multiple second algorithm modules to the invoking module 110 to achieve the second service requirement. For example, if the plurality of first algorithm modules are: module A, module B, and module C, and the plurality of second algorithm modules are: module B and module C, then the algorithm orchestration module 110 may no longer obtain from the remote algorithm pool 120 The algorithm module directly sends the module B and module C to the calling module 130 to execute the module B and module C according to the second algorithm chain to realize the second business requirement.
  • the embodiments in Figures 1 to 3 are described by taking the terminal device as a camera as an example.
  • devices such as single-chip microcomputers and chips with small storage capacity but also need to load algorithms to achieve various business requirements. It can be applied to the algorithm update system provided by this application.
  • the algorithm orchestration module on the edge node After the algorithm orchestration module on the edge node generates an algorithm chain according to business requirements, it sends the obtained algorithm module (either locally obtained by the edge node or obtained from the central node) and the algorithm chain to the single-chip microcomputer for use Its execution makes the algorithm update of the single-chip microcomputer without manual intervention, the time and human resources required for the algorithm update are greatly reduced, the scalability is stronger, and the applicable business scenarios are more extensive.
  • the above examples are only for illustration, and the specific implementation in other application scenarios will not be repeated here.
  • the algorithm update system provided by this application, through the algorithm orchestration module, generate an algorithm chain according to business needs, and obtain the algorithm module required by the algorithm chain from the local and multiple algorithm subpools, and then call the module, Call the algorithm chain to implement business functions and complete the camera upgrade.
  • the algorithm update system provided in this application can make the algorithm update process of the camera no longer necessary
  • the algorithm orchestration module can directly adjust the algorithm chain according to the new business requirements, and then implement the adjusted algorithm chain by calling the module to realize the new business requirements, which greatly reduces the time and human resources required for the algorithm update process, and has more scalability.
  • the algorithm update method can be applied to the algorithm update system 100 shown in FIG. 1, and the method is used to update the algorithm run by the terminal device.
  • the terminal device is the device on which the aforementioned calling module 130 is deployed. Specifically, it may be a camera or other embedded devices.
  • the terminal device may also be a chip, a single-chip microcomputer, etc., and this application will not make specific details. Limited, in order to facilitate a better understanding of the present application, the following description of the algorithm update method will uniformly take an application scenario where the terminal device is a camera and the algorithm update is performed on the camera as an example.
  • the algorithm update method provided by this application includes the following steps:
  • the computing device receives the first service requirement.
  • the computing device is used to deploy the algorithm orchestration module 110 of the foregoing content, which may specifically be the camera in the foregoing content, or may be an edge computing device, which is not specifically limited in this application.
  • the computing device that deploys the algorithm orchestration module 110 and the terminal device that deploys the invocation module 130 may be the same device, for example, the computing device is an edge.
  • the computing device, the terminal device is a camera, or different devices.
  • the computing device and the edge device are the same camera, which is not specifically limited in this application.
  • the above-mentioned first business requirement includes one of person recognition, face recognition, vehicle recognition, and license plate recognition.
  • the business requirement of camera 1 can be to identify a speeding vehicle and record its license plate number
  • the business requirement of camera 2 can be to identify a vehicle running a red light and record its license plate number.
  • S420 The computing device generates a first algorithm chain for realizing the foregoing first service requirement, where the first algorithm chain is used to describe an execution sequence of multiple first algorithm modules that execute the foregoing first service requirement.
  • the first business requirement of camera 2 can be to identify a vehicle running a red light and record its license plate number
  • the algorithm chain that the algorithm orchestration module can generate according to the business requirement is: Vehicle detection algorithm module-tracking algorithm module-location recognition algorithm module-license plate recognition algorithm module, that is, the vehicle detection algorithm module first detects the vehicle in each frame of the image during the red light period, and then the tracking algorithm module detects each The driving track of the vehicle is determined by the vehicle running the red light, and then the vehicle running the red light is recognized by the position recognition algorithm module, and finally the license plate number is recognized by the license plate recognition algorithm module.
  • the above-mentioned first algorithm chain is used for illustration and does not constitute a specific limitation.
  • the computing device can maintain a corresponding relationship database, which includes multiple business requirements and the corresponding relationships between algorithm chains.
  • business requirement 1 and business requirement 2 correspond to algorithm chain 1
  • business requirement 3 corresponds to algorithm.
  • Chain 2 business demand 4 corresponds to algorithm chain 3 or algorithm chain 4, etc.
  • the computing device can directly query the corresponding relationship database to determine the first algorithm chain corresponding to the first business demand.
  • the multiple correspondences in the correspondence database may be pre-standardized or generated by machine learning.
  • the prior specification means that developers can understand the business requirements in different business scenarios through questionnaires, role-playing, use of plots, and data statistics, and then design algorithm chains corresponding to various business requirements to obtain a Correspondence library of correspondence between business requirements and algorithm chains.
  • Machine learning refers to the above-mentioned multiple correspondences generated by prior specification as training data, through decision tree algorithm, genetic algorithm, neural network method, Bayesian network method, rough set method, rule induction method, database method and visualization
  • One or more algorithms in the method and so on obtain more correspondences, and generate a correspondence library containing more correspondences.
  • the above-mentioned algorithm examples are for illustration only, and should not constitute a specific limitation.
  • the computing device may also perform natural language processing such as semantic recognition and associated word recognition on the first business requirement, and then determine the relationship with the first business requirement. For business requirements with similar requirements, search for the algorithm chain corresponding to the approximate business requirements in the correspondence database, and then simply adjust the algorithm chain to obtain the first algorithm chain corresponding to the first business requirement.
  • the computing device can search and "recognize red light running in the correspondence database"
  • the algorithm chain corresponding to the business requirement of "the vehicle license plate number” is obtained as: vehicle detection algorithm module-tracking algorithm module-location recognition algorithm module-license plate recognition algorithm module, and then obtain the above from the algorithm pool 120 A small-capacity version of the four modules to obtain the first algorithm chain corresponding to the first business requirement. It is also possible to set the connection relationship of some algorithm modules to infer the first algorithm chain corresponding to the first service requirement based on the connection relationship.
  • the algorithm chain corresponding to the first business requirement can be ABCEF . It should be understood that the above examples are only for illustration and cannot constitute a specific limitation.
  • the computing device obtains a part of the algorithm modules of the plurality of first algorithm modules locally, and obtains other algorithm modules of the plurality of first algorithm modules from a remote algorithm pool.
  • a remote algorithm pool For the description of the remote algorithm pool, reference may be made to the description of the algorithm pool 120 in the embodiments in FIG. 1 to FIG. 3, and details are not repeated here.
  • the computing device can obtain other algorithm modules that are locally missing among the multiple first algorithm modules from the remote algorithm pool. Thereby, the communication consumption required in the process of obtaining multiple first algorithm modules is reduced, and the algorithm update speed is improved.
  • each algorithm module has multiple versions. Therefore, the foregoing computing device obtains a part of the multiple first algorithm modules locally, and obtains other algorithm modules of the multiple first algorithm modules from the remote algorithm pool, including: the computing device determines the parameter information of the terminal device; The device obtains a part of the plurality of first algorithm modules corresponding to the parameter information from the local At least one of the first algorithm modules has multiple versions.
  • the above-mentioned first service requirement is: each frame of image captured by camera 1 is transmitted to node 1 to identify the license plate number, that is, the terminal device that deploys the calling module is node 1, and the computing device that deploys the algorithm orchestration module It is camera 1, then after the computing device receives the first business demand, it can obtain the first algorithm chain corresponding to the first business demand by querying the corresponding relationship database: vehicle detection algorithm module-position recognition module-license plate recognition module, assuming calculation If the device does not have the above four algorithm modules, the computing device can send the request to obtain the vehicle detection algorithm module, location recognition module, and license plate recognition module to the algorithm pool, and at the same time send the camera parameter information (such as the resolution of the captured picture) to the node
  • the parameter information of 1 (for example, the current resource occupancy rate of node 1 is high) is sent to the remote algorithm pool.
  • the remote algorithm pool can combine the low-overhead version of the vehicle detection algorithm module, the low-overhead version of the location recognition module, and the low-overhead version.
  • the license plate recognition module is sent to the computing device, so as to ensure that the normal operation of node 1 can be ensured after the algorithm upgrade of the node, and other services of node 1 will not be affected. It should be understood that the above examples are only for illustration and cannot constitute a specific limitation.
  • the way to manually edit the algorithm update package according to the business needs to complete the replacement version of the terminal equipment to achieve the business needs is often prone to various hardware conflicts. It requires multiple debugging and modification of the algorithm update package, which consumes a lot of manpower and time.
  • the remote algorithm pool can directly return the parameter information of the terminal device to the algorithm module of the appropriate version, which can ensure that when the calling module on the terminal device executes the above-mentioned multiple first algorithm modules according to the first algorithm chain, There will be no hardware conflicts, which avoids the manpower and time resources consumed by multiple debugging, and improves the efficiency of algorithm updates.
  • the computing device sends the first algorithm chain and the multiple first algorithm modules to the terminal device, so that the terminal device can execute the multiple first algorithm modules according to the first algorithm chain to realize the first service requirement.
  • the terminal device can be used to deploy the calling module 130 in the foregoing content.
  • the remote algorithm pool includes a first algorithm subpool and a second algorithm subpool
  • the computing device obtains a plurality of first algorithm modules from the remote algorithm pool.
  • Other algorithm modules include: the computing device sends an acquisition request to the first algorithm subpool to acquire other algorithm modules in the multiple first algorithm modules; the computing device receives the other algorithm modules in the multiple first algorithm modules sent by the first algorithm subpool Algorithm module, where other algorithm modules in the plurality of first algorithm modules are directly obtained locally by the first algorithm subpool from the first algorithm subpool, or other modules in the plurality of first algorithm modules are the first algorithm subpool.
  • the pool is obtained from the second algorithm subpool, or some of the other algorithm modules in the multiple first algorithm modules are locally obtained by the first algorithm subpool from the first algorithm subpool, and some of the algorithm modules are the first algorithm module.
  • the algorithm subpool is obtained from the second algorithm subpool.
  • the computing device sends a request for N first algorithm modules (N is a positive integer) to the first algorithm subpool, if there are these N first algorithm modules in the first algorithm subpool, it can Return the N first algorithm modules directly to the computing device; if there are only M of the N first algorithm modules in the first algorithm subpool (M ⁇ N, M is a natural number), then the first algorithm The subpool may obtain the remaining (NM) first algorithm modules from the second algorithm subpool, and then return these (NM) first algorithm modules together with the local M first algorithm modules to the computing device.
  • the distance between the first algorithm subpool and the foregoing terminal device is smaller than the distance between the second algorithm subpool and the foregoing terminal device.
  • the storage device deploying the second algorithm subpool is a cloud server
  • the storage device deploying the first algorithm subpool is an edge computing device.
  • the computing device is connected to the edge computing device, and the edge computing device is connected to the cloud server.
  • FIG. 2 and FIG. 3 Reference may be made to the embodiments in FIG. 2 and FIG. 3, and details are not repeated here. It is understandable that by deploying the algorithm pool at multiple levels in this way, the computing device can acquire algorithm modules faster, the types of algorithm modules that can be acquired are more complete, and the applicable business scenarios are more extensive.
  • the terminal device executes the multiple first algorithm modules according to the first algorithm chain to achieve the first service requirement
  • the service scenario of the terminal device changes, and the computing device receives the second service requirement input by the user
  • the computing device can continue to generate the second algorithm chain for realizing the second business requirement, and then obtain a part of the multiple second algorithm modules from the multiple first algorithm modules obtained locally and last time, and then
  • the remote algorithm pool acquires other algorithm modules among multiple second algorithm modules, and finally sends the second algorithm chain and multiple second algorithm modules to the terminal device for the terminal device to execute multiple second algorithms according to the second algorithm chain
  • the module fulfills the second business requirement.
  • the first business requirement before the camera 2 shown in Figure 2 is the recognition of the license plate number of the vehicle running through the red light
  • the first algorithm chain is vehicle detection algorithm module-tracking algorithm module-location recognition algorithm module-license plate recognition algorithm module
  • the second algorithm chain corresponding to the business needs of red light vehicle license plate number recognition can be obtained: vehicle detection algorithm module-tracking algorithm module-location recognition algorithm module- License plate recognition algorithm module, the second algorithm chain 2: pedestrian detection algorithm module-tracking algorithm module-face recognition algorithm module corresponding to the business needs of pedestrian identification through red light.
  • camera 2 already contains multiple required by algorithm chain 1.
  • the first algorithm module so the camera 2 can only obtain the algorithm module corresponding to the algorithm chain 2 from the first algorithm subpool (ie, the edge computing device in Fig. 2), so as to load the new algorithm with minimal changes and reduce the time when the algorithm is updated. Increase the efficiency of algorithm update.
  • the algorithm update method provided by this application is more convenient and faster , To avoid the waste of human resources and time.
  • the terminal device can execute the above algorithm module according to the algorithm chain to achieve business requirements and complete the algorithm update of the terminal device.
  • the algorithm update method provided in this application can make the algorithm update process of the camera unnecessary
  • computing equipment can directly adjust the algorithm chain according to new business requirements, and then execute the adjusted algorithm chain by calling the module to achieve business requirements, which greatly reduces the time and human resources required for the algorithm update process, and makes it more scalable.
  • the applicable business scenarios are more extensive.
  • the computing device After the computing device receives a service request that needs to be executed by a terminal device (such as a camera), it generates an algorithm chain that implements the service request.
  • a terminal device such as a camera
  • some of the algorithm modules directly use the local algorithm modules of the computing device.
  • Another part of the algorithm modules (for example, the algorithm modules that cannot be provided locally by the computing device) are obtained from the remote server, so that the algorithm of the camera can be updated, and the existing algorithm module resources of the computing device can be used.
  • the developer generates a complete algorithm package for executing the service request, and then updates the camera from the remote server with the entire algorithm package. Therefore, the prior art neither generates an algorithm chain, nor does it reasonably utilize the local algorithm modules of the computing device. Compared with the prior art, this solution reduces the time and bandwidth resource occupation required for the algorithm update process of the computing device.
  • the computing device and terminal device are both cameras, that is, the algorithm orchestration module 110 and the calling module 130 are both deployed on the cameras, the first algorithm subpool is located on the edge computing device, and the second algorithm subpool is located on the cloud server Take the application scenario of as an example to illustrate the algorithm update method provided in this application.
  • camera 1 shoots an intersection and directly processes the captured images, such as pedestrian identification, vehicle license plate recognition, etc.
  • the camera deployed with the algorithm programming module and calling module can be as shown in Figure 2.
  • the edge computing device deployed with the first algorithm subpool may be the edge computing device shown in FIG. 2
  • the cloud server deployed with the second algorithm subpool may be in the data center as shown in FIG.
  • a cloud server, as shown in Figure 5 uses the algorithm update method provided in this application to update the algorithm of the camera 1 in the scene.
  • the process can be as follows:
  • Step 51 The algorithm programming module of the camera 1 receives the business requirements, that is, recognizes the license plate number of the vehicle running the red light. For details, refer to step S410 in the foregoing content, and details are not described here.
  • Step 52 The algorithm orchestration module of the camera 1 generates a corresponding algorithm chain S1 according to business requirements, that is, vehicle detection algorithm module A-tracking algorithm module B-position recognition algorithm module C-license plate recognition algorithm module D.
  • the algorithm orchestration module can query the corresponding relationship library to obtain the algorithm chain corresponding to the business requirement.
  • the corresponding relationship library refer to step S420 in the foregoing content, which will not be repeated here.
  • Step 53 The algorithm orchestration module of camera 1 determines the locally lacking license plate recognition algorithm module D among the algorithm modules required by the algorithm chain S1, and sends a request for obtaining the license plate recognition algorithm module D to the edge computing device, and the request includes the camera 1 parameter information.
  • camera 1 receives the new service requirement in step S51 and generates the above algorithm chain according to the service requirement.
  • step S1 it can be determined whether the vehicle detection algorithm module A, tracking algorithm module B, position recognition algorithm module C, and license plate recognition algorithm module D are stored in the machine first, and then obtain the algorithm modules that the machine does not have from the first algorithm subpool.
  • the previous business requirement of camera 1 is only to take photos of the license plate of a vehicle running a red light
  • the algorithm chain before camera 1 is vehicle detection algorithm module A-tracking algorithm module B-location recognition algorithm module C
  • camera 1 can only The first algorithm subpool acquires the license plate recognition algorithm module D, without repeatedly acquiring the vehicle detection algorithm module A, the tracking algorithm module B, and the position recognition algorithm module C, thereby reducing the amount of data transmission and improving the algorithm update speed.
  • the algorithm orchestration module of camera 1 receives the business requirements and generates the corresponding ones according to the business requirements.
  • all the algorithm modules required by the algorithm chain can be obtained directly from the first algorithm subpool, namely the vehicle detection algorithm module A, the tracking algorithm module B, the position recognition algorithm module C, and the license plate recognition algorithm module D.
  • Figure 5 is based on the example that camera 1 has locally acquired vehicle detection algorithm module A, tracking algorithm module B, and location recognition algorithm module C. Therefore, at step 53, the algorithm layout module of camera 1 is sent to the edge computing device on the edge computing device.
  • the first algorithm subpool obtains the license plate recognition algorithm module D.
  • Step 54 The first algorithm subpool determines that the license plate recognition algorithm module D is not included locally, and sends a request for obtaining the license plate recognition algorithm module D to the second algorithm subpool on the cloud server.
  • the request includes the parameter information of the camera 1.
  • the first algorithm subpool can directly send the algorithm module D to the algorithm arrangement module of the camera 1. If the first algorithm subpool contains the license plate recognition algorithm module D, but does not contain the license plate recognition algorithm module D corresponding to the parameter information of the camera 1, the first algorithm subpool can still send to the second algorithm subpool to obtain the license plate recognition algorithm
  • the request of module D the request contains the parameter information of camera 1.
  • Step 55 The second algorithm subpool determines the corresponding version of the license plate recognition algorithm module D1 according to the parameter information of the camera 1, and sends the license plate recognition algorithm module D1 to the first algorithm subpool, and the first algorithm subpool receives the license plate recognition algorithm Module D1.
  • Step 56 The first algorithm subpool sends the received license plate recognition algorithm module D1 to the algorithm arrangement module of the camera 1.
  • the algorithm arrangement module of the camera 1 receives the license plate recognition algorithm module D1. It is understandable that the first algorithm subpool can store the module D1 for other cameras to obtain the module.
  • Step 57 The algorithm arrangement module of the camera 1 sends the algorithm chain S1 and all corresponding algorithm modules (that is, the vehicle detection algorithm module A, the tracking algorithm module B, the position recognition algorithm module C, and the license plate recognition algorithm module D1) to the calling module.
  • algorithm modules that is, the vehicle detection algorithm module A, the tracking algorithm module B, the position recognition algorithm module C, and the license plate recognition algorithm module D1
  • Step 58 The calling module of camera 1 executes the vehicle detection algorithm module A, tracking algorithm module B, position recognition algorithm module C, and license plate recognition algorithm module D1 according to the algorithm chain S1, and realizes that the algorithm arrangement module of camera 1 receives in step 51 Business needs.
  • Step 59 The invocation module of camera 1 feeds back information of successful invocation to the algorithm orchestration module, and the algorithm update of camera 1 is completed.
  • the developer needs to generate a complete algorithm update package according to the new business requirements, which contains the algorithm module AD, and then install the update package to the camera and replace it. Remove the previous update package.
  • camera 1 only adjusts the algorithm chain, and therefore only obtains one algorithm module D from the first algorithm subpool.
  • the entire upgrade process not only requires no manual intervention, reduces the waste of human resources, but also Makes the upgrade process faster, reduces the amount of communication, and reduces the upgrade cost.
  • the camera's algorithm orchestration module can obtain various algorithm modules faster, improve the upgrade speed of the entire algorithm update system, and enable the camera to obtain more types of algorithm modules. , The applicable business scenarios are more abundant.
  • the computing device and terminal device that is, the algorithm orchestration module, the calling module, and the first algorithm subpool are located on the edge computing device, and the second algorithm subpool is located on the cloud server as an example, the algorithm provided in this application
  • the update method is illustrated by an example.
  • camera 1 and camera 2 photograph the intersection and send the captured images to the edge computing device for processing, such as pedestrian identification, vehicle license plate recognition, etc., and deploy algorithm programming module, calling module and
  • the edge computing device of the first algorithm subpool may be the edge computing device on the side of the road closer to the camera as shown in FIG. 2, and the cloud server deployed with the second algorithm subpool may be the data shown in FIG. 2.
  • a server in the center, as shown in Fig. 6, uses the algorithm update method provided by this application to update the algorithm of camera 1 and camera 2 in the scene.
  • the procedure can be as follows:
  • Step 61 The algorithm orchestration module of the edge computing device receives the business requirement, that is, recognizes the license plate number of the vehicle running the red light. For details, reference may be made to step S410 and step 51 in the foregoing content, and details are not repeated here.
  • Step 62 The algorithm orchestration module of the edge computing device generates a corresponding algorithm chain S1 according to business requirements, that is, vehicle detection algorithm module A-tracking algorithm module B-location recognition algorithm module C-license plate recognition algorithm module D.
  • the algorithm orchestration module can input business requirements into the algorithm model to obtain the corresponding algorithm chain. For the method of obtaining the algorithm model, refer to step S420 in the foregoing content, which will not be repeated here.
  • Step 63 The algorithm orchestration module of the edge computing device obtains the algorithm modules required by the algorithm chain S1 from the local first algorithm sub-pool, and determines that the locally lacking algorithm module is: the license plate recognition algorithm module D.
  • the algorithm orchestration module of the edge computing device obtains the algorithm modules required by the algorithm chain S1 from the local first algorithm sub-pool, and determines that the locally lacking algorithm module is: the license plate recognition algorithm module D.
  • the license plate recognition algorithm module D For details, please refer to step 53 above, which will not be repeated here.
  • Step 64 The algorithm orchestration module of the edge computing device sends a request for obtaining the license plate recognition algorithm module D to the second algorithm subpool of the cloud server.
  • the request includes parameter information of the edge computing device, and the parameter information may include the processor of the edge computing device. Capability, processor occupancy rate, storage capacity, device temperature, etc., may also include the resolution, size, format, etc. of the pictures taken by camera 1 and camera 2 connected to the edge computing device, which are not specifically limited in this application.
  • Step 65 The second algorithm subpool of the cloud server determines the corresponding version of the license plate recognition algorithm module D1 according to the parameter information of the edge computing device, and sends the license plate recognition algorithm module D1 to the algorithm layout module of the edge computing device.
  • Step 66 The algorithm layout module of the edge computing device sends the algorithm chain S1 and all corresponding algorithm modules (that is, the vehicle detection algorithm module A, the tracking algorithm module B, the position recognition algorithm module C, and the license plate recognition algorithm module D1) to the caller. Module.
  • the edge computing device can also store the newly received license plate recognition algorithm module D1 in the first algorithm subpool, so that the business scenarios of camera 1 and camera 2 will change again, and when new business requirements are generated, if the new business requirements happen to be If the license plate recognition algorithm module D1 is needed, the edge computing device can directly obtain the algorithm module from the local first algorithm subpool, thereby reducing the amount of communication required for the transmission of the algorithm module, thereby increasing the speed of algorithm update.
  • Step 67 The invocation module of the edge computing device connects the various algorithm modules in series according to the algorithm chain S1 to realize the business functions corresponding to the business requirements.
  • Step 68 The invocation module of the edge computing device invokes the successful information to the algorithm orchestration module, completes the algorithm update of the edge computing device, and realizes the service upgrade of the camera 1 and the camera 2.
  • the edge computing device only adjusts the algorithm chain, and therefore only obtains one algorithm module D from the second algorithm subpool.
  • the entire upgrade process not only requires no manual intervention, reduces the waste of human resources, but also It can make the upgrade process faster, reduce the amount of communication, and reduce the upgrade cost.
  • the algorithm update method provided in this application can be deployed flexibly.
  • the algorithm orchestration module, the algorithm pool, and the calling module can be deployed on the camera, on the edge computing device, or on the cloud server.
  • the most suitable solution can be selected for deployment according to specific application scenarios.
  • the application scenarios shown in Figs. 5 and 6 are used for illustration and are not specifically limited in this application.
  • the electronic device 700 may be a camera, an edge computing device, or a cloud server in the foregoing content.
  • the electronic device 700 includes a processor 710, a communication interface 720, and a memory 730.
  • the processor 710, the communication interface 720, and the memory 730 are connected to each other through an internal bus 740.
  • the processor 710, the communication interface 720, and the memory 730 may be connected by a bus, or may be communicated by other means such as wireless transmission.
  • the embodiment of the present application takes the connection via a bus 740 as an example, where the bus 740 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus or the like.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the bus 740 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 7, but it does not mean that there is only one bus or one type of bus.
  • the processor 710 may be composed of one or more general-purpose processors, such as a central processing unit (CPU), or a combination of a CPU and a hardware chip.
  • the aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (Programmable Logic Device, PLD), or a combination thereof.
  • the above-mentioned PLD may be a complex programmable logic device (Complex Programmable Logic Device, CPLD), a field programmable logic gate array (Field-Programmable Gate Array, FPGA), a general array logic (Generic Array Logic, GAL), or any combination thereof.
  • the processor 710 executes various types of digital storage instructions, such as software or firmware programs stored in the memory 730, which enables the computing device 700 to provide a wide variety of services.
  • the memory 730 is used to store program codes, algorithm chains, and algorithm modules, and the processor 710 controls execution, and the program codes may include one or more software modules.
  • the processor 710 may include a calling module for receiving the first algorithm chain and multiple first algorithm modules sent by the algorithm orchestration module, and according to the first algorithm chain Execute one of the above-mentioned multiple algorithm modules to achieve the first business requirement.
  • the processor 710 may also include an algorithm orchestration module, which is used to receive the first service requirement and generate the corresponding first algorithm chain according to the first service requirement.
  • the memory 730 may include the first algorithm sub-pool, and the first algorithm sub-pool may be used to receive data sent by the algorithm orchestration module.
  • the algorithm module obtains the request of the algorithm module and the parameter information of the camera, and returns the algorithm module corresponding to the parameter information to the algorithm layout module, which can be specifically used to perform the processing steps that the camera can perform in any of the embodiments in Figure 1 to Figure 6 above, I will not go into details here.
  • the memory 730 is used to store program codes, algorithm chains, and algorithm modules, and is executed by the processor 710.
  • the program codes may include one or more software modules.
  • the processor 710 may also include an algorithm orchestration module, the algorithm orchestration module is used to receive the first business requirements, and generate the corresponding first algorithm chain according to the first business requirements , Obtain at least one algorithm module required by the algorithm chain from the local and the second algorithm sub-pool.
  • the electronic device 700 may also include an algorithm orchestration module, which is used to receive business requirements and generate a corresponding algorithm chain according to the business requirements.
  • the algorithm subpool obtains at least one algorithm module required by the algorithm chain.
  • the memory 730 may include a first algorithm subpool, and the first algorithm subpool may be used to receive the algorithm module acquisition request and the algorithm module sent by the algorithm orchestration module.
  • the parameter information of the camera, and the algorithm module corresponding to the parameter information is returned to the algorithm layout module, which can be specifically used to execute the processing steps that can be performed by the edge computing device in any of the embodiments in FIG. 1 to FIG. 6 described above.
  • the memory 730 is used to store program codes, algorithm chains, and algorithm modules, and the processor 710 controls execution, and the program codes may include one or more software modules.
  • the processor 710 may also include an algorithm orchestration module, which is used to receive the first business requirement and generate a corresponding first algorithm chain according to the first business requirement. Obtain at least one algorithm module required by the algorithm chain locally.
  • the electronic device 700 may also include an algorithm orchestration module, which is used to receive business requirements and generate a corresponding algorithm chain according to the business requirements.
  • the algorithm subpool obtains at least one algorithm module required by the algorithm chain.
  • the memory 730 may include a second algorithm subpool, and the second algorithm subpool may be used to receive an algorithm module acquisition request sent by the first algorithm subpool.
  • the parameter information of the camera can be specifically used to execute the processing steps that can be performed by the cloud server in any of the embodiments in FIG. 1 to FIG. 6 described above.
  • the memory 730 may include a volatile memory (Volatile Memory), such as a random access memory (Random Access Memory, RAM); the memory 730 may also include a non-volatile memory (Non-Volatile Memory), such as a read-only memory (Read-only memory). Only Memory, ROM, Flash Memory, Hard Disk Drive (HDD), or Solid-State Drive (SSD); the memory 730 may also include a combination of the above types.
  • the memory 730 may store application program codes and program data, such as the first algorithm subpool or the second algorithm subpool, and then the memory 730 may store multiple algorithm modules.
  • the communication interface 720 may be a wired interface (such as an Ethernet interface), an internal interface (such as a high-speed serial computer expansion bus (Peripheral Component Interconnect express, PCIe) bus interface), a wired interface (such as an Ethernet interface), or a wireless interface (for example, a cellular network interface or the use of a wireless local area network interface) to communicate with other devices or modules.
  • a wired interface such as an Ethernet interface
  • PCIe serial computer expansion bus
  • PCIe Peripheral Component Interconnect express
  • Ethernet interface such as an Ethernet interface
  • a wireless interface for example, a cellular network interface or the use of a wireless local area network interface
  • FIG. 7 is only a possible implementation of the embodiment of the present application.
  • the electronic device may also include more or fewer components, which is not limited here.
  • the content that is not shown or described in the embodiments of the present application please refer to the relevant descriptions in the embodiments described in FIGS. 1 to 6, and details are not repeated here.
  • the electronic device shown in FIG. 7 may also be a computer cluster composed of multiple computing nodes, which is not specifically limited in this application.
  • the embodiment of the present application also provides a computer-readable storage medium, which stores instructions in the computer-readable storage medium, and when the computer-readable storage medium runs on a processor, the method flow shown in FIG. 1 to FIG. 6 is implemented.
  • the embodiment of the present application also provides a computer program product.
  • the computer program product runs on a processor, the method flow shown in FIGS. 1 to 6 is realized.
  • the above-mentioned embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination.
  • the above-mentioned embodiments may be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more sets of available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a high-density digital video disc (Digital Video Disc, DVD)), or a semiconductor medium.
  • the semiconductor medium may be an SSD.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Stored Programmes (AREA)

Abstract

一种对摄像机的算法进行更新技术,计算设备收到业务请求后,生成实现业务请求的算法链,对于组成该算法链的算法模块,优先使用计算设备本地的算法模块,计算设备本地所没有的算法模块则从远端服务器中获得,从而既能对摄像机的算法实现更新,又利用到了计算设备本地已有的算法模块,减少了对计算设备算法更新过程所需的时间和带宽资源占用。

Description

算法更新的方法、系统及设备
本申请要求于2020年04月29日提交的申请号为202010358510.1、发明名称为“算法更新的方法、系统及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,尤其涉及算法更新的方法、系统及设备。
背景技术
近年来,随着计算机、网络、图像处理以及传输技术的发展,视频监控领域的摄像机也随之变得越来越智能化,摄像机可以通过加载各种算法来实现各种各样的业务需求,比如对拍摄到的图像进行自动识别、存储、检测和自动报警等等,从而被广泛应用于不同的业务场景中。当前的摄像机可以支持不同的应用场景。但是每在新业务场景或者业务场景发生变化时,都需要开发人员根据新的业务需求,编写好完整的算法更新包,然后使用该算法更新包对摄像机原有场景的算法包进行替换,这一过程将消耗大量的人力资源和时间。
发明内容
本申请提供了一种算法更新的方法,系统及设备,用于解决当前摄像机升级过程中消耗大量人力资源和时间的问题。
第一方面,提供了一种摄像机升级的方法,该方法包括以下步骤:
首先,计算设备接收第一业务需求,然后生成用于实现第一业务需求的第一算法链,该第一算法链用于描述执行第一业务需求的多个第一算法模块的执行顺序,接着,计算设备从本地获取多个第一算法模块中的一部分算法模块,并从远端算法池中获取多个第一算法模块中的其他算法模块,获得到第一算法链所需的多个第一算法模块之后,计算设备向终端设备发送第一算法链和多个第一算法模块,以供终端设备按照上述第一算法链执行多个第一算法模块实现第一业务需求。
使用本申请提供的算法更新方法,首先通过计算设备,根据业务需求生成算法链,并从算法池中下载该算法链所需的算法模块,然后再向终端设备发送该算法链和算法模块,终端设备可以按照算法链执行上述算法模块实现业务需求,完成终端设备的算法更新。相比于通过人工根据新的业务需求生成算法更新包,并将使用该算法更新包对摄像机原有场景的算法包进行替换,本申请提供的算法更新方法可以使得摄像机的算法更新过程不再需要人工介入,计算设备可以根据新的业务需求直接调整算法链,再通过调用模块执行调整后的算法链实现业务需求,使得摄像机升级过程所需的时间和人力资源大大减少,可扩展性更强,适用的业务场景更加广泛。
简言之,计算设备收到需要由终端设备(例如摄像机)执行的业务请求后,生成实现业务请求的算法链,对于组成所述算法链的算法模块,一部分直接使用计算设备本地的算法模块,另外一部分算法模块(例如所述计算设备本地无法提供的算法模块)则从远端服务器中获得,从而既能对摄像机的算法实现更新,又利用到了计算设备本地已有的算法模块资源。而现有技术中,由开发人员生成用于执行业务请求的完整的算法包,然后把整个算法包从远端服务器更新摄像机。因此,现有技术既没有生成算法链,也没有合理利用所述计算设备本地已有的算法模块。和现有技术相比,本方案减少了对计算设备算法更新过程所需的时间和带宽资源占用。
在第一方面的一种可能的实现方式中,上述终端设备是摄像机,第一业务需求包括人员识别、人脸识别、车辆识别、车牌识别中的一个。
举例来说,图2描述的应用场景中,终端设备是摄像机,那么摄像机1的业务需求可以是识别超速行驶的车辆,并记录其车牌号,摄像机2的业务需求可以是识别闯红灯的车辆,并记录其车牌号,应理解,上述举例仅用于说明,不同应用场景中的摄像机业务需求不同,本申请不作具体限定。
在第一方面的一种可能的实现方式中,远端算法池包括第一算法子池以及第二算法子池,计算设备从远端算法池中获取多个第一算法模块中的其他算法模块包括:首先,计算设备向第一算法子池发送获取请求,以获取多个第一算法模块中的其他算法模块。然后,计算设备接收第一算法子池发送的多个第一算法模块中的其他算法模块,多个第一算法模块中的其他算法模块是第一算法子池直接从第一算法子池本地获取的,或者,多个第一算法模块中的其他模块是第一算法子池从第二算法子池获取的,或者,多个第一算法模块中的其他算法模块中的部分算法模块是第一算法子池从第一算法子池本地获取的,部分算法模块是第一算法子池从第二算法子池获取的。
上述实现方式中,第一算法子池与上述终端设备的距离还可以小于第二算法子池与上述终端设备的距离。举例来说,部署第二算法子池的存储设备是云服务器,部署第一算法子池的存储设备是边缘计算设备,该计算设备与边缘计算设备连接,而边缘计算设备与云服务器连接。这样通过多级部署算法池的方式,可以使得计算设备获取算法模块的速度更快,可以获取到的算法模块类型更全,可适应的业务场景更加广泛。通过多级部署算法池的方式,可以使得摄像机算法编排模块获取算法模块的速度更快,提高整个算法更新系统的升级速度,同时可以使得摄像机能够获取到的算法模块种类更多,适应的业务场景更加丰富。
在第一方面的一种可能的实现方式中,每个算法模块拥有多个版本。因此,上述计算设备从本地获取多个第一算法模块中的一部分算法模块,从远端算法池中获取多个第一算法模块中的其他算法模块包括:计算设备确定终端设备的参数信息;计算设备从本地获取多个第一算法模块中的一部分与参数信息对应版本的算法模块,从远端算法池中获取多个第一算法模块中的与参数信息对应版本的其他算法模块,其中,多个第一算法模块中至少一个第一算法模块拥有多个版本。
可以理解的,人工根据业务需求编辑算法更新包对终端设备进行完整替换版本的方式实现业务需求,往往会容易出现各种硬件冲突的问题,需要多次调试修改算法更新包,消耗大量的人力和时间。而本申请提供的算法更新方法,远端算法池可以直接终端设备的参数信息返回合适版本的算法模块,可以确保终端设备上的调用模块根据第一算法链执行上述多个第一算法模块时,不会出现硬件冲突的问题,避免了多次调试消耗的人力和时间资源,提高算法更新的效率。
在第一方面的一种可能的实现方式中,部署第二算法子池的存储设备是云服务器,部署第一算法子池的存储设备是边缘计算设备,计算设备与边缘计算设备连接,边缘计算设备与云服务器连接。
在第一方面的一种可能的实现方式中,计算设备可以维护一个对应关系库,该对应关系库中包括多个业务需求以及算法链之间的对应关系,比如业务需求1和业务需求2对应算法链1,业务需求3对应算法链2,业务需求4对应算法链3或者算法链4等等,计算设备可以直接查询该对应关系库,确定第一业务需求对应的第一算法链。
其中,对应关系库中的多条对应关系可以是事先规范或者机器学习生成。这里,事先规 范指的是开发人员可以通过调查问卷、角色扮演、使用剧情以及数据统计等方法,理解不同业务场景下的业务需求后,设计与各种业务需求对应的算法链,获得一个包含多个业务需求和算法链之间对应关系的对应关系库。机器学习指的是将上述通过事先规范生成的多个对应关系作为训练数据,通过决策树算法、遗传算法、神经网络方法、贝叶斯网络方法、粗糙集方法、规则归纳方法、数据库方法和可视化方法等等中的一种或者多种算法获得更多的对应关系,生成包含更多对应关系的对应关系库。应上述算法举例仅用于说明,并不能构成具体限定。
在第一方面的一种可能的实现方式中,如果终端设备根据第一算法链执行上述多个第一算法模块实现第一业务需求以后,终端设备的业务场景发生了变化,计算设备接收到了用户输入的第二业务需求,那么计算设备可以继续生成用于实现第二业务需求的第二算法链,然后从本地和上一次获取的多个第一算法模块中,获取多个第二算法模块中的一部分算法模块,再从远端算法池中获取多个第二算法模块中的其他算法模块,最后向终端设备发送第二算法链和多个第二算法模块,以供终端设备按照第二算法链执行多个第二算法模块实现第二业务需求。
举例来说,摄像机2之前的第一业务需求为闯红灯车辆车牌号码识别,第一算法链为车辆检测算法模块-跟踪算法模块-位置识别算法模块-车牌识别算法模块,假设计算设备和终端设备均为摄像机2,由于该区域总是发生行人闯红灯出现事故,摄像机2需要额外具备监控识别闯红灯行人身份识别的功能,此时的第二业务需求有2个,即闯红灯车辆车牌号码识别以及闯红灯行人身份识别,摄像机2查询对应关系库之后,可以获得闯红灯车辆车牌号码识别的业务需求对应的第二算法链1:辆检测算法模块-跟踪算法模块-位置识别算法模块-车牌识别算法模块,闯红灯行人身份识别的业务需求对应的第二算法链2:行人检测算法模块-跟踪算法模块-人脸识别算法模块,此时摄像机2已经包含了算法链1所需的多个第一算法模块,因此摄像机2可以只向第一算法子池(即图2中的边缘计算设备)获取算法链2对应的算法模块,从而以最小的改动方式加载新的算法,减少算法更新时的通信消耗量,提高算法更新的效率。
因此,实施上述实现方式,相比于通过开发人员将变化后的业务场景所需的全部模块,封装打包成一个算法升级包,然后对摄像机进行完整替换版本的方式实现算法更新,本申请提供的算法更新方法更加便捷、快速,避免了人力资源和时间的浪费。
第二方面,提供了一种算法更新系统,用于对终端设备运行的算法进行更新,该系统包括算法编排模块、远端算法池以及调用模块,其中,算法编排模块用于接收第一业务需求,算法编排模块用于生成用于实现第一业务需求的第一算法链,第一算法链用于描述执行第一业务需求的多个第一算法模块的执行顺序,算法编排模块用于从本地获取多个第一算法模块中的一部分算法模块,从远端算法池中获取多个第一算法模块中的其他算法模块,算法编排模块用于向调用模块发送第一算法链和多个第一算法模块,调用模块用于按照第一算法链执行多个第一算法模块,以供终端设备按照实现第一业务需求。
在第二方面的一种可能的实现方式中,远端算法池包括第一算法子池以及第二算法子池,算法编排模块用于向第一算法子池发送获取请求,以获取多个第一算法模块中的其他算法模块;算法编排模块用于接收第一算法子池发送的多个第一算法模块中的其他算法模块,其中,多个第一算法模块中的其他算法模块是第一算法子池直接从第一算法子池本地获取的,或者,多个第一算法模块中的其他模块是第一算法子池从第二算法子池获取的,或者,多个第一算法模块中的其他算法模块中的部分算法模块是第一算法子池从第一算法子池本地获取的,部 分算法模块是第一算法子池从第二算法子池获取的。
在第二方面的一种可能的实现方式中,算法编排模块用于确定终端设备的参数信息;算法编排模块用于从本地获取多个第一算法模块中的一部分与参数信息对应版本的算法模块,从远端算法池中获取多个第一算法模块中的与参数信息对应版本的其他算法模块,其中,多个第一算法模块中至少一个第一算法模块拥有多个版本。
在第二方面的一种可能的实现方式中,第二算法子池部署于云服务器,第一算法子池部署于边缘计算设备,边缘计算设备与云服务器连接;算法编排模块和调用模块部署于摄像机,摄像机与边缘计算设备连接;或者,算法编排模块部署于边缘计算设备,调用模块部署于摄像机,其中,摄像机与边缘计算设备相连;或者,算法编排模块和调用模块部署于边缘计算设备。
在第二方面的一种可能的实现方式中,算法编排模块还用于在向调用模块发送算法链和多个第一算法模块之后,接收第二业务需求;算法编排模块还用于生成用于实现第二业务需求的第二算法链,第二算法链用于描述执行第二业务需求的多个第二算法模块的执行顺序;算法编排模块还用于从本地和多个第一算法模块中获取多个第二算法模块中的部分算法模块,从远端算法池中获取多个第二算法模块中的其他算法模块;算法编排模块还用于向调用模块发送第二算法链和多个第二算法模块;调用模块用于按照第二算法链执行多个第二算法模块,实现第二业务需求。
第三方面,提供了一种计算机程序产品,包括计算机程序,当计算机程序被计算设备读取并执行时,实现如第一方面所描述的方法。
第四方面,提供了一种计算机可读存储介质,包括指令,当所述指令在计算设备上运行时,使得计算设备实现如第一方面描述的方法。
第五方面,提供了一种电子设备,包括处理器和存储器,处理器执行存储器中的代码实现如第一方面描述的方法。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。
图1是本申请提供的一种算法更新系统的结构示意图;
图2是本申请提供的一种应用场景下的算法编排模块、调用模块和远端算法池;
图3是本申请提供的另一应用场景下的摄像机、边缘节点和中心节点之间的网络拓扑图;
图4是本申请提供的一种算法更新方法的流程示意图;
图5是一种应用场景下本申请提供的算法更新方法的流程示意图;
图6是另一种应用场景下本申请提供的算法更新方法的流程示意图;
图7是本申请提供的一种电子设备的结构示意图。
具体实施方式
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
随着科学技术的不断发展,视频监控领域的摄像机朝着智能化的方向不断演进。其中,智能分析是智能摄像机的核心功能,其功能和性能又完全取决于其内嵌的算法,比如车牌识别算法、交通行为分析算法、视频质量诊断算法等等。一般来说,不同业务场景下的智能摄像机需要载入不同的算法,比如在十字路口的智能摄像机,需要一些能够根据摄像机捕捉到的 画面检测到违章停车、压黄线、逆行等检测功能的算法,还需要一些能够根据摄像机捕捉到的画面识别车牌、车型、人脸等识别功能的算法;在视频质量诊断系统中的智能摄像机,需要一些能够根据摄像机捕捉到的画面检测到雪花、条纹、视频丢失情况等检测功能的算法。
当摄像机第一次载入业务场景所需要的算法时,需要开发人员根据该业务场景的业务需求,人工编辑好算法更新包,然后使用该算法更新包对智能摄像机进行算法的加载,这一过程不仅消耗大量的人力资源,也将耗费大量时间。并且,对于已经根据原有业务场景的业务需求配置好的智能摄像机来说,如果新的业务需求与原有业务需求非常类似,只有一点不同,此时也需要开发人员根据新的业务需求,重新编写算法更新包,然后使用该算法更新包对摄像机原有场景的算法包进行替换,造成人力资源的浪费。
举例来说,某路段之前设置了禁停标志,该路段的智能摄像机的业务需求包括检测违章停车、检测闯红灯的行人身份以及检测闯红灯的车辆车牌号,现在该路段禁停标志被撤离,该路段的智能摄像机不再需要检测违章停车了,但是其他需求(检测闯红灯的行人身份以及检测闯红灯的车辆车牌号)仍然保留,在这种情况下,开发人员在对该路段的智能摄像机进行算法更新时,需要将检测闯红灯的行人身份以及检测闯红灯的车辆车牌号的算法封装打包成一个新的算法更新包,然后在摄像机上安装该算法更新包,替换掉之前的算法包来实现算法更新,算法更新的过程缺少可扩展性,无法直接对原有的算法包进行修改调整,不但造成人力资源和时间的浪费。
为了解决上述算法更新过程中,容易浪费人力资源以及时间的问题,本申请提供了一种算法更新系统100,该系统中的算法编排模块可以根据业务需求生成算法链,并从本地和远端算法池中获取该算法链所需的多个算法模块,然后通过调用模块,根据算法链执行上述多个算法模块来实现业务需求,完成摄像机的算法更新。相比于通过人工根据新的业务需求生成算法更新包,并将使用该算法更新包对摄像机原有场景的算法包进行替换,本申请提供的算法更新系统可以使得摄像机的算法更新过程不再需要人工介入,算法编排模块可以根据新的业务需求直接调整算法链,再通过调用模块执行调整后的算法链实现新业务需求,使得摄像机算法更新所需的时间和人力资源大大减少。
如图1所示,图1是本申请提供的一种算法更新系统100的结构示意图。该算法更新系统100包括算法编排模块110、远端算法池120(例如算法池服务器)以及调用模块130,该系统100用于对终端设备运行的算法进行更新,这里,终端设备可以是摄像机,也可以是其他嵌入式设备,比如在物联网的应用场景中,终端设备还可以是芯片、单片机等等,本申请不作具体限定,为了便于本申请能够更好的被理解,下文关于算法更新系统100的描述将统一以终端设备是摄像机,算法更新系统100用于对摄像机进行算法更新的应用场景为例进行说明。其中,算法更新系统100内部的单元模块可以有多种划分,各个模块可以是软件模块,也可以是硬件模块,也可以部分是软件模块部分是硬件模块,图1仅为一种示例性的划分方式,本申请不对其进行限制。
算法编排模块110用于接收第一业务需求,然后生成用于实现该第一业务需求的第一算法链,该第一算法链用于描述执行所述业务需求的多个第一算法模块的执行顺序,接着从本地获取上述多个第一算法模块中的一部分算法模块,从远端算法池120中获取上述多个第一算法模块中的其他算法模块。算法编排模块110通过本地和远端算法池120获取到上述第一算法链所需的多个第一算法模块之后,可以向调用模块130发送上述第一算法链和多个第一算法模块,以供调用模块按照第一算法链执行多个第一算法模块,实现第一业务需求。
其中,第一算法链(Algorithm Chain)是由多个第一算法模块组成的一串算法的组合, 用于完成第一业务需求的完整的算法功能。算法模块(Algorithm Module)是完成单个算法功能的最小单元。举例来说,如果第一业务需求为监控道路上行驶的车辆,识别出超速车辆的车牌号码,那么第一算法链可以是车辆检测算法模块-跟踪算法模块-位置识别算法模块-车牌识别算法模块等等,也就是说,先检测出每帧图像中的车辆,然后检测出每个车辆的行驶轨迹,计算是否超速,然后将超速车辆进行车牌位置的识别,再对其进行车牌号码的识别。应理解,上述算法链用于举例说明,并不能构成具体限定。
远端算法池120用于存储各种各样的算法模块,当算法编排模块110向其获取多个第一算法模块中的其他算法模块时,远端算法池120可以向算法编排模块返回上述第一算法模块中的其他算法模块。仍以上述例子为例,如果业务需求为监控道路上行驶的车辆,识别出超速车辆的车牌号码,算法编排模块110生成了算法链:车辆检测算法模块-跟踪算法模块-位置识别算法模块-车牌识别算法模块,如果算法编排模块110本地没有这四个算法模块,算法编排模块110将会向远端算法池120发送获取车辆检测算法模块、跟踪算法模块、位置识别算法模块以及车牌识别算法模块的请求,远端算法池120可以根据该请求,向算法编排模块110返回上述车辆检测算法模块、跟踪算法模块、位置识别算法模块以及车牌识别算法模块。
需要说明的,远端算法池120不但存储有多个算法模块,适用于各种各样的应用场景,并且每个算法模块还拥有多个版本,每个版本适用于不同硬件环境,比如车辆检测的算法模块可以包括高/低精度版本、高/低资源开销版本、高/低准确率版本、高/低稳定性版本等等,举例来说,下表1显示了一个远端算法池120存储的算法模块示例表格,应理解,表1仅用于举例说明,本申请不对算法模块可能拥有的版本进行限定。
因此,算法编排模块110在向远端算法池120获取上述多个第一算法模块中的一部分算法模块时,还可以将调用模块130所处的终端设备的参数信息同时发送给远端算法池120,远端算法池120可以根据上述参数信息,返回合适版本的算法模块。
仍以上述例子为例,第一业务需求为监控道路上行驶的车辆,识别出超速车辆的车牌号码,第一算法链是车辆检测算法模块-跟踪算法模块-位置识别算法模块-车牌识别算法模块,如果调用模块130部署于一台摄像机A上,该摄像机A内的芯片为低端芯片,硬件处理能力很差,远端算法池120中的算法模块如表1所示,那么远端算法池120最终返回给算法编排模块110的算法模块可以是:低精度版本车辆检测算法模块V1.2、低精度版本跟踪算法模块V5.2、低开销版本位置识别算法模块V3.4以及低开销版本车牌识别算法模块V4.4。应理解,远端算法池120根据调用模块所处终端设备的参数信息返回合适版本的算法模块,可以确保调用模块执行算法链时,避免算法更新后出现硬件冲突的问题,提高算法更新的效率。并且,上述举例仅用于说明,并不能构成具体限定。
表1 远端算法池120存储的算法模块示例表格
  车辆检测 人脸识别 位置识别 车牌识别 跟踪算法
高精度版本 V1.1 V2.1 V3.1 V4.1
低精度版本 V1.2 V2.2 V3.2 V4.2 V5.2
高开销版本 V1.3 V2.3 V5.3
低开销版本 V2.4 V3.4 V4.4
高准确率版本 V1.5 V5.5
具体实现中,算法模块可以以各种动态链接库(Dynamic Link Library,DLL)和配置文件 等形式存储于远端算法池120以及算法编排模块110本地,比如可执行与可连接格式(Executable and Linkable Format,ELF)的动态链接库、XML形式的配置文件、共享对象(Shared Object,SO)格式的动态链接库等等,还可以包括其他格式的动态链接库,本申请不作具体限定。
调用模块130用于接收算法编排模块110发送的第一算法链和多个第一算法模块,按照上述第一算法链执行多个第一算法模块实现第一业务需求,完成算法更新。调用模块可以根据第一算法链串联执行多个第一算法模块实现业务需求,也可以并联执行多个算法模块实现业务需求,也可以是部分串联、部分并联执行多个第一算法模块实现业务需求,具体可以根据算法链中的执行顺序执行多个第一算法模块,本申请不做具体限定。简单来说,调用模块130是实现业务需求的模块,也是实际执行算法的模块。
具体实现中,本申请提供的算法更新系统100中的各个模块部署灵活。下面分别对三种模块的部署原则进行说明:算法编排模块110可以部署于任何可以输入业务需求的摄像机或者节点;算法池120可以部署于拥有足够存储容量的摄像机或者节点;调用模块130需要部署于实际执行算法的摄像机或者节点上。因此,结合业务场景的实际情况,各个模块可以部署于相同的摄像机上,也可以部署于相同的节点上,也可以部分部署于摄像机、部分部署于节点上,本申请不作具体限定。
举例来说,如果业务需求是:摄像机直接将拍摄到的图像进行人脸识别,那么调用模块130需要部署在摄像机上,如果业务需求是:摄像机将拍摄到的图像发送至节点进行人脸识别,那么调用模块130需要部署在执行人脸识别算法的节点上。再举例来说,调用模块130在摄像机上时,算法编排模块110也可以部署于该摄像机上;调用模块130在某一节点上时,算法编排模块也可以部署于该节点上,从而减少算法编排模块110和调用模块130之间传输第一算法链和多个第一算法模块的通信开销,提高摄像机算法更新的速度。再举例来说,如果硬件条件限制了算法编排模块110必须设置于节点上或者摄像机上,比如某个摄像机不支持输入业务需求的功能,必须从节点上输入业务需求,那么算法编排模块110可以位于节点上,调用模块130位于摄像机上。应理解,上述举例仅用于说明,并不能构成具体限定。
需要说明的,上述节点可以是通用的物理服务器,例如,如X86服务器等,也可以是基于通用的物理服务器结合网络功能虚拟化(Network Functions Virtualization,NFV)技术实现的虚拟机(Virtual Machine,VM),所述虚拟机指通过 软件模拟的具有完整 硬件系统功能的、运行在一个完全 隔离环境中的完整 计算机系统,本申请不做具体限定。
在一实施例中,节点可以分为边缘节点和中心节点。其中,边缘节点和中心节点相连。边缘节点可以是在地理位置上距离用于部署算法编排模块110的计算设备较近的,用于提供计算、存储、通信资源的边缘计算设备,比如位于道路两侧的边缘计算设备。中心节点130可以是在地理位置上距离用于部署算法编排模块110的计算设备较远的,用于提供计算、存储、通信资源的单个计算设备或者计算设备集群,比如云服务器,云服务器具体可以是数据中心的物理服务器,也可以是创建在数据中心的虚拟机,还可以是部署在数据中心的服务器或者虚拟机上的软件系统,该软件系统可以分布式的部署在多个服务器上、或者分布式地部署在多个虚拟机上、或者分布式地部署在虚拟机和服务器上。举例来说,如图2所示,路口设置有摄像机1和摄像机2两个摄像机对路口进行监控,那么边缘节点可以是如图2所示的,距离路口较近的一台边缘计算设备,中心节点可以是离路口很远的某个数据中心中的云服务器,应理解,上述举例仅用于说明,并不能构成具体限定。
在一实施例中,算法池120包括第一算法子池和第二算法子池,第一算法子池部署于上 述边缘节点,比如边缘计算设备,第二算法子池部署于上述中心节点,比如云服务器,算法编排模块110在生成第一算法链之后,可以先向边缘计算设备获取上述第一算法模块中的其他算法模块,如果边缘计算设备没有该算法编排模块110所需的算法模块,边缘计算设备可以再向云服务器获取上述第一算法模块中的其他算法模块,然后将获取到的算法模块返回给算法编排模块110。
仍以图2为例,假设路口设置有摄像机1和摄像机2两个摄像机对路口进行监控,假设算法编排模块和调用模块位于摄像机1,算法编排模块获取摄像机1的业务需求,并根据业务需求生成算法链A-B-C-D之后,摄像机1上的算法编排模块可以向距离摄像机较近的边缘节点,即图2中的边缘计算设备获取该算法链所需的算法模块A、B、C以及D,如果边缘计算设备上恰好有算法模块A、B、C和D,那么边缘计算设备边缘计算设备可以直接将上述四个模块返回给算法编排模块,从而完成摄像机的快速升级;如果边缘计算设备边缘计算设备上只有算法模块A和D,那么边缘计算设备还可以向中心节点,也就是距离摄像机较远的,图2中某个数据中心的服务器获取算法模块C和D,然后将获取得到的算法模块C和D与本地的算法模块A和B一同发送给摄像机1上的算法编排模块,算法编排模块将算法链A-B-C-D和算法模块A、B、C以及D一同发送给调用模块,使得摄像机1上的调用模块根据该算法链和算法模块,将多个算法模块按照算法链进行串联并启动算法链,从而实现业务需求,完成摄像机1的升级,同理可以完成摄像机2的升级,这里不展开赘述。
在一实施例中,部署于中心节点的第二算法子池可以存储摄像机全部业务场景下可能用到的算法模块,而部署于边缘节点的第一算法子池可以根据与其通信的摄像机所处的业务场景,存储一些该业务场景常用的算法模块。这样通过多级部署算法子池的方式,可以使得算法编排模块110获取算法模块的速度更快,提高整个算法更新系统的升级速度,同时可以使得算法编排模块110能够获取到的算法模块种类更多,适应的业务场景更加丰富。
举例来说,如图3所示,存储容量较大、距离摄像机较远的中心节点可以用于部署第二算法子池3,该第二算法子池3存储了摄像机1~4全部可能的业务需求所需要的全部算法模块,存储容量较小、距离摄像机较近的边缘节点1和边缘节点2可以用于部署第一算法子池1和第一算法子池2,该第一算法子池1和第一算法子池2存储了部分第二算法子池3中的算法模块,具体地,第一算法子池1可以根据与其相连的摄像机1和摄像机2的业务场景A,从第二算法子池3中下载并存储一些与业务场景A相关的算法模块,第一算法子池2可以是根据与其相连的摄像机3和摄像机4的业务场景B,从第二算法子池3中下载并存储一些与业务场景B相关的算法模块。这样,当摄像机1上的算法编排模块110根据第一业务需求生成第一算法链之后,假设该摄像机1本地并没有第一算法链所需的多个第一算法模块,那么摄像机1上的算法编排模块110可以先向距离摄像机1较近的边缘节点1获取上述多个第一算法模块,如果1边缘节点上的第一算法子池1存储了上述多个第一算法模块,边缘节点1可以直接将上述多个第一算法模块返回给摄像机1;如果边缘节点1只有上述多个第一算法模块的一部分,那么边缘节点1可以向中心节点获取上述多个第一算法模块中,边缘节点1上没有的部分算法模块,最后边缘节点1可以将上述多个第一算法模块发送至摄像机1的算法编排模块110,以供其将上述多个第一算法模块和第一算法链发送给摄像机1上的调用模块130,从而实现业务需求完成摄像机的升级。可以理解的,这样通过多级部署算法池的方式,可以使得摄像机算法编排模块获取算法模块的速度更快,提高整个算法更新系统的升级速度,同时可以使得摄像机能够获取到的算法模块种类更多,适应的业务场景更加丰富。
因此,本申请提供的算法更新系统100可以结合具体的应用场景,灵活部署上述算法编 排模块110、第一算法子池、第二算法子池以及调用模块130,使得算法编排模块110获取算法模块的速度更快,提高整个算法更新系统100的升级速度。一般来说,由于算法池需要存储大量的算法模块,需要部署于存储能力较强的设备中,因此第二算法子池通常部署于中心节点,比如云服务器,第一算法子池通常部署于边缘节点,比如边缘计算设备。而算法编排模块110和调用模块130既可以全都部署于摄像机,该摄像机与所述边缘计算设备连接,也可以将算法编排模块110部署于边缘计算设备,调用模块130部署于摄像机,其中,摄像机与边缘计算设备相连,还可以将算法编排模块110和调用模块130全部部署于边缘计算设备。
下表2显示了算法编排模块110、第一算法子池、第二算法子池以及调用模块130可能的部署方案,应理解,表2仅用于举例说明,满足前述内容中描述的部署原则的任何方案都属于本申请方案的保护范围,这里不一一列举。
表2 算法编排模块110、算法池120以及调用模块130的部署方案示例
Figure PCTCN2021079430-appb-000001
在一实施例中,如果算法编排模块110在调用模块130根据第一算法链执行上述多个第一算法模块实现第一业务需求以后,接收到了第二业务需求,那么算法编排模块110还用于生成用于实现上述第二业务需求的第二算法链,然后从本地和之前获取到的上述多个第一算法模块中,获取上述多个第二算法模块中的部分算法模块,从远端算法池中获取多个第二算法模块中的其他算法模块,最后再向调用模块130发送上述第二算法链和上述多个第二算法模块,以供调用模块130按照第二算法链执行多个第二算法模块,实现第二业务需求。可以理解的,由于算法编排模块110在接收到第二业务需求之前,已经获取到了多个第一算法模块,如果之前获取的多个第一算法模块恰好包括上述多个第二算法模块,算法编排模块110可以不再向远端算法池120获取算法模块,直接将上述多个第二算法模块发送给调用模块110,实现第二业务需求。举例来说,多个第一算法模块为:模块A、模块B和模块C,多个第二算法模块为:模块B和模块C,那么算法编排模块110可以不再向远端算法池120获取算法模块,直接将模块B和模块C发送给调用模块130按照第二算法链执行模块B和模块C,实现第二业务需求,相比于人工根据新业务场景的全部业务需求生成算法更新包(这里将需要对模块B和模块C进行封装打包,生成一个算法更新包),替换掉之前的算法包来实现算法更新的方法,本申请提供的算法更新系统速度更快,且无需人工介入,可扩展性更强,适用的业务场景更加广泛。
需要说明的,图1-图3实施例均以终端设备为摄像机为例进行了说明,具体实现中,单片机、芯片等存储容量较小、但是也需要加载算法实现各种业务需求的设备,也可以适用于本申请提供的算法更新系统。举例来说,边缘节点上的算法编排模块根据业务需求生成算法链之后,将获取到的算法模块(可以是边缘节点本地获取的也可以是中心节点处获取的)和算法链发送给单片机以供其执行,使得单片机的算法更新无需人工介入,算法更新所需的时 间和人力资源大大减少,可扩展性更强,适用的业务场景更加广泛。上述举例仅用于说明,对于其他应用场景下的具体实现这里不再一一展开赘述。
综上可知,使用本申请提供的算法更新系统,通过算法编排模块,根据业务需求生成算法链,并从本地和多个算法子池中获取该算法链所需的算法模块,然后通过调用模块,调用算法链实现业务功能,完成摄像机的升级。相比于通过人工根据新的业务需求生成算法更新包,并将使用该算法更新包对摄像机原有场景的算法包进行替换,本申请提供的算法更新系统可以使得摄像机的算法更新过程不再需要人工介入,算法编排模块可以根据新的业务需求直接调整算法链,再通过调用模块执行调整后的算法链实现新业务需求,使得算法更新过程所需的时间和人力资源大大减少,可扩展性更强,适用的业务场景更加广泛。并且,整个算法更新系统的部署非常灵活,可以根据实际情况将各个模块部署在摄像机、边缘节点或者中心节点上,结合具体的应用场景和灵活的部署方式,可以使得算法编排模块获取算法模块的速度更快,进而提高整个算法更新系统的升级速度。
下面结合图4,对本申请供的一种算法更新方法进行说明。该算法更新方法可以应用于图1所示的算法更新系统100中,该方法用于对终端设备运行的算法进行更新。这里,终端设备是部署前述调用模块130的设备,具体可以是摄像机,也可以是其他嵌入式设备,比如在物联网的应用场景中,终端设备还可以是芯片、单片机等等,本申请不作具体限定,为了便于本申请能够更好的被理解,下文关于算法更新方法的描述将统一以终端设备是摄像机,对摄像机进行算法更新的应用场景为例进行说明。如图4所示,本申请提供的算法更新方法包括以下步骤:
S410:计算设备接收第一业务需求。这里,计算设备用于部署前述内容的算法编排模块110,具体可以是前述内容中的摄像机,也可以是边缘计算设备,本申请不作具体限定。
可以理解的,参考前述内容中的表2实施例、图2-图3实施例可知,部署算法编排模块110的计算设备和部署调用模块130的终端设备可以是同一个设备,比如计算设备为边缘计算设备,终端设备为摄像机,也可以是不同的设备,比如计算设备和边缘设备为同一台摄像机,本申请不作具体限定。
在一实施例中,上述第一业务需求包括人员识别、人脸识别、车辆识别、车牌识别中的一个。举例来说,图2描述的应用场景中,摄像机1的业务需求可以是识别超速行驶的车辆,并记录其车牌号,摄像机2的业务需求可以是识别闯红灯的车辆,并记录其车牌号,应理解,上述举例仅用于说明,不同应用场景中的摄像机业务需求不同,本申请不作具体限定。
S420:计算设备生成用于实现上述第一业务需求的第一算法链,其中,该第一算法链用于描述执行上述第一业务需求的多个第一算法模块的执行顺序。
仍以上述例子为例,图2描述的应用场景中,摄像机2的第一业务需求可以是识别闯红灯的车辆,并记录其车牌号,那么算法编排模块根据该业务需求可以生成的算法链为:车辆检测算法模块-跟踪算法模块-位置识别算法模块-车牌识别算法模块,也就是说,先通过车辆检测算法模块检测出红灯期间每帧图像中的车辆,然后通过跟踪算法模块检测出每个车辆的行驶轨迹,确定闯红灯的车辆,然后通过位置识别算法模块将闯红灯的车辆进行车牌位置的识别,最后通过车牌识别算法模块对车牌进行号码识别。应理解,上述第一算法链用于举例说明,并不能构成具体限定。
具体实现中,计算设备可以维护一个对应关系库,该对应关系库中包括多个业务需求以及算法链之间的对应关系,比如业务需求1和业务需求2对应算法链1,业务需求3对应算法链2,业务需求4对应算法链3或者算法链4等等,计算设备可以直接查询该对应关系库, 确定第一业务需求对应的第一算法链。其中,对应关系库中的多条对应关系可以是事先规范或者机器学习生成。其中,事先规范指的是开发人员可以通过调查问卷、角色扮演、使用剧情以及数据统计等方法,理解不同业务场景下的业务需求后,设计与各种业务需求对应的算法链,获得一个包含多个业务需求和算法链之间对应关系的对应关系库。机器学习指的是将上述通过事先规范生成的多个对应关系作为训练数据,通过决策树算法、遗传算法、神经网络方法、贝叶斯网络方法、粗糙集方法、规则归纳方法、数据库方法和可视化方法等等中的一种或者多种算法获得更多的对应关系,生成包含更多对应关系的对应关系库。应上述算法举例仅用于说明,并不能构成具体限定。
可以理解的,如果对应关系库中不包括与第一业务需求对应的第一算法链,那么计算设备还可以对第一业务需求进行语义识别、关联词识别等自然语言处理之后,确定与第一业务需求近似的业务需求,在对应关系库中搜索与该近似业务需求对应的算法链,然后对该算法链进行简单调整,获得该第一业务需求对应的第一算法链。举例来说,如果图2所示的摄像机1的第一业务需求为:识别闯红灯的车辆车牌号,但是摄像机1只有2M的可用存储空间,那么计算设备可以现在对应关系库中搜索与“识别闯红灯的车辆车牌号”这一业务需求对应的算法链,获得该业务需求对应的算法链为:车辆检测算法模块-跟踪算法模块-位置识别算法模块-车牌识别算法模块,然后向算法池120获取上述四个模块的小容量版本,从而获得第一业务需求对应的第一算法链。还可以通过设置一些算法模块的连接关系,根据连接关系推理出第一业务需求对应的第一算法链,举例来说,设置连接关系为:设置模块E模块只能与模块F相连。如果查询对应关系库后确定该第一业务需求的近似业务需求对应的算法链为A-B-C,第一业务需求与近似业务需求的差别为需要E模块,那么第一业务需求对应的算法链可以是A-B-C-E-F。应理解,上述举例仅用于说明,并不能构成具体限定。
S430:计算设备从本地获取上述多个第一算法模块中的一部分算法模块,从远端算法池中获取上述多个第一算法模块中的其他算法模块。其中,远端算法池的描述具体可以参考图1-图3实施例中关于算法池120的描述,这里不展开赘述。
可以理解的,如果计算设备本地已经存储了上述多个第一算法模块的部分算法模块,那么计算设备可以向远端算法池获取上述多个第一算法模块中,本地缺少的其他算法模块。从而减少获取多个第一算法模块这一过程所需的通信消耗,提高算法更新的速度。
在一实施例中,参考表1实施例可知,每个算法模块拥有多个版本。因此,上述计算设备从本地获取多个第一算法模块中的一部分算法模块,从远端算法池中获取多个第一算法模块中的其他算法模块包括:计算设备确定终端设备的参数信息;计算设备从本地获取多个第一算法模块中的一部分与参数信息对应版本的算法模块,从远端算法池中获取多个第一算法模块中的与参数信息对应版本的其他算法模块,其中,多个第一算法模块中至少一个第一算法模块拥有多个版本。
举例来说,上述第一业务需求为:对摄像机1拍摄的每帧图像传输至节点1进行车牌号码的识别,也就是说,部署调用模块的终端设备为节点1,部署算法编排模块的计算设备是摄像机1,那么计算设备接收到该第一业务需求之后,可以通过查询对应关系库获得与第一业务需求对应的第一算法链:车辆检测算法模块-位置识别模块-车牌识别模块,假设计算设备上没有上述四种算法模块,那么计算设备可以将获取车辆检测算法模块、位置识别模块以及车牌识别模块的请求发送给算法池,同时将摄像机的参数信息(比如拍摄图片的分辨率)该节点1的参数信息(比如节点1当前的资源占用率较高)一同发送给远端算法池,远端算法池可以将低开销版本的车辆检测算法模块、低开销版本的位置识别模块以及低开销版本的 车牌识别模块发送给计算设备,从而确保该节点在进行算法升级之后,可确保节点1的正常运行,也不会对节点1的其他业务产生影响。应理解,上述举例仅用于说明,并不能构成具体限定。
可以理解的,人工根据业务需求编辑算法更新包对终端设备进行完整替换版本的方式实现业务需求,往往会容易出现各种硬件冲突的问题,需要多次调试修改算法更新包,消耗大量的人力和时间。而本申请提供的算法更新方法,远端算法池可以直接终端设备的参数信息返回合适版本的算法模块,可以确保终端设备上的调用模块根据第一算法链执行上述多个第一算法模块时,不会出现硬件冲突的问题,避免了多次调试消耗的人力和时间资源,提高算法更新的效率。
S440:计算设备向终端设备发送第一算法链和多个第一算法模块,以供终端设备按照第一算法链执行多个第一算法模块实现第一业务需求。其中,终端设备可以用于部署前述内容中的调用模块130。
在一实施例中,参考图2以及图3实施例可知,远端算法池包括第一算法子池以及第二算法子池,计算设备从远端算法池中获取多个第一算法模块中的其他算法模块包括:计算设备向第一算法子池发送获取请求,以获取多个第一算法模块中的其他算法模块;计算设备接收第一算法子池发送的多个第一算法模块中的其他算法模块,其中,多个第一算法模块中的其他算法模块是第一算法子池直接从第一算法子池本地获取的,或者,多个第一算法模块中的其他模块是第一算法子池从第二算法子池获取的,或者,多个第一算法模块中的其他算法模块中的部分算法模块是第一算法子池从第一算法子池本地获取的,部分算法模块是第一算法子池从第二算法子池获取的。简单来说,计算设备如果向第一算法子池发送获取N个第一算法模块的请求(N为正整数),在第一算法子池中有这N个第一算法模块的情况下,可以直接向计算设备返回这N个第一算法模块;如果第一算法子池中只有这N个第一算法模块中的M个(M<N,M为自然数)第一算法模块,那么第一算法子池可以向第二算法子池获取剩余的(N-M)个第一算法模块,然后将这(N-M)个第一算法模块与本地的M个第一算法模块一同返回给计算设备。
具体实现中,第一算法子池与上述终端设备的距离小于第二算法子池与上述终端设备的距离。举例来说,部署第二算法子池的存储设备是云服务器,部署第一算法子池的存储设备是边缘计算设备,该计算设备与边缘计算设备连接,而边缘计算设备与云服务器连接,具体可以参考图2和图3实施例,这里不再重复赘述。可以理解的,这样通过多级部署算法池的方式,可以使得计算设备获取算法模块的速度更快,可以获取到的算法模块类型更全,可适应的业务场景更加广泛。
在一实施例中,如果终端设备根据第一算法链执行上述多个第一算法模块实现第一业务需求以后,终端设备的业务场景发生了变化,计算设备接收到了用户输入的第二业务需求,那么计算设备可以继续生成用于实现第二业务需求的第二算法链,然后从本地和上一次获取的多个第一算法模块中,获取多个第二算法模块中的一部分算法模块,再从远端算法池中获取多个第二算法模块中的其他算法模块,最后向终端设备发送第二算法链和多个第二算法模块,以供终端设备按照第二算法链执行多个第二算法模块实现第二业务需求。
仍以前述例子为例,图2所示的摄像机2之前的第一业务需求为闯红灯车辆车牌号码识别,第一算法链为车辆检测算法模块-跟踪算法模块-位置识别算法模块-车牌识别算法模块,假设计算设备和终端设备均为摄像机2,由于该区域总是发生行人闯红灯出现事故,摄像机2需要额外具备监控识别闯红灯行人身份识别的功能,此时的第二业务需求有2个,即闯红灯 车辆车牌号码识别以及闯红灯行人身份识别,摄像机2查询对应关系库之后,可以获得闯红灯车辆车牌号码识别的业务需求对应的第二算法链1:辆检测算法模块-跟踪算法模块-位置识别算法模块-车牌识别算法模块,闯红灯行人身份识别的业务需求对应的第二算法链2:行人检测算法模块-跟踪算法模块-人脸识别算法模块,此时摄像机2已经包含了算法链1所需的多个第一算法模块,因此摄像机2可以只向第一算法子池(即图2中的边缘计算设备)获取算法链2对应的算法模块,从而以最小的改动方式加载新的算法,减少算法更新时的通信消耗量,提高算法更新的效率。相比于通过开发人员将变化后的业务场景所需的全部模块,封装打包成一个算法升级包,然后对摄像机进行完整替换版本的方式实现算法更新,本申请提供的算法更新方法更加便捷、快速,避免了人力资源和时间的浪费。
综上可知,使用本申请提供的算法更新方法,首先通过计算设备,根据业务需求生成算法链,并从算法池中下载该算法链所需的算法模块,然后再向终端设备发送该算法链和算法模块,终端设备可以按照算法链执行上述算法模块实现业务需求,完成终端设备的算法更新。相比于通过人工根据新的业务需求生成算法更新包,并将使用该算法更新包对摄像机原有场景的算法包进行替换,本申请提供的算法更新方法可以使得摄像机的算法更新过程不再需要人工介入,计算设备可以根据新的业务需求直接调整算法链,再通过调用模块执行调整后的算法链实现业务需求,使得算法更新过程所需的时间和人力资源大大减少,可扩展性更强,适用的业务场景更加广泛。
简言之,计算设备收到需要由终端设备(例如摄像机)执行的业务请求后,生成实现业务请求的算法链,对于组成所述算法链的算法模块,一部分直接使用计算设备本地的算法模块,另外一部分算法模块(例如所述计算设备本地无法提供的算法模块)则从远端服务器中获得,从而既能对摄像机的算法实现更新,又利用到了计算设备本地已有的算法模块资源。而现有技术中,由开发人员生成用于执行业务请求的完整的算法包,然后把整个算法包从远端服务器更新摄像机。因此,现有技术既没有生成算法链,也没有合理利用所述计算设备本地已有的算法模块。和现有技术相比,本方案减少了对计算设备算法更新过程所需的时间和带宽资源占用。
下面结合图2和图5,以计算设备和终端设备均为摄像机,即算法编排模块110和调用模块130均部署于摄像机,第一算法子池位于边缘计算设备,第二算法子池位于云服务器的应用场景为例,对本申请提供的算法更新方法进行举例说明。
假设该应用场景中,摄像机1对路口进行拍摄,并对拍摄到的图像直接进行处理,比如行人身份识别、车辆车牌识别等等,部署了算法编排模块和调用模块的摄像机可以是如图2所示的摄像机1,部署了第一算法子池的边缘计算设备可以是如图2所示的边缘计算设备,部署了第二算法子池的云服务器可以是如图2所示的数据中心中的一台云服务器,如图5所示,使用本申请提供的算法更新方法对该场景中的摄像机1进行算法更新的步骤流程可以如下:
步骤51、摄像机1的算法编排模块接收业务需求,即:识别闯红灯的车辆车牌号。具体可以参考前述内容中的步骤S410,这里不展开赘述。
步骤52、摄像机1的算法编排模块根据业务需求生成对应的算法链S1,即车辆检测算法模块A-跟踪算法模块B-位置识别算法模块C-车牌识别算法模块D。具体实现中,算法编排模块可以查询对应关系库,获得与业务需求对应的算法链,对应关系库的具体描述可以参考前述内容中的步骤S420,这里不展开赘述。
步骤53、摄像机1的算法编排模块确定算法链S1所需的算法模块中,本地缺少的车牌 识别算法模块D,向边缘计算设备发送获取该车牌识别算法模块D的请求,该请求中包含了摄像机1的参数信息。
应理解,如果摄像机1是非首次进行算法部署,即摄像机1上已经根据之前的业务需求部署了一些算法,那么摄像机1在步骤S51接收到新的业务需求,并根据该业务需求生成了上述算法链S1之后,可以先确定本机是否存储有上述车辆检测算法模块A、跟踪算法模块B、位置识别算法模块C以及车牌识别算法模块D,然后向第一算法子池获取本机没有的算法模块。比如摄像机1之前的业务需求仅为对闯红灯的车辆的车牌进行拍照,那么摄像机1之前的算法链为车辆检测算法模块A-跟踪算法模块B-位置识别算法模块C,此时摄像机1可以只向第一算法子池获取车牌识别算法模块D,而无需再重复获取车辆检测算法模块A、跟踪算法模块B和位置识别算法模块C,从而减少数据传输量,提高算法更新速度。
当然,如果摄像机1首次进行算法部署,即摄像机1是一台崭新的、从未部署过任何算法的摄像机,那么摄像机1的算法编排模块在接收到业务需求,并根据该业务需求生成了对应的算法链后,可以直接向第一算法子池获取该算法链所需的全部算法模块,即上述车辆检测算法模块A、跟踪算法模块B、位置识别算法模块C以及车牌识别算法模块D。但是图5是以摄像机1本地已获取了车辆检测算法模块A、跟踪算法模块B、位置识别算法模块C为例,因此步骤53处,摄像机1的算法编排模块向边缘计算设备边缘计算设备上的第一算法子池获取车牌识别算法模块D。
步骤54、第一算法子池确定本地不包含该车牌识别算法模块D,向云服务器上的第二算法子池发送获取车牌识别算法模块D的请求,该请求中包含了摄像机1的参数信息。
可以理解的,如果第一算法子池包含了车牌识别算法模块D,那么第一算法子池可以直接将该算法模块D发送给摄像机1的算法编排模块。如果第一算法子池包含了车牌识别算法模块D,但是不包含与摄像机1的参数信息对应版本的车牌识别算法模块D,第一算法子池仍可以向第二算法子池发送获取车牌识别算法模块D的请求,该请求中包含了摄像机1的参数信息。
步骤55、第二算法子池根据摄像机1的参数信息,确定对应版本的车牌识别算法模块D1,并向第一算法子池发送该车牌识别算法模块D1,第一算法子池接收该车牌识别算法模块D1。
步骤56、第一算法子池将接收到的车牌识别算法模块D1发送给摄像机1的算法编排模块。摄像机1的算法编排模块接收该车牌识别算法模块D1。可以理解的,第一算法子池可以存储该模块D1,以供其他摄像机获取该模块。
步骤57、摄像机1的算法编排模块将算法链S1和对应的全部算法模块(即上述车辆检测算法模块A、跟踪算法模块B、位置识别算法模块C以及车牌识别算法模块D1)发送给调用模块。
步骤58、摄像机1的调用模块根据算法链S1,执行上述车辆检测算法模块A、跟踪算法模块B、位置识别算法模块C以及车牌识别算法模块D1,实现摄像机1的算法编排模块在步骤51接收到的业务需求。
步骤59、摄像机1的调用模块向算法编排模块反馈调用成功的信息,完成摄像机1的算法更新。
上述例子中,如果不使用本申请提供的方法,则需要开发人员根据新的业务需求生成一个完整的算法更新包,该更新包中包含了算法模块A-D,然后将更新包对摄像机进行安装,替换掉之前的更新包。而使用本申请提供的方法,摄像机1只是对算法链进行了调整,因此也只向第一算法子池获取了一个算法模块D,整个升级过程不但无需人工介入,减少人力资 源的浪费,还可以使得升级过程更加快速,减少通信量,降低升级成本。并且,通过多级部署算法池的方式,可以使得摄像机的算法编排模块获取各种算法模块的速度更快,提高整个算法更新系统的升级速度,同时可以使得摄像机能够获取到的算法模块种类更多,适应的业务场景更加丰富。
下面以计算设备和终端设备均为边缘计算设备,即算法编排模块、调用模块和第一算法子池位于边缘计算设备,第二算法子池位于云服务器的应用场景为例,对本申请提供的算法更新方法进行举例说明。
假设该应用场景中,摄像机1和摄像机2对路口进行拍摄,并将拍摄到的图像发送给边缘计算设备进行处理,比如行人身份识别、车辆车牌识别等等,部署了算法编排模块、调用模块和第一算法子池的边缘计算设备可以是如图2所示的离摄像机距离较近的道路一侧的边缘计算设备,部署了第二算法子池的云服务器可以是如图2所示的数据中心中的一台服务器,如图6所示,使用本申请提供的算法更新方法对该场景中的摄像机1和摄像机2进行算法更新的步骤流程可以如下:
步骤61、边缘计算设备的算法编排模块接收业务需求,即:识别闯红灯的车辆车牌号。具体可以参考前述内容中的步骤S410以及上述步骤51,这里不展开赘述。
步骤62、边缘计算设备的算法编排模块根据业务需求生成对应的算法链S1,即车辆检测算法模块A-跟踪算法模块B-位置识别算法模块C-车牌识别算法模块D。具体实现中,算法编排模块可以将业务需求输入算法模型获得对应的算法链,算法模型的获得方式可以参考前述内容中的步骤S420,这里不展开赘述。
步骤63、边缘计算设备的算法编排模块向本地的第一算法子池获取算法链S1所需的算法模块,确定本地缺少的算法模块为:车牌识别算法模块D。具体可以参考上述步骤53,这里不展开赘述。
步骤64、边缘计算设备的算法编排模块向云服务器的第二算法子池发送获取车牌识别算法模块D的请求,该请求包括边缘计算设备的参数信息,该参数信息可以包括边缘计算设备的处理器能力、处理器占用率、存储容量、设备温度等等,还可以包括与边缘计算设备相连的摄像机1和摄像机2拍摄的图片的分辨率、尺寸、格式等等,本申请不做具体限定。
步骤65、云服务器的第二算法子池根据边缘计算设备的参数信息,确定对应版本的车牌识别算法模块D1,并向边缘计算设备的算法编排模块发送该车牌识别算法模块D1。
步骤66、边缘计算设备的算法编排模块将将算法链S1和对应的全部算法模块(即上述车辆检测算法模块A、跟踪算法模块B、位置识别算法模块C以及车牌识别算法模块D1)发送给调用模块。边缘计算设备还可以将新接收到的车牌识别算法模块D1存储于第一算法子池中,使得摄像机1和摄像机2的业务场景再次发生变化,产生新的业务需求时,如果新的业务需求恰好需要车牌识别算法模块D1,那么边缘计算设备可以直接从本地的第一算法子池获取到该算法模块,从而减少算法模块传输所需的通信量,进而提高算法更新的速度。
步骤67、边缘计算设备的调用模块根据算法链S1,对各个算法模块进行串联,实现业务需求对应的业务功能。
步骤68、边缘计算设备的调用模块向算法编排模块调用成功的信息,完成边缘计算设备的算法更新,实现摄像机1和摄像机2的业务升级。
上述例子中,如果不使用本申请提供的方法,则需要开发人员根据新的业务需求生成一个完整的算法更新包,该更新包中包含了算法模块A-D,然后将更新包对边缘计算设备进行安装,替换掉之前的更新包。而使用本申请提供的方法,边缘计算设备只是对算法链进行了 调整,因此也只向第二算法子池获取了一个算法模块D,整个升级过程不但无需人工介入,减少人力资源的浪费,还可以使得升级过程更加快速,减少通信量,降低升级成本。
需要说明的,本申请提供的算法更新方法部署灵活,算法编排模块、算法池以及调用模块可以部署在摄像机上,也可以部署在边缘计算设备上,也可以部署在云服务器上。具体实现中,可以根据具体的应用场景,选择最合适的方案进行部署,图5和图6所示的应用场景用于举例说明,本申请不作具体限定。
上述详细阐述了本申请实施例的方法,为了便于更好的实施本申请实施例上述方案,相应地,下面还提供用于配合实施上述方案的相关设备。
参见图7,图7为本申请实施例提供的一种电子设备的结构示意图。其中,所述电子设备700可以是前述内容中的摄像机、边缘计算设备或者云服务器。如图7所示,电子设备700包括:处理器710、通信接口720以及存储器730,所示处理器710、通信接口720以及存储器730通过内部总线740相互连接。
处理器710、通信接口720和存储器730可通过总线方式连接,也可通过无线传输等其他手段实现通信。本申请实施例以通过总线740连接为例,其中,总线740可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线740可以分为地址总线、数据总线、控制总线等。为便于表示,图7中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
所述处理器710可以由一个或者多个通用处理器构成,例如中央处理器(Central Processing Unit,CPU),或者CPU和硬件芯片的组合。上述硬件芯片可以是专用集成电路(Application-Specific Inegrated Circuit,ASIC)、可编程逻辑器件(Programmable Logic Device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(Complex Programmable Logic Device,CPLD)、现场可编程逻辑门阵列(Field-Programmable Gate Array,FPGA)、通用阵列逻辑(Generic Array Logic,GAL)或其任意组合。处理器710执行各种类型的数字存储指令,例如存储在存储器730中的软件或者固件程序,它能使计算设备700提供较宽的多种服务。
在电子设备900是摄像机的情况下,所述存储器730用于存储程序代码、算法链和算法模块,并由处理器710来控制执行,所述程序代码中可以包括一个或者多个软件模块。例如,在调用模块部署于摄像机的应用场景中,处理器710可以包括调用模块,该调用模块用于接收算法编排模块发送的第一算法链和多个第一算法模块,并根据第一算法链执行上述多个一个算法模块,实现第一业务需求。再例如,在算法编排模块部署于摄像机的应用场景中,处理器710还可以包括算法编排模块,该算法编排模块用于接收第一业务需求,并根据第一业务需求生成对应的第一算法链,从本地和远端算法池获取该算法链所需的至少一个算法模块。再例如,在远端算法池部署于摄像机的应用场景中,比如第一算法子池位于摄像机,那么存储器730可以包括第一算法子池,该第一算法子池可以用于接收算法编排模块发送的算法模块的获取请求和摄像机的参数信息,向算法编排模块返回与该参数信息对应的算法模块,具体可以用于执行上述图1-图6中任一实施例中摄像机可以执行的处理步骤,这里不展开赘述。
在电子设备900是边缘计算设备的情况下,所述存储器730用于存储程序代码、算法链和算法模块,并由处理器710来控制执行,所述程序代码中可以包括一个或者多个软件模块。例如,在调用模块部署于边缘计算设备的应用场景中,处理器710还可以包括算法编排模块,该算法编排模块用于接收第一业务需求,并根据第一业务需求生成对应的第一算法链,从本 地和第二算法子池获取该算法链所需的至少一个算法模块。再例如,在算法编排模块部署于边缘计算设备的应用场景中,电子设备700还可以包括算法编排模块,该算法编排模块用于接收业务需求,并根据业务需求生成对应的算法链,向第一算法子池获取该算法链所需的至少一个算法模块。再例如,在远端算法池部署于边缘计算设备的应用场景中,那么存储器730可以包括第一算法子池,该第一算法子池可以用于接收算法编排模块发送的算法模块的获取请求和摄像机的参数信息,向算法编排模块返回与该参数信息对应的算法模块,具体可以用于执行上述图1-图6中任一实施例中边缘计算设备可以执行的处理步骤。
在电子设备900是云服务器的情况下,所述存储器730用于存储程序代码、算法链和算法模块,并由处理器710来控制执行,所述程序代码中可以包括一个或者多个软件模块。例如,在调用模块部署于云服务器的应用场景中,处理器710还可以包括算法编排模块,该算法编排模块用于接收第一业务需求,并根据第一业务需求生成对应的第一算法链,从本地获取该算法链所需的至少一个算法模块。再例如,在算法编排模块部署于边缘计算设备的应用场景中,电子设备700还可以包括算法编排模块,该算法编排模块用于接收业务需求,并根据业务需求生成对应的算法链,向第一算法子池获取该算法链所需的至少一个算法模块。再例如,在远端算法池部署于云服务器的应用场景中,那么存储器730可以包括第二算法子池,该第二算法子池可以用于接收第一算法子池发送的算法模块的获取请求和摄像机的参数信息,具体可以用于执行上述图1-图6中任一实施例中云服务器可以执行的处理步骤。
存储器730可以包括易失性存储器(Volatile Memory),例如随机存取存储器(Random Access Memory,RAM);存储器730也可以包括非易失性存储器(Non-Volatile Memory),例如只读存储器(Read-Only Memory,ROM)、快闪存储器(Flash Memory)、硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);存储器730还可以包括上述种类的组合。其中,存储器730可以存储有应用程序代码以及程序数据,比如第一算法子池或者第二算法子池,那么存储器730中可以存储有多个算法模块。
通信接口720可以为有线接口(例如以太网接口),可以为内部接口(例如高速串行计算机扩展总线(Peripheral Component Interconnect express,PCIe)总线接口)、有线接口(例如以太网接口)或无线接口(例如蜂窝网络接口或使用无线局域网接口),用于与与其他设备或模块进行通信。
需要说明的,图7仅仅是本申请实施例的一种可能的实现方式,实际应用中,所述电子设备还可以包括更多或更少的部件,这里不作限制。关于本申请实施例中未示出或未描述的内容,可参见前述图1-图6所述实施例中的相关阐述,这里不再赘述。图7所示的电子设备还可以是多个计算节点构成的计算机集群,本申请不作具体限定。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在处理器上运行时,图1-图6所示的方法流程得以实现。
本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在处理器上运行时,图1-图6所示的方法流程得以实现。
上述实施例,可以全部或部分地通过软件、硬件、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载或执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可 以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(Digital Subscriber Line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,高密度数字视频光盘(Digital Video Disc,DVD)、或者半导体介质。半导体介质可以是SSD。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。

Claims (15)

  1. 一种算法更新的方法,用于对终端设备运行的算法进行更新,其特征在于,所述方法包括:
    计算设备接收第一业务需求;
    所述计算设备生成用于实现所述第一业务需求的第一算法链,所述第一算法链用于描述执行所述第一业务需求的多个第一算法模块的执行顺序;
    所述计算设备从本地获取所述多个第一算法模块中的一部分算法模块,从远端算法池中获取所述多个第一算法模块中的其他算法模块;
    所述计算设备向所述终端设备发送所述第一算法链和所述多个第一算法模块,以供所述终端设备按照所述第一算法链执行所述多个第一算法模块实现所述第一业务需求。
  2. 根据权利要求1所述的方法,其特征在于:
    所述终端设备是摄像机;
    所述第一业务需求包括人员识别、人脸识别、车辆识别、车牌识别中的一个。
  3. 根据权利要求2所述的方法,其特征在于,所述远端算法池包括第一算法子池以及第二算法子池,所述计算设备从远端算法池中获取所述多个第一算法模块中的其他算法模块包括:
    所述计算设备向所述第一算法子池发送获取请求,以获取所述多个第一算法模块中的其他算法模块;
    所述计算设备接收所述第一算法子池发送的所述多个第一算法模块中的其他算法模块,其中,所述多个第一算法模块中的其他算法模块是所述第一算法子池直接从第一算法子池本地获取的,或者,所述多个第一算法模块中的其他模块是所述第一算法子池从所述第二算法子池获取的,或者,所述多个第一算法模块中的其他算法模块中的部分算法模块是所述第一算法子池从所述第一算法子池本地获取的,部分算法模块是所述第一算法子池从所述第二算法子池获取的。
  4. 根据权利要求1至3任一权利要求所述的方法,其特征在于,所述计算设备从本地获取所述多个第一算法模块中的一部分算法模块,从远端算法池中获取所述多个第一算法模块中的其他算法模块包括:
    所述计算设备确定所述终端设备的参数信息;
    所述计算设备从本地获取所述多个第一算法模块中的一部分与所述参数信息对应版本的算法模块,从远端算法池中获取所述多个第一算法模块中的与所述参数信息对应版本的其他算法模块,其中,所述多个第一算法模块中至少一个第一算法模块拥有多个版本。
  5. 根据权利要求3或4任一权利要求所述的方法,其特征在于,部署所述第二算法子池的存储设备是云服务器,部署所述第一算法子池的存储设备是边缘计算设备,所述计算设备与所述边缘计算设备连接,所述边缘计算设备与所述云服务器连接。
  6. 根据权利要求1至5任一权利要求所述的方法,其特征在于,所述计算设备向所述终端设备发送所述算法链和所述多个第一算法模块之后,还包括:
    所述计算设备接收第二业务需求;
    所述计算设备生成用于实现所述第二业务需求的第二算法链,所述第二算法链用于描述执行所述第二业务需求的多个第二算法模块的执行顺序;
    所述计算设备从所述本地和所述多个第一算法模块中获取所述多个第二算法模块中的一 部分算法模块,从所述远端算法池中获取所述多个第二算法模块中的其他算法模块;
    所述计算设备向所述终端设备发送所述第二算法链和所述多个第二算法模块,以供所述终端设备按照所述第二算法链执行所述多个第二算法模块实现所述第二业务需求。
  7. 一种算法更新系统,用于对终端设备运行的算法进行更新,其特征在于,所述系统包括算法编排模块、远端算法池以及调用模块,其中,
    所述算法编排模块用于接收第一业务需求;
    所述算法编排模块用于生成用于实现所述第一业务需求的第一算法链,所述第一算法链用于描述执行所述第一业务需求的多个第一算法模块的执行顺序;
    所述算法编排模块用于从本地获取所述多个第一算法模块中的一部分算法模块,从远端算法池中获取所述多个第一算法模块中的其他算法模块;
    所述算法编排模块用于向所述调用模块发送所述第一算法链和所述多个第一算法模块;
    所述调用模块用于按照所述第一算法链执行所述多个第一算法模块,以供所述终端设备按照实现所述第一业务需求。
  8. 根据权利要求7所述的系统,其特征在于,所述远端算法池包括第一算法子池以及第二算法子池,
    所述算法编排模块用于向所述第一算法子池发送获取请求,以获取所述多个第一算法模块中的其他算法模块;
    所述算法编排模块用于接收所述第一算法子池发送的所述多个第一算法模块中的其他算法模块,其中,所述多个第一算法模块中的其他算法模块是所述第一算法子池直接从第一算法子池本地获取的,或者,所述多个第一算法模块中的其他模块是所述第一算法子池从所述第二算法子池获取的,或者,所述多个第一算法模块中的其他算法模块中的部分算法模块是所述第一算法子池从所述第一算法子池本地获取的,部分算法模块是所述第一算法子池从所述第二算法子池获取的。
  9. 根据权利要求7或8任一权利要求所述的系统,其特征在于,
    所述算法编排模块用于确定所述终端设备的参数信息;
    所述算法编排模块用于从本地获取所述多个第一算法模块中的一部分与所述参数信息对应版本的算法模块,从远端算法池中获取所述多个第一算法模块中的与所述参数信息对应版本的其他算法模块,其中,所述多个第一算法模块中至少一个第一算法模块拥有多个版本。
  10. 根据权利要求7至9任一权利要求所述的系统,其特征在于,
    所述第二算法子池部署于云服务器,所述第一算法子池部署于边缘计算设备,所述边缘计算设备与所述云服务器连接;
    所述算法编排模块和所述调用模块部署于摄像机,所述摄像机与所述边缘计算设备连接;或者,
    所述算法编排模块部署于所述边缘计算设备,所述调用模块部署于所述摄像机,其中,所述摄像机与所述边缘计算设备相连;或者,
    所述算法编排模块和所述调用模块部署于所述边缘计算设备。
  11. 根据权利要求7至10任一权利要求所述的系统,其特征在于,
    所述算法编排模块还用于在向所述调用模块发送所述算法链和所述多个第一算法模块之后,接收第二业务需求;
    所述算法编排模块还用于生成用于实现所述第二业务需求的第二算法链,所述第二算法链用于描述执行所述第二业务需求的多个第二算法模块的执行顺序;
    所述算法编排模块还用于从本地和所述多个第一算法模块中获取所述多个第二算法模块中的部分算法模块,从远端算法池中获取所述多个第二算法模块中的其他算法模块;
    所述算法编排模块还用于向所述调用模块发送所述第二算法链和所述多个第二算法模块;
    所述调用模块用于按照所述第二算法链执行所述多个第二算法模块,实现所述第二业务需求。
  12. 一种计算机可读存储介质,其特征在于,包括指令,当所述指令在计算设备上运行时,使得所述计算设备执行如权利要求1至6任一权利要求所述的方法。
  13. 一种电子设备,其特征在于,包括处理器和存储器,所述处理器执行所述存储器中的代码执行如权利要求1至6任一权利要求所述的方法。
  14. 一种计算机程序产品,其特征在于,包括计算机程序,当所述计算机程序被计算设备读取并执行时,使得所述计算设备行如权利要求1至6任一权利要求所述的方法。
  15. 一种计算设备,用于对终端设备运行的算法进行更新,其特征在于,所述计算设备包括:
    接口,用于接收第一业务需求;
    处理器,用于:
    生成用于实现所述第一业务需求的第一算法链,所述第一算法链用于描述执行所述第一业务需求的多个第一算法模块的执行顺序;
    从所述计算设备本地获取所述多个第一算法模块中的一部分算法模块,从所述算法池服务器中获取所述多个第一算法模块中的其他算法模块;
    向所述终端设备发送所述第一算法链和所述多个第一算法模块,以供所述终端设备按照所述第一算法链执行所述多个第一算法模块实现所述第一业务需求。
PCT/CN2021/079430 2020-04-29 2021-03-06 算法更新的方法、系统及设备 WO2021218384A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010358510.1 2020-04-29
CN202010358510.1A CN113568630A (zh) 2020-04-29 2020-04-29 算法更新的方法、系统及设备

Publications (1)

Publication Number Publication Date
WO2021218384A1 true WO2021218384A1 (zh) 2021-11-04

Family

ID=78158854

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/079430 WO2021218384A1 (zh) 2020-04-29 2021-03-06 算法更新的方法、系统及设备

Country Status (2)

Country Link
CN (1) CN113568630A (zh)
WO (1) WO2021218384A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115474000A (zh) * 2022-08-16 2022-12-13 支付宝(杭州)信息技术有限公司 数据处理方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109451040A (zh) * 2018-12-10 2019-03-08 王顺志 基于边缘计算的物联网组网系统及组网方法
CN110197128A (zh) * 2019-05-08 2019-09-03 华南理工大学 基于边缘计算与云端统筹的人脸识别架构设计方法
CN110913181A (zh) * 2019-12-06 2020-03-24 太原师范学院 一种基于边缘计算的仓库视频监控系统
EP3629165A1 (en) * 2018-09-27 2020-04-01 INTEL Corporation Accelerated resource allocation techniques

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3629165A1 (en) * 2018-09-27 2020-04-01 INTEL Corporation Accelerated resource allocation techniques
CN109451040A (zh) * 2018-12-10 2019-03-08 王顺志 基于边缘计算的物联网组网系统及组网方法
CN110197128A (zh) * 2019-05-08 2019-09-03 华南理工大学 基于边缘计算与云端统筹的人脸识别架构设计方法
CN110913181A (zh) * 2019-12-06 2020-03-24 太原师范学院 一种基于边缘计算的仓库视频监控系统

Also Published As

Publication number Publication date
CN113568630A (zh) 2021-10-29

Similar Documents

Publication Publication Date Title
CN112199385B (zh) 用于人工智能ai的处理方法、装置、电子设备和存储介质
WO2019090993A1 (zh) 监控系统的部署方法、装置、计算机设备及存储介质
US11979686B2 (en) Method and system for software-defined camera and camera
CN110532098B (zh) 提供gpu服务的方法及系统
CN112148494B (zh) 用于算子服务的处理方法、装置、智能工作站和电子设备
CN112035516B (zh) 用于算子服务的处理方法、装置、智能工作站和电子设备
WO2022016998A1 (zh) 物联网控制系统的处理方法、系统、服务器、终端及介质
CN112069205B (zh) 用于业务应用的处理方法、装置、智能工作站和电子设备
CN112348081A (zh) 用于图像分类的迁移学习方法、相关装置及存储介质
CN110737425B (zh) 一种计费平台系统的应用程序的建立方法及装置
CN112463290A (zh) 动态调整计算容器的数量的方法、系统、装置和存储介质
CN111459610A (zh) 一种模型部署方法和装置
WO2021218384A1 (zh) 算法更新的方法、系统及设备
US20140237485A1 (en) System and method for aggregate data from multiple sources to provide a single cim object
CN110390813B (zh) 基于车型鉴别的大数据处理系统
CN116260725A (zh) 一种服务器的带宽分配方法、装置、电子设备及存储介质
CN111986473A (zh) 基于车型鉴别的大数据处理方法
US11429870B2 (en) Method for configuring deep learning program and container manager
CN112764839B (zh) 一种用于管理服务平台的大数据配置方法及系统
CN112667491B (zh) 虚拟机的功能测试方法及装置
CN115203133A (zh) 数据处理方法、装置、归约服务器及映射服务器
CN107818122A (zh) 一种代理组件、搜索管理方法及搜索管理系统
CN110753082A (zh) 服务调用方法及终端设备
WO2021197327A1 (zh) 信号处理方法及相关设备
US11934840B2 (en) Classification of hardware components

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21797421

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21797421

Country of ref document: EP

Kind code of ref document: A1