Summary of the invention
The purpose of the present invention includes the adjustment method for providing a kind of electric power acquisition terminal, device and electric power acquisition terminal,Its efficiency that can be improved the debugging of electric power acquisition terminal filed.
The embodiment of the present invention this can be implemented so that
In a first aspect, the embodiment of the present invention provides a kind of adjustment method of electric power acquisition terminal, it is whole to be applied to electric power acquisitionEnd, the electric power acquisition terminal and USB flash disk can plug connect, the electric power acquisition terminal and remote terminal communication connection, it is described farJourney terminal is provided with hyper terminal, which comprises when the USB flash disk is inserted into the electric power acquisition terminal, obtains the USB flash diskThe state configuration information of storage, the state configuration information includes status command;Indicate that the electric power is adopted in the status commandWhen collection terminal enters debugging mode, verification information is obtained from the USB flash disk;If the verification information meets preset condition, beatIt opens the hyper terminal and debugging operations is executed by the hyper terminal.
As it can be seen that under the premise of not changing electric power acquisition terminal original structure, by obtaining the state configuration information in USB flash diskHyper terminal is opened with verification information and debugging operations are executed by hyper terminal, realizes the debugging behaviour under wireless statusMake, eliminate the carrying of PC machine and the deposition step of Serial Port Line, so that the operation of staff's field adjustable is more convenient, and then greatlyImprove electric power acquisition terminal filed debugging efficiency.Meanwhile by the verifying to verification information, non-working person is avoidedMalice debugging to electric power acquisition terminal, improves the safety of electric power acquisition terminal debugging operations.
In alternative embodiments, if the verification information meets preset condition, the hyper terminal is openedAnd before the step of executing debugging operations by the hyper terminal, the method also includes: judge the interior of the verification informationSize is deposited whether more than the first preset value;When the memory size of the verification information is less than first preset value, judgementDigital size in the verification information whether within a preset range, the format of the verification information whether meet preset rules withAnd whether the length scale of the verification information is more than second preset value;Digital size in the verification information is in instituteIt states the format in preset range, in the verification information and meets the length scale of the preset rules and the verification information notWhen more than second preset value, then judge that the verification information meets preset condition.
As it can be seen that can be kept away by the setting in advance to the first preset value, preset range, preset rules and the second preset valueExempt from non-working person to debug the malice of electric power acquisition terminal, improves the safety of electric power acquisition terminal debugging operations.
In alternative embodiments, the step of whether format for judging the verification information meets preset rules packetInclude: judge the odd bits of the verification information content whether be number, the verification information even bit content whether bePreset characters;It is in the content that the content of the odd bits in the verification information is the even bit in digital, described verification informationWhen preset characters, then judge that the format in the verification information meets the preset rules.
As it can be seen that by the setting in advance to preset rules, it can be to avoid non-working person to the malice of electric power acquisition terminalDebugging, improves the safety of electric power acquisition terminal debugging operations.
In alternative embodiments, the electric power acquisition terminal prestores flag information, and the state configuration information is alsoIncluding tuning parameter, described the step of opening the hyper terminal and executing debugging operations by the hyper terminal includes: rootDisplacement calculating and/or operation are carried out to the flag information according to the tuning parameter, obtain the character string of preset length;According to instituteThe character string for stating preset length opens the hyper terminal and executes debugging operations by the hyper terminal.
As it can be seen that being beaten under the premise of not changing electric power acquisition terminal original structure by obtaining the tuning parameter in USB flash diskIt opens hyper terminal and debugging operations is executed by hyper terminal, realize the debugging operations under wireless status, eliminate PC machineThe deposition step with Serial Port Line is carried, so that the operation of staff's field adjustable is more convenient, and then electric power is greatly improved and adoptsCollect the efficiency of terminal filed debugging.
In alternative embodiments, the method also includes: when opening the hyper terminal, record corresponding logInformation;The log information is sent to the USB flash disk to save.
Second aspect, the embodiment of the present invention provide a kind of debugging apparatus of electric power acquisition terminal, and it is whole to be applied to electric power acquisitionEnd, the electric power acquisition terminal and USB flash disk can plug connect, the electric power acquisition terminal and remote terminal communication connection, it is described farJourney terminal is provided with hyper terminal, and described device includes: the first acquisition module, for being inserted into the electric power acquisition when the USB flash diskWhen terminal, the state configuration information of the USB flash disk storage is obtained, the state configuration information includes status command;Second obtains mouldBlock, for obtaining verifying letter from the USB flash disk when the status command indicates that the electric power acquisition terminal enters debugging modeBreath;Matching and debugging module opens the hyper terminal and by described super if meeting preset condition for the verification informationGrade terminal executes debugging operations.
In alternative embodiments, the debugging apparatus of the electric power acquisition terminal further include: first judgment module is used forJudge the memory size of the verification information whether more than the first preset value;Second judgment module, in the verification informationMemory size when being less than first preset value, judge the Digital size in the verification information whether in preset rangeWhether the format of interior, the described verification information meets whether preset rules and the length scale of the verification information are more than describedTwo preset values;Third judgment module, in the Digital size in the verification information in the preset range, the verifyingWhen the length scale that format in information meets the preset rules and the verification information is less than second preset value,Then judge that the verification information meets preset condition.
In alternative embodiments, the second judgment module includes: the first judging unit, for judging the verification informationThe contents of odd bits whether be the content of even bit of number, the verification information whether be preset characters;Second judgement is singleMember, for be number in the content of the odd bits in the verification information, the content of even bit in the verification information is pre-If when character, then judging that the format in the verification information meets the preset rules.
In alternative embodiments, the electric power acquisition terminal prestores flag information, and the state configuration information is alsoIncluding tuning parameter, the matching and debugging module includes: computing unit, is used for according to the tuning parameter to the flag informationDisplacement calculating and/or operation are carried out, the character string of preset length is obtained;Debugging unit, for the character according to the preset lengthString opens the hyper terminal and executes debugging operations by the hyper terminal.
The third aspect, the embodiment of the present invention provide a kind of electric power acquisition terminal, the storage including being stored with computer programDevice and processor when the computer program is read and run by the processor, are realized as described in aforementioned embodiments are anyElectric power acquisition terminal adjustment method.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present inventionIn attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment isA part of the embodiment of the present invention, instead of all the embodiments.The present invention being usually described and illustrated herein in the accompanying drawings is implementedThe component of example can be arranged and be designed with a variety of different configurations.
Therefore, the detailed description of the embodiment of the present invention provided in the accompanying drawings is not intended to limit below claimedThe scope of the present invention, but be merely representative of selected embodiment of the invention.Based on the embodiments of the present invention, this field is commonTechnical staff's every other embodiment obtained without creative efforts belongs to the model that the present invention protectsIt encloses.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang YiIt is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.
In the description of the present invention, it should be noted that if there is the side of the instructions such as term " on ", "lower", "inner", "outside"Position or positional relationship be based on the orientation or positional relationship shown in the drawings or the invention product using when the side usually putPosition or positional relationship, are merely for convenience of description of the present invention and simplification of the description, rather than the device or member of indication or suggestion meaningPart must have a particular orientation, be constructed and operated in a specific orientation, therefore be not considered as limiting the invention.
In addition, being only used for distinguishing description if there is term " first ", " second " etc., it is not understood to indicate or imply phaseTo importance.
It should be noted that in the absence of conflict, the feature in the embodiment of the present invention can be combined with each other.
Referring to FIG. 1, being the application environment schematic diagram of electric power acquisition terminal 100 provided in this embodiment, the electric power acquisitionTerminal 100 and the pluggable connection of USB flash disk 200, electric power acquisition terminal 100 and remote terminal 300 communicate to connect.As shown in Fig. 2, electric powerAcquisition terminal 100 passes through remote communication module by usb 1 10 and the pluggable connection of USB flash disk 200, electric power acquisition terminal 100130 communicate to connect with remote terminal 300.
Wherein, remote terminal 300 is provided with hyper terminal 400, and hyper terminal 400 can be understood as a Duan Jincheng or long-rangeThe software function module of terminal 300, hyper terminal 400 is for executing debugging operations.Remote terminal 300 can be computer.
In the present embodiment, electric power acquisition terminal 100 includes the memory and processor for being stored with computer program, is calculatedWhen machine program is read out by the processor and runs, and execute corresponding function.For example, when USB flash disk 200 is inserted into electric power acquisition terminal 100Usb 1 10 when, when electric power acquisition terminal 100 identifies the USB flash disk 200, the computer program in memory is held by processorRow, to realize the revealed adjustment method of the present embodiment.
In the present embodiment, memory is for storing computer program or data.Memory may be, but not limited to, at randomIt accesses memory (Random Access Memory, RAM), read-only memory (Read Only Memory, ROM), may be programmedRead-only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (ErasableProgrammable Read-Only Memory, EPROM), electricallyerasable ROM (EEROM) (Electric ErasableProgrammable Read-Only Memory, EEPROM) etc..
Data or computer program of the processor for being stored in read/writable memory device, and execute corresponding function.ProcessorIt may be, but not limited to, single-chip microcontroller (Microcontroller Unit, MCU), FPGA (Field Programmable GateArray, field programmable gate array) etc..
It referring to figure 3., is a kind of flow diagram of the adjustment method of electric power acquisition terminal provided in an embodiment of the present invention.It should be noted that the adjustment method of electric power acquisition terminal provided in an embodiment of the present invention is not with Fig. 3 and below specificSequence is limitation, it should be understood that in other embodiments, the adjustment method of electric power acquisition terminal provided in an embodiment of the present invention itsThe sequence of middle part steps can be exchanged with each other according to actual needs or part steps therein also can be omitted or delete.The adjustment method of the electric power acquisition terminal can be applied in Fig. 1 and electric power acquisition terminal 100 shown in Fig. 2, below will be to Fig. 3Shown in detailed process be described in detail.
Step S101 obtains the state configuration information of USB flash disk storage when USB flash disk is inserted into electric power acquisition terminal, and state matches confidenceBreath includes status command.
In the present embodiment, for USB flash disk 200 before being inserted into electric power acquisition terminal 100, staff can be in advance in USB flash disk 200Storage state configuration information, state configuration information can be stored in the first file of the creation of USB flash disk 200.
In the present embodiment, when USB flash disk 200 is inserted into electric power acquisition terminal 100, electric power acquisition terminal 100 can be first to USB flash disk200 are identified, if the USB flash disk 200 can be identified, just first judge whether the first file of USB flash disk 200 is sky, and if not empty, electric power is adoptedCollection terminal 100 then can read state configuration information;If it is empty, electric power acquisition terminal 100 can then report an error.
Step S102 obtains verifying letter when status command instruction electric power acquisition terminal enters debugging mode from USB flash diskBreath.
In the present embodiment, status command can be set to binary number 0 or 1, when status command is set as 0, stateInstruction can then indicate that electric power acquisition terminal 100 enters communications status.When status command is set as 1, status command can then be indicatedElectric power acquisition terminal 100 enters debugging mode.
Therefore after electric power acquisition terminal 100 reads state configuration information, can first reading state instruction value, and with defaultValue in state parameter table is compared.If the value for the status command that electric power acquisition terminal 100 is read is 0, work as electric power acquisitionWhen value in 100 state parameter table of terminal is 0, the value in 100 state parameter table of electric power acquisition terminal is not altered, i.e., electric power is adoptedCollection terminal 100 continues to keep communications status.If the value for the status command that electric power acquisition terminal 100 is read is 0, work as electric power acquisitionWhen value in 100 state parameter table of terminal is 1, the value in 100 state parameter table of electric power acquisition terminal is changed to 0, i.e. electric power by 1Acquisition terminal 100 is changed into communications status by debugging mode.If the value for the status command that electric power acquisition terminal 100 is read is 1,When the value in 100 state parameter table of electric power acquisition terminal is 0, the value in 100 state parameter table of electric power acquisition terminal is by 0 changeIt is 1, i.e., electric power acquisition terminal 100 is debugging mode by communication state transitions, and reads verification information from USB flash disk 200.If electric powerThe value for the status command that acquisition terminal 100 is read is 1, when the value in 100 state parameter table of electric power acquisition terminal is 1, electricityValue in 100 state parameter table of power acquisition terminal is not altered, i.e., electric power acquisition terminal 100 continues to keep debugging mode, and from UVerification information is read in disk 200.
In the present embodiment, for USB flash disk 200 before being inserted into electric power acquisition terminal 100, staff can be in advance in USB flash disk 200Verification information is stored, verification information can be stored in the second file of the creation of USB flash disk 200.
Step S106 opens hyper terminal and executes debugging by hyper terminal if verification information meets preset conditionOperation.
In the present embodiment, the state configuration information that electric power acquisition terminal 100 obtains further includes tuning parameter, electric power acquisitionTerminal 100 prestores flag information.Electric power acquisition terminal 100 is obtaining verification information from USB flash disk 200, and determines verification informationAfter meeting preset condition, electric power acquisition terminal 100 can according to tuning parameter to flag information carry out calculate obtain can open it is superThe character string of terminal 400, hyper terminal 400 can execute the debugging operations with the character string corresponding function according to the character string.
Referring to figure 4., it is the flow diagram of the sub-step of step S106, specifically includes:
Sub-step S1061 carries out displacement calculating and/or operation to flag information according to tuning parameter, obtains preset lengthCharacter string.
In the present embodiment, electric power acquisition terminal 100, can be first to memory after determining that verification information meets preset conditionIn flag information carry out displacement calculating, the flag information after obtaining multiple displacements, electric power acquisition terminal 100 will be after multiple displacementsFlag information carry out or operation, obtain the character string of preset length.It is appreciated that by each of flag information digital 1 and 0Shifting algorithm is carried out according to the Digital size in tuning parameter, the flag information after obtaining multiple displacements, after multiple displacementsFlag information carries out or operation obtains the character string of preset length.For example, flag information is 00001001, shifted in tuning parameterDigital size be 2, then in flag information the 0th 1 will shifted left double figures, the 7th and the 6th in flag informationThe 0 of position will be displaced to the 0th and the 1st, and the also successively shifted left double figures of 0 of remaining in flag information, shiftFlag information afterwards is 00000100, in flag information the 1 of the 3rd also can shifted left double figures, the mark after being shiftedInformation is 00100000.Flag information 00100000 by the flag information 00000100 of displacement and after shifting carries out or operation,Obtain the character string 00100100 that preset length is 8.
In the present embodiment, the preset length of character string may be arranged as other digits, it is not limited to 8.It is preferred thatGround can be set to 32.
Sub-step S1062 opens hyper terminal according to the character string of preset length and executes debugging by hyper terminal 400Operation.
In the present embodiment, electric power acquisition terminal 100 is after being calculated the character string of preset length, by preset lengthCharacter string is assigned to the serial ports of hyper terminal 400, and hyper terminal 400 opens corresponding serial ports according to the character string of preset length,Hyper terminal 400 carries out the debugging of corresponding function according to open serial ports.That is, electric power acquisition terminal 100 is according to differenceTuning parameter can obtain different character strings, electric power acquisition terminal 100 can open hyper terminal 400 according to different character stringsDifferent serial ports, hyper terminal 400 carries out the debugging of different function according to open different serial ports.I.e. different serial ports correspond toDifferent function debuggings, the corresponding different serial ports of different character strings.Meanwhile electric power acquisition terminal 100 opens new serial ports, andThe serial ports of original opening will not be changed.
Referring to figure 5., another process for the adjustment method of electric power acquisition terminal 100 provided in an embodiment of the present invention is shownIt is intended to, on the basis of flow diagram shown in Fig. 3, the adjustment method is further comprising the steps of:
Whether step S103 judges the memory size of verification information more than the first preset value.
In the present embodiment, the first preset value can be set to 2M, electric power acquisition terminal 100 read verification information itBefore, first obtain the memory size of verification information.If the memory size of verification information is more than the first preset value, judge that the verifying is believedMistake is ceased, electric power acquisition terminal 100 can report an error.If the memory size of verification information is less than the first preset value, reading is testedInformation is demonstrate,proved, verification information is further differentiated.
Step S104 judges the number in verification information when the memory size of verification information is less than the first preset valueSize whether within a preset range, the format of verification information whether meet preset rules and verification information length scale whetherMore than the second preset value.
Step S105, format of the Digital size within a preset range, in verification information in verification information meet defaultWhen the length scale of rule and verification information is less than the second preset value, then judge that verification information meets preset condition.
In the present embodiment, electric power acquisition terminal 100 can traverse all numbers in verification information, judge institute in verification informationWhether within a preset range there is number, if having number in verification information not within a preset range, electric power acquisition terminal 100 is reportedIt is wrong;If within a preset range, electric power acquisition terminal 100 successively judges that the format of verification information is to all numbers in verification informationIt is no to meet preset rules;Electric power acquisition terminal 100 judges whether the format of verification information meets preset rules and be specifically as follows, and sentencesWhether it is preset characters that whether the content of the odd bits of disconnected verification information is the content of even bit of number, verification information, if testingThe odd bits presence of card information is not the even bit of the interior perhaps verification information of number in the presence of the content for not being preset characters, electric powerAcquisition terminal 100 then reports an error;If the content that the content of the odd bits of verification information is all the even bit of number, verification information is allPreset characters then judge that the format in verification information meets preset rules;Electric power acquisition terminal 100 is in reading verification informationAfter terminating symbol, then the length scale of verification information can be obtained, and whether judge the length scale of verification information more than secondPreset value, if the length scale of verification information is more than the second preset value, electric power acquisition terminal 100 can report an error;If verification informationLength scale be less than the second preset value, then judge that verification information meets preset condition.The debugging operations for indicating this are worksThe conjunction rule for making personnel operate, rather than the malicious operation of non-working person.
In the present embodiment, electric power acquisition terminal 100 judges the memory size, format and length of verification informationSequence is arbitrary, however it is not limited to which the sequence of this implementation statement can be arbitrarily arranged according to the actual situation.
In the present embodiment, preset range can be set to 1-31, and preset characters can be set to comma, and terminating symbol canTo be set as branch.It is appreciated that electric power acquisition terminal 100 is after reading terminating symbol, regardless of behind verification information whetherThere are also content, electric power acquisition terminal 100 can all be considered as judgement and terminate, and can obtain the content in verification information before terminating symbolThe length scale of content before terminating symbol is compared by length scale with the second preset value.
Further, in the present embodiment, verification information can also be formed by letter or without bracket, judge letter or notWith bracket whether with the letter of preset database purchase or without parenthesis matching, if the letter of verification information or without bracket notIn preset database, then report an error;If verification information letter or without bracket in preset database if can be to verifyingThe format and length scale of information are judged, if all meeting the requirements, judge that verification information meets preset condition.
Further, in the present embodiment, adjustment method is further comprising the steps of:
Step S107 records corresponding log information when opening hyper terminal.
Log information is sent to USB flash disk and saved by step S108.
In the present embodiment, it is super when date information includes the serial ports that electric power acquisition terminal 100 opens hyper terminal 400The title for the function that terminal 400 is opened and time, staff can clearly know entirely to debug according to the log informationProcess.
In order to execute the corresponding steps in above-described embodiment and each possible mode, a kind of debugging apparatus is given below120 implementation.Fig. 6 is please referred to, Fig. 6 is a kind of debugging apparatus 120 of electric power acquisition terminal provided in an embodiment of the present inventionThe functional block diagram.It should be noted that the debugging apparatus 120 of electric power acquisition terminal provided by the present embodiment, basePresent principles and the technical effect of generation are identical with above-described embodiment, and to briefly describe, the present embodiment part does not refer to place, can joinExamine corresponding contents in the above embodiments.The debugging apparatus 120 include first obtain module 121, second obtain module 122 andWith debugging module 123.
First, which obtains module 121, is used to obtain the state that USB flash disk 200 stores when USB flash disk 200 is inserted into electric power acquisition terminal 100Configuration information, state configuration information include status command.
It is appreciated that the first acquisition module 121 is used to execute the content of above-mentioned steps S101.
Second, which obtains module 122, is used for when status command instruction electric power acquisition terminal 100 enters debugging mode, from USB flash diskVerification information is obtained in 200.
It is appreciated that the second acquisition module 122 is used to execute the content of above-mentioned steps S102.
If matching and debugging module 123 meets preset condition for verification information, hyper terminal 400 is opened and by superTerminal 400 executes debugging operations.
It is appreciated that matching and debugging module 123 is used to execute the content of above-mentioned steps S106.
Fig. 7 is please referred to, matching and debugging module 123 includes computing unit 1231 and debugging unit 1232.
Computing unit 1231 is used to judge whether the content of the odd bits of verification information to be digital, verification information even bitContent whether be preset characters.
It is appreciated that computing unit 1231 is used to execute the content of above-mentioned steps S1061.
Debugging unit 1232 is number, the even bit in verification information for the content of the odd bits in verification informationWhen content is preset characters, then judge that the format in verification information meets the preset rules.
It is appreciated that debugging unit 1232 is used to execute the content of above-mentioned steps S1062.
It further, further include first judgment module as shown in figure 8, on the basis of debugging apparatus 120 is shown in Fig. 6124, the second judgment module 125, third judgment module 126, logger module 127 and sending module 128.
Whether first judgment module 124 is used to judge the memory size of verification information more than the first preset value.
It is appreciated that first judgment module 124 is used to execute the content of above-mentioned steps S103.
Second judgment module 125 is used for when the memory size of verification information is less than the first preset value, judges verifying letterDigital size in breath whether within a preset range, the format of verification information whether meet the length of preset rules and verification informationSpend whether size is more than second preset value.
It is appreciated that the second judgment module 125 is used to execute the content of above-mentioned steps S104.
Third judgment module 126 is for lattice of the Digital size within a preset range, in verification information in verification informationWhen the length scale that formula meets preset rules and verification information is less than the second preset value, then it is default to judge that verification information meetsCondition.
It is appreciated that third judgment module 126 is used to execute the content of above-mentioned steps S105.
Logger module 127 is used for when opening hyper terminal 400, records corresponding log information.
It is appreciated that logger module 127 is used to execute the content of above-mentioned steps S107.
Sending module 128 is saved for log information to be sent to USB flash disk 200.
It is appreciated that sending module 128 is used to execute the content of above-mentioned steps S108.
Optionally, the first above-mentioned acquisition module 121, second obtains module 122, matching and debugging module 123, first judgesModule 124, the second judgment module 125, third judgment module 126, logger module 127 and sending module 128 can be with softwaresOr the form of firmware (Firmware) is stored in memory, and can be executed by processor.
In conclusion the embodiment of the invention provides adjustment method, device and the electric power acquisitions of a kind of electric power acquisition terminalTerminal, under the premise of not changing electric power acquisition terminal original structure, by obtaining state configuration information and verifying letter in USB flash diskBreath realizes the debugging operations under wireless status, eliminates to open hyper terminal and by hyper terminal execution debugging operationsThe carrying of PC machine and the deposition step of Serial Port Line so that the operation of staff's field adjustable is more convenient, and then greatly improveThe efficiency of electric power acquisition terminal filed debugging.Meanwhile by the verifying to verification information, avoids non-working person and electric power is adoptedThe malice debugging for collecting terminal, improves the safety of electric power acquisition terminal debugging operations.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, anyIn the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by those familiar with the art, all answersIt is included within the scope of the present invention.Therefore, protection scope of the present invention should be with the scope of protection of the claimsIt is quasi-.