CN102981795A - Method of displaying information - Google Patents

Method of displaying information Download PDF

Info

Publication number
CN102981795A
CN102981795A CN2012104297821A CN201210429782A CN102981795A CN 102981795 A CN102981795 A CN 102981795A CN 2012104297821 A CN2012104297821 A CN 2012104297821A CN 201210429782 A CN201210429782 A CN 201210429782A CN 102981795 A CN102981795 A CN 102981795A
Authority
CN
China
Prior art keywords
execution
coding
instruction
pattern data
character pattern
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.)
Granted
Application number
CN2012104297821A
Other languages
Chinese (zh)
Other versions
CN102981795B (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.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies 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 Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201210429782.1A priority Critical patent/CN102981795B/en
Publication of CN102981795A publication Critical patent/CN102981795A/en
Application granted granted Critical
Publication of CN102981795B publication Critical patent/CN102981795B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method of displaying information and belongs to the field of information safety. The method of displaying the information includes the following steps. Regular information codes and corresponding character model data are placed in a 'regular character zone'. When a character resolved by an instruction is identical with the content of the 'regular character zone', the content is directly stored in a display buffer cache and a liquid crystal screen is used for displaying the information. A process of transforming character codes is removed in the method of displaying the information so that the information can be rapidly displayed and screen blinking is avoided. Stored display information is less and little in occupied space in a chip.

Description

A kind of method that shows information
Technical field
The present invention relates to information security field, relate in particular to a kind of method that shows information.
Background technology
Fast development along with information industry, the development of infotech brings great convenience not only for people's life, also fundamentally changed people's life style, behavior and values, infotech has also produced huge and deep effect to economy and social development simultaneously.
In the prior art, do not have a kind of faster and better mode that information is presented on the liquid crystal display faster, and the situation of screen flicker often can occur.
Summary of the invention
The objective of the invention is to solve problems of the prior art, a kind of method that shows information is provided.
The technical solution used in the present invention is: a kind of method that shows information comprises:
Step 101: equipment is waited for and is received the instruction that host computer sends;
Step 102: described equipment is judged the type of the instruction that receives;
If the instruction that receives is instruction to be resolved, then execution in step 103;
If the instruction that receives is other operational orders, then execution in step 107;
Step 103: whether the coding in " conventional characters district " in the coding that described equipment judgement parses from instruction and the second default memory block is identical, if identical, then from " conventional characters district ", read the character pattern data corresponding with the described coding that parses, then execution in step 105, otherwise execution in step 104;
Step 104: described equipment is read the character pattern data corresponding with the described coding that parses from the 3rd default memory block;
Step 105: described equipment is kept at the display buffer district with described character pattern data;
Step 106: described equipment generates response and returns to host computer, returns execution in step 101; Described response is the success of Hash data signature or failed response.
Step 107: described equipment is carried out other operational orders, generates to respond accordingly and to return to execution in step 101 behind the host computer.
Also comprise in the described step 103: described equipment carries out Hash calculation to described instruction, obtains the Hash data, and described Hash data are kept in the first default memory block.In step 102, the instruction that receives when described equipment is when treating signature command, and execution in step S01 is to step S04;
Step S01: described equipment shows described character pattern data by liquid crystal display;
Step S02: described equipment judges whether " affirmations " key is pressed in Preset Time, if so, and execution in step S03 then, otherwise cancel signature operation execution in step S04;
Step S03: described equipment is read described Hash data from the described first default memory block, and to described Hash data signature;
Step S04: described equipment generates the second response and returns to host computer.
In step 102, when containing in the instruction to be resolved that described equipment receives when remaining signature operation, then between step 105 and step 106, also comprise:
Step S-1: described equipment carries out Hash calculation to described instruction, obtains the Hash data, and is kept in the first default memory block;
Step S-2: described equipment shows described character pattern data by liquid crystal display;
Step S-3: described equipment judges whether " affirmation " key is pressed in Preset Time, and if so, then execution in step S-4 returns to host computer otherwise cancel signature operation, returns execution in step 101;
Step S-4: described equipment is read described Hash data from the described first default memory block, and to described Hash data signature.
Response is instruction successfully resolved or failed response described in the corresponding step 106.
Described step 103 can specifically comprise:
Step 103-1: the position that the first pointer variable is pointed to " conventional characters district " article one record is set;
Step 103-2: whole codings that will parse from instruction compare as whole codings of the position of a record and described the first pointer variable indication, if identical, then from " conventional characters district ", read the character pattern data corresponding with the described coding that parses, then execution in step 105, otherwise execution in step 103-3;
Step 103-3: described the first pointer variable is increased progressively preset value, judge whether the record of described the first pointer variable indication position is empty, if so, execution in step 104, otherwise execution in step 103-2.
Described step 103-2 can also replace with,
Step S103-2: single encoded the comparing of the single encoded and described first pointer variable indication position that will from instruction, parse, if identical, then from " conventional characters district ", read the character pattern data corresponding with the described coding that parses, then execution in step 105, otherwise execution in step 103-3.
Described step 105 can replace with,
Step S15: described equipment is kept at the display buffer district with the described coding that parses.
Further, described step 103 is revised as step S103: whether the coding in " conventional characters district " in the coding that described equipment judgement parses from instruction and the second default memory block is identical, if identical, then from " conventional characters district ", read the character pattern data corresponding with the described coding that parses, then execution in step 105, otherwise execution in step S11.
Between step 103 and step 104, also comprise:
Step S11: whether described equipment judgement " conventional characters district " is had living space and is deposited the described coding that parses, and if so, then execution in step 104; Otherwise execution in step S12;
Step S12: described equipment is wiped rear execution in step 104 with the coding and the corresponding character pattern data that deposit at first in " conventional characters district ";
Between step 104 and step 105, also comprise:
Step S13: described equipment writes described " conventional characters district " with the described coding that parses and corresponding character pattern data as a new record;
Further, described step 103 is revised as step S-103: whether the coding in " conventional characters district " in the coding that described equipment judgement parses from instruction and the second default memory block is identical, if identical, then from " conventional characters district ", read the character pattern data corresponding with the described coding that parses, then execution in step 105, otherwise execution in step S21.Described step 103 specifically comprises:
Steps A: whether the coding of judging " the first label area " in the coding parse and " the conventional characters district " from instruction is identical, if identical, then execution in step 105, otherwise execution in step B;
Step B: whether the coding of judging " the second label area " in the coding parse and " the conventional characters district " from instruction is identical, if identical, then execution in step 105, otherwise execution in step S21.
Between step 103 and step 104, also comprise accordingly:
Step S21: described equipment judges whether " the first label area " in described " conventional characters district " has living space and deposits the described coding that parses, if so, and execution in step S23 then; Otherwise execution in step S22;
Step S22: described equipment is wiped rear execution in step 104 with coding and corresponding character pattern data that described " the first label area " deposits at first;
Between step 104 and step 105, also comprise accordingly:
Step S23: described equipment writes " the first label area " with the described coding that parses and corresponding character pattern data as a new record;
Pre-set when the content of " the second label area " is production in described " conventional characters district ", can not revise, the content in " the first label area " can be modified.
Described step S12 replaces with:
Step S22: coding and the corresponding character pattern data of the record that described equipment is minimum with " access times " in " conventional characters district " are wiped rear execution in step 104.
Among the described step S22, " conventional characters district " is comprised of encode, encode corresponding character pattern data and " access times ", wherein " access times " set in advance initial value, when the coding in the described coding that parses and " conventional characters district " is identical, read character pattern data, " access times " with this record increase progressively default value simultaneously;
Described step S22 specifically comprises:
Step S22-1: from " conventional characters district ", find out " access times " minimum record, the second pointer variable is set points to this record;
Step S22-2: with the coding of described the second pointer variable indication position and corresponding character pattern data deletion.
Described step S13 specifically comprises:
Step S13-1: after described the second pointer variable indication position was wiped free of, coding and corresponding character pattern data that instruction is parsed write " conventional characters district " as a new record;
Step S13-2: described the second pointer variable is done and is increased progressively rear execution in step 105.
Described step 104 specifically comprises:
Step 104-1: the described code conversion that parses is become the UCS-4 coding;
Step 104-2: be coded in the character pattern data of searching and read correspondence in the 3rd default memory block according to the UCS-4 after the conversion.
The beneficial effect that the present invention obtains is: adopt scheme of the present invention to reduce character-coded transfer process, so that information shows that fast avoid occurring the situation of screen flicker, and the demonstration information of storage is less, it is less to take chip space.
Description of drawings
Fig. 1 is a kind of process flow diagram that shows the method for information that the embodiment of the invention 1 provides;
Fig. 2 is a kind of process flow diagram that shows the method for information that the embodiment of the invention 2 provides;
Fig. 3 is a kind of process flow diagram that shows the method for information that the embodiment of the invention 3 provides;
Fig. 4 is a kind of process flow diagram that shows the method for information that the embodiment of the invention 4 provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Embodiment 1:
Embodiments of the invention 1 provide a kind of method that shows information, as shown in Figure 1, comprising:
Step 101: equipment is waited for and is received the instruction that host computer sends;
Described instruction is after the device power self check, the data that receive by USB interface;
Step 102: described equipment is judged the type of the instruction that receives;
If the instruction that receives is the packet parsing instruction, then execution in step 103 is to step 110;
If the instruction that receives is the message signature command, then execution in step 111 is to step 114;
If the instruction that receives is other operational order, then execution in step 115;
Be specially:
First and second byte of described instruction is the type part of instruction, and described equipment decision instruction type is that the first two byte of the instruction that receives by judgement realizes:
If the first two byte is 0x002A, represent that then the instruction that receives is the packet parsing instruction, execution in step 103 is to step 110;
If the first two byte is 0x002B, represent that then the instruction that receives is the message signature command, execution in step 111 is to step 114;
If the first two byte is other bytecodes, represent that then the instruction that receives is other operational orders, execution in step 115;
Further, if the first two byte is 0x001A, then the instruction of expression reception is packet parsing and signature command, and then step 115 is specially: execution in step 103 is to step 109, and then execution in step 111 is to step 114;
Step 103: described equipment carries out Hash calculation to described instruction, obtains the Hash data, and is kept in the first default memory block;
Step 104: whether the coding in " conventional characters district " in the coding that judgement parses from instruction and the second default memory block is identical, if identical, execution in step 109, otherwise execution in step 105;
In the present embodiment, the coding that parses from instruction is the UTF-8 coding preferably, in addition, can also be the GBK coding;
In the present embodiment, the second default memory block refers to the Flash memory block in the chip, and wherein, " conventional characters district " left in the second default memory block, is used for depositing account, the amount of money and name;
Concrete:
The process that parses coding from instruction is: parse first character string from instruction, then take out the coding of each character from character string;
The coding that will parse from instruction compares with the coding in " conventional characters district " as a whole, if identical, then execution in step 109, otherwise execution in step 105;
" conventional characters district " is comprised of coding and corresponding character pattern data;
For example: be encoded to example with UTF-8, a record in " conventional characters district " is: UTF-8 coding: e9 87 91 e9 a2 9d ef bc 9a 31;
Corresponding character pattern data: 0x01,0x00,0x01,0x00,0x02,0x80,0x04,0x40,0x08,0x20,0x10,0x50,0x2F, 0xEE, 0xC1,0x04,0x01,0x00,0x1F, 0xF0,0x01,0x00,0x11,0x10,0x09,0x20,0x05,0x48,0x7F, 0xFC, 0x00,0x00,0x10,0x04,0x08,0xFE, 0x7F, 0x10,0x41,0x24,0x92,0x7E, 0x1E, 0x44,0x22,0x54,0x54,0x54,0x08,0x54,0x14,0x54,0x22,0x54,0x7F, 0x54,0xA2,0x10,0x22,0x28,0x3E, 0x46,0x20,0x82,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x38,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x3E, 0x00,0x00,0x00,0x00,0x00;
What this character pattern data represented is " amount of money: 1 ";
Step 105: whether judgement " conventional characters district " is had living space and deposit the coding that parses from instruction, if having living space, then execution in step 107, otherwise execution in step 106;
Step 106: the coding and the corresponding character pattern data that deposit at first in " conventional characters district " are wiped;
Step 107: from the 3rd default memory block, read the character pattern data corresponding with the described coding that parses;
In the present embodiment, the 3rd default memory block refers to the NandFlash memory block, and the character pattern data that does not have in " conventional characters district " can find in the 3rd default memory block;
Step 108: the described coding that parses and the character pattern data read from the 3rd default memory block are write " conventional characters district " as a new record;
Step 109: the described coding that parses is kept at the display buffer district;
Step 110: execution in step 101 after generating the first response and returning to host computer;
Wherein, the first response is instruction successfully resolved or failed response;
Step 111: described equipment is read corresponding character pattern data according to the coding in the display buffer district from " conventional characters district ";
Step 112: show character pattern data by liquid crystal display;
Step 113: from the first default memory block, read the Hash data and to the Hash data signature;
Step 114: execution in step 101 after generating the second response and returning to host computer;
Wherein, the content of the second response is that instruction is signed successfully or failed response;
Step 115: carry out other operational orders, generate and to respond accordingly and to return to execution in step 101 behind the host computer.
Embodiment 2:
Embodiments of the invention 2 provide a kind of method that shows information, as shown in Figure 2, comprising:
Step 201: equipment is waited for and is received the instruction that host computer sends;
Described instruction is after the device power self check, the data that receive by USB interface;
Step 202: described equipment is judged the type of the instruction that receives;
If the instruction that receives is the packet parsing instruction, then execution in step 203-210;
If the instruction that receives is the message signature command, then execution in step 211-213;
If the instruction that receives is other operational order, then execution in step 214;
Be specially:
First and second byte of described instruction is the type part of instruction, and described equipment decision instruction type is to realize by the first two byte of judging the instruction that receives:
If the first two byte is 0x002A, then the instruction of expression reception is the packet parsing instruction, execution in step 203-210;
If the first two byte is 0x002B, then the instruction of expression reception is the message signature command, execution in step 211-213;
If the first two byte is other bytecodes, then the instruction of expression reception is other operational orders, execution in step 214;
Step 203: described equipment carries out Hash calculation to instruction, obtains the Hash data, and is kept in the first default memory block;
Step 204: whether the coding in " conventional characters district " in the coding that judgement parses from instruction and the second default memory block is identical, if identical, execution in step 209, otherwise execution in step 205;
In the present embodiment, the second default memory block refers to the Flash memory block in the chip, and wherein, " conventional characters district " left in the second default memory block, is used for depositing account, the amount of money and name;
" conventional characters district " is comprised of coding and corresponding character pattern data, can be modified;
Be specially:
The described coding that parses is compared with the coding in " conventional characters district " as a whole, if identical, then execution in step 209, otherwise execution in step 205;
Step 205: whether judgement " conventional characters district " is had living space and deposit the coding that parses from instruction, if having living space, then execution in step 207, otherwise execution in step 206;
Step 206: the coding and the corresponding character pattern data that deposit at first in " conventional characters district " are wiped;
Step 207: from the 3rd default memory block, read the character pattern data corresponding with the coding that from instruction, parses;
In the present embodiment, the 3rd default memory block refers to the NandFlash memory block, and the character pattern data that " conventional characters district " do not have can find in the 3rd default memory block;
Step 208: the coding that will parse from instruction and the character pattern data of reading from the 3rd default memory block write " conventional characters district " as a new record;
Step 209: the character pattern data of the coding correspondence that will parse from instruction is kept in the display buffer district;
Step 210: execution in step 201 after generating the first response and returning to host computer;
Wherein, the first response is instruction successfully resolved or failed response;
Step 211: the character pattern data in the display buffer district is shown by liquid crystal display;
Concrete:
211-1: pointer variable N is set, pointer variable N initialization is pointed to the first character pattern data in display buffer district;
211-2: read character pattern data from pointer variable N indication position, then by liquid crystal display character pattern data is shown;
211-3: pointer variable N is execution in step 211-2 after adding 1 operation;
Step 212: from the first default memory block, read the Hash data and to the Hash data signature;
Step 213: execution in step 201 after generating the second response and returning to host computer;
Wherein, the second response is to the success of Hash data signature or failed response;
Step 214: carry out other operational orders, execution in step 201 after generating respective response and returning to host computer.
Embodiment 3:
Embodiments of the invention 3 are a kind of methods that show information that provide on the basis of embodiment 1 or 2, as shown in Figure 3, comprising:
Step 301: equipment is waited for and is received the instruction that host computer sends;
Described instruction is after the device power self check, the data that receive by USB interface;
Step 302: described equipment is judged the type of the instruction that receives;
If the instruction that receives is the packet parsing instruction, then execution in step 303-317;
If the instruction that receives is the message signature command, then execution in step 318-326;
If the instruction that receives is other instruction, then execution in step 327;
Be specially:
The 1st, 2 bytes of described instruction are the type parts of instruction, and described equipment decision instruction type is that front 2 bytes of the instruction that receives by judgement realize:
If the 1st, 2 bytes of instruction are 0x002A, represent that then the instruction that receives is the packet parsing instruction, execution in step 303-317;
If the 1st, 2 bytes of instruction are 0x002B, represent that then the instruction that receives is the message signature command, execution in step 318-326;
If the 1st, 2 bytes of instruction are other bytecodes, represent that then the instruction that receives is other instructions, execution in step 327;
Step 303: described equipment judges whether satisfy to carry out authority, is execution in step 304 then, otherwise returns execution in step 301 after the errored response to host computer;
Be specially:
Described equipment is searched the first preset value, the first preset value is set in advance in the equipment, to carry out the mark whether authority satisfies, if the first preset value is 1, then satisfy and carry out authority, execution in step 304 is if the first preset value is 0, then do not satisfy right of execution limit, return execution in step 301 after the errored response to described host computer;
Step 304: described equipment judges whether the argument section of described instruction is correct, is execution in step 305 then, otherwise returns execution in step 301 after the errored response to host computer;
Be specially:
The argument section of described instruction is third and fourth byte of instruction, the second preset value that deposits in the described equipment is 0010, whether the argument section of decision instruction is identical with the second preset value, represent that if the same argument section is correct, execution in step 305, otherwise return execution in step 301 after the errored response to described host computer;
Step 305: described equipment judges whether described instruction supports hash algorithm, if support, then execution in step 306, if do not support, then returns execution in step 301 after the errored response to described host computer;
Described equipment is searched the 3rd pre-set preset value, if the 3rd preset value is 1, then supports hash algorithm, and execution in step 306 if the 3rd preset value is 0, is not then supported hash algorithm, returns execution in step 301 after the errored response to host computer;
Step 306: described equipment carries out Hash calculation to described instruction, obtains the Hash data, and the Hash data are kept in the first default memory block;
Step 307: described equipment points to the first pointer variable the first parsing character of the data field of described instruction;
Be specially:
The first parsing character of the data field of described instruction is pointed in the first pointer variable initialization, i.e. the 6th byte of instruction, and instruction is the data field of instruction since the 6th byte, data field length is variable;
Step 308: described equipment judges whether the parsing character of the first pointer variable indication position belongs to " the conventional characters district " in the second default memory block, and if so, then execution in step 309, otherwise execution in step 314; In the present embodiment, " conventional characters district " is stored in the second default memory block, and the described second default memory block refers to the Flash memory block in the chip;
" conventional characters district " is comprised of two parts, and a part is " the first label area ", and another part is " the second label area ";
What deposit in " the first label area " is nametags.What deposit in " the second label area " is account and the amount of money, wherein, content in " the second label area " is pre-set when producing, cannot change, " the first label area " and " the second label area " in described " conventional characters district " all are to be encoded by UTF-8, " access times " of the character pattern data that coding is corresponding and every record correspondence form, wherein " access times " initial value is 1, when the UTF-8 coding of resolving character and the UTF-8 in " conventional characters district " encode when identical, the character pattern data of correspondence is read, and " access times " with this record add 1 simultaneously;
In the present embodiment, the coding of preferentially selecting is the UTF-8 coding, can also use the GBK coding, below is encoded to example with UTF-8 and sets forth, but only be exemplary, does not limit protection scope of the present invention;
For example, " gold " word in " the second label area " is by UTF-8 coding (e9 87 91), character pattern data (0x01,0x00,0x01,0x00,0x02,0x80,0x04,0x40,0x08,0x20,0x10,0x50,0x2F, 0xEE, 0xC1,0x04,0x01,0x00,0x1F, 0xF0,0x01,0x00,0x11,0x10,0x09,0x20,0x05,0x48,0x7F, 0xFC, 0x00,0x00) and " " access times ": 3 " composition;
" volume " word is by UTF-8 coding (e9 a2 9d) and character pattern data (0x10,0x04,0x08,0xFE, 0x7F, 0x10,0x41,0x24,0x92,0x7E, 0x1E, 0x44,0x22,0x54,0x54,0x54,0x08,0x54,0x14,0x54,0x22,0x54,0x7F, 0x54,0xA2,0x10,0x22,0x28,0x3E, 0x46,0x20,0x82) " " access times ": 3 " composition;
Concrete, do not belong to " the first label area " in " conventional characters district " if judge the parsing character of the first pointer variable indication position, then the UTF-8 coding with " the second label area " compares, and takes out corresponding character pattern data, and then execution in step 314;
Equipment is resolved described parsing character according to the XML standard, judges that then " the first label area " that the parsing character belongs in " conventional characters district " still belongs to " the second label area ";
For example:
<?xml?version="1.0"?encoding="utf-8"?>
<SignData>
<Fields>
<PayerAccountNo>6221286897001330</PayerAccountNo>
<PayerAccountName〉Zhang San</PayerAccountName 〉
<PayerAccountNoName=: " shroff account number ":〉6221286897001736<PayerAccountNo 〉
<PayerAccountName name=" gathering name in an account book: "〉Li Si<PayerAccountName 〉
<TrsAmount name=" dealing money: "〉1</TrsAmount 〉
</Fields>
</SignData>
When what parse be<PayerAccountName 〉, belong to " the first label area ";
When what parse be<PayerAccountNo〉belong to " the second label area ";
Step 309: described equipment judges whether there is current parsing character in " the first label area ", is execution in step 314 then, otherwise execution in step 310;
Be specially:
309-1: the second pointer variable is set, and the position of article one record of " the first label area " is pointed in initialization;
309-2: the UTF-8 coding in article one record of the UTF-8 coding of the parsing character of the first pointer variable indication position and " the first label area " is compared, if identical, then " access times " with this record add 1, and then execution in step 314, otherwise execution in step 309-3;
309-3: the second pointer variable is done and is added 1 operation, judges whether the parsing character of the second pointer variable indication position is empty, if so, then represents described parsing character not in " conventional characters district ", execution in step 310, otherwise execution in step 309-2;
Step 310: described equipment judges whether " the first label area " has living space and deposits the parsing character of the first pointer variable indication position, is execution in step 312 then, otherwise execution in step 311;
Be specially:
The capacity of supposing " the first label area " is M, if the second pointer variable less than M, then expression " the first label area " is had living space and is deposited described parsing character, execution in step 312;
If the second pointer variable is more than or equal to M, then expression " the first label area " is full, does not have the space to deposit described parsing character, and then execution in step 311;
Step 311: described equipment is wiped " access times " minimum record in " the first label area ";
Be specially:
Step 311-1: from " the first label area ", find out " access times " minimum record, the second pointer variable is pointed to this record;
Step 311-2: with the record deletion of the second pointer variable sensing;
Step 312: described equipment is read the character pattern data corresponding with the parsing character of the first pointer variable indication position from the 3rd default memory block;
In the present embodiment, the described the 3rd default memory block refers to the NandFlash memory block, and the character pattern data that does not have in " conventional characters district " can find in the 3rd default memory block;
From the described the 3rd default memory block, find the position corresponding with the UTF-8 coding of described parsing character, read corresponding character pattern data;
Step 313: described equipment writes " the first label area " with UTF-8 coding and the corresponding character pattern data of described parsing character as a new record;
Be specially:
Step 313-1: judge whether the second pointer variable indication position is empty, if be empty, execution in step 313-2, otherwise the second pointer variable is done from adding the rear execution in step 313-1 that continues of 1 operation;
Step 313-2: the UTF-8 coding of described parsing character is placed on the UTF-8 code area that " the first label area " distinguished, the character pattern data of described parsing character is placed on the character pattern data district of " the first label area ";
Step 314: the UTF-8 coding of described parsing character is saved in the display buffer district;
Step 315: move one after the sensing with the first pointer variable;
Step 316: whether the parsing character of judging the first pointer variable indication position is empty, if so, and execution in step 317, if not, return execution in step 308;
Step 317: execution in step 301 after generating the first response and returning to host computer;
Step 318: the reference position of the 3rd pointer variable being pointed to the display buffer district;
Step 319: judge whether nametags of character corresponding to the position of the 3rd pointer variable indication, if so, then from " the first label area ", read character pattern data, execution in step 323, otherwise execution in step 320;
Step 320: judge in " the second label area ", whether can find current character, if so, then from " the second label area ", read execution in step 323 behind the character pattern data, otherwise execution in step 321;
Step 321: character corresponding to the 3rd pointer variable indication position carried out code conversion;
The UTF-8 code conversion of the character that the 3rd pointer variable indication position is corresponding is the UCS-4 coding, because can only identify the UCS-4 coding in the 3rd default memory block;
Step 322: the coding according to conversion is read character pattern data from the 3rd default memory block;
In the 3rd default memory block, find with change after the identical position of UCS-4 coding, read corresponding character pattern data;
Step 323: show character pattern data by liquid crystal display;
Described equipment shows by the character pattern data of inquiring about the second default memory block and the 3rd default memory block and obtaining these by liquid crystal display;
Step 324: judge whether " affirmations " key is pressed, if so, preset from first and to read the Hash data the memory block and to the Hash data rear execution in step 326 of signing, otherwise execution in step 325;
Step 325: described equipment judges whether overtime, if so, then cancels signature operation, execution in step 326, otherwise execution in step 324;
Equipment presets a Preset Time, then represents overtime when surpassing this Preset Time;
Step 326: execution in step 301 after generating the second response and returning to host computer;
Wherein, the content of the second response is to the success of Hash data signature or failed response;
Step 327: described equipment is carried out other instructions, generates respective response and returns execution in step 301 to host computer.
Embodiment 4
Embodiments of the invention 4 are a kind of methods that show information that provide on the basis of embodiment 1 or 2, as shown in Figure 4, comprising:
Step 401: equipment is waited for and is received the instruction that host computer sends;
Described instruction is after the device power self check, the data that receive by USB interface;
Step 402: described equipment is judged the instruction type that receives;
If the instruction that receives is the packet parsing instruction, then execution in step 403-407;
If the instruction that receives is the message signature command, then execution in step 408-410;
If the instruction that receives is other operational order, then execution in step 411;
Be specially:
First and second byte of described instruction is the type part of instruction, and described equipment decision instruction type is to realize by the first two byte of judging the instruction that receives:
If the first two byte is 0x002A, represent that then the instruction that receives is the packet parsing instruction, execution in step 403-407;
If the first two byte is 0x002B, represent that then the instruction that receives is the message signature command, execution in step 408-410;
If the first two byte is other bytecodes, then the instruction of expression reception is other operational orders, execution in step 411;
Step 403: described equipment carries out Hash calculation to instruction, obtains the Hash data, and is kept in the first default memory block;
Step 404: whether the coding in " conventional characters district " in the coding that judgement parses from instruction and the second default memory block is identical, if identical, then in " conventional characters district ", read execution in step 406 behind the corresponding character pattern data, otherwise execution in step 405;
Step 405: from the 3rd default memory block, read the character pattern data corresponding with the described coding that parses;
Step 406: described equipment is kept at the display buffer district with described character pattern data;
Step 407: execution in step 401 after described equipment generates the first response and returns to host computer;
Step 408: described equipment shows character pattern data by liquid crystal display;
Step 409: described equipment is read described Hash data from the described first default memory block, and to described Hash data signature;
Step 410: execution in step 401 after described equipment generates the second response and returns to host computer;
Step 411: described equipment is carried out other operational orders, generates to respond accordingly and to return to execution in step 401 behind the host computer.

Claims (17)

1. a method that shows information is characterized in that, comprising:
Step 101: equipment is waited for and is received the instruction that host computer sends;
Step 102: described equipment is judged the type of the instruction that receives;
If the instruction that receives is instruction to be resolved, then execution in step 103;
If the instruction that receives is other operational orders, then execution in step 107;
Step 103: whether the coding in " conventional characters district " in the coding that described equipment judgement parses from instruction and the second default memory block is identical, if identical, then from " conventional characters district ", read the character pattern data corresponding with the described coding that parses, then execution in step 105, otherwise execution in step 104;
Step 104: described equipment is read the character pattern data corresponding with the described coding that parses from the 3rd default memory block;
Step 105: described equipment is kept at the display buffer district with described character pattern data;
Step 106: described equipment generates response and returns to host computer, returns execution in step 101;
Step 107: described equipment is carried out other operational orders, generates to respond accordingly and to return to execution in step 101 behind the host computer.
2. method according to claim 1 is characterized in that,
Also comprise in the described step 103: described equipment carries out Hash calculation to described instruction, obtains the Hash data, and described Hash data are kept in the first default memory block.
3. method according to claim 2 is characterized in that,
In step 102, the instruction that receives when described equipment is when treating signature command, and execution in step S01 is to step S04;
Step S01: described equipment shows described character pattern data by liquid crystal display;
Step S02: described equipment judges whether " affirmations " key is pressed in Preset Time, if so, and execution in step S03 then, otherwise cancel signature operation execution in step S04;
Step S03: described equipment is read described Hash data from the described first default memory block, and to described Hash data signature;
Step S04: described equipment generates the second response and returns to host computer.
4. method according to claim 1 is characterized in that,
In step 102, when containing in the instruction to be resolved that described equipment receives when remaining signature operation, then between step 105 and step 106, also comprise:
Step S-1: described equipment carries out Hash calculation to described instruction, obtains the Hash data, and is kept in the first default memory block;
Step S-2: described equipment shows described character pattern data by liquid crystal display;
Step S-3: described equipment judges whether " affirmation " key is pressed in Preset Time, and if so, then execution in step S-4 returns to host computer otherwise cancel signature operation, returns execution in step 101;
Step S-4: described equipment is read described Hash data from the described first default memory block, and to described Hash data signature.
5. method according to claim 1 is characterized in that, response is instruction successfully resolved or failed response described in the step 106.
6. method according to claim 4 is characterized in that,
Response described in the step 106 is the success of Hash data signature or failed response.
7. method according to claim 1 is characterized in that,
Described step 103 specifically comprises:
Step 103-1: the position that the first pointer variable is pointed to " conventional characters district " article one record is set;
Step 103-2: whole codings that will parse from instruction compare as whole codings of the position of a record and described the first pointer variable indication, if identical, then from " conventional characters district ", read the character pattern data corresponding with the described coding that parses, then execution in step 105, otherwise execution in step 103-3;
Step 103-3: described the first pointer variable is increased progressively preset value, judge whether the record of described the first pointer variable indication position is empty, if so, execution in step 104, otherwise execution in step 103-2.
8. method according to claim 7 is characterized in that,
Described step 103-2 replaces with,
Step S103-2: single encoded the comparing of the single encoded and described first pointer variable indication position that will from instruction, parse, if identical, then from " conventional characters district ", read the character pattern data corresponding with the described coding that parses, then execution in step 105, otherwise execution in step 103-3.
9. method according to claim 1 is characterized in that,
Described step 105 replaces with,
Step S15: described equipment is kept at the display buffer district with the described coding that parses.
10. method according to claim 1 is characterized in that,
Between step 103 and step 104, also comprise:
Step S11: whether described equipment judgement " conventional characters district " is had living space and is deposited the described coding that parses, and if so, then execution in step 104; Otherwise execution in step S12;
Step S12: described equipment is wiped rear execution in step 104 with the coding and the corresponding character pattern data that deposit at first in " conventional characters district ";
Between step 104 and step 105, also comprise:
Step S13: described equipment writes described " conventional characters district " with the described coding that parses and corresponding character pattern data as a new record;
Described step 103 is revised as step S103: whether the coding in " conventional characters district " in the coding that described equipment judgement parses from instruction and the second default memory block is identical, if identical, then from " conventional characters district ", read the character pattern data corresponding with the described coding that parses, then execution in step 105, otherwise execution in step S11.
11. the method according to claim 1 is characterized in that,
Between step 103 and step 104, also comprise:
Step S21: described equipment judges whether " the first label area " in described " conventional characters district " has living space and deposits the described coding that parses, if so, and execution in step S23 then; Otherwise execution in step S22;
Step S22: described equipment is wiped rear execution in step 104 with coding and corresponding character pattern data that described " the first label area " deposits at first;
Between step 104 and step 105, also comprise:
Step S23: described equipment writes " the first label area " with the described coding that parses and corresponding character pattern data as a new record;
Described step 103 is revised as step S-103: whether the coding in " conventional characters district " in the coding that described equipment judgement parses from instruction and the second default memory block is identical, if identical, then from " conventional characters district ", read the character pattern data corresponding with the described coding that parses, then execution in step 105, otherwise execution in step S21.
12. method according to claim 11 is characterized in that,
Described step 103 specifically comprises:
Steps A: whether the coding of judging " the first label area " in the coding parse and " the conventional characters district " from instruction is identical, if identical, then execution in step 105, otherwise execution in step B;
Step B: whether the coding of judging " the second label area " in the coding parse and " the conventional characters district " from instruction is identical, if identical, then execution in step 105, otherwise execution in step S21.
13. method according to claim 12 is characterized in that,
Pre-set when the content of " the second label area " is production in described " conventional characters district ", can not revise, the content in " the first label area " can be modified.
14. method according to claim 10 is characterized in that,
Described step S12 replaces with:
Step S22: coding and the corresponding character pattern data of the record that described equipment is minimum with " access times " in " conventional characters district " are wiped rear execution in step 104.
15. method according to claim 14 is characterized in that,
Among the described step S22, " conventional characters district " is comprised of encode, encode corresponding character pattern data and " access times ", wherein " access times " set in advance initial value, when the coding in the described coding that parses and " conventional characters district " is identical, read character pattern data, " access times " with this record increase progressively default value simultaneously;
Described step S22 specifically comprises:
Step S22-1: from " conventional characters district ", find out " access times " minimum record, the second pointer variable is set points to this record;
Step S22-2: with the coding of described the second pointer variable indication position and corresponding character pattern data deletion.
16. method according to claim 15 is characterized in that,
Described step S13 specifically comprises:
Step S13-1: after described the second pointer variable indication position was wiped free of, coding and corresponding character pattern data that instruction is parsed write " conventional characters district " as a new record;
Step S13-2: described the second pointer variable is done and is increased progressively rear execution in step 105.
17. method according to claim 1 is characterized in that,
Described step 104 specifically comprises:
Step 104-1: the described code conversion that parses is become the UCS-4 coding;
Step 104-2: be coded in the character pattern data of searching and read correspondence in the 3rd default memory block according to the UCS-4 after the conversion.
CN201210429782.1A 2012-10-31 2012-10-31 Method of displaying information Expired - Fee Related CN102981795B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210429782.1A CN102981795B (en) 2012-10-31 2012-10-31 Method of displaying information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210429782.1A CN102981795B (en) 2012-10-31 2012-10-31 Method of displaying information

Publications (2)

Publication Number Publication Date
CN102981795A true CN102981795A (en) 2013-03-20
CN102981795B CN102981795B (en) 2015-05-27

Family

ID=47855867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210429782.1A Expired - Fee Related CN102981795B (en) 2012-10-31 2012-10-31 Method of displaying information

Country Status (1)

Country Link
CN (1) CN102981795B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108776597A (en) * 2018-06-19 2018-11-09 深圳繁易电气有限公司 A method of the anti-flicker of screen being applied in man-machine interface start-up course

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040006547A1 (en) * 2002-07-03 2004-01-08 Dehlinger Peter J. Text-processing database
CN1889648A (en) * 2006-05-26 2007-01-03 深圳创维-Rgb电子有限公司 Method for realizing hidden captions display with screen menu type regulating mode
CN101178729A (en) * 2007-12-12 2008-05-14 北京中星微电子有限公司 Words display process in embedded system and system thereof
CN102141916A (en) * 2011-01-19 2011-08-03 深圳创维数字技术股份有限公司 Embedded equipment and method for displaying language word on OSD interface

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040006547A1 (en) * 2002-07-03 2004-01-08 Dehlinger Peter J. Text-processing database
CN1889648A (en) * 2006-05-26 2007-01-03 深圳创维-Rgb电子有限公司 Method for realizing hidden captions display with screen menu type regulating mode
CN101178729A (en) * 2007-12-12 2008-05-14 北京中星微电子有限公司 Words display process in embedded system and system thereof
CN102141916A (en) * 2011-01-19 2011-08-03 深圳创维数字技术股份有限公司 Embedded equipment and method for displaying language word on OSD interface

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108776597A (en) * 2018-06-19 2018-11-09 深圳繁易电气有限公司 A method of the anti-flicker of screen being applied in man-machine interface start-up course

Also Published As

Publication number Publication date
CN102981795B (en) 2015-05-27

Similar Documents

Publication Publication Date Title
CN103559184B (en) The display packing of forms pages and device
CN104166970A (en) Handwriting data file generating method and apparatus thereof, handwriting data file recovery display method and apparatus thereof, and electronic device
CN105138340A (en) Interaction method and system for Native and Web pages
CN103336690A (en) HTML (Hypertext Markup Language) 5-based text-element drawing method and device
CN101840373B (en) Data operating method and device
CN105874813A (en) Content-adaptive chunking for distributed transcoding
CN106529962A (en) Method and device used for enhancing hotspot account processing ability in trading system
KR20140037535A (en) Method and apparatus for creating e-book including user effects
CN102981795B (en) Method of displaying information
CN105513115B (en) Method and device for converting SWF into Canvas animation
CN105930390A (en) Relation-type database expansion method and relation-type database expansion system
CN107329765A (en) Program file processing method and processing device
CN106951254A (en) The method and device that similar traffic functional module is multiplexed in payment system
CN101770367B (en) Compressing method and compressing device of .NET file
CN109634569A (en) Process implementation method, device, equipment and readable storage medium storing program for executing based on note
CN102866985B (en) For data formatter and the method for on-line analysing processing system
CN109493228A (en) A kind of method and device generating stock news in brief model
CN106599008A (en) Method and device for loading and displaying commodity list based on waterfall flow mode, and client
CN107741833A (en) Storage method and device of nestable key-value
CN115048920A (en) Front-end data exporting method, device, equipment and storage medium
CN108874875A (en) The asynchronous loading method of web page contents, device, readable storage medium storing program for executing and terminal
CN114612065A (en) Associated equipment combination method, device, equipment and medium for process papermaking
CN107145947A (en) A kind of information processing method, device and electronic equipment
CN103065079A (en) Method for preventing fraudulent signing
CN104050195B (en) A kind of advertisement sticker processing method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150527

CF01 Termination of patent right due to non-payment of annual fee