WO2020062914A1 - 一种算法的更新方法及装置 - Google Patents

一种算法的更新方法及装置 Download PDF

Info

Publication number
WO2020062914A1
WO2020062914A1 PCT/CN2019/090151 CN2019090151W WO2020062914A1 WO 2020062914 A1 WO2020062914 A1 WO 2020062914A1 CN 2019090151 W CN2019090151 W CN 2019090151W WO 2020062914 A1 WO2020062914 A1 WO 2020062914A1
Authority
WO
WIPO (PCT)
Prior art keywords
algorithm
deployed
network camera
image file
container
Prior art date
Application number
PCT/CN2019/090151
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 华为技术有限公司
Priority to EP19867919.3A priority Critical patent/EP3846023A4/en
Publication of WO2020062914A1 publication Critical patent/WO2020062914A1/zh
Priority to US17/213,834 priority patent/US11740886B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • 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
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/617Upgrading or updating of programs or applications for camera control
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Definitions

  • the embodiments of the present application relate to the field of communication technologies, and more specifically, to an algorithm update method and device.
  • the surveillance system can manage multiple network cameras, each network camera is equipped with monitoring software, and the monitoring software of each network camera is preset with algorithms for identifying images.
  • updating the algorithm will cause the network camera to reinstall the monitoring software, and reinstalling the monitoring software will cause all functions in the network camera to be interrupted, so that the network camera cannot operate normally.
  • the embodiments of the present application provide an algorithm update method and device, so as to update the algorithm without affecting the normal operation of the network camera.
  • an embodiment of the present application provides a method for updating an algorithm.
  • the method includes: a network camera receives a delete instruction including an identifier of an algorithm container to be deleted sent by a monitoring system, and the identifier of the algorithm container to be deleted in the delete instruction is a network camera.
  • the network camera deletes the algorithm container instance corresponding to the algorithm container ID to be deleted.
  • the network camera receives the description file of the algorithm to be deployed sent by the monitoring system.
  • the network camera parses the algorithm description file to be deployed to obtain the identification of at least one algorithm image file to be deployed, the at least one algorithm image file to be deployed encapsulates the algorithm to be deployed; the network camera obtains at least one An algorithm image file is deployed; the network camera generates an algorithm container instance to be deployed according to at least one algorithm algorithm file to be deployed, and the algorithm algorithm to be deployed runs in the instance of the algorithm container to be deployed.
  • neither the process of deleting the container instance of the algorithm to be deleted by the network camera nor the process of deploying the container instance of the algorithm to be deployed by the identification algorithm to be deployed has affected the network camera.
  • the normal operation of the algorithm is improved, so the algorithm updating method provided in the embodiments of the present application can improve the stability of the network camera during the algorithm updating process.
  • obtaining, by the network camera, at least one algorithm image file to be deployed according to an identifier of the algorithm image file to be deployed includes: determining, according to the identifier of the algorithm image file to be deployed, that the network camera is not stored in the network camera The first algorithm algorithm image file to be deployed, and the second algorithm algorithm image file stored in the network camera; the network camera sends a request to the monitoring system to obtain the first algorithm image file to be deployed; the network camera receives the monitoring system and sends the first standby An algorithm image file is deployed; the network camera forms at least one algorithm image file to be deployed by combining the first algorithm image file to be deployed and the second algorithm image file to be deployed.
  • the network camera needs to obtain the The image file of the algorithm to be deployed in the network camera does not need to obtain all the image files of the algorithm to be deployed on the monitoring system, thereby saving network transmission resources.
  • obtaining, by the network camera, at least one algorithm image file to be deployed according to an identifier of the algorithm image file to be deployed includes: determining, according to the identifier of the algorithm image file to be deployed, that the network camera is not stored in the network camera At least one algorithm image file to be deployed; the network camera sends a request to the monitoring system to obtain at least one algorithm image file to be deployed; the network camera receives at least one algorithm image file to be deployed sent by the monitoring system.
  • obtaining, by the network camera, at least one algorithm image file to be deployed according to an identifier of the algorithm image file to be deployed includes: determining, by the network camera, the At least one algorithm image file to be deployed; the network camera obtains at least one algorithm image file to be deployed.
  • the network camera generating an instance of an algorithm container to be deployed according to at least one algorithm image file to be deployed includes: the network camera generates an algorithm container image to be deployed according to the container engine and the algorithm description file to be deployed, the container The engine is preset in the network camera; the network camera creates an algorithm container instance to be deployed according to the algorithm container image to be deployed and at least one algorithm image file to be deployed.
  • the method further includes: the network camera determines the image of the algorithm container to be deleted corresponding to the algorithm container identifier to be deleted And at least one algorithm file to be deleted, at least one algorithm image file to be deleted encapsulates the algorithm to be deleted; the network camera deletes the container image of the algorithm to be deleted and at least one image file to be deleted.
  • the network camera After the container instance is deleted by the network camera, the network camera also needs to delete the container image and at least one algorithm image file stored in the memory of the network camera, thereby saving the storage resources of the network camera.
  • an embodiment of the present application provides a network camera.
  • the network camera includes a receiving module configured to receive a deletion instruction sent by a monitoring system and including an identifier of an algorithm container to be deleted.
  • the identifier of the algorithm container to be deleted in the deletion instruction is The identifier of the algorithm container instance to be deleted in the network camera.
  • the algorithm to be deleted is running in the algorithm container instance to be deleted.
  • the deletion module is used to delete the algorithm container instance to be deleted corresponding to the algorithm container identifier to be deleted.
  • the receiving module is also used to receive monitoring.
  • a deployment instruction including a description file of the algorithm to be deployed sent by the system; a parsing module configured to parse the description file of the algorithm to be deployed to obtain at least one file identifier, at least one file identifier to be at least one image image file to be deployed, and at least one algorithm to be deployed
  • An algorithm to be deployed is encapsulated in the image file; an obtaining module is configured to obtain at least one algorithm image file to be deployed according to an identifier of the algorithm image file to be deployed; and a generating module is configured to generate an instance of the algorithm container to be deployed according to at least one algorithm image file to be deployed, Run deployment algorithm to be deployed within the container instance algorithm.
  • the obtaining module is specifically configured to determine, according to the identifier of the algorithm image file to be deployed, the first algorithm image file to be deployed that is not stored in the network camera, and the image file to be stored in the network camera.
  • the second algorithm image file to be deployed sending a request to the monitoring system to obtain the first algorithm image file to be deployed; receiving the monitoring system to send the first algorithm image file to be deployed; the first algorithm image file to be deployed and the second algorithm image to be deployed
  • the files form at least one image file of the algorithm to be deployed.
  • the obtaining module is specifically configured to determine at least one to-be-deployed algorithm image file that is not stored in the network camera according to the identifier of the to-be-deployed algorithm image file; sending to the monitoring system to obtain at least one A request for an algorithm image file to be deployed; receiving at least one algorithm image file to be deployed sent by a monitoring system.
  • the obtaining module is specifically configured to determine at least one to-be-deployed algorithm image file stored in the network camera according to the identifier of the to-be-deployed algorithm image file; obtain at least one to-be-deployed algorithm image file .
  • the generating module is specifically configured to generate the container image of the algorithm to be deployed according to the container engine and the algorithm description file to be deployed, and the container engine is preset in the network camera; according to the container image of the algorithm to be deployed Create at least one algorithm container instance to be deployed with at least one algorithm algorithm file to be deployed.
  • the deletion module is further configured to determine an algorithm container image corresponding to the algorithm container identifier to be deleted and at least one algorithm image file to be deleted, and the at least one algorithm image file to be deleted is encapsulated. Algorithm to be deleted; delete the container image of the algorithm to be deleted and at least one image file of the algorithm to be deleted.
  • an embodiment of the present application provides a network camera.
  • the network camera includes one or more processors and a memory.
  • the one or more processors are configured to read software codes stored in the memory and execute the foregoing first section.
  • the method in one aspect or any possible implementation manner of the first aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores software code, where the software code is capable of executing the first aspect or after being read by one or more processors.
  • the method in any one of the possible aspects of the first aspect.
  • an embodiment of the present application provides a computer program product containing instructions, which when executed on a computer or processor, causes the computer or processor to execute the foregoing first aspect or any possible implementation of the first aspect Way in the way.
  • FIG. 1 is a schematic diagram of a scenario of an update algorithm according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a network camera according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an example of deleting a container of a network camera according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of an example of a network camera deployment container provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an example of a network camera generating container according to an embodiment of the present application.
  • FIG. 7 is a flowchart of another algorithm update method according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another network camera according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another network camera according to an embodiment of the present application.
  • the algorithm image file package includes a description file and at least one algorithm image file. Both the description file and the algorithm image file are files stored in the terminal.
  • the description file includes an identifier of an algorithm image file package and an identifier of at least one algorithm image file. At least one algorithm image file encapsulates an algorithm, a service running library, a root file system, and the like.
  • the container engine is an application.
  • the container engine can parse the description file to generate a container image.
  • the container engine can also use the container image and mount at least one algorithm image file to generate a container instance.
  • Container images are templates for container instances generated by the container engine through description files.
  • the container engine can use container images to generate one or more container instances.
  • a container instance is generated by the container engine using a container image and mounting at least one algorithm image file.
  • the algorithm running in the container instance is at least one algorithm encapsulated in the algorithm image file.
  • Algorithms running inside the container instance are used to process the image.
  • FIG. 1 is a schematic diagram of an update algorithm scenario provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a network camera provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of an example of a network camera deletion container provided by an embodiment of the present application
  • FIG. 4 is a schematic diagram of an example of a network camera deployment container provided by an embodiment of the present application.
  • the device in FIG. 1 includes a monitoring system 1, a mirror server 2, a plurality of network cameras 3, and a management device 4.
  • the image server 2 is used to provide the algorithm 1 with an algorithm image file package for the monitoring system 1.
  • the monitoring system 1 is configured to update the algorithm of the network camera 3 according to the control instruction sent by the management device 4 and the algorithm image file package provided by the mirror server 2.
  • the network camera 3 is configured to process an image according to an algorithm provided by the monitoring system 1.
  • FIG. 2 to FIG. 4 show a process in which the monitoring system 1 updates a face recognition algorithm in the network camera 3 to a license plate recognition algorithm.
  • the embodiment of the present application can also implement version upgrade of the same algorithm.
  • the network camera shown in FIG. 2 is a state before the update algorithm.
  • the device in FIG. 2 includes a monitoring system 1, a network camera 3, and a management device 4.
  • the hardware 31 of the network camera 3 runs an operating system 32
  • the operating system 32 runs monitoring software 33 and a container instance 34
  • the monitoring software 33 is used to implement functions such as image collection and remote communication.
  • the container identifier of the container instance 34 is “C-1”, and a face recognition algorithm running in the container instance 34 can recognize a face image in the collected image.
  • Container instance 34 is generated by the algorithm image file package that encapsulates the face recognition algorithm.
  • the storage path of the algorithm image file package that encapsulates the face recognition algorithm is "/webcam/.../RL/", which encapsulates the face recognition algorithm.
  • the identification of the algorithm image file package is "RL”.
  • the network camera 3 also stores an algorithm image file package that encapsulates the license plate recognition algorithm.
  • the license plate recognition algorithm can identify the license plate image in the collected image, and the algorithm image file that encapsulates the license plate recognition algorithm.
  • the storage path of the package is "/webcam/.../CP/"
  • the package image of the algorithm image file encapsulating the license plate recognition algorithm is "CP”
  • the license plate recognition algorithm does not run in the container instance of the network camera 3.
  • Table 1 is an example of a mapping relationship table stored by the network camera 3.
  • Table 2 shows an example of the mapping relationship table about the network camera 3 stored by the monitoring system 1.
  • the monitoring system 1 can grasp the condition of the network camera 3 through Table 2. It can be known from Table 2 that the monitoring system 1 can learn that the face recognition algorithm is running in the container instance 34 with the container identifier “C-1”, and the license plate recognition algorithm has not been run in the container instance of the network camera 3.
  • the monitoring system 1 receives a delete instruction with a container identifier of “C-1” and a deployment instruction with an algorithm image file package and an identifier of “CP” sent by the management device 4. Then, the monitoring system 1 sends a delete instruction with the container identifier “C-1” to the network camera 3. After the network camera 3 receives the delete instruction sent by the monitoring system 1 with the container identifier "C-1", the network camera 3 will find the container instance 34 corresponding to the container identifier "C-1" and delete the running face recognition Container instance 34 of the algorithm. Finally, the network camera 3 sends a confirmation message A to the monitoring system 1 to successfully delete the container instance 34 corresponding to the container identifier “C-1”.
  • Table 3 is an example of an updated mapping relationship table stored by the network camera 3.
  • Table 4 shows an example of the updated mapping table about the network camera 3 stored in the monitoring system 1.
  • the monitoring system 1 needs to update the mapping relationship stored locally The table, that is, the monitoring system 1 will fill in "None” in the cell of the container ID corresponding to "RL” in Table 4. In addition, the monitoring system 1 also needs to fill in "not yet deployed” in the cell of the running state of the algorithm image file package corresponding to "RL” in Table 4.
  • the monitoring system 1 obtains the identifier of the algorithm image file package in the deployment instruction sent by the management device 4, and the identifier of the algorithm image file package in the deployment instruction is "CP".
  • the monitoring system 1 can determine the storage path "/ monitoring system /.../ CP /" of the algorithm image file corresponding to "CP” in Table 6, and use the storage path "/ monitoring system /.../ CP /" Find the algorithm image file package of the license plate recognition algorithm.
  • the monitoring system 1 extracts the description file in the algorithm image file package of the license plate recognition algorithm, and the monitoring system 1 sends a deployment instruction with the description file to the network camera 3.
  • the algorithm image file package of the license plate recognition algorithm includes a description file and at least one algorithm image file.
  • the description file includes an identifier of the algorithm image file package and at least one algorithm image file.
  • At least one algorithm image file represents an algorithm image file or At least two algorithm image files.
  • At least one algorithm image file is three algorithm image files, and the three algorithm image files are a first algorithm image file encapsulated with a license plate recognition algorithm, and a first algorithm image file encapsulated with a service runtime library.
  • the second algorithm image file and the third algorithm image file that encapsulates the root file system.
  • the first algorithm image file is identified by JX-1
  • the second algorithm image file is identified by JX-2
  • the third algorithm image file is identified by JX. -3.
  • the network camera 3 parses the description file to obtain an identifier of an algorithm image file package and three algorithm image files.
  • the identifier of the obtained algorithm image file package is "CP”
  • the identifiers of the three obtained algorithm image files are JX-1, JX-2, and JX-3.
  • the network camera 3 will find the storage path of the algorithm image file package “/ network camera /.../ CP /” corresponding to “CP” according to Table 5, and the storage path of the algorithm image file package “/ network camera / ...
  • the network camera 3 generates a container instance 35 according to the three algorithm image files obtained.
  • the container instance 35 runs a license plate recognition algorithm, and the container identifier of the container instance 35 is "C-2".
  • the network camera 3 sends a confirmation message B to the monitoring system 1, the confirmation message B is that the container instance 35 running the license plate recognition algorithm is successfully generated, and the container identifier of the container instance 35 is "C-2".
  • Table 5 shows an example of the updated mapping relationship table stored by the network camera 3.
  • the network camera 3 has generated a container instance 35 running a license plate recognition algorithm, and the container identifier of the container instance 35 is "C-2".
  • the network camera 3 needs to update the mapping table stored locally. That is, the network camera 3 will fill in the "C-2" in the cell of the container ID corresponding to "CP” in Table 5, to indicate that the license plate recognition algorithm runs in the container instance 35 corresponding to the container ID "C-2" .
  • Table 6 shows an example of the updated mapping table about the network camera 3 stored in the monitoring system 1.
  • the monitoring system 1 needs to update the local mapping relationship table stored in the monitoring system 1, that is, the monitoring system 1 will correspond to the "CP” in Table 6.
  • “C-2” is filled in the cell of the container ID to indicate that the license plate recognition algorithm is running in the container instance 35 corresponding to the container ID "C-2".
  • the monitoring system 1 also needs to fill in “running” in the cell of the running state of the algorithm image file package corresponding to “CP” in Table 6.
  • FIG. 5 is a flowchart of an algorithm updating method according to an embodiment of the present application.
  • the algorithm updating method shown in FIG. 5 can improve the stability of the network camera during the algorithm updating process.
  • the method shown in FIG. 5 includes the following steps.
  • Step S11 The monitoring system sends a delete instruction with a container identifier of the algorithm to be deleted to the network camera.
  • the identifier of the algorithm container to be deleted in the deletion instruction is the identifier of the algorithm container instance to be deleted in the network camera, and the algorithm to be deleted is running in the algorithm container instance to be deleted.
  • Step S12 The network camera receives a delete instruction sent by the monitoring system with a container identifier of the algorithm to be deleted.
  • the network camera will receive the delete instruction with the algorithm container identifier to be deleted sent by the monitoring system.
  • Step S13 The network camera deletes the instance of the algorithm container to be deleted corresponding to the identifier of the algorithm container to be deleted.
  • the network camera will find the algorithm container instance to be deleted corresponding to the algorithm container identifier to be deleted, and delete the algorithm container instance to be deleted corresponding to the algorithm container identifier to be deleted.
  • the container instance 34 shown in FIG. 3 is the container instance of the algorithm to be deleted, and the face recognition algorithm in the container instance 34 is the algorithm to be deleted running in the container instance of the algorithm to be deleted.
  • the embodiment shown in FIG. 3 is a detailed process of a network camera deleting a container instance according to a delete instruction sent by a monitoring system.
  • Step S14 The monitoring system sends a deployment instruction including a description file of the algorithm to be deployed to the network camera.
  • step S11 and step S14 there are various ways regarding the sequential execution order of step S11 and step S14.
  • step S11 may be performed first, and then step S14 may be performed.
  • the monitoring system may first send a delete instruction with a container identifier of the algorithm to be deleted to the network camera, and then the monitoring system sends a deployment instruction including the algorithm description file to be deployed to the network camera.
  • step S11 and step S14 can be performed simultaneously.
  • the monitoring system may send a delete instruction with a container identifier of the algorithm to be deleted and a deployment instruction including a description file of the algorithm to be deployed to the network camera.
  • step S14 can be performed first, and then step S11 can be performed.
  • the monitoring system first sends a deployment instruction including a description file of the algorithm to be deployed to the network camera, and then the monitoring system sends a deletion instruction with the container identifier of the algorithm to be deleted to the network camera.
  • Step S15 The network camera receives a deployment instruction including a description file of an algorithm to be deployed sent by the monitoring system.
  • Step S16 The network camera parses the algorithm description file to be deployed to obtain at least one file identifier.
  • Each file identifier corresponds to an algorithm image file to be deployed, and the algorithm image file to be deployed encapsulates the algorithm to be deployed.
  • At least one file identifier represents one file identifier or at least two file identifiers
  • at least one algorithm image file represents one algorithm image file or at least two algorithm image files.
  • at least one file identifier is one file identifier
  • at least one algorithm image file is one algorithm image file
  • at least one algorithm image file is two algorithms Image files
  • at least one file identifier is three file identifiers
  • at least one algorithm image file is three algorithm image files.
  • At least one algorithm image file is three algorithm image files
  • the three algorithm image files are a first algorithm image file encapsulated with a license plate recognition algorithm, a second algorithm image file encapsulated with a business runtime library, and a package.
  • the third algorithm image file with the root file system, the identifier of the first algorithm image file is JX-1, the identifier of the second algorithm image file is JX-2, and the identifier of the third algorithm image file is JX-3.
  • Step S17 The network camera obtains at least one algorithm image file to be deployed corresponding to at least one file identifier.
  • Step S18 The network camera generates an algorithm container instance to be deployed according to at least one image algorithm file to be deployed, and the algorithm algorithm to be deployed runs in the instance of the algorithm container to be deployed.
  • the container instance 35 shown in FIG. 4 is the container instance of the algorithm to be deployed, and the license plate recognition algorithm in the container instance 35 is the algorithm to be deployed running in the container instance of the algorithm to be deployed.
  • the embodiment shown in FIG. 4 is a detailed process of deploying a container instance by a network camera according to a deployment instruction sent by a monitoring system.
  • the network camera generates an algorithm container instance to be deployed according to at least one image algorithm file to be deployed, and may further include the following steps: the network camera according to the container engine and the algorithm description file to be deployed An algorithm container image to be deployed is generated, and the container engine is preset in the network camera; the network camera creates an instance of the algorithm container to be deployed according to the algorithm container image to be deployed and at least one algorithm image file to be deployed.
  • the container engine is pre-deployed in the network camera, and the algorithm description file and algorithm image file to be deployed in the network camera are ready.
  • the container engine in the network camera generates an algorithm container image to be deployed by parsing the algorithm description file to be deployed.
  • the algorithm container image to be deployed is a static template for container instances used inside the container engine.
  • the container image to be deployed algorithm can be used to generate One or more dynamic container instances; then, the container engine uses the to-be-deployed algorithm container image and mounts the associated at least one to-be-deployed algorithm image file to generate the to-be-deployed algorithm container instance, and the to-be-deployed algorithm runs within the to-be-deployed algorithm container instance.
  • FIG. 6 is a schematic diagram of an example of a network camera generation container provided by an embodiment of the present application.
  • the hardware 41 of the network camera 4 in FIG. 6 runs an operating system 42.
  • the operating system 42 runs monitoring software 43 and a container engine 44.
  • the monitoring software 43 is used to implement functions such as image collection and remote communication.
  • the network camera 4 obtains the description file and at least one algorithm image file, it can generate a container image 45 according to the container engine 44 and the description file, and create a container instance 46 according to the container image 45 and at least one algorithm image file to be deployed.
  • the container instance 46 runs a license plate recognition algorithm 47, a service running library 48, and a root file system 49.
  • step S13 that is, after the network camera deletes the instance of the algorithm container to be deleted corresponding to the identifier of the algorithm container to be deleted
  • the embodiment shown in FIG. 5 further It may include the following steps: the network camera determines the algorithm container image to be deleted corresponding to the algorithm container identifier to be deleted and at least one algorithm image file to be deleted, at least one algorithm image file to be deleted encapsulates the algorithm to be deleted; the network camera deletes the algorithm container image to be deleted And at least one algorithm image file to be deleted.
  • FIG. 6 it is assumed that the container instance 46 in FIG. 6 is the algorithm container instance to be deleted corresponding to the algorithm container identifier to be deleted, and the container image 45 is the algorithm container image to be deleted corresponding to the algorithm container identifier to be deleted, FIG. 6 At least one of the algorithm image files is stored in the memory of the network camera 4. After the network camera 4 deletes the container instance 46, the network camera 4 also needs to delete the container image 45 and at least one algorithm image file stored in the memory of the network camera 4, so that the storage resources of the network camera 4 can be saved.
  • FIG. 7 is a flowchart of another algorithm update method according to an embodiment of the present application.
  • the embodiment shown in FIG. 7 is an extended embodiment based on the embodiment shown in FIG. 5, that is, step S17 in FIG. 5 may further include the following steps.
  • Step S21 The network camera determines, according to at least one file identifier, a first algorithm image file to be deployed that is not stored in the network camera, and a second algorithm image file to be deployed that is stored in the network camera.
  • the network camera determines that the image file of the first algorithm to be deployed is not stored in the network camera according to the at least one file identifier, and determines the second algorithm to be deployed
  • the image file is stored in the network camera, indicating that the second algorithm image file to be deployed can be reused.
  • the network camera needs to obtain the first algorithm algorithm image file in the monitoring system.
  • the network camera can also determine whether the algorithm image file to be deployed corresponding to the file identifier is stored in the network camera through the mapping relationship between the file identifier and the storage path.
  • the network camera can maintain a file list of the algorithm image files that have been stored.
  • the file list may include information such as the identifier, size, version, and storage path of the algorithm image files that have been saved.
  • the network camera can determine the first algorithm image file and the corresponding first file identifier that have not been stored in the network camera and the second algorithm image file and the corresponding file that have been stored in the network camera by querying the file list and comparing at least one file identifier. Second file identifier.
  • Table 7 is an example of a mapping table between a file identifier and a storage path stored by a network camera.
  • the file identifier "JX-1" does not correspond to the file storage path
  • the file identifier "JX-2” corresponds to the file storage path "/webcam/.../JX-2”
  • the image file of the algorithm to be deployed corresponding to -1 is not stored in the network camera
  • the image file of the algorithm to be deployed corresponding to the file identifier" JX-2 is stored in the network camera.
  • step S21 the first algorithm algorithm image file to be deployed is not stored in the network camera, and the network camera needs to obtain the first algorithm algorithm image file to be deployed on the monitoring system.
  • the second algorithm algorithm image file to be deployed is stored in the network camera, and the network camera can locally obtain the second algorithm algorithm image file to be deployed.
  • the number of the first algorithm image files to be deployed may be one, or may be two or more.
  • the number of the second algorithm image files to be deployed may be one, or may be two or more.
  • Step S22 The network camera sends a request to the monitoring system to obtain a first image file of the algorithm to be deployed.
  • Step S23 The monitoring system obtains a first image file of the algorithm to be deployed.
  • the monitoring system can directly obtain a corresponding first algorithm algorithm image file to be deployed.
  • the monitoring system may also obtain the first algorithm image file to be deployed corresponding to the first file identifier through the mapping relationship between the file identifier and the storage path.
  • Table 8 is an example of a mapping relationship table between a file identifier and a storage path stored by the monitoring system.
  • the monitoring system After the monitoring system receives a request from the network camera to obtain a first image file to be deployed corresponding to the first file identifier, the monitoring system will parse the first file identifier in the request, assuming the first file identifier is "JX- 1". Then, the monitoring system will use Table 8 to find the file storage path "/ monitoring system /.../ JX-1" corresponding to the file identifier "JX-1" and use the file storage path "/ monitoring system /.../ JX -1 "to obtain the image file of the algorithm to be deployed corresponding to the file identifier" JX-1 ".
  • Step S24 The monitoring system sends a first image file to be deployed to the network camera.
  • the surveillance system After the surveillance system obtains the first algorithm algorithm image file to be deployed, it can send the first algorithm algorithm image file to be deployed to the network camera.
  • Step S25 The network camera receives a first image file to be deployed sent by the monitoring system.
  • Step S26 The network camera obtains a second image algorithm file to be deployed.
  • the network camera can directly obtain the corresponding second algorithm image file to be deployed.
  • the network camera may also obtain the second image file to be deployed corresponding to the second file identifier through the mapping relationship between the file identifier and the storage path.
  • the network camera can obtain the file storage path "/ network camera / ..” corresponding to the file identifier "JX-2” in Table 7. ./JX-2 ", and use the file storage path" /webcam/.../JX-2 "to obtain the image file of the algorithm to be deployed corresponding to the file identifier" JX-2 ".
  • Step S27 The network camera forms at least one algorithm image file to be deployed by combining the first algorithm image file to be deployed and the second algorithm image file to be deployed.
  • a file storage path may only be used to store an image file of the algorithm to be deployed corresponding to a file identifier.
  • a file storage path in Table 7 is “/ network camera /.../ JX "-2" is only used to store the image file of the algorithm to be deployed corresponding to the file identifier "JX-2".
  • One file storage path can also be used to store multiple image files to be deployed corresponding to multiple file IDs.
  • step S21 if the network camera determines that at least one algorithm image file to be deployed corresponding to at least one file identifier is not stored in the network camera, then the network camera A request for acquiring at least one algorithm image file to be deployed corresponding to at least one file identifier may be sent to the monitoring system, and the network camera receives at least one algorithm image file to be deployed sent by the monitoring system.
  • step S21 if the network camera determines that at least one algorithm algorithm image file corresponding to at least one file identifier is stored in the network camera, then the network camera The at least one algorithm image file to be deployed corresponding to the at least one file identifier may be directly obtained.
  • the network camera determines whether at least one algorithm image file to be deployed corresponding to the at least one file identifier is stored in the network camera.
  • the network camera can obtain the image file of the algorithm to be deployed that is not stored in the network camera in the monitoring system.
  • the network camera can also reuse the locally stored algorithm image file to be deployed, so the network camera can obtain at least one file identifier according to the actual situation.
  • FIG. 8 is a schematic diagram of another network camera according to an embodiment of the present application.
  • the network camera includes the following modules:
  • the receiving module 11 is configured to receive a delete instruction with an identifier of an algorithm container to be deleted sent by a monitoring system.
  • the identifier of the algorithm container to be deleted in the delete instruction is an identifier of the algorithm container instance to be deleted in the network camera, and the algorithm container instance to be deleted runs Algorithm to be deleted.
  • the deleting module 12 is configured to delete an algorithm container instance to be deleted corresponding to the identifier of the algorithm container to be deleted. For a specific detailed implementation manner, please refer to the detailed description corresponding to step S13 in the method embodiment shown in FIG. 5 above.
  • the receiving module 11 is further configured to receive a deployment instruction sent by a monitoring system and including a description file of an algorithm to be deployed.
  • a deployment instruction sent by a monitoring system and including a description file of an algorithm to be deployed.
  • the parsing module 13 is configured to parse the algorithm description file to be deployed to obtain at least one file identifier, the at least one file identifier is an identifier of at least one algorithm algorithm file to be deployed, and the at least one algorithm algorithm file to be deployed encapsulates the algorithm to be deployed.
  • the at least one file identifier is an identifier of at least one algorithm algorithm file to be deployed
  • the at least one algorithm algorithm file to be deployed encapsulates the algorithm to be deployed.
  • the obtaining module 14 is configured to obtain at least one algorithm image file to be deployed corresponding to at least one file identifier.
  • the obtaining module 14 is configured to obtain at least one algorithm image file to be deployed corresponding to at least one file identifier.
  • a generating module 15 is configured to generate an algorithm container instance to be deployed according to at least one image algorithm file to be deployed, and the algorithm algorithm to be deployed runs in the instance of the algorithm container to be deployed.
  • the obtaining module 14 is specifically configured to determine, according to at least one file identifier, a first algorithm file to be deployed that is not stored in the network camera, and a second algorithm to be deployed that is stored in the network camera.
  • the obtaining module 14 is specifically configured to determine at least one algorithm image file to be deployed that is not stored in the network camera according to at least one file identifier; and send to the monitoring system to obtain at least one algorithm image file to be deployed Request; receive at least one algorithm image file to be deployed sent by the monitoring system.
  • the obtaining module 14 is specifically configured to determine at least one algorithm image file to be deployed stored in the network camera according to at least one file identifier; and obtain at least one algorithm image file to be deployed.
  • the obtaining module 14 is specifically configured to determine at least one algorithm image file to be deployed stored in the network camera according to at least one file identifier; and obtain at least one algorithm image file to be deployed.
  • the generating module 15 is specifically configured to generate the container image of the algorithm to be deployed according to the container engine and the algorithm description file to be deployed, and the container engine is preset in the network camera; according to the container image of the algorithm to be deployed and at least An algorithm image file to be deployed creates an instance of the algorithm container to be deployed.
  • the container engine is preset in the network camera; according to the container image of the algorithm to be deployed and at least An algorithm image file to be deployed creates an instance of the algorithm container to be deployed.
  • the deletion module 12 is further configured to determine an algorithm container image to be deleted and at least one algorithm image file to be deleted corresponding to the identifier of the algorithm container to be deleted, and at least one algorithm image file to be deleted is encapsulated to be deleted. Algorithm; delete the algorithm container image to be deleted and at least one algorithm image file to be deleted. For a specific detailed implementation manner, please refer to the corresponding detailed description in the method embodiment shown in FIG. 5 above.
  • FIG. 9 is a schematic diagram of another network camera according to an embodiment of the present application.
  • the network camera 5 includes a central processing unit 51, an image processor 52, an I / O device 53, a memory 54, and a non-volatile memory (NVM) memory 55.
  • the network camera 5 in FIG. 9 is equivalent to the network camera 3 in FIGS. 1 to 4.
  • NVM non-volatile memory
  • the network camera 5 shown in FIG. 9 may be applied to the method embodiments corresponding to FIG. 5 and FIG. 7.
  • the central processing unit 51 may use the I / O device 53 to receive a deletion instruction sent by the monitoring system with a container identifier of the algorithm to be deleted, and the central processor 51 may delete the container identifier corresponding to the algorithm to be deleted.
  • An example of an algorithm container The central processing unit 51 may use the I / O device 53 to receive a deployment instruction including a description file of an algorithm to be deployed sent by a monitoring system.
  • the central processing unit 51 may parse the algorithm description file to be deployed to obtain at least one file identifier.
  • the central processing unit 51 may use the I / O device 53 to obtain at least one algorithm image file to be deployed corresponding to at least one file identifier in the non-volatile memory 55, and the central processing unit 51 may generate an algorithm container instance to be deployed according to the at least one algorithm image file to be deployed .
  • a 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 device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center via a wired (e.g., Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website site, 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, a data center, or the like that includes one or more available medium integrations.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (Solid State Disk (SSD)), and the like.
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, a DVD
  • a semiconductor medium for example, a solid state disk (Solid State Disk (SSD)

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Closed-Circuit Television Systems (AREA)
  • Studio Devices (AREA)

Abstract

本申请实施例公开了一种算法的更新方法及装置,该方法包括:网络摄像机接收监控系统发送的具有待删除算法容器标识的删除指令;网络摄像机删除待删除算法容器标识对应的待删除算法容器实例;网络摄像机接收监控系统发送的包括待部署算法描述文件的部署指令;网络摄像机解析待部署算法描述文件得到至少一个文件标识;网络摄像机获取至少一个文件标识对应的至少一个待部署算法镜像文件;网络摄像机根据至少一个待部署算法镜像文件生成待部署算法容器实例。在网络摄像机更新算法的过程中,均未影响到网络摄像机的正常运行,本申请实施例提供的算法的更新方法可以提高网络摄像机在更新算法过程中的稳定性。

Description

一种算法的更新方法及装置 技术领域
本申请实施例涉及通信技术领域,更具体的说,涉及算法的更新方法及装置。
背景技术
在视频监控领域内,监控系统可以管理多个网络摄像机,每个网络摄像机均配置有监控软件,每个网络摄像机的监控软件内均预置有用于识别图像的算法。
在监控软件内的算法需要更新时,由于算法已经融入到网络摄像机的监控软件内,所以无法单独的更新算法,只能在网络摄像机内重新安装具有最新版本的算法的监控软件,以实现对算法的更新。
在上述相关技术中,更新算法会导致网络摄像机重新安装监控软件,重新安装监控软件会导致网络摄像机内的所有功能均被中断,以使网络摄像机无法正常运行。
发明内容
本申请实施例提供一种算法的更新方法及装置,以实现在不影响网络摄像机正常运行的情况下,对算法进行更新。
本申请实施例是这样实现的:
第一方面,本申请实施例提供了一种算法的更新方法,该方法包括:网络摄像机接收监控系统发送的包含待删除算法容器标识的删除指令,删除指令中的待删除算法容器标识为网络摄像机内的待删除算法容器实例的标识,待删除算法容器实例内运行有待删除算法;网络摄像机删除待删除算法容器标识对应的待删除算法容器实例;网络摄像机接收监控系统发送的包括待部署算法描述文件的部署指令;网络摄像机解析待部署算法描述文件得到至少一个待部署算法镜像文件的标识,至少一个待部署算法镜像文件内封装有待部署算法;网络摄像机根据待部署算法镜像文件的标识获取至少一个待部署算法镜像文件;网络摄像机根据至少一个待部署算法镜像文件生成待部署算法容器实例,待部署算法容器实例内运行有待部署算法。
在第一方面中,在网络摄像机删除运行有待删除算法的待删除算法容器实例的过程中,以及在网络摄像机部署运行有待部署识别算法的待部署算法容器实例的过程中,均未影响到网络摄像机的正常运行,所以本申请实施例提供的算法的更新方法可以提高网络摄像机在更新算法过程中的稳定性。
在第一方面的一种可实现的方式中,网络摄像机根据待部署算法镜像文件的标识获取至少一个待部署算法镜像文件包括:网络摄像机根据待部署算法镜像文件的标识确定未存储在网络摄像机中的第一待部署算法镜像文件,以及存储在网络摄像机中的第二待部署算法镜像文件;网络摄像机向监控系统发送获取第一待部署算法镜像文件的请求;网络摄像机接收监控系统发送第一待部署算法镜像文件;网络摄像机将第一待部署算法镜像文件和第二待部署算法镜像文件组成至少一个待部署算法镜像文件。
其中,如果至少一个待部署算法镜像文件中的一部分待部署算法镜像文件存储在网络摄像机内,另一部分待部署算法镜像文件未存储在网络摄像机内,那么网络摄像机需要在监控系统上获取未存储在网络摄像机内的待部署算法镜像文件,无需在监控系统上获取全部的待部署算法镜像文件,从而可以节省网络传输资源。
在第一方面的一种可实现的方式中,网络摄像机根据待部署算法镜像文件的标识获 取至少一个待部署算法镜像文件包括:网络摄像机根据待部署算法镜像文件的标识确定未存储在网络摄像机中的至少一个待部署算法镜像文件;网络摄像机向监控系统发送获取至少一个待部署算法镜像文件的请求;网络摄像机接收监控系统发送的至少一个待部署算法镜像文件。
在第一方面的一种可实现的方式中,网络摄像机根据待部署算法镜像文件的标识获取至少一个待部署算法镜像文件包括:网络摄像机根据待部署算法镜像文件的标识确定存储在网络摄像机中的至少一个待部署算法镜像文件;网络摄像机获取至少一个待部署算法镜像文件。
在第一方面的一种可实现的方式中,网络摄像机根据至少一个待部署算法镜像文件生成待部署算法容器实例包括:网络摄像机根据容器引擎和待部署算法描述文件生成待部署算法容器镜像,容器引擎预先设置在网络摄像机内;网络摄像机根据待部署算法容器镜像和至少一个待部署算法镜像文件创建待部署算法容器实例。
在第一方面的一种可实现的方式中,在网络摄像机删除待删除算法容器标识对应的待删除算法容器实例以后,方法还包括:网络摄像机确定待删除算法容器标识对应的待删除算法容器镜像和至少一个待删除算法镜像文件,至少一个待删除算法镜像文件内封装有待删除算法;网络摄像机删除待删除算法容器镜像和至少一个待删除算法镜像文件。
其中,在网络摄像机删除容器实例以后,网络摄像机还需要删除容器镜像和存储在网络摄像机的存储器内的至少一个算法镜像文件,从而可以节省网络摄像机的存储资源。
第二方面,本申请实施例提供了一种网络摄像机,该网络摄像机包括:接收模块,用于接收监控系统发送的包含待删除算法容器标识的删除指令,删除指令中的待删除算法容器标识为网络摄像机内的待删除算法容器实例的标识,待删除算法容器实例内运行有待删除算法;删除模块,用于删除待删除算法容器标识对应的待删除算法容器实例;接收模块,还用于接收监控系统发送的包括待部署算法描述文件的部署指令;解析模块,用于解析待部署算法描述文件得到至少一个文件标识,至少一个文件标识为至少一个待部署算法镜像文件的标识,至少一个待部署算法镜像文件内封装有待部署算法;获取模块,用于根据待部署算法镜像文件的标识获取至少一个待部署算法镜像文件;生成模块,用于根据至少一个待部署算法镜像文件生成待部署算法容器实例,待部署算法容器实例内运行有待部署算法。
在第二方面的一种可实现的方式中,获取模块,具体用于根据待部署算法镜像文件的标识确定未存储在网络摄像机中的第一待部署算法镜像文件,以及存储在网络摄像机中的第二待部署算法镜像文件;向监控系统发送获取第一待部署算法镜像文件的请求;接收监控系统发送第一待部署算法镜像文件;将第一待部署算法镜像文件和第二待部署算法镜像文件组成至少一个待部署算法镜像文件。
在第二方面的一种可实现的方式中,获取模块,具体用于根据待部署算法镜像文件的标识确定未存储在网络摄像机中的至少一个待部署算法镜像文件;向监控系统发送获取至少一个待部署算法镜像文件的请求;接收监控系统发送的至少一个待部署算法镜像文件。
在第二方面的一种可实现的方式中,获取模块,具体用于根据待部署算法镜像文件的标识确定存储在网络摄像机中的至少一个待部署算法镜像文件;获取至少一个待部署算法镜像文件。
在第二方面的一种可实现的方式中,生成模块,具体用于根据容器引擎和待部署算法描述文件生成待部署算法容器镜像,容器引擎预先设置在网络摄像机内;根据待部署算法容器镜像和至少一个待部署算法镜像文件创建待部署算法容器实例。
在第二方面的一种可实现的方式中,删除模块,还用于确定待删除算法容器标识对应的待删除算法容器镜像和至少一个待删除算法镜像文件,至少一个待删除算法镜像文件内封装有待删除算法;删除待删除算法容器镜像和至少一个待删除算法镜像文件。
第三方面,本申请实施例提供了一种网络摄像机,该网络摄像机包括一个或多个处理器以及存储器;其中,一个或多个处理器用于读取存储在存储器中的软件代码并执行上述第一方面或第一方面的任一种可能实现方式中的方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有软件代码,软件代码为在被一个或多个处理器读取后能够执行上述第一方面或第一方面的任一种可能实现方式中的方法。
第五方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机或处理器上运行时,使得计算机或处理器执行上述第一方面或第一方面的任一种可能实现方式中的方法。
附图说明
图1所示的为本申请实施例提供的一种更新算法的场景示意图;
图2所示的为本申请实施例提供的一种网络摄像机的示意图;
图3所示的为本申请实施例提供的一种网络摄像机删除容器实例的示意图;
图4所示的为本申请实施例提供的一种网络摄像机部署容器实例的示意图;
图5所示的为本申请实施例提供的一种算法的更新方法的流程图;
图6所示的为本申请实施例提供的一种网络摄像机生成容器实例的示意图;
图7所示的为本申请实施例提供的另一种算法的更新方法的流程图;
图8所示的为本申请实施例提供的另一种网络摄像机的示意图;
图9所示的为本申请实施例提供的又一种网络摄像机的示意图。
具体实施方式
在介绍本申请实施例以前,先介绍一下容器的相关概念。
算法镜像文件包中包括一个描述文件和至少一个算法镜像文件,描述文件和算法镜像文件均为终端内存储的文件。其中,描述文件内具有算法镜像文件包的标识和至少一个算法镜像文件的标识,至少一个算法镜像文件内封装有算法、业务运行库和根文件系统等。
容器引擎为一个应用程序。容器引擎可以解析描述文件生成容器镜像,容器引擎还可以使用容器镜像并挂载至少一个算法镜像文件生成容器实例。
容器镜像为容器引擎通过描述文件生成的容器实例的模板,容器引擎可以使用容器镜像生成一个或多个容器实例。
容器实例为容器引擎使用容器镜像并挂载至少一个算法镜像文件生成的,容器实例 内运行的算法为至少一个算法镜像文件内封装的算法。
容器实例内运行的算法用于对图像进行处理。
请参见图1至图4所示,图1所示的为本申请实施例提供的一种更新算法的场景示意图,图2所示的为本申请实施例提供的一种网络摄像机的示意图,图3所示的为本申请实施例提供的一种网络摄像机删除容器实例的示意图,图4所示的为本申请实施例提供的一种网络摄像机部署容器实例的示意图。
在图1所示的实施例中,图1中的设备包括监控系统1、镜像服务器2、多个网络摄像机3和管理设备4。镜像服务器2用于为监控系统1提供封装有算法的算法镜像文件包。监控系统1用于根据管理设备4发送的控制指令和镜像服务器2提供的算法镜像文件包对网络摄像机3的算法进行更新。网络摄像机3用于根据监控系统1提供的算法处理图像。
请参见图2至图4所示,图2至图4所示的为监控系统1将网络摄像机3内的人脸识别算法更新为车牌识别算法的过程。当然,本申请实施例也可以实现对同一个算法进行版本的升级。
请参见图2所示,图2所示的网络摄像机为更新算法以前的状态。图2中的设备包括监控系统1、网络摄像机3和管理设备4。其中,网络摄像机3的硬件31上运行着操作系统32,操作系统32运行着监控软件33和容器实例34,监控软件33用于实现采集图像和远程通信等功能。
在图2所示的实施例中,容器实例34的容器标识为“C-1”,容器实例34内运行的人脸识别算法可以识别采集的图像中的人脸图像。容器实例34是由封装有人脸识别算法的算法镜像文件包生成的,封装有人脸识别算法的算法镜像文件包的存储路径为“/网络摄像机/.../RL/”,封装有人脸识别算法的算法镜像文件包的标识为“RL”。
在图2所示的实施例中,网络摄像机3内还存储了封装有车牌识别算法的算法镜像文件包,车牌识别算法可以识别采集的图像中的车牌图像,封装有车牌识别算法的算法镜像文件包的存储路径为“/网络摄像机/.../CP/”,封装有车牌识别算法的算法镜像文件包的标识为“CP”,车牌识别算法并未运行在网络摄像机3的容器实例中。
请参见表1所示,表1所示的为网络摄像机3存储的映射关系表的示例。
Figure PCTCN2019090151-appb-000001
表1
请参见表2所示,表2所示的为监控系统1存储的关于网络摄像机3的映射关系表的示例。
Figure PCTCN2019090151-appb-000002
表2
在图2所示的实施例中,监控系统1通过表2可以掌握网络摄像机3的情况。通过表2可以得知,监控系统1可以得知人脸识别算法正运行在容器标识为“C-1”的容器实例34中,车牌识别算法尚未运行在网络摄像机3的容器实例中。
请参见图3所示,监控系统1接收到管理设备4发送的具有容器标识为“C-1”的删除指令和具有算法镜像文件包的标识为“CP”的部署指令。然后,监控系统1会向网络摄像机3发送具有容器标识为“C-1”的删除指令。在网络摄像机3接收到监控系统1发送的具有容器标识为“C-1”的删除指令以后,网络摄像机3会找到容器标识为“C-1”对应的容器实例34,并删除运行有人脸识别算法的容器实例34。最后,网络摄像机3会向监控系统1发送成功删除容器标识为“C-1”对应的容器实例34的确认消息A。
请参见表3所示,表3所示的为网络摄像机3存储的更新后的映射关系表的示例。
Figure PCTCN2019090151-appb-000003
表3
通过表3可以得知,在网络摄像机3删除容器标识为“C-1”对应的容器实例34以后,网络摄像机3需要更新存储在本地的映射关系表,即网络摄像机3会在表3中的“RL”对应的容器标识的单元格中填入“无”。
请参见表4所示,表4所示的为监控系统1存储的更新后的关于网络摄像机3的映射关系表的示例。
Figure PCTCN2019090151-appb-000004
表4
通过表4可以得知,在监控系统1接收到网络摄像机3发送的成功删除容器标识为“C-1”对应的容器实例34的确认消息A以后,监控系统1需要更新存储在本地的映射关系表,即监控系统1会在表4中的“RL”对应的容器标识的单元格中填入“无”。而且,监控系统1还需要在表4中的“RL”对应的算法镜像文件包的运行状态的单元格中填入“尚未部署”。
请参见图4所示,在监控系统1修改完的映射关系表以后,监控系统1获取管理设备4发送的部署指令中的算法镜像文件包的标识,部署指令中的算法镜像文件包的标识为“CP”。监控系统1可以在表6中确定“CP”对应的算法镜像文件包的存储路径“/监控系统/.../CP/”,并利用存储路径“/监控系统/.../CP/”找到车牌识别算法的算法镜像文件包。监控系统1提取车牌识别算法的算法镜像文件包中的描述文件,监控系统1会向网络摄像机3发送具有描述文件的部署指令。其中,车牌识别算法的算法镜像文件包中包括描述文件和至少一个算法镜像文件,描述文件包括算法镜像文件包的标识和至少一个算法镜像文件的标识,至少一个算法镜像文件表示一个算法镜像文件或至少两个算法镜像文件。
在图4所示的实施例中,假设至少一个算法镜像文件为三个算法镜像文件,这三个算法镜像文件分别为封装有车牌识别算法的第一算法镜像文件、封装有业务运行库的第二算法镜像文件和封装有根文件系统的第三算法镜像文件,第一算法镜像文件的标识为JX-1,第二算法镜像文件的标识为JX-2,第三算法镜像文件的标识为JX-3。
在图4所示的实施例中,在网络摄像机3接收到监控系统1发送的具有描述文件的部署指令以后,网络摄像机3会解析该描述文件得到算法镜像文件包的标识和三个算法镜像文件的标识,其中,得到的算法镜像文件包的标识为“CP”,得到的三个算法镜像文件的标识为JX-1、JX-2和JX-3。网络摄像机3会根据表5找到“CP”对应的算法镜像文件包的存储路径“/网络摄像机/.../CP/”,并在算法镜像文件包的存储路径“/网络摄像机/.../CP/”中获取三个算法镜像文件的标识(JX-1、JX-2和JX-3)对应的三个算法镜像文件。然后,网络摄像机3会根据得到的三个算法镜像文件生成容器实例35,其中,容器实例35内运行有车牌识别算法,容器实例35的容器标识为“C-2”。最后,网络摄像机3会向监控系统1发送确认消息B,该确认消息B为成功生成运行有车牌识别算法的容器实例35,且容器实例35的容器标识为“C-2”。
请参见表5所示,表5所示的为网络摄像机3存储的更新后的映射关系表的示例。
Figure PCTCN2019090151-appb-000005
表5
通过表5可以得知,网络摄像机3已经生成了运行有车牌识别算法的容器实例35,且容器实例35的容器标识为“C-2”,网络摄像机3需要更新存储在本地的映射关系表,即网络摄像机3会在表5中的“CP”对应的容器标识的单元格中填入“C-2”,以表示车牌识别算法运行在容器标识为“C-2”对应的容器实例35中。
请参见表6所示,表6所示的为监控系统1存储的更新后的关于网络摄像机3的映射关系表的示例。
Figure PCTCN2019090151-appb-000006
表6
通过表6可以得知,在监控系统1接收到网络摄像机3发送的确认消息B以后,监控系统1需要更新存储在本地的映射关系表,即监控系统1会在表6中的“CP”对应的容器标识的单元格中填入“C-2”,以表示车牌识别算法运行在容器标识为“C-2”对应的容器实例35中。而且,监控系统1还需要在表6中的“CP”对应的算法镜像文件包的运行状态的单元格中填入“正在运行”。
在图2至图4所示的实施例中,在网络摄像机3删除运行有人脸识别算法的容器实例34的过程中,以及在网络摄像机3部署运行有车牌识别算法的容器实例35的过程中,均未影响到网络摄像机3的正常运行,所以本申请实施例提供的算法的更新方法可以提 高网络摄像机3在更新算法过程中的稳定性。
上面通过图1至图4所示的实施例简要的展示了网络摄像机3更新算法的场景和过程,下面开始详细介绍本申请实施例提供的算法的更新方法及装置。
请参见图5所示,图5所示的为本申请实施例提供的一种算法的更新方法的流程图。图5所示的算法的更新方法可以提高网络摄像机在更新算法过程中的稳定性。图5所示的方法包括以下步骤。
步骤S11、监控系统向网络摄像机发送具有待删除算法容器标识的删除指令。
其中,删除指令中的待删除算法容器标识为网络摄像机内的待删除算法容器实例的标识,待删除算法容器实例内运行有待删除算法。
步骤S12、网络摄像机接收监控系统发送的具有待删除算法容器标识的删除指令。
其中,在监控系统向网络摄像机发送具有待删除算法容器标识的删除指令以后,网络摄像机便会接收到监控系统发送的具有待删除算法容器标识的删除指令。
步骤S13、网络摄像机删除待删除算法容器标识对应的待删除算法容器实例。
其中,网络摄像机会找到待删除算法容器标识对应的待删除算法容器实例,并删除待删除算法容器标识对应的待删除算法容器实例。
例如,请参见图3所示,图3所示的容器实例34即为待删除算法容器实例,容器实例34内的人脸识别算法即为待删除算法容器实例内运行的待删除算法。
关于步骤S11至步骤S13,可以参见图3所示的实施例,图3所示的实施例为网络摄像机根据监控系统发送的删除指令删除容器实例的详细过程。
步骤S14、监控系统向网络摄像机发送包括待部署算法描述文件的部署指令。
其中,关于步骤S11和步骤S14的先后执行顺序存在多种方式。
第一种方式,可以先执行步骤S11,再执行步骤S14。例如,监控系统可以先向网络摄像机发送具有待删除算法容器标识的删除指令,然后,监控系统再向网络摄像机发送包括待部署算法描述文件的部署指令。
第二种方式,可以同时执行步骤S11和步骤S14。例如,监控系统可以向网络摄像机发送具有待删除算法容器标识的删除指令和包括待部署算法描述文件的部署指令。
第三种方式,可以先执行步骤S14,再执行步骤S11。例如,监控系统先向网络摄像机发送包括待部署算法描述文件的部署指令,然后,监控系统再向网络摄像机发送具有待删除算法容器标识的删除指令。
步骤S15、网络摄像机接收监控系统发送的包括待部署算法描述文件的部署指令。
步骤S16、网络摄像机解析待部署算法描述文件得到至少一个文件标识。
其中,每一个文件标识都对应有待部署算法镜像文件,待部署算法镜像文件内封装有待部署算法。
至少一个文件标识表示一个文件标识或至少两个文件标识,至少一个算法镜像文件表示一个算法镜像文件或至少两个算法镜像文件。例如,在至少一个文件标识为1个文件标识时,至少一个算法镜像文件为1个算法镜像文件;又如,在至少一个文件标识为2个文件标识时,至少一个算法镜像文件为2个算法镜像文件;再如,在至少一个文件标识为3个文件标识时,至少一个算法镜像文件为3个算法镜像文件。
例如,假设1:至少一个算法镜像文件为三个算法镜像文件,这三个算法镜像文件分别为封装有车牌识别算法的第一算法镜像文件、封装有业务运行库的第二算法镜像文件和封装有根文件系统的第三算法镜像文件,第一算法镜像文件的标识为JX-1,第二算法镜像文件的标识为JX-2,第三算法镜像文件的标识为JX-3。
步骤S17、网络摄像机获取至少一个文件标识对应的至少一个待部署算法镜像文件。
其中,网络摄像机获取至少一个文件标识对应的至少一个待部署算法镜像文件存在多种情况,后面的实施例会详细的介绍多种情况。
步骤S18、网络摄像机根据至少一个待部署算法镜像文件生成待部署算法容器实例,待部署算法容器实例内运行有待部署算法。
例如,请参见图4所示,图4所示的容器实例35即为待部署算法容器实例,容器实例35内的车牌识别算法即为待部署算法容器实例内运行的待部署算法。
关于步骤S14至步骤S18,可以参见图4所示的实施例,图4所示的实施例为网络摄像机根据监控系统发送的部署指令部署容器实例的详细过程。
在图5所示的实施例中,在网络摄像机删除运行有待删除算法的待删除算法容器实例的过程中,以及在网络摄像机部署运行有待部署识别算法的待部署算法容器实例的过程中,均未影响到网络摄像机的正常运行,所以本申请实施例提供的算法的更新方法可以提高网络摄像机在更新算法过程中的稳定性。
在图5所示的实施例的一种可实现的方式中,网络摄像机根据至少一个待部署算法镜像文件生成待部署算法容器实例还可以包括以下步骤:网络摄像机根据容器引擎和待部署算法描述文件生成待部署算法容器镜像,容器引擎预先设置在网络摄像机内;网络摄像机根据待部署算法容器镜像和至少一个待部署算法镜像文件创建待部署算法容器实例。
其中,网络摄像机内预先部署了容器引擎,并且网络摄像机内的待部署算法描述文件和算法镜像文件已经就绪。首先,网络摄像机内的容器引擎通过解析待部署算法描述文件生成一个待部署算法容器镜像,待部署算法容器镜像是容器引擎内部使用的一个关于容器实例的静态模板,待部署算法容器镜像可用于生成一个或多个动态的容器实例;然后,容器引擎使用待部署算法容器镜像并挂载关联的至少一个待部署算法镜像文件生成待部署算法容器实例,待部署算法运行在待部署算法容器实例内。
例如,请参考假设1,并参见图6所示,图6所示的为本申请实施例提供的一种网络摄像机生成容器实例的示意图。其中,图6中的网络摄像机4的硬件41上运行着操作系统42,操作系统42运行着监控软件43和容器引擎44,监控软件43用于实现采集图像和远程通信等功能。网络摄像机4在获取到描述文件和至少一个算法镜像文件以后,便可以根据容器引擎44和描述文件生成容器镜像45,并根据容器镜像45和至少一个待部署算法镜像文件创建容器实例46。容器实例46中运行有车牌识别算法47、业务运行库48和根文件系统49。
在图5所示的实施例的另一种可实现的方式中,在步骤S13以后,即在网络摄像机删除待删除算法容器标识对应的待删除算法容器实例以后,图5所示的实施例还可以包括以下步骤:网络摄像机确定待删除算法容器标识对应的待删除算法容器镜像和至少一 个待删除算法镜像文件,至少一个待删除算法镜像文件内封装有待删除算法;网络摄像机删除待删除算法容器镜像和至少一个待删除算法镜像文件。
例如,请参见图6所示,假设图6中的容器实例46为待删除算法容器标识对应的待删除算法容器实例,容器镜像45为待删除算法容器标识对应的待删除算法容器镜像,图6中的至少一个算法镜像文件存储在网络摄像机4的存储器内。在网络摄像机4删除容器实例46以后,网络摄像机4还需要删除容器镜像45和存储在网络摄像机4的存储器内的至少一个算法镜像文件,从而可以节省网络摄像机4的存储资源。
请参见图7所示,图7所示的为本申请实施例提供的另一种算法的更新方法的流程图。图7所示的实施例为建立在图5所示的实施例的基础上的扩展实施例,即图5的步骤S17还可以包括以下步骤。
步骤S21、网络摄像机根据至少一个文件标识确定未存储在网络摄像机中的第一待部署算法镜像文件,以及存储在网络摄像机中的第二待部署算法镜像文件。
其中,在网络摄像机通过解析待部署算法描述文件得到的至少一个文件标识中,如果网络摄像机根据至少一个文件标识确定第一待部署算法镜像文件未存储在网络摄像机中,且确定第二待部署算法镜像文件存储在网络摄像机中,说明第二待部署算法镜像文件可以被复用,网络摄像机需要在监控系统中获取第一待部署算法镜像文件。
当然,网络摄像机还可以通过文件标识与存储路径的映射关系来确定文件标识对应的待部署算法镜像文件是否存储在网络摄像机中。网络摄像机可以维护已经存储的算法镜像文件的文件列表,文件列表中可以包括已保存的算法镜像文件的标识、大小、版本及存储路径等信息。网络摄像机可以通过查询文件列表,并比照至少一个文件标识,确定网络摄像机中还未存储的第一算法镜像文件和对应的第一文件标识,以及网络摄像机中已经存储的第二算法镜像文件和对应的第二文件标识。
例如,请参见表7所示,表7所示的为网络摄像机存储的文件标识与存储路径的映射关系表的示例。在表7中,文件标识“JX-1”未对应有文件存储路径,文件标识“JX-2”对应有文件存储路径“/网络摄像机/.../JX-2”,说明文件标识“JX-1”对应的待部署算法镜像文件未存储在网络摄像机中,且文件标识“JX-2”对应的待部署算法镜像文件存储在网络摄像机中。
文件标识 文件标识对应的文件存储路径
JX-1
JX-2 /网络摄像机/.../JX-2
表7
在步骤S21中,第一待部署算法镜像文件未存储在网络摄像机中,网络摄像机需要在监控系统上获取到第一待部署算法镜像文件。第二待部署算法镜像文件存储在网络摄像机中,网络摄像机可以在本地获取到第二待部署算法镜像文件。
在步骤S21中,第一待部署算法镜像文件的数量可以为1个,也可以为2个或2个以上。第二待部署算法镜像文件的数量可以为1个,也可以为2个或2个以上。
例如,假设至少一个文件标识对应的待部署算法镜像文件的数量为5个,其中,第一待部署算法镜像文件的数量为3个,那么第二待部署算法镜像文件的数量=5个-3个 =2个。
又如,假设至少一个文件标识对应的待部署算法镜像文件的数量为5个,其中,第一待部署算法镜像文件的数量为1个,那么第二待部署算法镜像文件的数量=5个-1个=4个。
步骤S22、网络摄像机向监控系统发送获取第一待部署算法镜像文件的请求。
步骤S23、监控系统获取第一待部署算法镜像文件。
其中,监控系统可以直接获取到对应的第一待部署算法镜像文件。
当然,监控系统还可以通过文件标识与存储路径的映射关系来获取第一文件标识对应的第一待部署算法镜像文件。
例如,请参见表8所示,表8所示的为监控系统存储的文件标识与存储路径的映射关系表的示例。在监控系统接收到网络摄像机发送的获取第一文件标识对应的第一待部署算法镜像文件的请求以后,监控系统会解析出该请求内的第一文件标识,假设第一文件标识为“JX-1”。然后,监控系统会利用表8找到文件标识“JX-1”对应的文件存储路径“/监控系统/.../JX-1”,并利用文件存储路径“/监控系统/.../JX-1”获取到文件标识“JX-1”对应的待部署算法镜像文件。
文件标识 文件标识对应的文件存储路径
JX-1 /监控系统/.../JX-1
JX-2 /监控系统/.../JX-2
表8
步骤S24、监控系统向网络摄像机发送第一待部署算法镜像文件。
其中,在监控系统获取到第一待部署算法镜像文件以后,便可以向网络摄像机发送第一待部署算法镜像文件。
步骤S25、网络摄像机接收监控系统发送的第一待部署算法镜像文件。
步骤S26、网络摄像机获取第二待部署算法镜像文件。
其中,网络摄像机可以直接获取到对应的第二待部署算法镜像文件。
当然,网络摄像机还可以通过文件标识与存储路径的映射关系来获取第二文件标识对应的第二待部署算法镜像文件。
例如,请结合表7所示,假设第二文件标识为“JX-2”,网络摄像机可以在表7中获取到与文件标识“JX-2”对应有文件存储路径“/网络摄像机/.../JX-2”,并利用文件存储路径“/网络摄像机/.../JX-2”获取到文件标识“JX-2”对应的待部署算法镜像文件。
步骤S27、网络摄像机将第一待部署算法镜像文件和第二待部署算法镜像文件组成至少一个待部署算法镜像文件。
在图7所示的实施例中,如果至少一个待部署算法镜像文件中的一部分待部署算法镜像文件存储在网络摄像机内,另一部分待部署算法镜像文件未存储在网络摄像机内,那么网络摄像机需要在监控系统上获取未存储在网络摄像机内的待部署算法镜像文件,无需在监控系统上获取全部的待部署算法镜像文件,从而可以节省网络传输资源。
在图7所示的实施例中,一个文件存储路径可以仅用于存储一个文件标识对应的待部署算法镜像文件,例如,表7中的一个文件存储路径“/网络摄像机/.../JX-2”仅用 于存储文件标识“JX-2”对应的待部署算法镜像文件。一个文件存储路径还可以用于存储多个文件标识对应的多个待部署算法镜像文件,例如,假设一个文件存储路径“/网络摄像机/.../JX-3-5”用于存储文件标识“JX-3”对应的待部署算法镜像文件、文件标识“JX-4”对应的待部署算法镜像文件和文件标识“JX-5”对应的待部署算法镜像文件。
在图7所示的实施例的一种可实现的方式中,在步骤S21中,如果网络摄像机确定至少一个文件标识对应的至少一个待部署算法镜像文件均未存储在网络摄像机中,那么网络摄像机可以向监控系统发送获取至少一个文件标识对应的至少一个待部署算法镜像文件的请求,并且网络摄像机接收监控系统发送的至少一个待部署算法镜像文件。
在图7所示的实施例的另一种可实现的方式中,在步骤S21中,如果网络摄像机确定至少一个文件标识对应的至少一个待部署算法镜像文件均存储在网络摄像机中,那么网络摄像机可以直接获取至少一个文件标识对应的至少一个待部署算法镜像文件。
在图7所示的实施例中,在网络摄像机解析待部署描述文件得到至少一个文件标识以后,网络摄像机会判断至少一个文件标识对应的至少一个待部署算法镜像文件是否存储在网络摄像机内部。网络摄像机可以在监控系统中获取到网络摄像机内部未存储的待部署算法镜像文件,网络摄像机也可以复用本地预先存储的待部署算法镜像文件,所以网络摄像机可以根据实际情况来获取至少一个文件标识对应的至少一个待部署算法镜像文件。
请参见图8所示,图8所示的为本申请实施例提供的另一种网络摄像机的示意图。该网络摄像机包括以下模块:
接收模块11,用于接收监控系统发送的具有待删除算法容器标识的删除指令,删除指令中的待删除算法容器标识为网络摄像机内的待删除算法容器实例的标识,待删除算法容器实例内运行有待删除算法。具体详细的实现方式,请参考上述图5所示的方法实施例中步骤S12对应的详细描述。
删除模块12,用于删除待删除算法容器标识对应的待删除算法容器实例。具体详细的实现方式,请参考上述图5所示的方法实施例中步骤S13对应的详细描述。
接收模块11,还用于接收监控系统发送的包括待部署算法描述文件的部署指令。具体详细的实现方式,请参考上述图5所示的方法实施例中步骤S15对应的详细描述。
解析模块13,用于解析待部署算法描述文件得到至少一个文件标识,至少一个文件标识为至少一个待部署算法镜像文件的标识,至少一个待部署算法镜像文件内封装有待部署算法。具体详细的实现方式,请参考上述图5所示的方法实施例中步骤S16对应的详细描述。
获取模块14,用于获取至少一个文件标识对应的至少一个待部署算法镜像文件。具体详细的实现方式,请参考上述图5所示的方法实施例中步骤S17对应的详细描述。
生成模块15,用于根据至少一个待部署算法镜像文件生成待部署算法容器实例,待部署算法容器实例内运行有待部署算法。具体详细的实现方式,请参考上述图5所示的方法实施例中步骤S18对应的详细描述。
在一种可实现的实施例中,获取模块14,具体用于根据至少一个文件标识确定未 存储在网络摄像机中的第一待部署算法镜像文件,以及存储在网络摄像机中的第二待部署算法镜像文件;向监控系统发送获取第一待部署算法镜像文件的请求;接收监控系统发送第一待部署算法镜像文件;将第一待部署算法镜像文件和第二待部署算法镜像文件组成至少一个待部署算法镜像文件。具体详细的实现方式,请参考上述图7所示的方法实施例中步骤S21至步骤S27对应的详细描述。
在一种可实现的实施例中,获取模块14,具体用于根据至少一个文件标识确定未存储在网络摄像机中的至少一个待部署算法镜像文件;向监控系统发送获取至少一个待部署算法镜像文件的请求;接收监控系统发送的至少一个待部署算法镜像文件。具体详细的实现方式,请参考上述图7所示的方法实施例中对应的详细描述。
在一种可实现的实施例中,获取模块14,具体用于根据至少一个文件标识确定存储在网络摄像机中的至少一个待部署算法镜像文件;获取至少一个待部署算法镜像文件。具体详细的实现方式,请参考上述图7所示的方法实施例中对应的详细描述。
在一种可实现的实施例中,生成模块15,具体用于根据容器引擎和待部署算法描述文件生成待部署算法容器镜像,容器引擎预先设置在网络摄像机内;根据待部署算法容器镜像和至少一个待部署算法镜像文件创建待部署算法容器实例。具体详细的实现方式,请参考上述图5所示的方法实施例中对应的详细描述。
在一种可实现的实施例中,删除模块12,还用于确定待删除算法容器标识对应的待删除算法容器镜像和至少一个待删除算法镜像文件,至少一个待删除算法镜像文件内封装有待删除算法;删除待删除算法容器镜像和至少一个待删除算法镜像文件。具体详细的实现方式,请参考上述图5所示的方法实施例中对应的详细描述。
请参见图9所示,图9所示的为本申请实施例提供的又一种网络摄像机的示意图。该网络摄像机5包括中央处理器51、图像处理器52、I/O设备53、内存54和非易失性(non-volatile memory,NVM)存储器55。图9中的网络摄像机5等同于图1至图4中的网络摄像机3,关于图9中的网络摄像机5的详细介绍可以参见图1至图4对应的实施例中对于网络摄像机3的详细说明。
图9所示的网络摄像机5可以应用在图5和图7对应的方法实施例中。结合图5和图9所示,中央处理器51可以利用I/O设备53接收监控系统发送的具有待删除算法容器标识的删除指令,中央处理器51可以删除待删除算法容器标识对应的待删除算法容器实例,中央处理器51可以利用I/O设备53接收监控系统发送的包括待部署算法描述文件的部署指令,中央处理器51可以解析待部署算法描述文件得到至少一个文件标识,中央处理器51可以利用I/O设备53在非易失性存储器55中获取至少一个文件标识对应的至少一个待部署算法镜像文件,中央处理器51可以根据至少一个待部署算法镜像文件生成待部署算法容器实例。
在图9所示的实施例中,关于网络摄像机5的执行过程,请参考上述图5和图7对应的方法实施例中的详细描述。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地 产生按照本发明实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。

Claims (14)

  1. 一种算法的更新方法,其特征在于,所述方法包括:
    网络摄像机接收监控系统发送的包含待删除算法容器标识的删除指令,所述删除指令中的待删除算法容器标识为所述网络摄像机内的待删除算法容器实例的标识,所述待删除算法容器实例内运行有所述待删除算法;
    所述网络摄像机删除所述待删除算法容器标识对应的所述待删除算法容器实例;
    所述网络摄像机接收所述监控系统发送的包括待部署算法描述文件的部署指令;
    所述网络摄像机解析所述待部署算法描述文件得到至少一个待部署算法镜像文件的标识,所述至少一个待部署算法镜像文件内封装有待部署算法;
    所述网络摄像机根据所述待部署算法镜像文件的标识获取所述至少一个待部署算法镜像文件;
    所述网络摄像机根据所述至少一个待部署算法镜像文件生成待部署算法容器实例,所述待部署算法容器实例内运行有所述待部署算法。
  2. 根据权利要求1所述的算法的更新方法,其特征在于,所述网络摄像机根据所述待部署算法镜像文件的标识获取所述至少一个待部署算法镜像文件包括:
    所述网络摄像机根据所述待部署算法镜像文件的标识确定未存储在所述网络摄像机中的第一待部署算法镜像文件,以及存储在所述网络摄像机中的第二待部署算法镜像文件;
    所述网络摄像机向所述监控系统发送获取所述第一待部署算法镜像文件的请求;
    所述网络摄像机接收所述监控系统发送所述第一待部署算法镜像文件;
    所述网络摄像机将所述第一待部署算法镜像文件和所述第二待部署算法镜像文件组成所述至少一个待部署算法镜像文件。
  3. 根据权利要求1所述的算法的更新方法,其特征在于,所述网络摄像机根据所述待部署算法镜像文件的标识获取所述至少一个待部署算法镜像文件包括:
    所述网络摄像机根据所述待部署算法镜像文件的标识确定未存储在所述网络摄像机中的至少一个待部署算法镜像文件;
    所述网络摄像机向所述监控系统发送获取所述至少一个待部署算法镜像文件的请求;
    所述网络摄像机接收所述监控系统发送的所述至少一个待部署算法镜像文件。
  4. 根据权利要求1所述的算法的更新方法,其特征在于,所述网络摄像机根据所述待部署算法镜像文件的标识获取所述至少一个待部署算法镜像文件包括:
    所述网络摄像机根据所述待部署算法镜像文件的标识获取确定存储在所述网络摄像机中的至少一个待部署算法镜像文件;
    所述网络摄像机获取所述至少一个待部署算法镜像文件。
  5. 根据权利要求1至4任意一项所述的算法的更新方法,其特征在于,所述网络摄像机根据所述至少一个待部署算法镜像文件生成待部署算法容器实例包括:
    所述网络摄像机根据容器引擎和所述待部署算法描述文件生成待部署算法容器镜像,所述容器引擎预先设置在所述网络摄像机内;
    所述网络摄像机根据所述待部署算法容器镜像和所述至少一个待部署算法镜像文件创建待部署算法容器实例。
  6. 根据权利要求1至4任意一项所述的算法的更新方法,其特征在于,在所述网络摄像机删除所述待删除算法容器标识对应的所述待删除算法容器实例以后,所述方法还包括:
    所述网络摄像机确定所述待删除算法容器标识对应的待删除算法容器镜像和至少一个待删除算法镜像文件,所述至少一个待删除算法镜像文件内封装有所述待删除算法;
    所述网络摄像机删除所述待删除算法容器镜像和所述至少一个待删除算法镜像文件。
  7. 一种网络摄像机,其特征在于,包括:
    接收模块,用于接收监控系统发送的包含待删除算法容器标识的删除指令,所述删除指令中的待删除算法容器标识为所述网络摄像机内的待删除算法容器实例的标识,所述待删除算法容器实例内运行有所述待删除算法;
    删除模块,用于删除所述待删除算法容器标识对应的所述待删除算法容器实例;
    所述接收模块,还用于接收所述监控系统发送的包括待部署算法描述文件的部署指令;
    解析模块,用于解析所述待部署算法描述文件得到至少一个待部署算法镜像文件的标识,所述至少一个待部署算法镜像文件内封装有待部署算法;
    获取模块,用于根据所述待部署算法镜像文件的标识获取所述至少一个待部署算法镜像文件;
    生成模块,用于根据所述至少一个待部署算法镜像文件生成待部署算法容器实例,所述待部署算法容器实例内运行有所述待部署算法。
  8. 根据权利要求7所述的网络摄像机,其特征在于:
    所述获取模块,具体用于根据所述待部署算法镜像文件的标识确定未存储在所述网络摄像机中的第一待部署算法镜像文件,以及存储在所述网络摄像机中的第二待部署算法镜像文件;向所述监控系统发送获取所述第一待部署算法镜像文件的请求;接收所述监控系统发送所述第一待部署算法镜像文件;将所述第一待部署算法镜像文件和所述第二待部署算法镜像文件组成所述至少一个待部署算法镜像文件。
  9. 根据权利要求7所述的网络摄像机,其特征在于:
    所述获取模块,具体用于根据所述待部署算法镜像文件的标识确定未存储在所述网络摄像机中的至少一个待部署算法镜像文件;向所述监控系统发送获取所述至少一个待部署算法镜像文件的请求;接收所述监控系统发送的所述至少一个待部署算法镜像文件。
  10. 根据权利要求7所述的网络摄像机,其特征在于:
    所述获取模块,具体用于根据所述待部署算法镜像文件的标识确定存储在所述网络摄像机中的至少一个待部署算法镜像文件;获取所述至少一个待部署算法镜像文件。
  11. 根据权利要求7至10任意一项所述的网络摄像机,其特征在于:
    所述生成模块,具体用于根据容器引擎和所述待部署算法描述文件生成待部署算法容器镜像,所述容器引擎预先设置在所述网络摄像机内;根据所述待部署算法容器镜像和所述至少一个待部署算法镜像文件创建待部署算法容器实例。
  12. 根据权利要求7至10任意一项所述的网络摄像机,其特征在于:
    所述删除模块,还用于确定所述待删除算法容器标识对应的待删除算法容器镜像和至少一个待删除算法镜像文件,所述至少一个待删除算法镜像文件内封装有所述待删除算法;删除所述待删除算法容器镜像和所述至少一个待删除算法镜像文件。
  13. 一种网络摄像机,其特征在于,包括一个或多个处理器以及存储器;
    其中,所述一个或多个处理器用于读取存储在所述存储器中的软件代码并执行如所述权利要求1-6任一所述的方法。
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有软件代码,所述软件代码为在被一个或多个处理器读取后能够执行如所述权利要求1-6任一所述的方法的代码。
PCT/CN2019/090151 2018-09-27 2019-06-05 一种算法的更新方法及装置 WO2020062914A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19867919.3A EP3846023A4 (en) 2018-09-27 2019-06-05 ALGORITHM UPDATE PROCEDURE AND DEVICE
US17/213,834 US11740886B2 (en) 2018-09-27 2021-03-26 Algorithm update method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811130135.4 2018-09-27
CN201811130135.4A CN110955441B (zh) 2018-09-27 2018-09-27 一种算法的更新方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/213,834 Continuation US11740886B2 (en) 2018-09-27 2021-03-26 Algorithm update method and apparatus

Publications (1)

Publication Number Publication Date
WO2020062914A1 true WO2020062914A1 (zh) 2020-04-02

Family

ID=69950974

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/090151 WO2020062914A1 (zh) 2018-09-27 2019-06-05 一种算法的更新方法及装置

Country Status (4)

Country Link
US (1) US11740886B2 (zh)
EP (1) EP3846023A4 (zh)
CN (1) CN110955441B (zh)
WO (1) WO2020062914A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113225537A (zh) * 2021-05-10 2021-08-06 合肥中科类脑智能技术有限公司 一种视频图像分析系统及方法
CN114205526B (zh) * 2021-12-09 2022-11-15 重庆紫光华山智安科技有限公司 一种网络摄像机算法接入方法、系统、介质及电子终端
CN114745268A (zh) * 2022-03-31 2022-07-12 杭州视洞科技有限公司 一种网络摄像头在线更新加载算法库的方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104702982A (zh) * 2013-12-20 2015-06-10 杭州海康威视数字技术股份有限公司 一种视频分析设备的算法配置方法和系统
CN106210132A (zh) * 2016-08-19 2016-12-07 浙江宇视科技有限公司 一种网络摄像机配置方法、装置及系统
CN107580322A (zh) * 2017-08-28 2018-01-12 驭势科技(北京)有限公司 无人驾驶车辆软件系统的升级方法、装置和无人驾驶车辆
US20180143820A1 (en) * 2015-03-24 2018-05-24 Oracle International Corporation Techniques for efficient application configuration patching
CN108551395A (zh) * 2018-03-15 2018-09-18 上海欣诺通信技术股份有限公司 通信设备升级方法、通信设备及计算机存储介质

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070034239A (ko) 2005-09-23 2007-03-28 삼성전자주식회사 소프트웨어 업데이트 방법 및 시스템과 그 방법을 기록한컴퓨터 판독 가능한 기록매체
US10375287B2 (en) * 2009-10-21 2019-08-06 Disney Enterprises, Inc. Object trail-based analysis and control of video
JP6366386B2 (ja) * 2014-06-30 2018-08-01 キヤノン株式会社 通信装置、撮像装置、通信装置の制御方法、及びプログラム
US12001825B2 (en) 2016-02-19 2024-06-04 Ford Global Technologies, Llc Method and apparatus for vehicle software update installation
CN105975295A (zh) * 2016-04-25 2016-09-28 乐视控股(北京)有限公司 用于主机集群的应用程序更新方法、装置及服务器设备
CN106454276A (zh) * 2016-11-30 2017-02-22 拾联(厦门)信息科技有限公司 一种音视频集成装置及集成视频监控系统
CN107171888A (zh) 2017-05-26 2017-09-15 安徽四创电子股份有限公司 一种基于cAdvisor的集群性能监测方法
CN107819632A (zh) 2017-11-24 2018-03-20 郑州云海信息技术有限公司 一种基于性能监控系统和Docker Swarm的动态负载均衡集群系统
CN107943501A (zh) * 2017-11-30 2018-04-20 深圳市东微智能科技股份有限公司 嵌入式设备升级方法、装置、计算机设备和存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104702982A (zh) * 2013-12-20 2015-06-10 杭州海康威视数字技术股份有限公司 一种视频分析设备的算法配置方法和系统
US20180143820A1 (en) * 2015-03-24 2018-05-24 Oracle International Corporation Techniques for efficient application configuration patching
CN106210132A (zh) * 2016-08-19 2016-12-07 浙江宇视科技有限公司 一种网络摄像机配置方法、装置及系统
CN107580322A (zh) * 2017-08-28 2018-01-12 驭势科技(北京)有限公司 无人驾驶车辆软件系统的升级方法、装置和无人驾驶车辆
CN108551395A (zh) * 2018-03-15 2018-09-18 上海欣诺通信技术股份有限公司 通信设备升级方法、通信设备及计算机存储介质

Also Published As

Publication number Publication date
CN110955441B (zh) 2021-11-26
EP3846023A1 (en) 2021-07-07
US20210216301A1 (en) 2021-07-15
US11740886B2 (en) 2023-08-29
EP3846023A4 (en) 2021-11-03
CN110955441A (zh) 2020-04-03

Similar Documents

Publication Publication Date Title
CN111866191B (zh) 消息事件的分发方法、分发平台、系统及服务器
US11740886B2 (en) Algorithm update method and apparatus
WO2018032770A1 (zh) 一种应用组件部署方法及部署节点
US9817975B2 (en) Method for logging firmware attack event and system therefor
CN109739619B (zh) 一种基于容器化应用的处理方法、装置及存储介质
CN111262908A (zh) 基于jenkins的任务构建方法及系统
WO2021121407A1 (zh) 一种虚拟机的容量更改方法及装置
CN111679888A (zh) 一种代理容器的部署方法及装置
CN111464603B (zh) 一种服务器扩容方法及扩容系统
CN111884834A (zh) 基于zookeeper的分布式系统升级方法、系统和计算机设备
CN115168031A (zh) 一种雾计算系统、方法、电子设备及存储介质
US20220357938A1 (en) Automatically configuring and deploying a software operator in a distributed computing environment from a package
US11399077B2 (en) Systems and methods for acknowledgement in media processing
WO2018068655A1 (zh) 一种许可管理方法和系统
US11431795B2 (en) Method, apparatus and storage medium for resource configuration
CN112631727B (zh) 一种容器组pod的监控方法及装置
CN116149701A (zh) 一种面向边缘终端的软件在线升级方法和系统
CN113391759B (zh) 一种通信方法和设备
CN109788054B (zh) 一种分布式应用协调服务节点的配置方法、服务器及介质
US11070425B2 (en) Method and system of detecting device rearrangement in manufacturing field
CN115993979A (zh) 配置转换方法、平滑升级方法、装置、设备及存储介质
CN114077587A (zh) 基于规则引擎的业务处理方法、规则引擎、介质和设备
CN112579247A (zh) 确定任务状态的方法和装置
US11736589B2 (en) Systems and methods for acknowledgement in media processing
US11442756B2 (en) Common service resource application method, related device, and system

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: 19867919

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019867919

Country of ref document: EP

Effective date: 20210331