CN114594966A - Upgrading method and upgrading device for analog camera - Google Patents

Upgrading method and upgrading device for analog camera Download PDF

Info

Publication number
CN114594966A
CN114594966A CN202210100130.7A CN202210100130A CN114594966A CN 114594966 A CN114594966 A CN 114594966A CN 202210100130 A CN202210100130 A CN 202210100130A CN 114594966 A CN114594966 A CN 114594966A
Authority
CN
China
Prior art keywords
analog camera
upgrade
data
signal
upgrading
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202210100130.7A
Other languages
Chinese (zh)
Inventor
董煜民
钱锋海
杨建军
吴威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202210100130.7A priority Critical patent/CN114594966A/en
Publication of CN114594966A publication Critical patent/CN114594966A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof

Landscapes

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

Abstract

The application discloses an upgrade method and an upgrade device for an analog camera, wherein the upgrade method for the analog camera comprises the following steps: after a trigger instruction sent by an upper computer is received, searching a preset position in a video signal sent by an analog camera; sending an upgrading instruction to the analog camera corresponding to the preset position so as to enable the analog camera to enter an upgrading mode, wherein after the analog camera enters the upgrading mode, corresponding to each video line in the video signal, the upgrading equipment can send data to the analog camera; and responding to the successful entering of the analog camera into the upgrading mode, and sending upgrading packet data sent by the upper computer to the analog camera. The upgrading method provided by the application can be used for efficiently upgrading the analog camera on the premise of not increasing the cost.

Description

Analog camera upgrading method and upgrading equipment
Technical Field
The present application relates to the field of analog camera technologies, and in particular, to an analog camera upgrading method and upgrading device.
Background
The analog camera has certain share in the security monitoring market with the advantages of low selling price, low reconstruction cost, good real-time performance and the like. However, since the video of the analog camera is continuously transmitted by analog signals and the link transmission standards are more, the analog camera is not as flexible as the IP camera of the standard link protocol in terms of camera data interaction, production automation and the like, so that the analog camera production and manufacturing enterprises have few available upgrading tools.
In the prior art, the upgrade procedure of the analog camera has the following three modes: the first is to dismantle the apparatus and upgrade to the main control ISP mode directly, the second is to dismantle the apparatus and change the program memory Flash outside the film directly, the third is to upgrade online through DVR now. At present, the upgrading modes add great difficulty and cost to the requirements of equipment research, development, debugging, upgrading and reworking, so an effective and available analog camera upgrading solution is very urgently needed.
Disclosure of Invention
The application provides an upgrading method and upgrading equipment for an analog camera, which can efficiently upgrade the analog camera on the premise of not increasing the cost.
A first aspect of an embodiment of the present application provides an analog camera upgrade method, where the method is executed by an upgrade device connected to the analog camera, and the method includes: after a trigger instruction sent by an upper computer is received, searching a preset position in a video signal sent by the analog camera; sending an upgrading instruction to the analog camera corresponding to the preset position so as to enable the analog camera to enter an upgrading mode, wherein after the analog camera enters the upgrading mode, the upgrading equipment can send data to the analog camera corresponding to each video line in the video signal; and responding to the successful entering of the simulation camera into the upgrading mode, and sending upgrading packet data sent by the upper computer to the simulation camera.
A second aspect of the embodiments of the present application provides an analog camera upgrading method, where the method is performed by an analog camera, and the method includes: sending a video signal to the connected upgrading device; after receiving an upgrade instruction sent by the analog camera, entering an upgrade mode, wherein after receiving a trigger instruction sent by an upper computer, the upgrade device searches for a preset position in the video signal, sends an upgrade instruction to the analog camera corresponding to the preset position, and after entering the upgrade mode, the upgrade device can send data to the analog camera corresponding to each video line in the video signal; and receiving upgrade packet data sent by the analog camera.
A third aspect of the embodiments of the present application provides an upgrade apparatus, where the upgrade apparatus includes a processor, a memory, and a communication circuit, where the processor is respectively coupled to the memory and the communication circuit, the memory stores program data, and the processor implements the steps in the foregoing method by executing the program data in the memory.
A fourth aspect of the present invention provides an analog camera, where the analog camera includes a processor, a memory, and a communication circuit, the processor is coupled to the memory and the communication circuit, respectively, the memory stores program data, and the processor implements the steps in the foregoing method by executing the program data in the memory.
A fifth aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program, the computer program being executable by a processor to implement the steps in the above method.
The beneficial effects are that: the upgrading device searches for the preset position in the video signal sent by the analog camera, corresponds to the preset position, and sends the upgrading instruction to the analog camera, so that the analog camera enters the upgrading mode, and after the analog camera enters the upgrading mode, the upgrading device corresponds to each video line in the video signal, and all the upgrading device can send data to the analog camera, so that after the analog camera successfully enters the upgrading mode, the upgrading device can send upgrading package data to the analog camera, and the upgrading of the analog camera is completed. The whole method does not need to improve the analog camera, and can efficiently upgrade the analog camera on the premise of not increasing the cost.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. Wherein:
FIG. 1 is a schematic diagram of an embodiment of an upgrade system according to the present application;
FIG. 2 is a schematic diagram of forward data extraction from a video signal;
FIG. 3 is a schematic view of a work flow of an upper computer in an embodiment of the method for upgrading an analog camera;
fig. 4 is a schematic view of a work flow of an upgrade device in an embodiment of the analog camera upgrade method according to the present application;
FIG. 5 is a schematic diagram of signals on various data interaction interfaces between the processing unit and the control unit when the analog camera is in a normal mode;
FIG. 6 is a schematic diagram of a portion of the signal amplification of FIG. 5;
FIG. 7 is a diagram illustrating registers preset in an upgrade device according to an embodiment of the present application;
FIG. 8 is a schematic diagram of signals on various data interaction interfaces between the processing unit and the control unit when the analog camera is in the upgrade mode;
FIG. 9 is a schematic diagram of a portion of the signal amplification of FIG. 8;
FIG. 10 is a schematic view of a part of the work flow of a control unit in an embodiment of the method for upgrading an analog camera according to the present application;
fig. 11 is a schematic view of a workflow of a control unit acquiring forward data in an embodiment of the method for upgrading an analog camera according to the present application;
FIG. 12 is a schematic flow chart diagram illustrating another embodiment of an analog camera upgrade method according to the present application;
FIG. 13 is a schematic structural diagram of an embodiment of an upgrade apparatus of the present application;
FIG. 14 is a schematic structural diagram of another embodiment of an upgrade apparatus of the present application;
FIG. 15 is a schematic diagram of the structure of an embodiment of the analog camera of the present application;
FIG. 16 is a schematic structural diagram of an embodiment of a computer-readable storage medium according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to upgrade the analog camera, the upgrading device is connected with the analog camera, and the upgrading device can be an independent electronic product and can also be integrated on other electronic products. Meanwhile, the upgrading equipment can also communicate with an upper computer.
Meanwhile, interactive data sent by the analog camera is called forward data, and interactive data received by the analog camera is called reverse data. The signals and the data of the application are two different concepts, the range of the signals is larger than that of the data, specifically, forward data can be extracted from video signals sent to the upgrading device by the analog camera, and besides the forward data, the video signals also have synchronous information for positioning the video signals, which can be specifically referred to as the following.
Meanwhile, the structure of the analog camera does not need to be improved, and with reference to fig. 1, in the analog camera 100, a link formed by a Buffer unit (Buffer) and a resistor R3 outputs a normal video signal (specifically, an analog video signal), a coupling circuit, the first receiving unit 110, the resistor R1, and the resistor R2 form a reverse data extraction link, and the link outputs a signal S1 to the master controller. The object of upgrading the analog video camera 100 is a Flash storage unit. The upgrade method of the present application relies on a reverse data extraction link in the analog camera 100.
Continuing to refer to fig. 1, the analog camera 100 and the upgrading device 200 are connected through a video transmission line, and after receiving the video signal sent by the analog camera 100, the capacitor C1 and the video clamping unit 210 in the upgrading device 200 perform clamping processing on the video signal, and output the clamped video signal. The process of performing the banding belongs to the prior art, and is not described in detail herein.
The positioning unit 220 is used for processing the video signal sent by the analog camera 100 and outputting a signal S3 to facilitate the processing unit 240 in positioning the video signal. The second receiving unit 230 is used for extracting forward data on the video signal sent by the analog camera 100 and outputting a signal S2, and the processing unit 240 has the functions of: positioning the video signal, sending out byte data to be sent according to protocol coding, and decoding forward data according to the protocol coding after receiving a signal S2; the control unit 250, which is a controller of the upgrade process, interacts with the upper computer 300 through the USB interface and acquires upgrade packet data, and transmits the upgrade packet data to the analog video camera 100.
The control unit 250 is further connected to a human-machine input/output (display) unit, a storage unit, and the like, as shown in fig. 1.
Among them, the methods of extracting reverse data from a video signal by the first receiving unit 110 in the analog video camera 100 and extracting forward data from a video signal by the second receiving unit 230 in the upgrade apparatus 200 are the same, and fig. 2 is schematically illustrated in order to extract forward data from a video signal.
Specifically, the second receiving unit 230 in this embodiment includes a second comparator 231, the non-inverting terminal of the second comparator 231 is connected to the output terminal of the video clamping unit 210 for receiving the video signal, after receiving the video signal, the second comparator 231 compares the voltage of the video signal with the input voltage vref2 at the inverting terminal, if the voltage of the video signal is greater than vref2, the second comparator 231 outputs a high level, otherwise, the second comparator 231 outputs a low level, finally, the second comparator 231 outputs the digital signal S2, and then the processing unit 240 extracts the high level signal in the digital signal S2 to obtain the forward data.
In other embodiments, the second comparator 231 may receive the video signal at the inverting terminal and the input voltage vref2 at the non-inverting terminal, and the processing unit 240 may extract the low level signal of the digital signal S2 to obtain the forward data after receiving the digital signal S2.
In this embodiment, a RAM is not added in the control unit 250, and only the RAM of the control unit 250 is used as a data buffer, so that in the upgrading process, the upper computer 300 divides the upgrade packet data into a plurality of sub upgrade data according to a preset size, and then the upper computer 300 issues one sub upgrade packet data to the upgrade apparatus 200 at a time. The preset size is 64kByte in an application scenario. In other embodiments, a RAM may be added to the control unit 250, so that the upper computer 300 may send the upgrade package data to the control unit 250 at one time.
In order to ensure the safety performance of the whole upgrading process, after the upgrading device 200 sends the sub-upgrading packet data to the analog camera 100 each time, the analog camera 100 needs to check the sub-upgrading packet data, and then requests the upper computer 300 to send the next sub-upgrading packet data.
Referring to fig. 3, in the upgrade process, the control process of the upper computer 300 includes:
s100: and initializing reset.
S101: it is determined whether the user inputs an instruction to connect the upgrade apparatus 200.
If the user inputs, step S102 is performed, otherwise step S101 is repeatedly performed.
S102: establishes a connection with the upgrade apparatus 200 and prompts the user on the display interface.
After the user inputs an instruction to connect the upgrade apparatus 200, the upper computer 300 establishes a connection with the upgrade apparatus 200 and informs the user after the connection is successful.
S103: and judging whether the user triggers upgrading.
And executing step S104 after the user triggers upgrading, otherwise, repeatedly executing step S103.
Specifically, when the user wants to upgrade the analog video camera 100, an upgrade instruction is triggered.
S104: the information of the analog camera 100 and the upgrade packet data selected by the user are acquired through the upgrade apparatus 200.
Specifically, after the user triggers an upgrade instruction, the upper computer 300 acquires information of the analog camera 100 and upgrade packet data selected by the user through the upgrade apparatus 200.
S105: it is judged whether the analog camera 100 is matched with the upgrade package data.
If not, step S106 is performed, and if matched, step S107 is performed.
S106: and prompting corresponding error information.
After step S106 is performed, step S100 is performed.
Specifically, if the analog video camera 100 does not match the upgrade package data, the user may be prompted to reselect the upgrade package data.
S107: the upper computer 300 controls the analog camera 100 to enter an upgrade mode through the upgrade apparatus 200.
Specifically, if the information of the analog camera 100 matches the upgrade package data, the upper computer 300 controls the upgrade apparatus 200 to send an upgrade instruction to the analog camera 100300 to control the analog camera 100 to enter the upgrade mode.
S108: it is determined whether the analog camera 100 enters the upgrade mode.
If not, step S106 is executed, and if so, step S109 is executed.
S109: and dividing the upgrade packet data into a plurality of sub upgrade packet data, and adding a check code to each sub upgrade packet data.
Specifically, after the analog camera 100 successfully enters the upgrade mode, the upper computer 300 divides the upgrade packet data into a plurality of sub-upgrade packet data according to a preset size, and adds a check code to each sub-upgrade packet data, so that the analog camera 100 checks the sub-upgrade packet data through the check code after receiving the sub-upgrade packet data.
S110: and transmitting the Nth sub-upgrade packet data.
S111: it is judged whether the analog camera 100 passes the verification of the nth sub upgrade packet data.
If so, step S112 is performed, and if not, step S115 is performed.
Specifically, after transmitting the sub upgrade packet data each time, the analog camera 100 waits for the verification of the sub upgrade packet data.
S112: and judging whether all the sub-upgrade packet data are sent completely.
If the transmission is completed, step S113 is executed, and if the transmission is not completed, step S114 is executed.
S113: and prompting the success of the upgrade.
S114: the value N of the transmit counter is incremented by one.
After step S114 is performed, step S110 is performed.
S115: the value M of the retransmission counter is incremented by one.
S116: and judging whether M exceeds a threshold value.
If so, step S106 is performed, and if not, step S110 is performed.
Specifically, if the analog video camera 100 does not pass the verification of the sub upgrade packet data, the upper computer 300 retransmits the sub upgrade packet data, but if the number of retransmissions exceeds a threshold, it is not transmitted but prompts an error message.
After receiving the sub-upgrade packet data, the analog camera 100 checks the sub-upgrade packet data each time, and then the upgrade apparatus 200 may determine whether the analog camera 100 passes the check of the sub-upgrade packet data according to the forward data sent by the analog camera 100.
In other embodiments, the analog camera 100 may not check the sub-upgrade packet data each time it receives the sub-upgrade packet data.
Referring to fig. 4, in the present embodiment, the upgrade apparatus 200 performs a process including:
s210: after receiving a trigger instruction sent by the upper computer 300, a preset position is searched in a video signal sent by the analog camera 100.
Specifically, the upgrade apparatus 200 may transmit an interactive instruction to the analog camera 100, for example, a 10 th line video line to a 15 th line video line preset in each frame image, corresponding to a preset position in the video signal, and the upgrade apparatus 200 may transmit the interactive instruction to the analog camera 100.
Therefore, after receiving the trigger instruction sent by the upper computer 300, the upgrade apparatus 200 searches for the preset position in the video signal sent by the analog camera 100, so as to send the upgrade instruction to the analog camera 100 corresponding to the preset position.
In this embodiment, the process of searching for the preset position in the video signal transmitted by the analog camera 100 in step S210 includes:
(a1) and extracting a synchronous head signal from the video signal, wherein the synchronous head signal comprises a first pulse signal and a second pulse signal with different pulse widths, the first pulse signal corresponds to video lines of images in the video signal one by one, and the second pulse signal is arranged between the first pulse signals corresponding to two adjacent frames of images in the video signal.
(b1) And determining a preset position according to the positions of the first pulse signal and the second pulse signal in the synchronous head signal.
Specifically, the positioning unit 220 is used to extract the sync header signal S3 in the present embodiment. The positioning unit 220 comprises a first comparator 221, an inverting terminal of the first comparator 221 is connected to the output terminal of the video clamping unit 210, and is used for receiving the video signal, with reference to fig. 2 and 5, after receiving the video signal, the first comparator 221 compares the voltage of the video signal with the input voltage vref3 at the non-inverting terminal, if the voltage of the video signal is greater than vref3, the first comparator 221 outputs a low level, otherwise, the first comparator 221 outputs a high level, and finally the first comparator 221 outputs a sync header signal S3.
With continued reference to fig. 5, the sync head signal S3 includes three kinds of width pulse signals, wherein the middle width pulse signal is defined as the first pulse signal, the widest pulse signal is defined as the second pulse signal, and the narrowest pulse signal is positioned as the third pulse signal. The first pulse signal may also be referred to as a line synchronization header signal, which corresponds to video lines of an image in the video signal one by one, that is, how many video lines are in each frame of image in the video signal, and how many first pulse signals are in the synchronization header signal S3 corresponding to each frame of image; the second pulse signals are arranged between the first pulse signals corresponding to two adjacent frames of images in the video signal, where the number of the second pulse signals between the first pulse signals corresponding to two adjacent frames of images may be one or multiple (as shown in fig. 5, multiple in fig. 5), it can be understood that the second pulse signals arranged between the first pulse signals corresponding to two adjacent frames of images correspond to the same frame of image, and one or more consecutive second pulse signals appearing between the first pulse signals corresponding to two adjacent frames of images in the video signal may be referred to as a group of frame synchronization header signals. The video signal sent by any analog camera 100 can be extracted to the sync header signal S3, and the difference is only the width and the number of the three pulse signals.
According to the first pulse signal and the second pulse signal in the sync header signal S3, a preset position, for example, a 10 th line video line to a 15 th line video line preset in each frame of image, may be found, and the upgrade apparatus 200 may send an interactive instruction to the analog camera 100, and may first distinguish two adjacent frames of images by the frame sync header signal, and then determine the 10 th line video line to the 15 th line video line in one frame of image by counting the first pulse signal.
Wherein the preset position matches the properties of the analog camera 100. The corresponding preset positions of the analog cameras 100 with different attributes are different. In this embodiment, before step S210, the attribute of the analog camera 100 may be determined according to the video signal sent by the analog camera 100, and finally, the preset position matched with the attribute is determined according to the attribute.
The properties of the analog camera 100 may include a video frame rate and a resolution, among others. The video frame rate of the analog camera 100 may be determined according to the time interval between the first and second pulse signals respectively corresponding to two adjacent frames of images in the video signal (i.e. the time interval between the first and second pulse signals in two adjacent sets of frame synchronization header signals) in the synchronization header signal S3, and the resolution of the analog camera 100 may be determined according to the number of the first pulse signals included in each frame of image in the synchronization header signal S3. For example, the video frame rate of the analog camera 100 is determined to be 25fps, and the resolution is 720P, wherein after the attribute of the analog camera 100 is determined, the attribute of the analog camera 100 may be saved in a register in the processing unit 240, as described in detail below.
In other embodiments, the attribute of the analog camera 100 may include only the video frame rate or the resolution, or the preset position may be determined according to the input of the user, that is, the user inputs the attribute of the analog camera 100 together when inputting the trigger instruction.
S220: and sending an upgrade instruction to the analog camera 100 corresponding to the preset position so as to enable the analog camera 100 to enter an upgrade mode, wherein after the analog camera 100 enters the upgrade mode, the upgrade device 200 can send data to the analog camera 100 corresponding to each video line in the video signal.
Specifically, after finding the preset position in step S210, the upgrade apparatus 200 sends an upgrade instruction to the analog camera 100 at the preset position to control the analog camera 100 to enter an upgrade mode. After the analog camera 100 enters the upgrade mode, the upgrade apparatus 200 may transmit data to the analog camera 100 in any video line of the video signal.
In this embodiment, the analog camera 100 has two modes, which are a normal mode and an upgrade mode, respectively, in the normal mode, the analog camera 100 normally acquires an image and outputs a corresponding video signal, at this time, most of the bandwidth of the channel is used to transmit image information, and only a small amount of bandwidth is reserved for data interaction, in the upgrade mode, the analog camera 100 does not acquire an image any more, at this time, in order to allow the channel to have enough bandwidth to be reserved for data interaction, the analog camera 100 outputs a full-black and colorless image, as can be known from the analog video modulation transmission principle, the full-black image only carries synchronization information, and has no image brightness and color information, and occupies a very small amount of bandwidth.
S230: in response to the analog camera 100 successfully entering the upgrade mode, upgrade packet data transmitted by the upper computer 300 is transmitted to the analog camera 100.
In the normal mode, the upgrade apparatus 200 may transmit data to the analog camera 100 only at a preset position, and in the upgrade mode, the upgrade apparatus 200 may transmit data to the analog camera 100 at any video line of an image.
As can be seen from the foregoing, the present application can complete the upgrade of the analog camera 100 without improving the analog camera 100.
In this embodiment, the control Unit 250 is an MCU (micro controller Unit), and because a general MCU has poor real-time performance and long instruction time, and a video line is frequently located, a baud rate of interactive data is high, and the general MCU is not a general protocol (a suitable codec module is not provided inside the MCU in general), and is not suitable for implementing a location function, the processing Unit 240 in this embodiment employs a CPLD (Complex Programmable logic device).
In this embodiment, with reference to fig. 1, the data interaction interfaces of the CPLD and the MCU include two groups: 1. INT interrupt signal + UART; 2. vedio _ BLK + Busy + Trigger + Data [7:0 ]. The 1 st group is used for the MCU to read and write the register of the CPLD, and the 2 nd group of interfaces is used for the MCU to transmit the upgrade package to the CPLD. The interaction register preset by the CPLD is shown in fig. 7.
Specifically, in conjunction with fig. 5 and fig. 6, the processing unit 240 outputs a signal Vedio _ BLK to the control unit 250 through the data interactive interface Vedio _ BLK to inform the control unit 250 of a position where the reverse data can be transmitted, wherein the control unit 250 can transmit the reverse data to the processing unit 240 when the signal Vedio _ BLK is a high level signal. For example, referring to fig. 5, 6, 8 and 9, in the normal mode, the signal Vedio _ BLK is a high level signal only in the 10 th to 15 th lines of the video signal, and in the upgrade mode, the signal Vedio _ BLK is a high level signal from the 10 th line.
The processing unit 240 outputs a signal Busy to the control unit 250 through the data interaction interface Busy to inform the control unit 250 whether it is in an idle state, wherein the processing unit 240 can collect data sent by the control unit 250 only when the signal Busy is low level, and the processing unit 240 is Busy sending data when the signal Busy is high level.
And when the Trigger output signal Trigger (first control signal) of the Data interaction interface Trigger of the control unit 250 is a rising edge, the processing unit 240 samples and stores the Data stored on the Data [7:0] pin, and prepares to send out as the Data to be sent. As can be seen from fig. 5 and 6, the rising edge of the signal Trigger occurs only when Vedio _ BLK is high.
Where t1 in fig. 6 indicates that when Trigger is a rising edge, signal Busy is not immediately a high signal because synchronous logic needs to delay several clocks. At the same time tsu represents the Data establishment time of Trigger sample Data of signal Trigger, and thd represents the Data retention time of Trigger sample Data.
Fig. 5 and 6 show the case where each interactive data interface outputs signals when the analog video camera 100 is in the normal mode, and the case where each interactive data interface outputs signals when the analog video camera 100 enters the upgrade mode is shown in fig. 8 and 9.
As can be seen from fig. 8 and 9, after the analog video camera 100 enters the upgrade mode, the upgrade apparatus 200 may transmit a plurality of bytes of data to the analog video camera 100 for each video line, and in the present embodiment, the upgrade apparatus 200 may transmit 5 bytes of data, i.e., B1, B2, B3, B4, and B5 shown in fig. 9, to the analog video camera 100 for each video line.
It will be appreciated that 5 bytes of data are sent for each video line, and that the signal Trigger (first control signal) comprises 5 rising edges, i.e. 5 pulse signals, for each video line.
As can be seen from the above comparison, the upgrade mode is mainly different in the amount of byte data transmitted per video line compared to the normal mode, and in the upgrade mode, byte data can be transmitted per video line basically.
The following describes the operation of the control unit 250 with reference to fig. 10:
after the connection with the analog camera 100 is performed, whether a video signal is locked is judged, specifically, whether bit3 in the event register is 1 is judged, after the bit3 in the event register is confirmed to be 1 and the connection with the upper computer 300 is successful, after a trigger instruction issued by the upper computer 300 is received, if a Vedio _ BLK is detected to be a rising edge, an upgrade instruction is sent to the analog camera 100.
After sending the upgrade instruction to the analog camera 100, if the analog camera 100 does not successfully enter the upgrade mode, the control unit 250 issues the upgrade instruction again, but after retransmitting the upgrade instruction, if the analog camera 100 still cannot enter the upgrade mode within a preset time, the control unit 250 reports an abnormality to the upper computer 300.
After the analog camera 100 successfully enters the upgrade mode, in a case where the upgrade is not completed, the control unit 250 receives sub-upgrade packet data transmitted by the lower computer, and transmits data to the analog camera 100 when the Vedio _ BLK is a rising edge, where the control unit 250 transmits data of several bytes (5 in the present embodiment) for each video line in the process of transmitting the data.
After the transmission of each sub-upgrade packet data is completed, the control unit 250 waits for the interruption of the data interaction interface INT of the processing unit 240, and reads the stored forward data after the interruption of the data interaction interface INT, thereby determining whether the analog camera 100 passes the verification on the sub-upgrade packet data. The procedure for reading the forward data and the mechanism for generating the interrupt by the data interaction interface INT are described below. In the process of waiting for the INT to generate the interrupt, if the time for waiting for the INT to generate the interrupt exceeds the time length threshold, the fact that the analog camera 100 is powered off can be directly judged, and at the moment, the fact that the analog camera is powered off is fed back to the upper computer 300, and the upgrading process is quitted.
If the analog camera 100 passes the verification of the sub-upgrade packet data, the result of passing the verification is fed back to the upper computer 300, and the upper computer 300 is requested to transmit the next sub-upgrade packet data.
If the analog camera 100 fails to verify the sub-upgrade packet data, a result of the failed verification is fed back to the upper computer 300, and the upper computer 300 is requested to retransmit the sub-upgrade packet data that was just transmitted.
Referring to fig. 7 and fig. 11, when the data interface INT generates an interrupt, the control unit 250 reads bits [7:4] of the event register in the processing unit 240 through the data interface UART. If bit [7] is equal to 1, the forward data reception is completed, then bit [6:4] is read to obtain the number of the forward data, and after the number of the forward data is obtained, the latest corresponding number of the forward data is read from a forward data receiving buffer (FIFO) according to the number. As can be seen from FIG. 7, each time the latest corresponding number of forward data is read from the forward data receive buffer (FIFO), bit [7], bit [6:4] automatically become zero.
The workflow of the processing unit 240 is described as follows:
after receiving the signal S3 output by the positioning unit, the processing unit 240 first determines the video frame rate and resolution of the analog camera 100 according to the first pulse signal and the second pulse signal, updates the value of the signal identification register with the value of the signal identification register in fig. 5 for "resolution @ video frame rate", and sets bit3 in the event register to 1.
When detecting that the signal S2 output by the second receiving unit 230 is a pulse signal, the processing unit 240 performs sampling coding, extracts forward data, sequentially places the forward data in a "forward data receiving buffer", stores the amount of the forward data in a bit [6:4] of an "event register" after the time when the pulse signal stops exceeds a preset time, and outputs an interrupt signal through the UART.
When detecting that the rising edge of the interactive interface Trigger occurs, the processing unit 240 samples the Data stored on the Data interactive interface Data [7:0] as the Data to be transmitted, sets the signal Busy to a high-level signal, obtains the attribute of the analog camera 100 according to the video frame rate stored in the signal identification register, determines the reverse Data transmission protocol, then the superposition unit 260 superposes the stored Data to be transmitted on the video signal according to the protocol, finally the upgrading device 200 transmits the superposed video signal to the analog camera 100 through the video transmission line, and after transmitting the Data, the processing unit 240 pulls down the Busy signal, thereby completing the transmission of one byte of Data.
It is understood that the control unit 250 sequentially transmits each byte Data of the sub upgrade packet Data to the Data interaction interface Data [7:0] upon receiving the sub upgrade packet Data transmitted from the upper computer 300.
Referring to fig. 12, fig. 12 is a schematic flowchart of another embodiment of the analog camera upgrading method according to the present application, in which the analog camera upgrading method includes:
s310: and sending the video signal to the connected upgrading device.
S320: the method comprises the steps that after an upgrading instruction sent by an analog camera is received, an upgrading mode is entered, wherein after the upgrading device receives a triggering instruction sent by an upper computer, a preset position is searched in a video signal, the upgrading device sends the upgrading instruction to the analog camera corresponding to the preset position, and after the analog camera enters the upgrading mode, the upgrading device can send data to the analog camera corresponding to each video line in the video signal.
S330: and receiving upgrade packet data sent by the analog camera.
The method in this embodiment is performed by an analog camera, and specific method procedures can be referred to the method steps performed by the analog camera in the above embodiment, and will not be described in detail here.
In one embodiment, to ensure that the channel has sufficient bandwidth left for data interaction, the analog camera sends a completely black image to the upgrade device after entering the upgrade mode. Specifically, according to the fact that the analog video modulation transmission is far away, the full black image only carries synchronous information, no image brightness and color information exists, and the occupied bandwidth is very small.
Referring to fig. 13, fig. 13 is a schematic structural diagram of an embodiment of the upgrade apparatus of the present application. The upgrade device 200 includes a processor 210, a memory 220, and a communication circuit 230, where the processor 210 is coupled to the memory 220 and the communication circuit 230, respectively, the memory 220 stores program data, and the processor 210 implements the steps in the method according to any of the above embodiments by executing the program data in the memory 220, and the detailed steps may refer to the above embodiments and are not described herein again.
Referring to fig. 14, fig. 14 is a schematic structural diagram of another embodiment of the upgrading device of the present application. The upgrade apparatus 300 includes a processing unit 310.
The processing unit 310 is configured to: after a trigger instruction sent by an upper computer is received, searching a preset position in a video signal sent by an analog camera, and sending an upgrading instruction to the analog camera corresponding to the preset position so as to enable the analog camera to enter an upgrading mode, wherein after the analog camera enters the upgrading mode, upgrading equipment can send data to the analog camera corresponding to each video line in the video signal; and responding to the fact that the simulation camera successfully enters the upgrading mode, and sending upgrading packet data sent by the upper computer to the simulation camera.
The upgrading device 300 executes the steps in the method for upgrading a simulation camera in any of the above embodiments when operating, and the detailed steps can be referred to the above embodiments and are not described herein again.
Referring to fig. 15, fig. 15 is a schematic structural diagram of an embodiment of the analog camera according to the present application. The analog camera 400 includes a processor 410, a memory 420, and a communication circuit 430, wherein the processor 410 is coupled to the memory 420 and the communication circuit 430, respectively, the memory 420 stores program data, and the processor 410 executes the program data in the memory 420 to implement the steps in any of the above-mentioned embodiments, and the detailed steps can be referred to the above-mentioned embodiments and are not described herein again.
Referring to fig. 16, fig. 16 is a schematic structural diagram of an embodiment of a computer-readable storage medium according to the present application. The computer-readable storage medium 500 stores a computer program 510, the computer program 510 being executable by a processor to implement the steps of any of the methods described above.
The computer-readable storage medium 500 may be a device that can store the computer program 510, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, or may be a server that stores the computer program 510, and the server can send the stored computer program 510 to another device for operation, or can self-operate the stored computer program 510.
The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application or are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (14)

1. An analog camera upgrade method, performed by an upgrade device connected to the analog camera, the method comprising:
after a trigger instruction sent by an upper computer is received, searching a preset position in a video signal sent by the analog camera;
sending an upgrading instruction to the analog camera corresponding to the preset position so as to enable the analog camera to enter an upgrading mode, wherein after the analog camera enters the upgrading mode, the upgrading equipment can send data to the analog camera corresponding to each video line in the video signal;
and responding to the successful entering of the simulation camera into the upgrading mode, and sending upgrading packet data sent by the upper computer to the simulation camera.
2. The method of claim 1, wherein said step of finding a predetermined position in the video signal transmitted by said analog camera comprises:
extracting a synchronous head signal from the video signal, wherein the synchronous head signal comprises a first pulse signal and a second pulse signal which are different in pulse width, the first pulse signal corresponds to video lines of images in the video signal one by one, and the second pulse signal is arranged between the first pulse signals corresponding to two adjacent frames of images in the video signal;
and determining the preset position according to the positions of the first pulse signal and the second pulse signal in the synchronous head signal.
3. The method of claim 2, further comprising:
and inputting the video signal into a first preset input end of a first comparator to obtain the synchronous head signal.
4. The method according to claim 1, wherein the step of transmitting the upgrade package data transmitted from the upper computer to the analog camera comprises:
receiving a plurality of sub-upgrade packet data with preset sizes, which are included in the upgrade packet data sequentially sent by the upper computer;
and sequentially sending the sub-upgrade packet data to the analog camera.
5. The method of claim 4, further comprising:
after the sub-upgrade packet data is sent to the analog camera every time, reading forward data in the video signal which is saved in advance;
determining whether the analog camera passes the verification of the sub-upgrade packet data or not according to the forward data;
responding to the pass, requesting the upper computer to send the next sub-upgrading packet data;
and responding to the failure, feeding back to the upper computer to request the upper computer to resend the sub-upgrade packet data.
6. The method of claim 5, further comprising:
inputting the video signal to a second input terminal of a second comparator;
and extracting the forward data from the digital signal output by the second comparator and storing the forward data.
7. The method of claim 4, wherein the upgrade device comprises a control unit, a processing unit, and a superposition unit;
after the analog camera enters the upgrading mode, corresponding to each video line in the video signals, the first control signals output by the control unit all comprise a plurality of pulse signals;
the processing unit collects data to be sent stored on a preset end every time when the pulse signal in the first control signal is detected, controls the superposition unit to superpose the data to be sent on the video signal according to a data transmission protocol corresponding to the analog camera, and then the upgrading device sends the superposed video signal to the analog camera, so that one byte of data is sent;
after receiving the sub-upgrade patch data sent by the upper computer, the control unit sends each byte data in the sub-upgrade patch data to the preset end of the processing unit in sequence.
8. The method according to claim 1, wherein after receiving the trigger instruction sent by the upper computer, before searching for the preset position in the video signal sent by the analog camera, the method further comprises:
determining the attribute of the analog camera according to the video signal sent by the analog camera;
and determining the preset position according to the attribute of the analog camera.
9. The method of claim 8, wherein the attributes comprise: at least one of a resolution and a video frame rate of the analog camera;
the step of determining the attribute of the analog camera according to the video signal sent by the analog camera includes:
extracting a synchronous head signal from the video signal, wherein the synchronous head signal comprises a first pulse signal and a second pulse signal which have different pulse widths, the first pulse signal corresponds to video lines of images in the video signal in a one-to-one manner, and the second pulse signal is arranged between the first pulse signals corresponding to two adjacent frames of images in the video signal;
determining the resolution of the analog camera according to the number of first pulse signals corresponding to each frame of image in the synchronous head signals;
or, determining the video frame rate of the analog camera according to the time interval between the first pulse signal and the second pulse signal corresponding to each of two adjacent frames of images in the video signal in the synchronization header signal.
10. An analog camera upgrade method, performed by the analog camera, the method comprising:
sending a video signal to the connected upgrading device;
after receiving an upgrade instruction sent by the analog camera, entering an upgrade mode, wherein after receiving a trigger instruction sent by an upper computer, the upgrade device searches for a preset position in the video signal, sends an upgrade instruction to the analog camera corresponding to the preset position, and after entering the upgrade mode, the upgrade device can send data to the analog camera corresponding to each video line in the video signal;
and receiving upgrade packet data sent by the analog camera.
11. The method of claim 10, further comprising:
and after entering the upgrading mode, the analog camera sends a completely black image to the upgrading equipment.
12. An upgrade device, comprising a processor, a memory and a communication circuit, the processor being respectively coupled to the memory and the communication circuit, the memory storing program data therein, the processor implementing the steps of the method according to any one of claims 1 to 9 by executing the program data in the memory.
13. An analog camera comprising a processor, a memory and a communication circuit, the processor being coupled to the memory and the communication circuit respectively, the memory storing program data therein, the processor implementing the steps of the method according to any one of claims 10-11 by executing the program data in the memory.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executable by a processor to implement the steps in the method according to any of claims 1-11.
CN202210100130.7A 2022-01-27 2022-01-27 Upgrading method and upgrading device for analog camera Pending CN114594966A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210100130.7A CN114594966A (en) 2022-01-27 2022-01-27 Upgrading method and upgrading device for analog camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210100130.7A CN114594966A (en) 2022-01-27 2022-01-27 Upgrading method and upgrading device for analog camera

Publications (1)

Publication Number Publication Date
CN114594966A true CN114594966A (en) 2022-06-07

Family

ID=81805975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210100130.7A Pending CN114594966A (en) 2022-01-27 2022-01-27 Upgrading method and upgrading device for analog camera

Country Status (1)

Country Link
CN (1) CN114594966A (en)

Similar Documents

Publication Publication Date Title
CN109618225B (en) Video frame extraction method, device, equipment and medium
CN108052474B (en) Data format conversion method, device, equipment and computer readable storage medium
WO2019134683A1 (en) Oscilloscope signal decoding method and apparatus, and oscilloscope
CN111818632B (en) Method, device, equipment and storage medium for equipment synchronization
CN113055225A (en) Method for acquiring network fault analysis data, terminal and server
CN112148322A (en) Method for upgrading firmware in single chip microcomputer connected with system on chip
EP1039368A2 (en) Data communication apparatus
CN114594966A (en) Upgrading method and upgrading device for analog camera
CN115604052B (en) Vehicle communication interaction method and system and electronic equipment
CN109756642B (en) Control method of ballot image acquisition system and ballot image acquisition system
CN108391120B (en) Camera starting test method, device, equipment and storage medium
US20240073168A1 (en) Message sending method and apparatus
CN108289165B (en) Method and device for realizing camera control based on mobile phone and terminal equipment
CN101136756A (en) Electric self-checking method, system and BMC chip on network long-range control host machine
CN114338270B (en) Data communication method, device, electronic equipment and storage medium
US11435999B2 (en) Method and apparatus for upgrading software
CN113709248B (en) Service request processing method, system, front-end and server-side service processing device
CN113315955B (en) ARINC818-2 receiving port error processing device and method
US6687853B1 (en) Checkpointing for recovery of channels in a data processing system
US7274712B2 (en) System and method of operating the system that responds to channel change requests without causing macro-blocking
CN111444741B (en) Data display method, data acquisition method, data display device, data acquisition device, electronic equipment and storage medium
CN117389769B (en) Browser-end rich text copying method and system based on cloud service and cloud platform
CN111866363B (en) Camera remote upgrading method and device, electronic equipment and readable storage medium
JPH1168874A (en) Analytic system for transmission information
CN117278174A (en) Data transmission method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination