Camera control methods, devices, systems, electronic devices, and storage media
By entering different recovery modes to perform partial and overall reset operations when the camera's intelligent function malfunctions, the problem of low camera control efficiency is solved, and fast and accurate camera control is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG DAHUA TECH CO LTD
- Filing Date
- 2023-04-13
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies suffer from low camera control efficiency, especially when intelligent functions malfunction, requiring a device restart for recovery, resulting in low control efficiency.
By acquiring the initial detection results of the camera's intelligent functions, the system enters the first recovery mode to reset the application software. If the detection results are abnormal again, it enters the second recovery mode to rebuild the entire system, thus achieving rapid recovery from partial functions to overall intelligent functions.
The camera's intelligent functions can be quickly restored without restarting the entire device, improving control efficiency and accuracy while minimizing the impact on users.
Smart Images

Figure CN116527870B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of camera technology, and in particular to camera control methods, apparatus, systems, electronic devices, and storage media. Background Technology
[0002] A smart camera is a device that converts optical image signals into electrical signals for recording. It uses a camera to convert light into electrical energy, obtaining a video signal. This signal is then amplified by a pre-amplifier circuit, processed and adjusted by various circuits, and finally sent to a recording medium such as a video recorder for recording. Smart cameras feature high resolution, low-light performance, and wide dynamic range, and are required for real-time intelligent monitoring in security and other scenarios. However, if the intelligent function malfunctions and is not promptly restored, it can lead to serious problems such as delayed capture of critical targets. Currently, related technologies typically require a restart to restore the camera after a malfunction is detected, resulting in low control efficiency.
[0003] Currently, no effective solution has been proposed to address the problem of low camera control efficiency in related technologies. Summary of the Invention
[0004] This application provides a camera control method, apparatus, system, electronic device, and storage medium to at least solve the problem of low camera control efficiency in related technologies.
[0005] In a first aspect, embodiments of this application provide a camera control method, the method including acquiring the initial detection result of the intelligent function of the camera;
[0006] If the initial detection result indicates that the camera's working state is abnormal, the camera is controlled to enter the first recovery mode. In the first recovery mode, a reset operation is performed on the camera's application software. After resetting the application software, the camera's intelligent functions are detected again to obtain a second detection result.
[0007] If the re-detection result indicates that the camera's working state remains abnormal, the camera is controlled to enter a second recovery mode, and in the second recovery mode, the camera is controlled to perform a reset operation.
[0008] In some embodiments, before obtaining the initial detection result of the camera's intelligent function, the method further includes:
[0009] Determine the image to be detected; wherein the image to be detected includes the target to be detected;
[0010] The camera obtains the target detection result for the image to be detected. If the target detection result indicates that the target to be detected has been successfully detected, the camera obtains the real-time operating data of the camera.
[0011] The initial detection result is determined based on the target detection result and the real-time operating data of the device.
[0012] In some embodiments, determining the initial detection result based on the target detection result and the device's real-time operating data includes:
[0013] Obtain the preset range of running data;
[0014] If the real-time operating data of the device is detected to be within the range of the operating data, an initial detection result indicating that the working state is normal is obtained;
[0015] If the detection result indicates that the detection of the target has failed, or if the real-time operating data of the device exceeds the operating data range, an initial detection result indicating that the working state is in an abnormal state is obtained.
[0016] In some embodiments, in the first recovery mode, the method further includes:
[0017] Get new rule parameters;
[0018] A reset operation is performed on the application software, and the current rule parameters stored in the camera are updated to the new rule parameters. After the application software is reset, the intelligent function of the camera is tested again to obtain the test result.
[0019] If the re-detection result indicates that the working state has changed from the abnormal state to the normal state, the camera is controlled to perform monitoring operations according to the new rule parameters.
[0020] In some embodiments, after controlling the camera to perform a reset operation in the second recovery mode, the method further includes:
[0021] Control the camera to exit the second recovery mode and acquire the real-time bitstream currently captured by the camera;
[0022] The real-time monitoring results of the camera are generated based on the real-time bitstream.
[0023] Secondly, embodiments of this application provide a camera control device, the device comprising: an acquisition module, a first recovery module, and a second recovery module;
[0024] The acquisition module is used to acquire the initial detection results of the camera's intelligent functions;
[0025] The first recovery module is used to control the camera to enter a first recovery mode when the initial detection result indicates that the camera's working state is abnormal. In the first recovery mode, the camera's application software is reset, and after resetting the application software, the camera's intelligent functions are detected again to obtain a second detection result.
[0026] The second recovery module is used to control the camera to enter a second recovery mode when the re-detection result indicates that the camera's working state is continuously in an abnormal state, and to control the camera to perform a reset operation in the second recovery mode.
[0027] In some embodiments, the apparatus further includes a determining module;
[0028] The determining module is used to determine the image to be detected; wherein the image to be detected includes the target to be detected;
[0029] The determining module is further configured to obtain the target detection result of the camera for the image to be detected, and, if the target detection result indicates that the target to be detected has been successfully detected, obtain the real-time operating data of the camera.
[0030] The determining module is further configured to determine the acquisition of the initial detection result based on the target detection result and the real-time operating data of the device.
[0031] Thirdly, embodiments of this application provide a camera control system, the system comprising: a camera body and a main control device; wherein, the main control device is connected to the camera body;
[0032] The main control device is used to execute the camera control method as described in the first aspect above.
[0033] Fourthly, embodiments of this application provide an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the camera control method as described in the first aspect above.
[0034] Fifthly, embodiments of this application provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the camera control method as described in the first aspect above.
[0035] Compared to related technologies, the camera control method, apparatus, system, electronic device, and storage medium provided in this application obtain the initial detection result of the camera's intelligent function; if the initial detection result indicates that the camera's working state is abnormal, the camera is controlled to enter a first recovery mode. In the first recovery mode, a reset operation is performed on the camera's application software. After resetting the application software, the camera's intelligent function is detected again to obtain a second detection result; if the second detection result indicates that the camera's working state remains abnormal, the camera is controlled to enter a second recovery mode. In the second recovery mode, the camera is controlled to perform a reset operation. This eliminates the need to restart the entire device for recovery after detecting a camera's intelligent function failure. Therefore, for minor camera failures, the intelligent function can be quickly restored to reduce the impact on the user, thereby solving the problem of low camera control efficiency and realizing a highly efficient and accurate camera control method.
[0036] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0037] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0038] Figure 1 This is an application environment diagram of a camera control method according to an embodiment of this application;
[0039] Figure 2 This is a flowchart of a camera control method according to an embodiment of this application;
[0040] Figure 3 This is a flowchart of a camera fault recovery method according to an embodiment of this application;
[0041] Figure 4 This is a flowchart of another camera control method according to an embodiment of this application;
[0042] Figure 5 This is a flowchart of a camera fault detection method according to an embodiment of this application;
[0043] Figure 6 This is a flow chart of a camera control method according to a preferred embodiment of this application;
[0044] Figure 7 This is a structural block diagram of a camera control device according to an embodiment of this application;
[0045] Figure 8 This is a structural block diagram of a camera control system according to an embodiment of this application;
[0046] Figure 9 This is a structural diagram of the internal structure of a computer device according to an embodiment of this application. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application. Furthermore, it is understood that although the efforts made in such a development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, modifications to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0048] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0049] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application means two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The terms “first,” “second,” “third,” etc., used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0050] The camera control method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, camera 102 communicates with server device 104 via a network. A data storage system can store the data that server device 104 needs to process. The data storage device can be integrated into server device 104 or placed in the cloud or on other network servers. Server device 104 obtains the initial detection result of the intelligent function of camera 102. If the initial detection result indicates that the working state of camera 102 is abnormal, server device 104 controls camera 102 to enter a first recovery mode. In the first recovery mode, a reset operation is performed on the application software of camera 102. After resetting the application software, the intelligent function of camera 102 is detected again to obtain a second detection result. If the second detection result indicates that the working state of camera 102 remains abnormal, server device 104 controls camera 102 to enter a second recovery mode and performs a reset operation in the second recovery mode. Server device 104 can be implemented using a standalone server or a server cluster composed of multiple servers.
[0051] This embodiment provides a camera control method. Figure 2 This is a flowchart of a camera control method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0052] Step S210: Obtain the initial detection results of the camera's intelligent functions.
[0053] The intelligent functions of the aforementioned cameras refer to intelligent business functions implemented based on algorithms such as deep learning. These intelligent functions include, but are not limited to, various extraction and analysis of relevant feature information of people, vehicles, and objects for intelligent recognition, or intelligent classification functions for vehicle wrong-way driving, zone intrusion detection, personnel focusing detection, tripwire crossing detection, rapid movement, personnel loitering detection, and passenger flow statistics. The initial detection results are used to indicate whether the intelligent function of the camera currently being tested has malfunctioned.
[0054] Step S220: If the initial detection result indicates that the camera's working state is abnormal, control the camera to enter the first recovery mode. In the first recovery mode, perform a reset operation on the camera's application software. After resetting the application software, re-detect the camera's intelligent functions to obtain a re-detection result.
[0055] The aforementioned first recovery mode refers to the business layer recovery mode for the camera's intelligent functions. In this mode, only the business layer functions of the corresponding camera's intelligent functions need to be restarted and restored. Specifically, if the camera's operating state is detected as abnormal by the initial detection result, it indicates a malfunction in the camera's intelligent functions. In this case, the camera can be controlled to enter the first recovery mode, and the transmission of the real-time bitstream collected by the camera to the intelligent business algorithm will be stopped. A restart command is sent to the camera through the camera application layer deployed on the server, causing the camera to respond to the restart command and restore its intelligent functions to their default state. This means clearing the data stored in the camera's intelligent functions and reconfiguring the algorithm rules, thereby achieving the aforementioned reset operation for the camera application software in the first recovery mode. Then, the camera's intelligent functions are re-detected to obtain the re-detection result used to indicate whether the camera's intelligent functions have malfunctioned.
[0056] Step S230: If the re-detection result indicates that the camera's working state is continuously in an abnormal state, control the camera to enter the second recovery mode, and control the camera to perform a reset operation in the second recovery mode.
[0057] The second recovery mode mentioned above refers to a mode for rebuilding the overall intelligent function of the camera. In this mode, all intelligent algorithms of the camera are completely cleared before the overall intelligent function is recreated. It should be noted that, considering critical application scenarios with high population flow, such as target personnel control at subway entrances and security for sporting events, real-time monitoring is typically required. Therefore, in the event of a camera's intelligent function failure, the recovery process from the start to the completion of recovery needs to be as fast as possible to detect targets as early as possible and improve the detection rate. Thus, in this embodiment, if the camera's current working state is detected as continuously abnormal based on the above-mentioned re-detection results, it indicates that the camera has not yet recovered its intelligent function normally in the first recovery mode. At this time, the camera can be controlled to enter the second recovery mode from the first recovery mode. In this mode, a reconstruction command is issued through the application layer to completely clear all intelligent algorithms and execute the above-mentioned reset operation to rebuild the overall intelligent function, thereby realizing a camera intelligent function recovery scheme that goes from partial function recovery to overall intelligent function recovery.
[0058] Through steps S210 to S230, by controlling the camera to enter different recovery modes when a current intelligent function failure is detected, an automatic camera recovery method from partial function recovery to overall intelligent recovery is realized. This eliminates the need to restart the entire device for recovery after an intelligent function failure is detected. Therefore, for minor camera failures, intelligent functions can be quickly restored to reduce the impact on users, thereby solving the problem of low camera control efficiency and realizing an efficient and accurate camera control method.
[0059] The embodiments of this application will be described in detail below with reference to practical application scenarios. Figure 3 This is a flowchart of a camera fault recovery method according to an embodiment of this application, such as... Figure 3 As shown, the process includes the following steps:
[0060] Step S301: First, enter the first recovery mode M1 mode and stop sending the acquired real-time bitstream to the camera's intelligent algorithm.
[0061] In step S302, the application layer sends a command to clear the data saved by the intelligent function to restore the camera's intelligent function to its default state. Then, it resends the rules to the intelligent algorithm and reconfigures the algorithm rules.
[0062] Step S303: Push the image to be detected stored in the camera device to the intelligent algorithm.
[0063] Step S304: Determine whether the camera's intelligent functions have returned to normal.
[0064] Step S305: If the judgment result of step S304 is yes, then stop sending the saved image to be detected to the camera's intelligent algorithm and execute the subsequent step S307.
[0065] Step S306: If the judgment result of step S304 is negative, stop transmitting images and enter the second recovery mode M2 mode to completely clear all algorithms, rebuild algorithms and reissue intelligent rules; then exit M2 mode and stop transmitting saved images to intelligent algorithms; execute subsequent step S307.
[0066] Step S307: Exit M1 mode and send the real-time bitstream into the intelligent algorithm for continued detection; complete the recovery process.
[0067] In some embodiments, a camera control method is provided. Figure 4 This is a flowchart of another camera control method according to an embodiment of this application, such as... Figure 4 As shown, the process includes Figure 2 All the steps shown, in addition to the following steps:
[0068] Step S410: Determine the image to be detected; wherein the image to be detected includes the target to be detected.
[0069] Specifically, the system can first acquire pre-captured and stored images of the target object from the camera to be tested, in order to perform fault detection and diagnosis. The target object can be a human body or a vehicle, among other targets.
[0070] Step S420: Obtain the target detection result of the camera for the image to be detected. If the target detection result indicates that the target to be detected has been successfully detected, obtain the real-time operating data of the camera.
[0071] During the camera intelligent function fault detection process via steps S410 to S420, a frame containing the target to be detected can be captured by the camera and sent to the intelligent algorithm. The intelligent algorithm detects and outputs result information such as the target bounding box or target ID. If no result information is output, it indicates that the target to be detected does not exist in the camera's monitoring screen, or that the intelligent function has a software fault. Therefore, it is necessary to use an image containing the target to be detected for detection to distinguish whether the current camera intelligent function has malfunctioned. If the target detection result indicates that the target to be detected is successfully detected, then real-time operating data such as CPU usage, memory usage, and algorithm latency of the current camera device are collected and analyzed.
[0072] Step S430: Based on the target detection result and the real-time operating data of the device, determine the initial detection result.
[0073] Specifically, when the image to be detected contains a target based on the target detection result, and the deviation between the real-time operating data of the device and the data of the camera device in normal operation is within a reasonable range (e.g., 10%), it indicates that there is no fault at this time, and the first detection result indicating that the camera is working normally is generated. Otherwise, the first detection result indicating that the camera is working abnormally is generated, and the fault recovery mode is entered. Thus, by combining the fault detection method of whether there is a target detection result output and whether the device operating data is within the normal range, the accurate judgment of fault detection of camera intelligent function is realized.
[0074] Through steps S410 to S430, when the target to be detected in the image to be detected is successfully detected, the initial detection result is determined based on the target detection result and the real-time operating data of the camera. By combining the verification of the intelligent result and the analysis of the camera's status data during operation, it is possible to accurately identify whether there is a software fault in the camera's intelligent function. This is beneficial to improving the accuracy of automatic detection and diagnosis of the camera's intelligent function, thereby improving the accuracy of camera control.
[0075] In some embodiments, determining the initial detection result based on the target detection result and the real-time operating data of the device further includes the following steps:
[0076] Step S431: Obtain the preset operating data range.
[0077] The aforementioned operating data range refers to the range of values for various device operating data when the camera's intelligent functions are operating normally. This operating data range can be preset by the staff based on the actual situation. For example, the operating data range for device CPU utilization can be preset to 0 to 75%, or the operating data range for device memory utilization can be 0 to 80%, etc., which will not be elaborated here.
[0078] Step S432: If the real-time operating data of the device is detected to be within the range of the operating data, an initial detection result indicating that the working state is normal is obtained.
[0079] Step S433: If the detection result indicates that the detection of the target has failed, or if the real-time operating data of the device exceeds the operating data range, the first detection result indicating that the working state is in an abnormal state is obtained.
[0080] In steps S432 to S433 above, if the target to be detected is detected based on the target detection result, it indicates that there are targets such as people, vehicles, and objects in the currently monitored image to be detected. At this time, the comparison and analysis results between the obtained real-time operating data of the device and the operating data range can be used to further determine whether the camera's intelligent function software has malfunctioned. If the real-time operating data of the device is detected to be within the operating data range, the first detection result indicating that the working state of the camera to be detected is normal is generated. If the target to be detected is not detected based on the target detection result, it indicates that there is no target in the currently monitored image to be detected. At this time, it can be determined that the camera's intelligent function is malfunctioning. Alternatively, if the target to be detected is detected based on the target detection result, and the real-time operating data of the device is detected to be outside the operating data range, it can also be determined that the camera's intelligent function is malfunctioning, and the first detection result indicating that the working state of the camera to be detected is abnormal is generated.
[0081] By analyzing and comparing the real-time operating data of the device with the preset operating data range through steps S431 to S433, and determining the initial detection result, the accuracy of automatic detection and diagnosis of the intelligent functions of the camera is further improved, thereby effectively improving the accuracy of camera control.
[0082] The embodiments of this application will be described in detail below with reference to practical application scenarios. Figure 5 This is a flowchart of a camera fault diagnosis according to an embodiment of this application, such as... Figure 5 As shown, the process includes the following steps:
[0083] Step S501: Stop sending the real-time bitstream captured by the camera to the camera's intelligent algorithm and enter the fault diagnosis mode.
[0084] Step S502: Read the image to be detected that is pre-stored in the camera device and send it to the intelligent algorithm; determine whether the intelligent algorithm has an intelligent result output; if the determination result of this step is no, then execute the subsequent step S506.
[0085] Step S503: If the judgment result of step S502 is yes, then collect the current real-time operating data of the camera. The real-time operating data may include the current CPU utilization, memory consumption, and intelligent algorithm time consumption of the current device.
[0086] Step S504: The real-time operating data of the device is automatically compared with the data when the camera's intelligent function is normal. The difference between the two values is analyzed to determine whether the real-time operating data of the device is normal. If the result of this step is no, the subsequent step S506 is executed.
[0087] Step S505: If the judgment result of step S504 is yes, then the current camera is determined to be fault-free, and the subsequent step S507 is executed.
[0088] Step S506: Confirm the occurrence of a fault so that after exiting the fault diagnosis mode in subsequent steps, enter the automatic recovery phase and continue to execute subsequent steps S507.
[0089] Step S507: Fault detection ends, outputs the result of present / absent fault detection, and exits the fault diagnosis mode.
[0090] In some embodiments, under the first recovery mode described above, the camera control method further includes the following steps:
[0091] Step S221: Obtain new rule parameters.
[0092] The aforementioned rule parameters refer to intelligent rule parameters for preset areas such as rule lines or detection areas in the camera's monitoring screen.
[0093] Step S222: Perform a reset operation on the application software and update the current rule parameters stored in the camera to the new rule parameters. After performing the reset operation on the application software, re-detect the intelligent function of the camera to obtain the re-detection result.
[0094] Step S223: If the re-detection result indicates that the working state has changed from the abnormal state to the normal state, the camera is controlled to perform monitoring operations according to the new rule parameters.
[0095] In steps S222 to S223 above, after detecting a malfunction in the intelligent function of the current camera through the above steps, the system enters the first recovery mode. In this first recovery mode, the transmission of video bitstream to the algorithm is stopped. Then, the service layer of the camera device automatically restores the default state and reissues new rule parameters to detect the camera's intelligent function again. If it is detected that the intelligent function of the current camera has returned to normal, that is, based on the above detection results, it is detected that the working state of the camera has changed from an abnormal state to a normal state, then the transmission of the currently acquired real-time bitstream to the intelligent image algorithm is started, and the real-time bitstream is monitored and detected based on the above new rule parameters to achieve the above monitoring operation.
[0096] Through steps S221 to S223, by clearing the data saved by the camera's intelligent function in the first recovery mode and reconfiguring the algorithm rule parameters, the camera that has malfunctioned can restore its normal intelligent function in a timely manner, thereby effectively improving the accuracy and efficiency of camera control.
[0097] In some embodiments, after controlling the camera to perform a reset operation in the second recovery mode, the camera control method further includes the following steps: controlling the camera to exit the second recovery mode and acquiring the real-time bitstream currently collected by the camera; generating real-time monitoring results for the camera based on the real-time bitstream. Specifically, after resetting the overall intelligent functions of the camera and issuing rules in the second recovery mode, the camera can be controlled to exit the second recovery mode and the first recovery mode sequentially, and the real-time bitstream currently collected by the camera can continue to be sent to the camera's intelligent algorithm, which then detects the real-time bitstream based on algorithms such as neural networks to output real-time intelligent monitoring results. Through the above embodiments, after the camera's intelligent functions return to normal, the camera is automatically controlled to exit the recovery mode and continue to perform intelligent monitoring services, thereby achieving rapid recovery of the camera's intelligent functions and further improving the accuracy and efficiency of camera control.
[0098] The embodiments of this application will be described in detail below with reference to practical application scenarios. Figure 6 This is a flowchart of a camera control method according to a preferred embodiment of this application, such as... Figure 6 As shown, the process includes the following steps:
[0099] Step S601: Power on the camera; retrieve the pre-created intelligent algorithm and configure the intelligent rules to complete the camera initialization.
[0100] Step S602: Send the real-time bitstream into the algorithm for detection.
[0101] Step S603: Determine if the detection method has output a result. If so, return to step S602 above and continue executing the camera control process.
[0102] Step S604: If the judgment result of step S603 is negative, determine whether to start the fault diagnosis process; if the judgment result of this step is negative, return to step S602 to continue executing the camera control process.
[0103] Step S605: If the judgment result of step S604 is yes, then start the fault diagnosis process and check whether the intelligent function of the camera has malfunctioned; if the judgment result of this step is no, then return to step S602 to continue executing the camera control process.
[0104] Step S606: If the judgment result of step S605 is yes, then start the self-recovery process and return to step S602 to continue executing the camera control process.
[0105] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0106] This embodiment also provides a camera control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0107] Figure 7 This is a structural block diagram of a camera control device according to an embodiment of this application, such as... Figure 7 As shown, the device includes: an acquisition module 72, a first recovery module 74, and a second recovery module 76. The acquisition module 72 is used to acquire the initial detection result of the camera's intelligent functions. The first recovery module 74 is used to control the camera to enter a first recovery mode when the initial detection result indicates that the camera's operating state is abnormal. In the first recovery mode, a reset operation is performed on the camera's application software, and after resetting the application software, the camera's intelligent functions are detected again to obtain a second detection result. The second recovery module 76 is used to control the camera to enter a second recovery mode when the second detection result indicates that the camera's operating state remains abnormal, and in the second recovery mode, the camera is controlled to perform a reset operation.
[0108] Through the above embodiments, when the first recovery module 74 and the second recovery module 76 detect that the camera is currently experiencing a smart function failure, they control the camera to enter different recovery modes respectively, realizing an automatic camera recovery method from partial function recovery to overall smart function recovery. Therefore, for minor camera failures, the smart function can be quickly restored to reduce the impact on the user, thereby solving the problem of low camera control efficiency and realizing an efficient and accurate camera control device.
[0109] In some embodiments, the camera control device further includes a determination module; the determination module is used to determine an image to be detected; wherein the image to be detected includes a target to be detected; the determination module is also used to acquire the target detection result of the camera for the image to be detected, and if the target detection result indicates that the target to be detected has been successfully detected, acquire the real-time operating data of the camera; the determination module is also used to determine the acquisition of the initial detection result based on the target detection result and the real-time operating data of the device.
[0110] In some embodiments, the determining module is further configured to obtain a preset operating data range; when the determining module detects that the real-time operating data of the device is within the operating data range, it obtains an initial detection result indicating that the working state is in an abnormal state; when the determining module detects that the target detection result indicates that the detection for the target to be detected has failed, or that the real-time operating data of the device exceeds the operating data range, it obtains an initial detection result indicating that the working state is in a normal state.
[0111] In some embodiments, under the first recovery mode described above, the first recovery module 74 is further configured to acquire new rule parameters; the first recovery module 74 performs a reset operation on the application software and updates the current rule parameters stored in the camera to the new rule parameters. After performing the reset operation on the application software, the intelligent function of the camera is detected again to obtain the re-detection result; if the re-detection result indicates that the working state has changed from the abnormal state to the normal state, the first recovery module 74 controls the camera to perform monitoring operations according to the new rule parameters.
[0112] In some embodiments, the camera control device further includes a monitoring module; the monitoring module is used to control the camera to exit the second recovery mode after performing a reset operation in the second recovery mode, and to acquire the real-time bitstream currently acquired by the camera; the monitoring module is also used to generate real-time monitoring results of the camera based on the real-time bitstream.
[0113] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0114] This embodiment also provides a camera control system. Figure 8 This is a structural block diagram of a camera control system according to an embodiment of this application, such as... Figure 8As shown, the system includes a camera body 82 and a main control device 84. The main control device 84 is connected to the camera body 82; the main control device 82 is used to execute any of the camera control methods described in the above embodiments. The main control device 82 can be a microcontroller, a main control chip, a computer, or a server, etc., used to execute the camera control process. Further, data transmission can occur between the main control device 82 and the camera body 84 via a transmission device; in one embodiment, the transmission device may include a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet; in another embodiment, the transmission device may be a radio frequency (RF) module, used for wireless communication with the Internet. Alternatively, the main control device 82 can also be directly integrated and deployed on the camera body 84.
[0115] Through the above embodiments, when the main control device 82 detects a current intelligent function failure in the camera, it controls the camera to enter different recovery modes, realizing an automatic camera recovery method from partial function recovery to overall intelligent recovery. Therefore, for minor camera failures, intelligent functions can be quickly restored to reduce the impact on users, thereby solving the problem of low camera control efficiency and realizing an efficient and accurate camera control system.
[0116] In some embodiments, a computer device is provided, which may be a server. Figure 9 This is a structural diagram of the internal structure of a computer device according to an embodiment of this application, such as... Figure 9 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores detection results for the intelligent functions of the camera. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements the aforementioned camera control method.
[0117] Those skilled in the art will understand that Figure 9The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0118] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0119] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0120] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0121] S1, obtain the initial detection results of the camera's intelligent functions.
[0122] S2, if the initial detection result indicates that the camera's working state is abnormal, control the camera to enter the first recovery mode. In the first recovery mode, perform a reset operation on the camera's application software. After resetting the application software, re-detect the camera's intelligent functions to obtain the re-detection result.
[0123] S3, if the re-detection result indicates that the camera's working state is still in an abnormal state, control the camera to enter the second recovery mode, and control the camera to perform a reset operation in the second recovery mode.
[0124] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0125] Furthermore, in conjunction with the camera control methods in the above embodiments, this application embodiment can provide a storage medium for implementation. This storage medium stores a computer program; when executed by a processor, the computer program implements any of the camera control methods in the above embodiments.
[0126] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0127] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0128] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0129] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A camera control method, characterized in that, The method includes: Obtain the initial detection results of the camera's intelligent functions; If the initial detection result indicates that the camera's working state is abnormal, the camera is controlled to enter a first recovery mode. In the first recovery mode, a reset operation is performed on the camera's application software. After resetting the application software, the camera's intelligent functions are detected again to obtain a second detection result. The first recovery mode refers to the service layer recovery mode for the camera's intelligent functions. In the first recovery mode, the input of the real-time bitstream collected by the camera to the intelligent service algorithm corresponding to the intelligent function is stopped, the data stored in the camera's intelligent function is cleared, and the rules of the intelligent service algorithm are reconfigured. If the re-detection result indicates that the camera's working state remains abnormal, the camera is controlled to enter a second recovery mode, and in the second recovery mode, the camera is controlled to perform a reset operation. The second recovery mode refers to the intelligent function reconstruction mode for the overall intelligent function of the camera. In the second recovery mode, the camera is controlled to completely clear all intelligent algorithms of the camera and then recreate the overall intelligent function. Control the camera to exit the second recovery mode and acquire the real-time bitstream currently captured by the camera; The real-time monitoring results of the camera are generated based on the real-time bitstream.
2. The camera control method according to claim 1, characterized in that, Before obtaining the initial detection result of the camera's intelligent function, the method further includes: Determine the image to be detected; wherein the image to be detected includes the target to be detected; The camera obtains the target detection result for the image to be detected. If the target detection result indicates that the target to be detected has been successfully detected, the camera obtains the real-time operating data of the camera. The initial detection result is determined based on the target detection result and the real-time operating data of the device.
3. The camera control method according to claim 2, characterized in that, The determination of the initial detection result based on the target detection result and the real-time operating data of the device includes: Obtain the preset range of running data; If the real-time operating data of the device is detected to be within the range of the operating data, an initial detection result indicating that the working state is normal is obtained; If the detection result indicates that the detection of the target has failed, or if the real-time operating data of the device exceeds the operating data range, an initial detection result indicating that the working state is in an abnormal state is obtained.
4. The camera control method according to claim 1, characterized in that, In the first recovery mode, the method further includes: Get new rule parameters; A reset operation is performed on the application software, and the current rule parameters stored in the camera are updated to the new rule parameters. After the application software is reset, the intelligent function of the camera is tested again to obtain the test result. If the re-detection result indicates that the working state has changed from the abnormal state to the normal state, the camera is controlled to perform monitoring operations according to the new rule parameters.
5. A camera control device, characterized in that, The device includes: an acquisition module, a first recovery module, a second recovery module, and a monitoring module; The acquisition module is used to acquire the initial detection results of the camera's intelligent functions; The first recovery module is used to control the camera to enter a first recovery mode when the initial detection result indicates that the camera's working state is abnormal. In the first recovery mode, a reset operation is performed on the camera's application software. After resetting the application software, the camera's intelligent functions are detected again to obtain a second detection result. The first recovery mode refers to the business layer recovery mode for the camera's intelligent functions. In the first recovery mode, the input of the real-time bitstream collected by the camera to the intelligent business algorithm corresponding to the intelligent function is stopped, the data stored in the camera's intelligent function is cleared, and the rules of the intelligent business algorithm are reconfigured. The second recovery module is used to control the camera to enter a second recovery mode when the re-detection result indicates that the camera's working state is continuously in an abnormal state, and to control the camera to perform a reset operation in the second recovery mode; The second recovery mode refers to the intelligent function reconstruction mode for the overall intelligent function of the camera. In the second recovery mode, the camera is controlled to completely clear all intelligent algorithms of the camera and then recreate the overall intelligent function. The monitoring module is used to control the camera to exit the second recovery mode and to acquire the real-time bitstream currently collected by the camera; The monitoring module is also used to generate real-time monitoring results of the camera based on the real-time bitstream.
6. The camera control device according to claim 5, characterized in that, The device also includes a determining module; The determining module is used to determine the image to be detected; wherein the image to be detected includes the target to be detected; The determining module is further configured to obtain the target detection result of the camera for the image to be detected, and, if the target detection result indicates that the target to be detected has been successfully detected, obtain the real-time operating data of the camera. The determining module is further configured to determine the acquisition of the initial detection result based on the target detection result and the real-time operating data of the device.
7. A camera control system, characterized in that, The system includes: a camera body and a main control device; wherein the main control device is connected to the camera body; The main control device is used to execute the camera control method as described in any one of claims 1 to 4.
8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the camera control method according to any one of claims 1 to 4.
9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the camera control method according to any one of claims 1 to 4.