CN104200186B - The method and laser bar code scanning platform of anti-deadlock - Google Patents

The method and laser bar code scanning platform of anti-deadlock Download PDF

Info

Publication number
CN104200186B
CN104200186B CN201410419760.6A CN201410419760A CN104200186B CN 104200186 B CN104200186 B CN 104200186B CN 201410419760 A CN201410419760 A CN 201410419760A CN 104200186 B CN104200186 B CN 104200186B
Authority
CN
China
Prior art keywords
chip
state
request information
synchronization request
house dog
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.)
Active
Application number
CN201410419760.6A
Other languages
Chinese (zh)
Other versions
CN104200186A (en
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.)
SHENZHEN XINGTONG WULIAN TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN XINGTONG WULIAN 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 SHENZHEN XINGTONG WULIAN TECHNOLOGY Co Ltd filed Critical SHENZHEN XINGTONG WULIAN TECHNOLOGY Co Ltd
Priority to CN201410419760.6A priority Critical patent/CN104200186B/en
Publication of CN104200186A publication Critical patent/CN104200186A/en
Application granted granted Critical
Publication of CN104200186B publication Critical patent/CN104200186B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of method of anti-deadlock, the method includes:Detect whether the first chip and/or the second chip receive synchronization request information, synchronization request information is used to notify that the recipient of synchronization request information initializes pin state and the synchronous crypto-operation factor, with synchronous with the sender of synchronization request information;If the first chip and/or the second chip receive synchronization request information, the first chip and the second chip is controlled to be initialized.The invention also discloses a kind of laser bar code scanning platform.This hair make use of a small amount of resources of chip, on the premise of it need not restart laser bar code scanning platform, intelligently solve the problems, such as that laser bar code scanning platform crashes, so as to save the time that laser bar code scanning platform is restarted by deadlock, reduce the time cost of user, meanwhile, enhance continuity and experience sense that user uses the laser bar code scanning platform.

Description

The method and laser bar code scanning platform of anti-deadlock
Technical field
The present invention relates to bar code scan technical field, more particularly to anti-deadlock method and laser bar code scanning platform.
Background technology
At present, many laser bar code scanning platforms (for example, hot environment) or long-time under special environment is in Easily there is deadlock situation in working condition.Deadlock is divided into hard deadlock (i.e. due to deadlock that hardware fault is caused) and soft deadlock is (i.e. The deadlock that software program internal problem is caused).
According to market survey, the deadlock situation caused by hardware is little, and major part crashes because software issue is caused Crash.When laser bar code scanning platform is in deadlock state, scanning platform will be unable to normal work.At this moment, most of laser The solution of barcode scanning platforms producer is that requirement user pulls out electricity laser bar code scanning platform is re-powered again, allows laser Barcode scanning platforms restarting enters working condition.But, the restarting process consuming time is long, and this processing method is blocked User seriously reduces the equipment experience sense of user using the continuity of laser bar code scanning platform, and also to increase user make With the time cost of laser bar code scanning platform.
The above is only used for auxiliary and understands technical scheme, does not represent and recognizes that the above is existing skill Art.
The content of the invention
Crash it is a primary object of the present invention to solving laser bar code scanning platform and restart that the consuming time is long, Consumer's Experience Difference, time cost technical problem high.
To achieve the above object, the method for a kind of anti-deadlock that the present invention is provided, the method for the anti-deadlock is including following Step:
Detect whether the first chip and/or the second chip receive synchronization request information, the synchronization request information is used to lead to Know the synchronization request information recipient initialization pin state and the synchronous crypto-operation factor, with the synchronization request information Sender's synchronous communication;
If first chip and/or the second chip receive synchronization request information, first chip and second are controlled Chip carries out initializing pin state and the synchronous crypto-operation factor.
Preferably, if first chip and/or the second chip receive synchronization request information, to first core The step of piece and/or the second chip carry out initialization pin state and the synchronous crypto-operation factor includes:
If first chip receives the synchronization request information that second chip sends, at the beginning of controlling first chip Its pin state of beginningization and the synchronous crypto-operation factor, meanwhile, control send synchronization request information second chip initiation its Pin state and the synchronous crypto-operation factor;
If second chip receives the synchronization request information that first chip sends, at the beginning of controlling second chip Its pin state of beginningization and the synchronous crypto-operation factor, meanwhile, control send synchronization request information first chip initiation its Pin state and the synchronous crypto-operation factor;
If first chip and the second chip receive mutually the synchronization request information of other side's transmission, described first is controlled Chip and the second chip initiation pin state and the synchronous crypto-operation factor.
Preferably, before the step of whether the first chip of the detection and/or the second chip receive synchronization request information, institute The method for stating anti-deadlock also includes:
Judge the running status of first chip and the second chip;
If first chip or second chip are in power-up state, first chip and the second chip are mutual Send synchronization request information;
If first chip is in deadlock state, sent to second chip after the first chip restarting Synchronization request information;
If second chip is in deadlock state, sent to first chip after the second chip restarting Synchronization request information, wherein, the running status of first chip and the second chip includes power-up state, normal condition and deadlock State.
Preferably, by setting the running status of the first chip described in the first house dog real-time monitoring, if described first sees Door overflows by dog because not set to 0 by first chip, then first chip is in deadlock state;
By set the second house dog real-time monitoring described in the second core running status, if second house dog because not by Second chip sets to 0 and overflows, then second chip is in deadlock state.
Preferably, if first chip and/or the second chip receive synchronization request information, to first core After the step of piece and the second chip are initialized, the method for the anti-deadlock also includes:
Judge the state of first house dog and the second house dog;
If the mode bit of first house dog and the second house dog is 0, first chip and the second chip are judged Initialize because causing in power-up state, and send start sound;
If the mode bit of first house dog and the second house dog is 1, first chip and the second chip are judged Initialize because causing in deadlock state, and house dog state is not sent into start sound to set to 0.
Additionally, to achieve the above object, the present invention also provides a kind of laser bar code scanning platform, laser bar code scanning is flat Platform includes:
Synchronous detection module, it is described same for detecting whether the first chip and/or the second chip receive synchronization request information Step solicited message is used to notify that the recipient of the synchronization request information initializes pin state and the synchronous crypto-operation factor, with institute State sender's synchronous communication of synchronization request information;
Initialization module, for when first chip and/or the second chip receive synchronization request information, control to be described First chip and the second chip carry out initializing pin state and the synchronous crypto-operation factor.
Preferably, the initialization module is used for:
If first chip receives the synchronization request information that second chip sends, at the beginning of controlling first chip Its pin state of beginningization and the synchronous crypto-operation factor, meanwhile, control send synchronization request information second chip initiation its Pin state and the synchronous crypto-operation factor;
If second chip receives the synchronization request information that first chip sends, at the beginning of controlling second chip Its pin state of beginningization and the synchronous crypto-operation factor, meanwhile, control send synchronization request information first chip initiation its Pin state and the synchronous crypto-operation factor;
If first chip and the second chip receive mutually the synchronization request information of other side's transmission, described first is controlled Chip and the second chip initiation pin state and the synchronous crypto-operation factor.
Preferably, the laser bar code scanning platform also includes:
First judge module, judges the running status of first chip and the second chip;
If first chip or second chip are in power-up state, first chip and the second chip are mutual Send synchronization request information;
If first chip is in deadlock state, sent to second chip after the first chip restarting Synchronization request information;
If second chip is in deadlock state, sent to first chip after the second chip restarting Synchronization request information, wherein, the running status of first chip and the second chip includes power-up state, normal condition and deadlock State.
Preferably, by setting the running status of the first chip described in the first house dog real-time monitoring, if described first sees Door overflows by dog because not set to 0 by first chip, then first chip is in deadlock state;
By setting the running status of the second chip described in the second house dog real-time monitoring, if second house dog is not because Set to 0 and overflowed by second chip, then second chip is in deadlock state.
Preferably, the laser bar code scanning platform also includes:
Second judge module, the state for judging first house dog and the second house dog, if described first guards the gate The mode bit of dog and the second house dog is 0, then judge first chip and the second chip initiation because in power-up state Cause, and send start sound;
If the mode bit of first house dog and the second house dog is 1, first chip and the second chip are judged Initialize because causing in deadlock state, and house dog state is not sent into start sound to set to 0.
The present invention by detecting whether the first chip and/or the second chip receive synchronization request information, believe by the synchronization request Breath is used to notify that the recipient of the synchronization request information initializes pin state and the synchronous crypto-operation factor, with it is described it is synchronous please Sender's synchronous communication of information is sought, if the first chip and/or the second chip receive synchronization request information, described first is controlled Chip and the second chip carry out initializing pin state and the synchronous crypto-operation factor, so, are crashed when the first chip and through house dog After waking up and restarting, the first chip sends synchronization request information and notifies the second chip initiation pin state to the second chip It is also carried out initializing pin state and the synchronous crypto-operation factor with the synchronous crypto-operation factor, and the first chip;When the second chip crashes And after waking up and restart through house dog, the second chip sends synchronization request information and notifies that the first chip is initial to the first chip Change pin state and the synchronous crypto-operation factor, and the second chip is also carried out initializing pin state and the synchronous crypto-operation factor;When One chip and the second chip crash and wake up and restart through house dog simultaneously after, then the first chip and the second chip enter simultaneously Row initialization pin state and the synchronous crypto-operation factor, so, the laser bar code scanning for being inside provided with the first chip and the second chip is flat Platform crashes, and only needs the first chip and the second chip initiation pin state and the synchronous crypto-operation factor to realize synchronous communication, profit With a small amount of resources of chip, on the premise of it need not restart laser bar code scanning platform, laser bar code is intelligently solved The problem that scanning platform crashes, so as to save the time that laser bar code scanning platform is restarted by deadlock, reduces user's Time cost, meanwhile, enhance continuity and experience sense that user uses the laser bar code scanning platform.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the method first embodiment of anti-deadlock of the invention;
If Fig. 2 is that first chip and/or the second chip receive synchronization request information in Fig. 1, to first core The refinement schematic flow sheet of the step of piece and/or the second chip are initialized;
Fig. 3 is the schematic flow sheet of the method second embodiment of anti-deadlock of the invention;
Fig. 4 is the schematic flow sheet of the method 3rd embodiment of anti-deadlock of the invention;
Fig. 5 is the high-level schematic functional block diagram of laser bar code scanning platform first embodiment of the present invention;
Fig. 6 is the high-level schematic functional block diagram of laser bar code scanning platform second embodiment of the present invention;
Fig. 7 is the high-level schematic functional block diagram of laser bar code scanning platform 3rd embodiment of the present invention;
Fig. 8 is the first chip of the invention and the second chip pin and data flow schematic diagram.
The realization of the object of the invention, functional characteristics and advantage will be described further referring to the drawings in conjunction with the embodiments.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of method of anti-deadlock.
Reference picture 1, Fig. 1 is the schematic flow sheet of the method first embodiment of anti-deadlock of the invention.
In the first embodiment, the method for the anti-deadlock includes:
Whether step S10, the first chip of detection and/or the second chip receive synchronization request information, and synchronization request information is used To notify that the recipient of synchronization request information initializes pin state and the synchronous crypto-operation factor, with the transmission with synchronization request information Square synchronous communication;
Reference picture 8, the first chip is used to encrypt, and the ciphertext that encryption is obtained is sent to the second chip, and the second chip is used for Decryption, the synchronous crypto-operation factor is used for the encryption of the first chip and the decryption of the second chip, also, the synchronous crypto-operation factor is with first The carrying out that is communicated between chip and the second chip and constantly synchronous change;Initialize the pin shape of the first chip and the second chip State, the 3rd pin (Pin.3) of the first chip is connected with the 5th pin (Pin.5) of the second chip, by the of the first chip Two pins (Pin.2) are connected with the 7th pin (Pin.7) of the second chip.3rd pin of the first chip only signals, and first The second pin of the chip only number of collection of letters;5th pin of the second chip only connects signal, the 7th pin of the second chip only number of collection of letters. The synchronization request information mutually sent between first chip and the second chip is 1010 (height height electricity frequency) pulse signals, this Sample, detects whether the second pin of the first chip and/or the 5th pin of the second chip receive 1010 pulse signals, just realizes Whether the first chip of detection and/or the second chip receive the function of synchronization request information.
If the first chip crashes, after detecting the first chip because crashing and restarting, to the second chip send it is same Step solicited message;If after the second chip crashes and restarts, detecting the second chip because crashing what is sent to the first chip Synchronization request information;If after the first chip and the second chip all crash and restart, detecting the first chip and the second core The synchronization request information that piece mutually sends because crashing.
Step S20, if the first chip and/or the second chip receive synchronization request information, controls the first chip and second Chip carries out initializing pin state and the synchronous crypto-operation factor.
Either the first chip or the second chip receive synchronization request information, or the first chip and the second chip are all Synchronization request message is have received, is required for the sender and recipient of synchronization request message while carrying out initializing pin state With the synchronous crypto-operation factor, to realize the synchronous communication of the first chip and the second chip.
In the present embodiment, by detecting whether the first chip and/or the second chip receive synchronization request information, the synchronization Solicited message is used to notify that the recipient of the synchronization request information is initialized with same with the sender of the synchronization request information Step, if the first chip and/or the second chip receive synchronization request information, is carried out initially to first chip and the second chip Change pin state and the synchronous crypto-operation factor, so, after the first chip crashes and wakes up and restart through house dog, the first chip Synchronization request information is sent to the second chip notify the second chip initiation pin state and the synchronous crypto-operation factor, and the first core Piece is also carried out initializing pin state and the synchronous crypto-operation factor;After the second chip crashes and wakes up and restart through house dog, Second chip sends synchronization request information and notifies the first chip initiation pin state and the synchronous crypto-operation factor to the first chip, and And second chip be also carried out initialize pin state and the synchronous crypto-operation factor;When simultaneously the first chip and the second chip crash through seeing After door dog wakes up and restarts, then the first chip and the second chip carry out simultaneously initialization pin state and synchronous crypto-operation because Son, so, the laser bar code scanning platform for being inside provided with the first chip and the second chip crashes, and only needs the first chip and the second core Piece is initialized to realize synchronous communication, a small amount of resources of chip is make use of, before it need not restart laser bar code scanning platform Put, intelligently solve the problems, such as that laser bar code scanning platform crashes, so as to save laser bar code scanning platform because crashing And the time restarted, the time cost of user is reduced, meanwhile, enhance user and use the continuous of the laser bar code scanning platform Property and experience sense.
Further, reference picture 2, Fig. 2 is the refinement schematic flow sheet of step S20 in Fig. 1.
In the present embodiment, step S20 includes:
Step S201, if the first chip receives the synchronization request information of the second chip transmission, controls the first chip initial Change its pin state and the synchronous crypto-operation factor, meanwhile, control sends the second chip initiation its pin shape of synchronization request information State and the synchronous crypto-operation factor;
When the second chip crashes, the second chip, the second chip weight are then waken up from spilling is increased by certain hour house dog It is new start after send synchronization request information to the first chip, then its pin state of the second chip initiation and synchronous crypto-operation because Son;After the first chip receives the synchronization request information of the second chip transmission, its pin state of the first chip initiation and synchronization Encryption factor.
Step S202, if the second chip receives the synchronization request information of the first chip transmission, controls the second chip initial Change its pin state and the synchronous crypto-operation factor, meanwhile, control sends the first chip initiation its pin shape of synchronization request information State and the synchronous crypto-operation factor;
When the first chip crashes, the first chip, the first chip weight are then waken up from spilling is increased by certain hour house dog It is new start after send synchronization request information to the second chip, then its pin state of the first chip initiation and synchronous crypto-operation because Son;After the second chip receives the synchronization request information of the first chip transmission, its pin state of the second chip initiation and synchronization Encryption factor.
Step S203, if the first chip and the second chip receive mutually the synchronization request information of other side's transmission, controls the One chip and the second chip initiation pin state and the synchronous crypto-operation factor.
When the first chip and the second chip crash simultaneously, the house dog of the first chip and the second chip is not because being fed dog And increasing spilling certainly, then house dog wakes up the first chip and the second chip, is sent out mutually after the first chip and the restarting of the second chip Send synchronization request information;After the first chip receives the synchronization request information of the second chip transmission, then its pin state is initialized With the synchronous crypto-operation factor;After the second chip receives the synchronization request information of the first chip transmission, then its pin state is initialized With the synchronous crypto-operation factor.
Further, reference picture 3, the schematic flow sheet of the method second embodiment of anti-deadlock of the invention.
In a second embodiment, before step S10, the method for the anti-deadlock also includes:
Step S30, judges the running status of the first chip and the second chip, if the first chip or the second chip are in upper electricity State, then the first chip and the second chip send mutually synchronization request information;If the first chip is in deadlock state, the first core After piece restarting synchronization request information is sent to the second chip;If the second chip is in deadlock state, the second chip is again Synchronization request information is sent to the first chip after startup, wherein, the running status of the first chip and the second chip includes upper electric shape State, normal condition and deadlock state.
When laser bar code scanning platform is powered on, then the first chip and the second chip are in power-up state simultaneously, then and first Chip and the second chip send mutually synchronization request information, and the first chip and the second chip initiation.
If the first chip and the second chip are in normal condition, the first chip and the second chip do not send synchronization request Information, the first chip normally performs encryption function, and initial data is encrypted into ciphertext is sent to the second chip;Second chip is normal Decryption function is performed, ciphertext is decrypted into and is forwarded in plain text.
Further, by set first the first chip of house dog real-time monitoring running status, if the first house dog because Do not set to 0 by the first chip and overflowed, then the first chip is in deadlock state;By setting second the second core of house dog real-time monitoring Running status, if the second house dog is overflowed because not set to 0 by the second chip, the second chip be in deadlock state.
In the first chip and the second chip preset house dog, house dog start original state position be 0, the first chip and Meeting timing reset restarts house dog (feeding dog) during second chip normally runs, if the first chip or the second chip crash, sees Door overflows by dog because that cannot be timed reset and restart, then house dog wakes up the first chip or the second chip.That is, when first Chip is crashed, and the first house dog is overflowed because not set to 0 by the first chip, then the first house dog wakes up the first chip, makes the first core Piece is restarted and sends synchronization request information to the second chip, is then initialized;When the second chip crash, the second house dog because not by Second chip sets to 0 and overflows, then the second house dog wakes up the second chip, restarts the second chip and sends synchronous to the first chip Solicited message, then initializes.
Further, reference picture 4, Fig. 4 is the schematic flow sheet of the method 3rd embodiment of anti-deadlock of the invention.
In the third embodiment, after step S20, the method for the anti-deadlock also includes:
Step S40, judges the state of the first house dog and the second house dog, if the shape of the first house dog and the second house dog State position is 0, then judge the first chip and the second chip initiation because causing in power-up state, and send start sound;If The mode bit of the first house dog and the second house dog is 1, then judge the first chip and the second chip initiation because in deadlock shape State and cause, do not send start sound, and by the state position 0 of house dog.
In the present embodiment, after the first chip and the second chip initiation, guarded the gate according to the first house dog and second The mode bit of dog, judge the first chip and the second chip be due to laser bar code scanning platform is re-powered or due to crash draw The initialization for rising.Because the mode bit initial default value of the first house dog and the second house dog is 0, when the first chip and the second core When piece sets to 0 without the legal time because of deadlock to the first house dog and the second house dog, the state of the first house dog and the second house dog Overflow and be changed into 1 in position.So, after the first chip and the second chip initiation, if the shape of the first house dog and the second house dog State position is 0, then judge the first chip and the second chip initiation because causing in power-up state, and sends start sound, with Prompting user's laser bar code scanning platform restarts;If the mode bit of the first house dog and the second house dog is 1, judge First chip and the second chip initiation do not send start sound because what is caused in deadlock state, and by the state of house dog Position 0, is restarted and initialized the mistake of pin state and the encryption synchronisation factor due to the first chip and/or the second chip because of deadlock Journey is time-consuming very short, and when the first chip and/or the second chip initiation in deadlock state because what is caused, start is not sent Sound, then whole process is fully transparent for user, i.e., user is imperceptible first chip and/or the second chip Crashed, user can glibly use laser bar code scanning platform very much.
The present invention further provides a kind of laser bar code scanning platform, reference picture 5, Fig. 5 is scanned for laser bar code of the present invention The high-level schematic functional block diagram of platform first embodiment.
In the first embodiment, the laser bar code scanning platform includes:
Synchronous detection module 50, it is synchronous for detecting whether the first chip and/or the second chip receive synchronization request information Solicited message is used to notify that the recipient of synchronization request information initializes pin state and the synchronous crypto-operation factor, with synchronization request Sender's synchronous communication of information;
Reference picture 8, the first chip is used to encrypt, and the ciphertext that encryption is obtained is sent to the second chip, and the second chip is used for Decryption, the synchronous crypto-operation factor is used for the encryption of the first chip and the decryption of the second chip, also, the synchronous crypto-operation factor is with first The carrying out that is communicated between chip and the second chip and constantly synchronous change;Initialize the pin shape of the first chip and the second chip State, the 3rd pin (Pin.3) of the first chip is connected with the 5th pin (Pin.5) of the second chip, by the of the first chip Two pins (Pin.2) are connected with the 7th pin (Pin.7) of the second chip.3rd pin of the first chip only signals, and first The second pin of the chip only number of collection of letters;5th pin of the second chip only connects signal, the 7th pin of the second chip only number of collection of letters. The synchronization request information mutually sent between first chip and the second chip is 1010 (height height electricity frequency) pulse signals, this Sample, detects whether the second pin of the first chip and/or the 5th pin of the second chip receive 1010 pulse signals, just realizes Whether the first chip of detection and/or the second chip receive the function of synchronization request information.
If after the first chip crashes and restarts, detecting the synchronization that the first chip sends because crashing to the second chip Solicited message;If after the second chip and restarting, detecting the second chip please because crashing the synchronization sent to the first chip Seek information;If after the first chip and the second chip all crash and restart, detecting the first chip and the second chip because dead The synchronization request information that machine mutually sends.
Initialization module 60, for when the first chip and/or the second chip receive synchronization request information, controlling the first core Piece and the second chip carry out initializing pin state and the synchronous crypto-operation factor.
Either the first chip or the second chip receive synchronization request information, or the first chip and the second chip are all Synchronization request message is have received, is required for the sender and recipient of synchronization request message while carrying out initializing pin state With the synchronous crypto-operation factor, that is, the pin state and the synchronous crypto-operation factor of the first chip and the second chip are initialized, to realize first The synchronous communication of chip and the second chip.
In the present embodiment, by detecting whether the first chip and/or the second chip receive synchronization request information, the synchronization Solicited message is used to notify that the recipient of the synchronization request information initializes pin state and the synchronous crypto-operation factor, with it is described Sender's synchronization of synchronization request information, if the first chip and/or the second chip receive synchronization request information, to described first Chip and the second chip carry out initializing pin state and the synchronous crypto-operation factor, so, are called out through house dog when the first chip crashes After waking up and restarting, the first chip to the second chip send synchronization request information notify the second chip initiation pin state and The synchronous crypto-operation factor, and the first chip is also carried out initialization pin state and the synchronous crypto-operation factor;Passed through when the second chip crashes After house dog wakes up and restarts, the second chip sends synchronization request information and notifies that the first chip initiation draws to the first chip Feet state and the synchronous crypto-operation factor, and the second chip is also carried out initialization pin state and the synchronous crypto-operation factor;When the first core Piece and the second chip crash after waking up and restart through house dog simultaneously, then the first chip and the second chip carry out initial simultaneously Change pin state and the synchronous crypto-operation factor, so, the laser bar code scanning platform for being inside provided with the first chip and the second chip crashes , only need the first chip and the second chip initiation to realize synchronous communication, a small amount of resources of chip is make use of, need not weigh On the premise of opening laser bar code scanning platform, intelligently solve the problems, such as that laser bar code scanning platform crashes, so as to save The time that laser bar code scanning platform is restarted by deadlock, the time cost of user is reduced, meanwhile, enhancing user's use should The continuity and experience sense of laser bar code scanning platform.
Further, initialization module 60 is used for:
If the first chip receives the synchronization request information of the second chip transmission, the first chip initiation its pin shape is controlled State and the synchronous crypto-operation factor, meanwhile, control sends its pin state of the second chip initiation of synchronization request information and synchronously adds The close factor;
If the second chip receives the synchronization request information of the first chip transmission, the second chip initiation its pin shape is controlled State and the synchronous crypto-operation factor, meanwhile, control sends its pin state of the first chip initiation of synchronization request information and synchronously adds The close factor;
If the first chip and the second chip receive mutually the synchronization request information of other side's transmission, the first chip and the are controlled Two chip initiation pin states and the synchronous crypto-operation factor.
When the second chip crashes, the second chip, the second chip weight are then waken up from spilling is increased by certain hour house dog It is new start after send synchronization request information to the first chip, then its pin state of the second chip initiation and synchronous crypto-operation because Son;After the first chip receives the synchronization request information of the second chip transmission, its pin state of the first chip initiation and synchronization Encryption factor.
When the first chip crashes, the first chip, the first chip weight are then waken up from spilling is increased by certain hour house dog It is new start after send synchronization request information to the second chip, then its pin state of the first chip initiation and synchronous crypto-operation because Son;After the second chip receives the synchronization request information of the first chip transmission, its pin state of the second chip initiation and synchronization Encryption factor.
When the first chip and the second chip crash simultaneously, the house dog of the first chip and the second chip is not because being fed dog And increasing spilling certainly, then house dog wakes up the first chip and the second chip, is sent out mutually after the first chip and the restarting of the second chip Send synchronization request information;After the first chip receives the synchronization request information of the second chip transmission, then its pin state is initialized With the synchronous crypto-operation factor;After the second chip receives the synchronization request information of the first chip transmission, then its pin state is initialized With the synchronous crypto-operation factor.
Further, reference picture 6, Fig. 6 is that the functional module of laser bar code scanning platform second embodiment of the present invention is illustrated Figure.
In a second embodiment, the laser bar code scanning platform also includes:
First judge module 70, the running status for judging the first chip and the second chip, if the first chip and second Chip is in power-up state, then the first chip and the second chip send mutually synchronization request information;If the first chip is in crashing State, then send synchronization request information after the restarting of the first chip to the second chip;If the second chip is in deadlock state, Synchronization request information is sent to the first chip after the restarting of second chip, wherein, the operation shape of the first chip and the second chip State includes power-up state, normal condition and deadlock state.
When laser bar code scanning platform is powered on, then the first chip and the second chip are in power-up state simultaneously, then and first Chip and the second chip send mutually synchronization request information, and the first chip and the second chip initiation
If the first chip and the second chip are in normal condition, the first chip and the second chip do not send synchronization request Information, the first chip normally performs encryption function, and initial data is encrypted into ciphertext is sent to the second chip;Second chip is normal Decryption function is performed, ciphertext is decrypted into and is forwarded in plain text.
Further, by set first the first chip of house dog real-time monitoring running status, if the first house dog because Do not set to 0 by the first chip and overflowed, then the first chip is in deadlock state;The fortune of second the second core of house dog real-time monitoring is set Row state, if the second house dog is overflowed because not set to 0 by the second chip, the second chip is in deadlock state.
In the first chip and the second chip preset house dog, house dog start original state position be 0, the first chip and Meeting timing reset restarts house dog (feeding dog) during second chip normally runs, if the first chip or the second chip crash, sees Door overflows by dog because that cannot be timed reset and restart, then house dog wakes up the first chip or the second chip.That is, when first Chip is crashed, and the first house dog is overflowed because not set to 0 by the first chip, then the first house dog wakes up the first chip, makes the first core Piece is restarted and sends synchronization request information to the second chip, is then initialized;When the second chip crash, the second house dog because not by Second chip sets to 0 and overflows, then the second house dog wakes up the second chip, restarts the second chip and sends synchronous to the first chip Solicited message, then initializes.
Further, reference picture 7, Fig. 7 is that the functional module of laser bar code scanning platform 3rd embodiment of the present invention is illustrated Figure.
In the third embodiment, the laser bar code scanning platform also includes:
Second judge module 80, the state for judging the first house dog and the second house dog, if the first house dog and The mode bit of two house dogs is 0, then judge the first chip and the second chip initiation because causing in power-up state, concurrently Go out start sound;If the mode bit of the first house dog and the second house dog be 1, judge the first chip and the second chip initiation because Cause in deadlock state, do not send start sound, and by the state position 0 of house dog.
In the present embodiment, after the first chip and the second chip initiation, guarded the gate according to the first house dog and second The mode bit of dog, judges that the first chip and the second chip are because laser bar code scanning platform is re-powered or is drawn due to crashing The initialization for rising.Because the mode bit initial default value of the first house dog and the second house dog is 0, when the first chip and the second core When piece sets to 0 without the legal time because of deadlock to the first house dog and the second house dog, the state of the first house dog and the second house dog Overflow and be changed into 1 in position.So, after the first chip and the second chip initiation, if the shape of the first house dog and the second house dog State position is 0, then judge the first chip and the second chip initiation because causing in power-up state, and sends start sound, with Prompting user's laser bar code scanning platform restarts;If the mode bit of the first house dog and the second house dog is 1, judge First chip and the second chip initiation do not send start sound because what is caused in deadlock state, and by the state of house dog Position 0, is restarted and initialized the mistake of pin state and the encryption synchronisation factor due to the first chip and/or the second chip because of deadlock Journey is time-consuming very short, and when the first chip and/or the second chip initiation in deadlock state because what is caused, start is not sent Sound, then whole process is fully transparent for user, i.e., user is imperceptible first chip and/or the second chip Crashed, user can glibly use laser bar code scanning platform very much.
The preferred embodiments of the present invention are these are only, the scope of the claims of the invention is not thereby limited, it is every to utilize this hair Equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (8)

1. a kind of method of anti-deadlock, it is characterised in that the method for the anti-deadlock is comprised the following steps:
By setting the running status of first the first chip of house dog real-time monitoring, if first house dog is not because by described the One chip sets to 0 and overflows, then first chip is in deadlock state;
By setting the running status of second the second chip of house dog real-time monitoring, if second house dog is not because by described the Two chips set to 0 and overflow, then second chip is in deadlock state;
If first chip is in deadlock state, send synchronous to second chip after the first chip restarting Solicited message;
If second chip is in deadlock state, send synchronous to first chip after the second chip restarting Solicited message;
Detect whether the first chip and/or the second chip receive synchronization request information, the synchronization request information is used to notify institute Recipient initialization pin state and the synchronous crypto-operation factor of synchronization request information are stated, with the transmission with the synchronization request information Square synchronous communication;
If first chip and/or the second chip receive synchronization request information, first chip and the second chip are controlled Initialization pin state and the synchronous crypto-operation factor.
2. the method for anti-deadlock as claimed in claim 1, it is characterised in that if first chip and/or the second core Piece receives synchronization request information, then first chip and the second chip are carried out initializing pin state and the synchronous crypto-operation factor The step of include:
If first chip receives the synchronization request information that second chip sends, first chip initiation is controlled Its pin state and the synchronous crypto-operation factor, meanwhile, control sends described its pin of second chip initiation of synchronization request information State and the synchronous crypto-operation factor;
If second chip receives the synchronization request information that first chip sends, second chip initiation is controlled Its pin state and the synchronous crypto-operation factor, meanwhile, control sends described its pin of first chip initiation of synchronization request information State and the synchronous crypto-operation factor;
If first chip and the second chip receive mutually the synchronization request information of other side's transmission, first chip is controlled With the second chip initiation pin state and the synchronous crypto-operation factor.
3. the method for anti-deadlock as claimed in claim 1 or 2, it is characterised in that the chip of the detection first and/or the second core Before the step of whether piece receives synchronization request information, the method for the anti-deadlock also includes:
Judge the running status of first chip and the second chip;
If first chip or second chip are in power-up state, first chip and the second chip send mutually Synchronization request information;
Wherein, the running status of first chip and the second chip includes power-up state, normal condition and deadlock state.
4. the method for anti-deadlock as claimed in claim 3, it is characterised in that if first chip and/or the second core Piece receives synchronization request information, then the step of initialized to first chip and the second chip after, the anti-deadlock Method also include:
Judge the state of first house dog and the second house dog;
If the mode bit of first house dog and the second house dog is 0, judge that first chip and the second chip are initial Change because causing in power-up state, and send start sound;
If the mode bit of first house dog and the second house dog is 1, judge that first chip and the second chip are initial Change because causing in deadlock state, and house dog state is not sent into start sound to set to 0.
5. a kind of laser bar code scanning platform, it is characterised in that the laser bar code scanning platform includes:
Synchronous detection module, for detecting whether the first chip and/or the second chip receive synchronization request information, the synchronization please Information is asked to be used to notify that the recipient of the synchronization request information initializes pin state and the synchronous crypto-operation factor, with same with described Walk sender's synchronous communication of solicited message;
Initialization module, for when first chip and/or the second chip receive synchronization request information, controlling described first Chip and the second chip carry out initializing pin state and the synchronous crypto-operation factor;
By setting the running status of the first chip described in the first house dog real-time monitoring, if first house dog is not because by institute State the first chip to set to 0 and overflow, then first chip is in deadlock state;
By setting the running status of the second chip described in the second house dog real-time monitoring, if second house dog is not because by institute State the second chip to set to 0 and overflow, then second chip is in deadlock state;
The laser bar code scanning platform also includes the first judge module, and the first judge module is used for:
If first chip is in deadlock state, send synchronous to second chip after the first chip restarting Solicited message;
If second chip is in deadlock state, send synchronous to first chip after the second chip restarting Solicited message.
6. laser bar code scanning platform as claimed in claim 5, it is characterised in that the initialization module is used for:
If first chip receives the synchronization request information that second chip sends, first chip initiation is controlled Its pin state and the synchronous crypto-operation factor, meanwhile, control sends described its pin of second chip initiation of synchronization request information State and the synchronous crypto-operation factor;
If second chip receives the synchronization request information that first chip sends, second chip initiation is controlled Its pin state and the synchronous crypto-operation factor, meanwhile, control sends described its pin of first chip initiation of synchronization request information State and the synchronous crypto-operation factor;
If first chip and the second chip receive mutually the synchronization request information of other side's transmission, first chip is controlled With the second chip initiation pin state and the synchronous crypto-operation factor.
7. the laser bar code scanning platform as described in claim 5 or 6, it is characterised in that first judge module, judges institute State the running status of the first chip and the second chip;
If first chip or second chip are in power-up state, first chip and the second chip send mutually Synchronization request information;
Wherein, the running status of first chip and the second chip includes power-up state, normal condition and deadlock state.
8. laser bar code scanning platform as claimed in claim 7, it is characterised in that the laser bar code scanning platform is also wrapped Include:
Second judge module, the state for judging first house dog and the second house dog;
If the mode bit of first house dog and the second house dog is 0, judge that first chip and the second chip are initial Change because causing in power-up state, and send start sound;
If the mode bit of first house dog and the second house dog is 1, judge that first chip and the second chip are initial Change because causing in deadlock state, and house dog state is not sent into start sound to set to 0.
CN201410419760.6A 2014-08-22 2014-08-22 The method and laser bar code scanning platform of anti-deadlock Active CN104200186B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410419760.6A CN104200186B (en) 2014-08-22 2014-08-22 The method and laser bar code scanning platform of anti-deadlock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410419760.6A CN104200186B (en) 2014-08-22 2014-08-22 The method and laser bar code scanning platform of anti-deadlock

Publications (2)

Publication Number Publication Date
CN104200186A CN104200186A (en) 2014-12-10
CN104200186B true CN104200186B (en) 2017-06-23

Family

ID=52085477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410419760.6A Active CN104200186B (en) 2014-08-22 2014-08-22 The method and laser bar code scanning platform of anti-deadlock

Country Status (1)

Country Link
CN (1) CN104200186B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6581835B1 (en) * 1995-12-18 2003-06-24 Metrologic Instruments, Inc. Method of and system for scanning bar code symbols using a laser scanning pattern having multiple focal zones, wherein the minimum beam dimension/minimum bar width (mbd/mbw) ratio is greater than or equal to 2.0
CN1956449A (en) * 2005-10-28 2007-05-02 北京书生数字技术有限公司 Encipher transmission method and equipment system for preventing cpying data resource
CN101577619A (en) * 2008-05-08 2009-11-11 吴志军 Real-time speech secret communication system based on information hiding
CN101599829A (en) * 2008-06-06 2009-12-09 华为技术有限公司 Authentication method, reader and label

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6581835B1 (en) * 1995-12-18 2003-06-24 Metrologic Instruments, Inc. Method of and system for scanning bar code symbols using a laser scanning pattern having multiple focal zones, wherein the minimum beam dimension/minimum bar width (mbd/mbw) ratio is greater than or equal to 2.0
CN1956449A (en) * 2005-10-28 2007-05-02 北京书生数字技术有限公司 Encipher transmission method and equipment system for preventing cpying data resource
CN101577619A (en) * 2008-05-08 2009-11-11 吴志军 Real-time speech secret communication system based on information hiding
CN101599829A (en) * 2008-06-06 2009-12-09 华为技术有限公司 Authentication method, reader and label

Also Published As

Publication number Publication date
CN104200186A (en) 2014-12-10

Similar Documents

Publication Publication Date Title
CN104639423B (en) Information interaction method, information interaction device and terminals
WO2007136665A3 (en) Method and apparatus for controlling access to network resources based on reputation
CN110727525A (en) Companion application for campaign collaboration
CN104683573B (en) The implementation method of shutdown alarm clock and mobile terminal
CN105207880B (en) Group recommending method and device
CN103491162B (en) Information sharing method based on mobile Internet and system
CN106201491A (en) Mobile terminal and mobile terminal remote assist course control method for use, device
CN103336838B (en) A kind of processing method of webpage, device and terminal device
CN104380722A (en) Communicating with an endpoint using matrix barcodes
CN105264970A (en) Method, device and mobile terminal for reducing power consumption
CN103713890A (en) Method of developing browser online game clients
CN105224578B (en) The browser synchronisation control means and terminal and system of a kind of cross-terminal
US20160080308A1 (en) Methods, systems, and devices for enriching microblog page
CN104200186B (en) The method and laser bar code scanning platform of anti-deadlock
CN103886411A (en) Online voting system
CN106603526B (en) WiFi/hotspot starting method and device
CN105224836A (en) Control method and device for top-layer suspended window and mobile equipment
US8825917B2 (en) Method, system and device for enabling USB data card with USB flash drive function to hibernate
CN105357387B (en) A kind of method, apparatus and system for waking up terminal
CN104346176B (en) A kind of method and device of browser starting
CN106357512A (en) Chat message differentiated synchronization method and chat message differentiated synchronization device
CN108919980A (en) Computer control system based on body-sensing
CN111898045B (en) Intelligent search method and device for network resources
WO2017140271A1 (en) Method, apparatus and system for performing information presentation
CN107872367A (en) Blank screen detection method, mobile terminal and computer-readable recording medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant