Summary of the invention
In view of this, the present invention proposes a kind of firmware version verification method and device of LCD monitor, can make that the user is convenient and safely LCD monitor is carried out the firmware version checking.
A kind of firmware version verification method of LCD monitor, described method comprises:
Read sequence code and the key of the store memory storage of LCD monitor;
Authorization code according to the different editions correspondence of the sequence code of described LCD monitor and cipher key calculation LCD monitor firmware;
The authorization code of the different editions that calculates is compared with the authorization code of the authorization code store memory storage of LCD monitor respectively, if the authorization code in the authorization code storer of the authorization code of one of them version and LCD monitor is identical, then version is proved to be successful, if identical without any the authorization code in the authorization code storer of the authorization code of a version and LCD monitor, version authentication failed then;
After version was proved to be successful, the firmware of the version of the authorization code correspondence that is proved to be successful was carried out in selection.
Further, described method also comprises, after the sequence code and key of the store memory storage of reading LCD monitor, obtains the authorization code of user's input, and the authorization code that gets access to is stored in the authorization code storer.
Further, the authorization code according to the different editions correspondence of the authorization code of described LCD monitor store memory storage and cipher key calculation LCD monitor firmware comprises:
Described sequence code is carried out bit arithmetic, make the length of described sequence code by half, obtain the preprocessing sequence sign indicating number;
With key described preprocessing sequence sign indicating number is encrypted, obtains the initial authorization sign indicating number;
Described initial authorization sign indicating number is carried out bit arithmetic with serial digital interface (SDI) character of the different editions of firmware respectively, obtain the authorization code of the different editions of firmware.
Further, to described sequence code carry out computing be with described sequence code by byte packet, per two bytes are one group, two bytes in every group are carried out bit arithmetic, and with the operation result combination of each group, obtain the preprocessing sequence sign indicating number.
Corresponding, the invention also discloses a kind of LCD monitor, described LCD monitor comprises:
Sequence code and key read module are for sequence code and the key of the store memory storage of reading LCD monitor;
The authorization code computing module is used for the authorization code according to sequence code and the cipher key calculation LCD monitor different editions correspondence of described LCD monitor;
The authorization code comparison module, the authorization code that is used for the different editions that will calculate compares with the authorization code of the authorization code store memory storage of LCD monitor respectively, if the authorization code in the authorization code storer of the authorization code of one of them version and LCD monitor is identical, then version is proved to be successful, if identical without any the authorization code in the authorization code storer of the authorization code of a version and LCD monitor, version authentication failed then;
Firmware version is selected module, and after being proved to be successful for version, the firmware of the version of the authorization code correspondence that is proved to be successful is carried out in selection.
Further, described LCD monitor also comprises the authorization code acquisition module, and described authorization code acquisition module is used for obtaining the authorization code of user's input, and the authorization code that gets access to is stored in the authorization code storer.
Further, described authorization code computing module comprises:
Preprocessing sequence sign indicating number operator module is used for described sequence code is carried out bit arithmetic, makes the length of described sequence code by half, obtains the preprocessing sequence sign indicating number;
Preprocessing sequence code encryption submodule is used for key described preprocessing sequence sign indicating number being encrypted, and obtains the initial authorization sign indicating number;
Authorization code operator module is used for described initial authorization sign indicating number is carried out bit arithmetic with serial digital interface (SDI) character of the different editions of firmware respectively, obtains the authorization code of the different editions of firmware.
Further, by byte packet, per two bytes are one group to described preprocessing sequence sign indicating number operator module with described sequence code, and every group of two interior bytes are carried out bit arithmetic, and the bit arithmetic result of each group is made up, and obtain the preprocessing sequence sign indicating number.
Firmware version verification method and the LCD monitor of LCD monitor of the present invention have following beneficial effect: (1) has reduced the number of times of firmware compiling, has simplified the operation when firmware upgraded; (2) in the LCD monitor burning simultaneously the firmware of different editions, and realized effective management to these firmwares; (3) authorization code is unique definite to every LCD monitor, has improved the security of firmware upgrade.
Embodiment
Further specify technical scheme of the present invention below in conjunction with accompanying drawing and by embodiment.
Fig. 2 shows the first embodiment of the present invention.
Fig. 2 is the process flow diagram of the version verification method of the LCD monitor that provides of the first embodiment of the present invention.When the version verification method of the LCD monitor shown in Fig. 2 is applied to the LCD monitor start its firmware is carried out the version checking.
Referring to Fig. 2, in the present embodiment, the version verification method of described LCD monitor comprises: step 201, read sequence code and the key of the store memory storage of LCD monitor; Step 202 is according to the authorization code of the different editions correspondence of the sequence code of described LCD monitor and cipher key calculation LCD monitor firmware; Step 203, the authorization code of the different editions that calculates is compared with the authorization code of the authorization code store memory storage of LCD monitor respectively, if the authorization code in the authorization code storer of the authorization code of one of them version and LCD monitor is identical, then version is proved to be successful, if identical without any the authorization code in the authorization code storer of the authorization code of a version and LCD monitor, version authentication failed then; Step 204, after version was proved to be successful, the firmware of the version of the authorization code correspondence that is proved to be successful was carried out in the LCD monitor selection.
In step 201, read sequence code and the key of the store memory storage of LCD monitor.
Described sequence code is the heuristicimal code of each LCD monitor of unique identification.In other words, unique LCD monitor of correspondence of each group sequence code.Described key is the parameter of using when described sequence code is encrypted computing.Described key is unique LCD monitor of correspondence also.In the present embodiment, described sequence code is one group of heuristicimal code that comprises 16 bytes, and described key is one group of heuristicimal code that comprises 8 bytes.Described sequence code and described key all are written in the LCD monitor before LCD monitor is dispatched from the factory in advance.
The sequence code of LCD monitor and key are stored in respectively in sequence code storer and the crypto key memory.When LCD monitor is carried out the version checking, at first from described sequence code storer, read sequence code, and from crypto key memory, read key.
In the present embodiment, described sequence code storer is the storer that comprises at least 16 bytes of memory spaces, and described crypto key memory is the storer that comprises at least 8 bytes of memory spaces.Described sequence code storer and described crypto key memory can be electrically erasable read-only memory (EEPROM).
In step 203, according to the authorization code of described LCD monitor and the authorization code of cipher key calculation LCD monitor different editions correspondence.
Step 203 comprises: substep 2031, described sequence code is carried out bit arithmetic, and make the length of described sequence code by half, obtain the preprocessing sequence sign indicating number; Substep 2032 is encrypted described preprocessing sequence sign indicating number with key, obtains the initial authorization sign indicating number; Substep 2033 carries out bit arithmetic with serial digital interface (SDI) character of the different editions of firmware respectively with described initial authorization sign indicating number, obtains the authorization code of the different editions of firmware.
In substep 2031, described sequence code is carried out bit arithmetic, make the length of described sequence code by half, obtain the preprocessing sequence sign indicating number.
In the present embodiment, described sequence code is one group of heuristicimal code that comprises 16 bytes.In the process of the authorization code that utilizes sequence code and cipher key calculation LCD, at first the described sequence code of 16 bytes that comprises is divided into 8 groups by byte, every group of two bytes, every group of two interior bytes are carried out bit arithmetic mutually then, obtain the bit arithmetic result of 8 bytes, bit arithmetic result with 8 bytes makes up at last, obtains the preprocessing sequence sign indicating number of 8 bytes.
In substep 2032, with key described preprocessing sequence sign indicating number is encrypted, obtain the initial authorization sign indicating number.
Described key is the sexadecimal parameter of using when described preprocessing sequence sign indicating number is encrypted computing.And in the present embodiment, described key is the heuristicimal code that comprises 8 bytes, and described preprocessing sequence sign indicating number also is the heuristicimal code that comprises 8 bytes.It specifically is the bit arithmetic of carrying out between described preprocessing sequence sign indicating number and the described key that described preprocessing sequence sign indicating number is encrypted computing.After finishing the cryptographic calculation to described preprocessing sequence sign indicating number, obtain the initial authorization sign indicating number.In the present embodiment, described initial authorization sign indicating number is the heuristicimal code that comprises 8 bytes.
In substep 2033, described initial authorization sign indicating number is carried out computing with serial digital interface (SDI) character of the different editions of firmware respectively, obtain the authorization code of the different editions of firmware.
Described serial digital interface (SDI) character is the heuristicimal code for the different editions of the firmware of expression LCD monitor.In other words, the version difference of the firmware of the different expression of the value of described serial digital interface (SDI) character LCD monitor.In the present embodiment, the heuristicimal code that comprises two bytes of described serial digital interface (SDI) character.
Described initial authorization sign indicating number is carried out bit arithmetic with serial digital interface (SDI) character of different editions of expression firmware respectively, just obtain the authorization code corresponding to the different editions of firmware.Because described sequence code and described key are determined each LCD monitor is unique, and described serial digital interface (SDI) character is determined for the different editions of LCD monitor is unique, so described authorization code is determined each firmware version of every LCD monitor is unique.In other words, described authorization code is corresponding one by one with the firmware version of LCD monitor.
In step 204, the authorization code of the different editions that calculates is compared with the authorization code of the authorization code store memory storage of LCD monitor respectively, if the authorization code in the authorization code storer of the authorization code of one of them version and LCD monitor is identical, then version is proved to be successful, if identical without any the authorization code in the authorization code storer of the authorization code of a version and LCD monitor, version authentication failed then.
Before LCD monitor is dispatched from the factory, except the sequence code and key that have write LCD monitor in advance, also write one group of authorization code in every LCD monitor in advance in every LCD monitor.Described authorization code is to obtain according to the sequence code of LCD monitor and cipher key calculation, and corresponding to one in the firmware of four versions.In the present embodiment, described authorization code is one group of heuristicimal code that comprises 8 bytes.
Described authorization code is stored in the authorization code storer.Described authorization code storer is the storer that comprises at least 8 bytes of memory spaces.Described authorization code storer can be electrically erasable read-only memory (EEPROM).
At the firmware that calculates four versions respectively behind the corresponding authorization code, with the firmware of the authorization code of described authorization code store memory storage and four versions that calculate respectively corresponding authorization code compare.If there is the authorization code with described authorization code store memory storage identical in four authorization codes of the firmware correspondence of four versions, then version is proved to be successful; If identical without any the authorization code with the storage of described authorization code store memory in four authorization codes of the firmware correspondence of four versions, version authentication failed then.
In step 205, after version was proved to be successful, the firmware of the version of the authorization code correspondence that is proved to be successful was carried out in the LCD monitor selection.
Version is proved to be successful a coupling in the authorization code of the authorization code of explanation in the LCD monitor and four versions that calculate, i.e. the authorization code correspondence of the authorization code store memory of LCD monitor storage one in the authorization code of four versions of firmware.Therefore, the processor of described LCD monitor should select to carry out the firmware of the version of the authorization code correspondence that is proved to be successful.
Before LCD monitor was dispatched from the factory, the firmware of LCD monitor was stored in the firmware memory of LCD monitor in advance.And, stored the firmware of four versions can finishing the LCD monitor Version Control in the described firmware memory in advance.Described firmware memory is read-write nonvolatile memory.Concrete, described firmware memory can be flash memory (FLASH).
After the version of LCD monitor was proved to be successful, described LCD monitor processor 102 read in the firmware of the version of the authorization code correspondence that is proved to be successful, and carried out the firmware that reads in, and finished the processing to vision signal and sound signal.
Present embodiment is by the authorization code of the firmware of calculating different editions, and with LCD monitor in the authorization code stored compare, finish the checking to the authorization code of LCD monitor, made LCD monitor can in the firmware of four versions, select processing and a broadcast of carrying out vision signal and sound signal safely, easily.
Fig. 3 shows the second embodiment of the present invention.
Fig. 3 is the process flow diagram of the version verification method of the LCD monitor that provides of the second embodiment of the present invention.Version checking when the version verification method of the LCD monitor shown in Fig. 3 is applied to the user firmware of LCD monitor is switched.
Referring to Fig. 3, in the present embodiment, the version verification method of described LCD monitor comprises: step 301, and obtain the authorization code of user's input, and the authorization code that gets access to is stored in the authorization code storer; Step 302 reads sequence code and the key of the store memory storage of LCD monitor; Step 303 is according to the authorization code of the different editions correspondence of the sequence code of described LCD monitor and cipher key calculation LCD monitor firmware; Step 304, the authorization code of the different editions that calculates is compared with the authorization code of the authorization code store memory storage of LCD monitor respectively, if the authorization code in the authorization code storer of the authorization code of one of them version and LCD monitor is identical, then version is proved to be successful, if identical without any the authorization code in the authorization code storer of the authorization code of a version and LCD monitor, version authentication failed then; Step 305, after version was proved to be successful, the firmware of the version of the authorization code correspondence that is proved to be successful was carried out in the LCD monitor selection.
In step 301, obtain the authorization code of user's input, and the authorization code that gets access to is stored in the authorization code storer.
In the present embodiment, LCD monitor is obtained the user by the authorization code of the soft keyboard input of keyboard or LCD monitor demonstration.Described authorization code is the heuristicimal code that comprises 8 bytes.The authorization code of user's input can be by synchronous being presented on the LCD monitor.After the operation that the user imports authorization code is finished, according to user's input validation authorization code input operation, and obtain the authorization code of the soft keyboard input that the user shows by keyboard or LCD monitor.
After obtaining the authorization code of user's input, the authorization code that gets access to is stored in the authorization code storer of LCD monitor.Described authorization code storer is the storer that comprises at least 8 bytes of memory spaces.Described authorization code storer can be electrically erasable read-only memory (EEPROM).
Step 302 to step 305 respectively with first embodiment of the invention in step 201 identical to step 204, do not repeat them here.
It should be appreciated by those skilled in the art that though step 301 is arranged at before step 302 and the step 303 among Fig. 3,, before execution in step 304, any time obtain and store described authorization code and can finish checking to the firmware version of LCD monitor.
Present embodiment by obtaining user input authorization code and store, sequence code and cipher key calculation authorization code according to LCD monitor, and the authorization code that calculates and the authorization code that obtains in advance compared, realized the switching between the firmware of the different editions of LCD monitor, and the security that has improved the firmware blocked operation.
Fig. 4 shows the third embodiment of the present invention.
Fig. 4 is the structural drawing of the firmware version demo plant of the LCD monitor that provides of the third embodiment of the present invention.Described firmware version demo plant comprises sequence code and key read module 401, authorization code computing module 402, authorization code comparison module 403 and firmware version selection module 404.
Described sequence code and key read module 401 are used for reading sequence code and the key of LCD monitor.Described sequence code is the heuristicimal code for the unique identification LCD monitor.In the present embodiment, described sequence code is the heuristicimal code that comprises 16 bytes.Described key is that described sequence code is encrypted the parameter that computing is to use.In the present embodiment, described key is the heuristicimal code that comprises 8 bytes.
The sequence code of LCD monitor and key are respectively stored in the sequence code storer and crypto key memory of LCD monitor.In the present embodiment, described sequence code storer is the storer that comprises at least 16 bytes of memory spaces, and described crypto key memory is the storer that comprises at least 8 bytes of memory spaces.And described sequence code storer and described crypto key memory can be electrically erasable read-only memory (EEPROM).
The authorization code that described authorization code computing module 402 is used for according to sequence code and the cipher key calculation LCD monitor different editions correspondence of described LCD monitor.Described authorization code computing module 402 comprises preprocessing sequence sign indicating number operator module 4021, preprocessing sequence code encryption submodule 4022 and authorization code operator module 4023.
Described preprocessing sequence sign indicating number operator module 4021 is used for described sequence code is carried out computing to obtain the preprocessing sequence sign indicating number.Described preprocessing sequence sign indicating number operator module is pressed byte packet with described sequence code.In the present embodiment, described sequence code comprises 16 bytes.Described preprocessing sequence sign indicating number operator module is divided into 8 groups with 16 bytes of described sequence code according to byte, every group of two bytes.Then, two bytes in described preprocessing sequence sign indicating number operator module makes every group are carried out bit arithmetic mutually, obtain the operation result of 8 bytes.At last, described preprocessing sequence sign indicating number operator module makes up the operation result of 8 bytes, obtains the preprocessing sequence sign indicating number of 8 bytes.
Described preprocessing sequence code encryption submodule 4022 usefulness keys are encrypted to obtain the initial authorization sign indicating number to described preprocessing sequence sign indicating number.Described preprocessing sequence code encryption submodule 4022 utilizes described key that described preprocessing sequence sign indicating number is encrypted.In the present embodiment, described key is the heuristicimal code that comprises 8 bytes, and described preprocessing sequence sign indicating number also is the heuristicimal code that comprises 8 bytes.The process of utilizing described key that described preprocessing sequence sign indicating number is encrypted is the process of carrying out bit arithmetic between described key and the described preprocessing sequence sign indicating number.The result who utilizes described key that described preprocessing sequence sign indicating number is encrypted is the initial authorization sign indicating number.
Described authorization code operator module 4023 is used for described initial authorization sign indicating number is carried out computing with the authorization code of the different editions that obtains firmware with serial digital interface (SDI) character of the different editions of firmware respectively.Described serial digital interface (SDI) character is the heuristicimal code for the firmware version of expression LCD monitor.In the present embodiment, described serial digital interface (SDI) character is the heuristicimal code that comprises two bytes.
The authorization code that described authorization code comparison module 403 is used for the different editions that will calculate compares with the authorization code of the authorization code store memory storage of LCD monitor respectively, if the authorization code in the authorization code storer of the authorization code of one of them version and LCD monitor is identical, then version is proved to be successful, if identical without any the authorization code in the authorization code storer of the authorization code of a version and LCD monitor, version authentication failed then.
In the present embodiment, described authorization code storer is the storer that comprises at least 16 bytes of memory spaces, and described authorization code is the heuristicimal code that comprises 16 bytes.Described authorization code computing module 402 has calculated the authorization code of the firmware correspondence of different editions.Described authorization code comparison module 403 described authorization code computing module 402 has been calculated different editions the firmware correspondence authorization code respectively with described authorization code storer in authorization code compare, to finish the version checking to the firmware of LCD monitor.In process relatively, if the authorization code of one of them version is identical with stored authorized sign indicating number in the described authorization code storer, then version is proved to be successful; If the authorization code of any one version is all different with stored authorized sign indicating number in the described authorization code storer, then the version authentication failed.
Described firmware version selects module 404 after version is proved to be successful, and selects to carry out the firmware of the version of the authorization code correspondence that is proved to be successful according to the result of version checking.Concrete, described LCD monitor processor 102 reads in the firmware of the version of the authorization code correspondence that is proved to be successful and carry out.
Present embodiment is by arranging authorization code computing module and authorization code comparison module, when starting shooting, LCD monitor finishes the calculating of authorization code and the checking of authorization code, make LCD monitor can finish checking to the version of its firmware, and select to carry out the firmware of respective version according to the checking result.
Fig. 5 shows the fourth embodiment of the present invention.
Fig. 5 is the structural drawing of the firmware version demo plant of the LCD monitor that provides of the fourth embodiment of the present invention.Described firmware version demo plant comprises authorization code acquisition module 501, sequence code and key read module 502, authorization code computing module 503, authorization code comparison module 504 and firmware version selection module 505.
Described authorization code acquisition module 501 is used for obtaining the authorization code of user's input, and the authorization code that gets access to is stored in the authorization code storer.Described authorization code is the heuristicimal code that comprises 8 bytes.Described authorization code acquisition module 501 obtains the authorization code of the soft keyboard input that the user shows by keyboard or LCD monitor, and the authorization code that gets access to is stored in the authorization code storer in the LCD monitor.
Described sequence code and key read module 502 are identical with key read module 401 with sequence code in the fourth embodiment of the invention, described authorization code computing module 503 is identical with authorization code computing module 402 in the fourth embodiment of the invention, described authorization code comparison module 504 is identical with authorization code comparison module 403 in the fourth embodiment of the invention, described firmware version selects module 505 to select module 404 identical with the firmware version in the fourth embodiment of the invention, all repeats no more at this.
Present embodiment is by arranging authorization code acquisition module, authorization code computing module and authorization code comparison module, when importing new authorization code, the user finishes the calculating of authorization code and the checking of authorization code, LCD monitor can be switched between the firmware of different editions, and improved the security of firmware blocked operation.
The above only is embodiments of the invention; be not so limit claim of the present invention; every equivalent structure or equivalent flow process conversion that utilizes Figure of description content of the present invention to do; or directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.