Four, embodiment
Bar code is filtered turbid precise search engine terminal technology:
1. network inputted search item:
1.1 filtration key word:
Data message flow analysis based on key word; Analyzing its principal character character compares according to existing key word library (in build key word library); Self-filtering adopts the equals mode that network packet is intercepted, and the content of packet is carried out the key word comparison, is filled into the corresponding MD5 value (Message Digest Algorithm) of data message stream; Calculate whether it similar with internal database, judge whether to tackle its data.
1.2 pooled data stream:
Merge the data message stream that filters key word, adopt MD5 (Message Digest Algorithm) to mix connected mode, pooled data stream.
1.3 data stream is submitted server apparatus to
Data stream after having merged well can adopt Method cipher mode (POST) to server apparatus by wireless terminal device or PC hardware device or server mode.Adopt the more cipher mode of Security.Such as: submit data to through non-POST, information data may be exposed to presentation layer, and is stored in the buffer memory of other media, just causes insecurity once check buffer memory.In addition, use non-POST to submit to data also may cause Cross-site request forgery to attack.
2. server apparatus data interaction:
2.1 setting up database connects:
Set up each and show needed table space, adopt the SQL hardware standard according to the equipment otherness.Authorize for database inside search access right.Be connected to database.(set up the relevant inquiring table space.)
2.2 database inquiry optimization:
Carry out the optimization that dichotomy (dichotomy) and Hash (Hash) mutually combine for each data of needs inquiries.Thereby reach the accurate matching of input data, shorten the inquiry institute purpose of service time.
Dichotomy:
Binary chop is claimed binary search again, and it is the higher lookup method of a kind of efficient.
Binary chop requires: linear list is an ordered list, and promptly node is according to keywords orderly in the table, and will use the storage organization of vector as table.Might as well establish ordered list increases progressively orderly.
Hash:
HASH is mainly used in AES in the information security field; It changes into 128 mixed and disorderly coding to the information of some different lengths; These encoded radios are called the HASH value. we can say that also hash is exactly the mapping relations that find between a kind of data content and the deposit data address.
2.3 verification msg correctness:
Data are carried out secondary checksum verification data correctness by the MD5 mode once more.
MD5: to the concise and to the point narration of MD5 algorithm can for: MD5 handles the information of input with 512 groupings; And each divides into groups to be divided into again 16 32 seats and divides into groups; After having passed through a series of processing; The output of algorithm is formed by four 32, with generating 128 hashed values after these four 32 packet concatenation.
2.4 inner debugging mechanism:
When connection or optimization or validation failure, internal server equipment forms daily record (LogData) with the numbering of the timing error of automatic misregistration generation.Convenient inquiry, and can start corresponding inner debugging mechanism, repair frequent fault, guarantee data query stability and robustness.
2.5 ISN conversion:
According to the different language requirement of information flow ISSUER platform, the unified UTF8 ISN form that adopts.When outputing to presentation layer, can reduce the occurrence frequency of mess code, accomplish optimization output and the effect that improves output efficiency.
UTF8:UTF-8 is that a kind of elongated character code of UNICODE is claimed ten thousand country codes again, is created in 1992 by Ken Thompson.Be standardized as RFC 3629 now.UTF-8 is with 1 to 6 byte code UNICODE character.Being used in can the simplified traditional font of same page Chinese display and other language (like Japanese, the Korean) on the webpage
2.6 acquisition Query Result:
Character information data stream after will passing through verification and changing turns back on the target query terminal as Query Result.Adopt the mode of network or WIFI or other various wireless or wired (according to device requirements) to transmit.
3. the terminal inquiry result resolves:
3.1 network measuring verification:
By the terminal inter-area traffic interarea is carried out parity checking.(employing all be data stream to be regarded as 16 integers stream repeat stack and calculate.For calculate the check with, at first the check and field be changed to 0.Then, in the valid data scope each 16 carry out the one's complement summation, the result exists in check and the field, data length is that odd number is then mended a byte 0.After receiving data, equally each 16 figure place in the valid data scope are carried out the summation of one's complement.The take over party in computation process, comprised transmit leg exist in the stem check with, any mistake does not take place in stem in transmission course, take over party's result calculated should be complete 0 or complete 1.If the result is not complete 0 or complete 1, the expression error in data.)
3.2 output verification:
Whether the character that test will be exported is the UTF8 form, if not the UTF8 formatted request is made mistakes, inside then attempts using the mode of " 2.1 set up database connects " once more.(UTF8 explains and asks for an interview the conversion of 2.5 ISNs).
3.3 data-switching:
Adopt international eXtensible Markup Language mode to change traffic flow information, be delivered to the terminal presentation layer.
3.4 terminal output:
Use the eXtensible Markup Language mode data of having changed to carry out data exhibiting.To convert the bar code that compiles out according to certain rule to significant information, need experience scanning and decipher two processes.The color of object is by its catoptrical type decided; White object can reflect the visible light of various wavelength; Black object then absorbs the visible light of various wavelength, thus when light that the bar code scanner light source sends after reflection on the bar code, reflected light shines on the inner photoelectric commutator of barcode scanner; The reflected light signal that photoelectric commutator is different according to power converts corresponding electric signal to.