Summary of the invention
The features and advantages of the present invention are partly stated in the following description, or can be apparent from this description, or learn by putting into practice the present invention.
In order to overcome the shortcoming of prior art, the invention provides a kind of anti-theft system initial method, equipment and antitheft ECU, effectively can prevent the situation occurring antitheft ECU erroneous matching and key error study in anti-theft system initialization procedure, reduce repair rate and productive costs.
It is as follows that the present invention solves the problems of the technologies described above adopted technical scheme:
A kind of antitheft initial method is provided, comprises the steps: the anti-theft state reading antitheft ECU; Whether the anti-theft state judging this antitheft ECU is do not mate, if do not mate, then carries out antitheft coupling and key study to this antitheft ECU, otherwise terminates antitheft initialize flow.
There is provided a kind of antitheft initial method as above, the antitheft initialize flow of described end, is specially: if judge, the anti-theft state of this antitheft ECU is as mating, then export antitheft ECU and mate report, and process ends; If the anti-theft state reading this antitheft ECU is abnormal, then output error report, and process ends.
A kind of antitheft initial method as above is provided, described key study is carried out to this antitheft ECU, comprise the steps: the anti-theft state again reading antitheft ECU; Whether the anti-theft state judging this antitheft ECU is mate, if mate, then carries out key study, otherwise terminates antitheft initialize flow.
A kind of antitheft initial method as above is provided, described " whether the anti-theft state again reading this antitheft ECU is mate; if mate; then carry out key study; otherwise terminate antitheft initialize flow " in " terminating antitheft initialize flow " be specially: if judge, the anti-theft state of this antitheft ECU is not as mating, then export antitheft ECU and do not mate report, and process ends; If the anti-theft state reading antitheft ECU is abnormal, then output error report, and process ends.
A kind of antitheft initial method as above is provided, also comprises the steps: the result recording the study of each key; According to the number of the successful key of result statistical learning of key study; Judge that whether antitheft initialization is successful according to the number of the key of learning success, and export judged result.
A kind of antitheft initial method as above is provided, judge that whether antitheft initialization is successful according to the number of the key of learning success, be specially: the number of the key of learning success and the numerical value pre-set are compared, if both are equal, exports antitheft initialization success report; Otherwise, export antitheft initialization error reporting.
A kind of antitheft initialization apparatus is also provided, comprises as lower module: the first anti-theft state judge module, for reading and judging the anti-theft state of antitheft ECU, and judge the anti-theft state of this antitheft ECU as mate or abnormal time, terminate antitheft initialize flow; Antitheft matching module, for when this first anti-theft state judge module judges the anti-theft state of this antitheft ECU as not mating, carries out antitheft coupling to this antitheft ECU; Key study module, for carrying out key study after this antitheft ECU completes antitheft coupling.
A kind of antitheft initialization apparatus as above is provided, also comprise the second anti-theft state judge module, before carrying out key study at this key study module, again read and judge the anti-theft state of antitheft ECU, and judge the anti-theft state of this antitheft ECU as do not mate or abnormal time, terminate antitheft initialize flow.
A kind of antitheft initialization apparatus as above is provided, also comprises: key learning records module, for recording the result of each key study, and the number of the successful key of result statistical learning according to key study; Learning outcome output module, whether successful for the antitheft initialization of Statistic analysis according to this key learning records module, and export judged result.
A kind of antitheft initialization apparatus as above being provided, also comprising anti-theft state output module: this first anti-theft state judge module and this second anti-theft state judge module are also for sending the anti-theft state of antitheft ECU to this anti-theft state output module; This anti-theft state output module, for receiving the anti-theft state of the antitheft ECU of this first anti-theft state judge module and the transmission of this second anti-theft state judge module and exporting corresponding report.
A kind of antitheft ECU is provided, comprises as lower module: antitheft matching module, for recording anti-code theft; Antitheft matching status logging modle, for recording the antitheft matching status of this antitheft matching module.
Compared with prior art, the antitheft initial method of the embodiment of the present invention, equipment and antitheft ECU, first its matching status was judged before antitheft coupling is carried out to antitheft ECU, to carry out antitheft coupling or the bad antitheft ECU of parcel received screens, only the antitheft ECU of the blank of not carrying out antitheft coupling is mated, the mistake mispairing causing key because of the repeated matching of antitheft ECU can be prevented; Again antitheft ECU anti-theft state being judged before carrying out key study, carrying out antitheft coupling by failing or the antitheft ECU that breaks down in coupling screens, the part waste that cannot use after can effectively preventing key from learning and recover and produce; And the mistake produced in antitheft initialization procedure and failure cause record are exported, providing failure-free foundation for reprocessing, improve and reprocessing efficiency and success ratio.
By reading specification sheets, those of ordinary skill in the art will understand the characteristic sum content of these technical schemes better.
Detailed description of the invention
Referring to Fig. 1, is an embodiment of the antitheft initial method of the present invention.
The antitheft initial method of the present embodiment, comprises the steps:
Step S101: the anti-theft state reading antitheft ECU;
Step S102: judge whether this antitheft ECU anti-theft state is do not mate, if do not mate, then performs step S103, otherwise terminates antitheft initialize flow;
Step S103: antitheft coupling is carried out to this antitheft ECU;
Step S104: key study is carried out to this antitheft ECU.
In the present embodiment, the anti-theft state of antitheft ECU is judged, guarantee equipment only carries out antitheft coupling to the antitheft ECU of blank, can effectively prevent because repeated matching generates the antitheft matching error of the antitheft ECU that multiple anti-code theft causes and key error study anti-code theft, also the vehicle having carried out key study can be avoided again to learn Key blanks, produce key waste.
Referring to Fig. 2, is another embodiment of the antitheft initial method of the present invention.
In order to effectively prevent key mispairing mistake from learning in the present embodiment, in antitheft ECU, be provided with anti-theft state.In antitheft initialization apparatus, increasing the state variable " immo_status " for monitoring whole learning process, and carrying out assignment according to the difference of anti-theft state.As shown in table 1, in the present embodiment, represent the anti-theft state of antitheft ECU with " 0 " for " coupling "; The anti-theft state of antitheft ECU is represented for " mating " with " 1 "; With " failure ", represent because Communications failure, antitheft ECU have failed coupling or parcel received is bad etc. that reading that reason causes is abnormal.
The assignment of table 1 state variable " immo_status " and implication
Assignment |
0 |
1 |
failure |
Implication |
Do not mate |
Mate |
Read abnormal |
The present embodiment is also provided with outcome variable " result " and statistical variable " number " in antitheft initialization apparatus.As shown in table 2, outcome variable " result " is used for reading and records key learning outcome: represent respectively " unsuccessful study " and " successfully learning " with " 0 " and " 1 "; If key study unsuccessful, then to " result " variable assignments be " 0 ", otherwise assignment is " 1 ".Statistical variable " number " is used for according to the key quantity of result statistics of variable learning success, namely according to having how many result variablees to be composed " 1 " to determine and the successful key quantity of recording learning.
The assignment of table 2 outcome variable " result " and implication
Assignment |
0 |
1 |
Implication |
Learn unsuccessfully |
Learning success |
According to procedural language environment or equipment actual conditions, assignment can be carried out with different characters or phraseology to above-mentioned variable in practical application.
The antitheft initial method of the present embodiment comprises the steps.
Step S201: antitheft initialization apparatus and antitheft ECU set up communication.
Step S202: the anti-theft state reading antitheft ECU, determines whether not mate: if anti-theft state does not mate, and performs step S2021 and step S203; Otherwise, judged result is exported, prompting operator, and process ends.
Detailed process is as follows:
First, antitheft initialization apparatus reads and judges the anti-theft state of antitheft ECU, according to the anti-theft state of antitheft ECU to state variable " immo_status " assignment: if detect that the anti-theft state of antitheft ECU is not for mate, then to " immo_status " assignment be " 0 "; If detect that the anti-theft state of antitheft ECU is for mate, then to " immo_status " assignment be " 1 "; If because of Communications failure or parcel received is bad causes reading abnormal, be then " failure " to " immo_status " assignment.
Then, antitheft initialization apparatus carries out different process according to " immo_status " assignment situation.
When state variable assignment is " 0 ", performs step S2021, export antitheft ECU and do not mate report, and perform step S203.
When state variable assignment is " 1 ", performs step S2022, export antitheft ECU and mate report, and process ends.
When state variable assignment is " failure ", perform step S2023, output error is reported, and process ends.
In this step, the anti-theft state of antitheft ECU is judged, will carry out antitheft coupling and the bad antitheft ECU of parcel received screens, and ensured that antitheft initialization apparatus only carried out antitheft coupling to the antitheft ECU of blank.Can effectively prevent repeated matching from generating multiple anti-code theft, avoid antitheft matching error and the key error study anti-code theft of antitheft ECU, also the vehicle having carried out key study can be avoided, again learn Key blanks, the key waste produced, and prevent other part of anti-theft system as the part waste that cannot use after key coupling and recover and produce.In addition, testing result is exported, enable the reason that operating personal is cut off according to the antitheft initialize flow of report analysis exported, and according to analysis result, corresponding antitheft ECU is reprocessed, improve and reprocess efficiency and success ratio.
Step S203: antitheft coupling is carried out to this antitheft ECU.
Have multiple to the method that antitheft ECU carries out antitheft coupling in practical application, such as: generate a string unique anti-code theft by antitheft initialization apparatus, and this anti-code theft is write antitheft ECU; Or activate antitheft ECU by antitheft initialization apparatus, produce unique anti-code theft by antitheft ECU itself and to go forward side by side line item.
Step S204: the anti-theft state again reading antitheft ECU, judges whether to mate, if anti-theft state has mated, then performs step S2041 and step S205; Otherwise, judged result is exported, prompting operator, and process ends.
Detailed process is as follows:
First, antitheft initialization apparatus reads and detects the anti-theft state of antitheft ECU, according to the anti-theft state of antitheft ECU to state variable " immo_status " assignment: if detect that the anti-theft state of antitheft ECU is not for mate, then to " immo_status " assignment be " 0 "; If detect that the anti-theft state of antitheft ECU is for mate, then to " immo_status " assignment be " 1 "; If because Communications failure, antitheft ECU have failed coupling or parcel received is bad causes reading abnormal, be then " failure " to " immo_status " assignment.
Then, antitheft initialization apparatus carries out different process according to " immo_status " assignment situation.
When state variable assignment is " 1 ", performs step 2041, export antitheft ECU and mate report, and perform step S205.
When state variable assignment is " 0 ", performs step S2042, export antitheft ECU and do not mate report, and process ends.
When state variable assignment is " failure ", perform step S2043, output error is reported, and process ends.
This step is before carrying out key study, again antitheft ECU anti-theft state is judged, carrying out antitheft coupling by failing or the antitheft ECU that breaks down in coupling screens, can effectively prevent because of the part waste that cannot use after key study and recover and produce.Further, testing result is exported, enable operating personal analyze the reason of antitheft initialize flow interruption according to test results report, and according to analysis result, corresponding antitheft ECU is reprocessed, improve and reprocess efficiency and success ratio.
Step S205: carry out key study, needs the write of the anti-code theft of this antitheft ECU in the key of study, and records the result of each key study: if key learning success, be " 1 " to outcome variable " result " assignment, otherwise assignment is " 0 ".
Step S206: after key study terminates, statistics key learning outcome, and statistics is exported.
In this step, statistical variable " number ", follows and carrys out the successful key quantity of statistical learning according to outcome variable " result " variable, namely according to having how many result variablees to be composed " 1 " to determine and the successful key quantity of recording learning.
After having added up, the quantity of statistical variable with the key learning success pre-set is compared, and comparison result is exported: if the value of statistical variable is equal with the quantity of the key learning success pre-set, then export antitheft initialization success report; Otherwise, export antitheft initialization failure reporting.When exporting antitheft initialization failure reporting, operating personal can analyze key study failure cause from antitheft initialization failure reporting, and reprocesses as required, improves and reprocesses efficiency and success ratio.
In the present embodiment, first its matching status was judged before antitheft coupling is carried out to antitheft ECU, to carry out antitheft coupling or the bad antitheft ECU of parcel received screens, only the antitheft ECU of the blank of not carrying out antitheft coupling is mated, generate and write anti-code theft, the mistake mispairing causing key because of the repeated matching of antitheft ECU can be prevented; Again antitheft ECU anti-theft state being judged before carrying out key study, carrying out antitheft coupling by failing or the antitheft ECU that breaks down in coupling screens, the part waste that cannot use after can effectively preventing key from learning and recover and produce.And by a series of state variable of setting, whole antitheft and key learning process to be monitored, the mistake produced and status of fail record are exported, providing failure-free foundation for reprocessing, improve and reprocessing efficiency and success ratio in antitheft initialization procedure.
Referring to Fig. 3, is an embodiment of the antitheft initialization apparatus of the present invention.
The antitheft initialization apparatus of the present embodiment comprises communication module 11, first anti-theft state judge module 12, second anti-theft state judge module 15, anti-code theft generation module 13, anti-code theft writing module 14, key study module 16, key learning records module 17, learning outcome output module 19 and anti-theft state output module 18.
Communication module 11, communicates for setting up with antitheft ECU.
First anti-theft state judge module 12, after setting up at communication module 11 and antitheft ECU and communicating, reads and judges the anti-theft state of antitheft ECU, and judge the anti-theft state of this antitheft ECU as mate or abnormal time, terminate antitheft initialize flow.Specific implementation is as follows:
This first anti-theft state judge module 12 reads and judges the anti-theft state of antitheft ECU, according to the anti-theft state of antitheft ECU to state variable " immo_status " assignment, then different process is carried out according to " immo_status " assignment situation: when state variable assignment is for " 0 ", judge that antitheft ECU does not mate, judged result is sent to anti-theft state output module 18, and jumps to next and perform an action; When state variable assignment is " 1 ", judges that antitheft ECU mates, judged result is sent to anti-theft state output module 18, and process ends; When state variable assignment is " failure ", judges that mistake appears in antitheft ECU, judged result is sent to anti-theft state output module 18, and process ends.
Antitheft matching module 13, for when the first anti-theft state judge module judges the anti-theft state of this antitheft ECU as not mating, carries out antitheft coupling to this antitheft ECU.
Second anti-theft state judge module 15, before the write of the anti-code theft of this antitheft ECU being needed the key of study at key study module 16, again read and judge the anti-theft state of antitheft ECU, and judge the anti-theft state of this antitheft ECU as do not mate or abnormal time, terminate antitheft initialize flow.Specific implementation is as follows:
This second anti-theft state judge module reads and judges the anti-theft state of antitheft ECU, according to the anti-theft state of antitheft ECU to state variable " immo_status " assignment, then carries out different process according to " immo_status " assignment situation:
When state variable assignment is " 0 ", judges that antitheft ECU does not mate, judged result is sent to anti-theft state output module 18, and process ends; When state variable assignment is " 1 ", judges that antitheft ECU mates, judged result is sent to anti-theft state output module 18, and jump to next and perform an action; When state variable assignment is " failure ", judges that mistake appears in antitheft ECU, judged result is sent to anti-theft state output module 18, and process ends.
Anti-theft state output module 18, for receiving judged result that the first anti-theft state judge module 12 and the second anti-theft state judge module 15 send over and exporting corresponding report, mainly comprise that antitheft ECU anti-theft state has mated report, antitheft ECU anti-theft state do not mate and report and error reporting.
Key study module 16, for carrying out key study after this antitheft ECU writes anti-code theft, writes the anti-code theft mated with this antitheft ECU in the key that needs learn.
Key learning records module 17, for recording the result of each key study, and according to the number of the successful key of result statistical learning of key study.Specific implementation is as follows:
If key learning success, be " 1 " to outcome variable " result " assignment, otherwise assignment is " 0 ".After all keys all complete study, statistical variable " number " is followed and is carried out the successful key quantity of statistical learning according to outcome variable " result " variable.
Learning outcome output module 19, number for the key of the learning success according to statistics judges that whether antitheft initialization is successful, and exporting judged result: statistical variable is compared with the quantity of the key learning success pre-set, if the value of statistical variable is equal with the quantity of the key learning success pre-set, then export antitheft initialization success report; Otherwise, export antitheft initialization failure reporting.
In the present embodiment, first anti-theft state judge module is set, first its matching status was judged before antitheft coupling is carried out to antitheft ECU, to carry out antitheft coupling or the bad antitheft ECU of parcel received screens, only the antitheft ECU of the blank of not carrying out antitheft coupling is mated, generate and write anti-code theft, the mistake mispairing causing key because of the repeated matching of antitheft ECU can be prevented; Second anti-theft state judge module is set, again antitheft ECU anti-theft state is judged before carrying out key study, carrying out antitheft coupling by failing or the antitheft ECU that breaks down in coupling screens, can effectively prevent, the part wave that cannot use after key study and recover and produce.Anti-theft state output module is set, according to the first anti-theft state judge module and the second anti-theft state judge module send over judged result generate and export corresponding report, operating personal is enable to analyze the reason of antitheft initialize flow interruption according to test results report, and according to analysis result, corresponding antitheft ECU is reprocessed, improve and reprocess efficiency and success ratio.Key learning records module is set, record and export the result of key study, when exporting antitheft initialization failure reporting, operating personal can analyze key study failure cause from antitheft initialization failure reporting, and reprocess as required, improve and reprocess efficiency and success ratio.
Referring to Fig. 4, is an embodiment of the antitheft ECU of the present invention.
The antitheft ECU of the present embodiment comprises antitheft matching module 21 and antitheft matching status logging modle 22.
Antitheft matching module 21, for recording anti-code theft.
Whether antitheft matching status logging modle 22, for recording the antitheft matching status of antitheft matching module 21, effectively can differentiate antitheft ECU and mating.Judged according to the antitheft matching status information reading antitheft matching status logging modle by antitheft initialization apparatus, therefore antitheft initialization apparatus can screen it according to the state of this antitheft ECU exactly in antitheft initialize flow.
The antitheft initial method of the embodiment of the present invention, antitheft ECU and antitheft initialization apparatus, first its matching status was judged before antitheft coupling is carried out to antitheft ECU, to carry out antitheft coupling or the bad antitheft ECU of parcel received screens, only the antitheft ECU of the blank of not carrying out antitheft coupling is mated, generate and write anti-code theft, the mistake mispairing causing key because of the repeated matching of antitheft ECU can be prevented; Again antitheft ECU anti-theft state is judged before carrying out key study, antitheft coupling is carried out or the antitheft ECU that breaks down in coupling screens by failing, the part waste that cannot use after can effectively preventing key from learning and recover and produce, and whole antitheft and key learning process is monitored, the mistake produced in antitheft initialization procedure and status of fail record are exported, providing failure-free foundation for reprocessing, improve and reprocessing efficiency and success ratio.
Above with reference to the accompanying drawings of the preferred embodiments of the present invention, those skilled in the art do not depart from the scope and spirit of the present invention, and multiple flexible program can be had to realize the present invention.For example, to illustrate as the part of an embodiment or the feature that describes can be used for another embodiment to obtain another embodiment.These are only the better feasible embodiment of the present invention, not thereby limit to interest field of the present invention that the equivalence change that all utilizations specification sheets of the present invention and accompanying drawing content are done all is contained within interest field of the present invention.