CN103455637A - License number search method and device - Google Patents

License number search method and device Download PDF

Info

Publication number
CN103455637A
CN103455637A CN2013104462382A CN201310446238A CN103455637A CN 103455637 A CN103455637 A CN 103455637A CN 2013104462382 A CN2013104462382 A CN 2013104462382A CN 201310446238 A CN201310446238 A CN 201310446238A CN 103455637 A CN103455637 A CN 103455637A
Authority
CN
China
Prior art keywords
car plate
key word
retrieval
index
condition
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
CN2013104462382A
Other languages
Chinese (zh)
Other versions
CN103455637B (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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201310446238.2A priority Critical patent/CN103455637B/en
Publication of CN103455637A publication Critical patent/CN103455637A/en
Application granted granted Critical
Publication of CN103455637B publication Critical patent/CN103455637B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a license number search method including the steps of A, adding location information of keywords of license numbers to each license number keyword index built by the Sphinx technique, B, receiving the license number search information input by users, C, building search conditions containing the license number keywords and locations of the keywords in the license numbers according to the search information input by the users, and searching in the license number keyword index according to the search conditions so as to determine search results. By the search technique, the search results can be more accurate while the search time is shorter.

Description

A kind of method and apparatus of car plate retrieval
Technical field
The present invention relates to searching field, relate in particular to a kind of method and apparatus of car plate retrieval.
Background technology
The standard " technical standard-T669.9: the identification of bayonet socket information, comparison, detection system technical requirement " of announcing according to the Ministry of Public Security, the time of information of vehicles inquiry response has following requirement:
A) accurately inquiry: certain condition established data in Query Database, query responding time should be not more than 3s; B) fuzzy query: in Query Database, containing having ready conditions uncertain data, query responding time should be not more than 6s.
In medium-sized or large-scale Gate System, the license board information of a year often reaches several hundred million even tens.Even carry out the fuzzy query of license board information in the information of tens several hundred million, existing recall precision is lower, and the user often needs to wait for a long time and just can get the license board information of needs.How can retrieve rapidly the needed license board information of user is the current problem solved that needs.
Summary of the invention
In view of this, the purpose of this invention is to provide a kind of method and apparatus of quick and precisely retrieving car plate.
For achieving the above object, the invention provides technical scheme as follows:
A kind of method of car plate retrieval, the method comprises the steps: that A, the car plate key word index that uses the Sphinx technology to set up to each increase the positional information of this key word in car plate; The retrieving information for car plate of B, reception user input; C, according to the retrieving information of user input, build the search condition that comprises car plate key word and the position of this key word in car plate, thereby and retrieved the deterministic retrieval result with described search condition in the car plate key word index.
Preferably, when in the car plate key word index, increasing the positional information of this key word in car plate, for the key word with identical initial character adds identical positional information.
Preferably, this search condition comprises when several retrieve sub-condition, each is retrieved sub-condition and comprises a car plate key word and the position of this key word in car plate, retrieve sub-condition with each and retrieved in the car plate key word index respectively, and these some result for retrieval are got to occur simultaneously and determine final result for retrieval.
Preferably, further increase the length information of car plate in described car plate key word index; Described search condition further comprises the length information of retrieving car plate.
Design based on same, the present invention also provides a kind of device of car plate retrieval, and this device comprises: index construct module, retrieving information receiver module and retrieval module; This index construct module, increase the positional information of this key word at car plate for the car plate key word index that uses the Sphinx technology to set up to each; The retrieving information receiver module, for receiving the retrieving information for car plate of user's input; Retrieval module, for the retrieving information according to user input, build the search condition that comprises car plate key word and the position of this key word in car plate, thereby and retrieved the deterministic retrieval result with described search condition in the car plate key word index.
Preferably, when this index construct module increases the positional information of this key word in car plate in the car plate key word index, for the key word index with identical initial character adds identical positional information.
Preferably, the search condition that retrieval module builds comprises when several retrieve sub-condition, each is retrieved sub-condition and comprises a car plate key word and the position of this key word in car plate, retrieval module is retrieved sub-condition with each and is retrieved in the car plate key word index respectively, and these some result for retrieval is got to occur simultaneously and determine final result for retrieval.
Preferably, this index construct module further further increases the length information of car plate in described car plate key word index; The search condition that described retrieval module builds further comprises the length information of retrieving car plate.
Compared with prior art, retrieval technique of the present invention will obtain result for retrieval more accurately, and consuming time shorter.
The accompanying drawing explanation
Fig. 1 is embodiment of the present invention process flow diagram.
Fig. 2 is embodiment of the present invention device building-block of logic.
Embodiment
Sphinx is a full-text search engine based on SQL, can be in conjunction with MySQL, and PostgreSQL does full-text search, and it can provide the function of search more professional than database itself, makes application program more easily realize specialized full-text search.Sphinx is in particular some script design search api interfaces, as PHP, and Python, Perl, Ruby etc. have also designed a storage engines plug-in unit for MySQL simultaneously.
The single index maximum of Sphinx can comprise 100,000,000 records, and the inquiry velocity under 1,000 ten thousand record cases is 0.x second (Millisecond).The speed that Sphinx creates index is: the index that creates 1,000,000 records only needs 3~4 minutes, and the index that creates 1,000 ten thousand records can complete in 50 minutes, and only comprises the increment index of up-to-date 100,000 records, rebuilds once and only needs tens seconds.
Use the Sphinx technology to set up the car plate key word index.The car plate of each n position will be set up (1+n) * n/2 bar key word index.Below take 7 car plates and describe as example.Such as for " Zhejiang A12345 " this car plate, the keyword message in the key word index of its foundation is as follows:
Key word
Zhejiang
Zhejiang A
Zhejiang A1
Zhejiang A12
Zhejiang A123
Zhejiang A1234
This A12345
A
A1
A12
A123
A1234
A12345
1
12
123
1234
12345
2
23
234
2345
3
34
345
4
45
5
Sphinx has set up index for the key word of likely being used.When the user uses the retrieval of accurate car plate, in the time of the fuzzy license plate retrieval, the record that Sphinx can quick-searching needs in index.
Although the velocity ratio of Sphinx retrieval is very fast, the result of retrieval is more than the actual needs sometimes.Such as the key word index that car plate " Zhejiang A12345 " and " Zhejiang A54321 " use Sphinx to set up of take is example.When the user wants to retrieve first character for " Zhejiang ", during car plate that last character be " 1 ", the retrieving information of user's input is " Zhejiang * 1 " (one or more character of * correspondence).When using the Sphinx retrieval, the search condition of using is that " ^ Zhejiang 1 " (^ means to match character and is positioned at the key word head, $ means to match character and is positioned at the key word afterbody), so the user can be retrieved the corresponding car plate of key word index " Zhejiang A1 ", and also the corresponding car plate of key word index " Zhejiang A54321 " can be retrieved.Tentation data only has " Zhejiang A12345 " and " Zhejiang A54321 " these two car plates in storehouse, these two car plates all can be retrieved out so.But, according to user's original idea, obviously " Zhejiang A12345 " is not its result of wanting.
For when using the retrieval of Sphinx technology, can obtain the result for retrieval that the user really wants, reduce the output that the user does not want result, the present invention proposes the Sphinx technology is carried out to improved method.Describe in detail by the following examples.
The method flow diagram of a kind of improved use Sphinx technology retrieval as shown in Figure 1.
S11, the car plate key word index that uses the Sphinx technology to set up to each increase the positional information of this key word in car plate.
When in the car plate key word index of setting up, increasing the positional information of this key word in car plate, for the key word index with identical initial character adds identical positional information.Still think that it is example that car plate " Zhejiang A12345 " is set up the Sphinx key word index, in the present embodiment, the Sphinx key word index of foundation following (Sphinx is that other fields that key word index is set up are ignored at this):
Figure BDA0000387250270000051
Figure BDA0000387250270000061
In above-mentioned example, the position that the position that the position of having supposed first character is 0, the second character is 1, the three character is 2, by that analogy.In fact positional information can also mean by other numerals or character, and the present invention is not limited in this respect.
The retrieving information for car plate of S12, reception user input.
S13, according to the retrieving information of user input, build the search condition that comprises car plate key word and the position of this key word in car plate, thereby and retrieved the deterministic retrieval result with described search condition in the car plate key word index.
After for the car plate of each acquisition, having set up the Sphinx key word index that comprises positional information, follow-up after user input is for the retrieving information of car plate the car plate indexing unit will utilize above-mentioned positional information to carry out retrieval.Such as the user has inputted the retrieving information of " Zhejiang * ", the car plate indexing unit will build following search condition: (key word: Zhejiang, position=0).When the user inputted " Zhejiang? H*1 " (? mean a character; * mean one or more character) retrieving information; the car plate indexing unit will be configured to following search condition and carry out retrieval in having increased the Sphinx key word index of positional information: (key word: Zhejiang, position=0) & (key word: H, position=2) & (key word: 1, position=6).This search condition comprises three sub-conditions of retrieval, is respectively (key word: Zhejiang, position=0), and (key word: H, position=2), (key word: 1, position=6).The car plate indexing unit, when carrying out retrieval, is retrieved sub-condition with each and is retrieved in the car plate key word index respectively, and these three result for retrieval are got to occur simultaneously obtains final result for retrieval.
Table 1 has provided other some examples, and has provided and the comparison that improves front Sphinx result for retrieval.
Figure BDA0000387250270000071
Table 1
By above-mentioned example, can find out, the retrieving information of user's input is in the Sphinx retrieval by before improving and the technology of the present invention retrieval, and some result for retrieval is identical, and the car plate retrieved is just the same; Some result for retrieval is the result for retrieval that is less than the Sphinx before improving of the present invention, and result for retrieval of the present invention is more accurate, more meets user's requirement.
Consider different car plate possibility length inconsistent (such as army's board is different with 7 common car plate length), so increase the length information of this car plate in the car plate key word index that can also further set up in the Sphinx technology.Carry out the car plate retrieval, in the search condition of structure, will further comprise length information, thereby carrying out retrieval more accurately.Owing to being exact matching, and only has one when carrying out the length coupling, so expending and not quite resource.But; generally, in dry illegal event, not too can utilize the car (disguise is too poor) of special car plate, usually can be with the car of 7 common licence plates; provide technically a kind of possibility so this optimization can only say, but advantage in actual applications may be also not obvious.
Design based on same, the present invention also provides a kind of device of car plate retrieval.Please refer to the drawing 2, this device comprises: index construct module, retrieving information receiver module and retrieval module; This index construct module, increase the positional information of this key word at car plate for the car plate key word index that uses the Sphinx technology to set up to each; The retrieving information receiver module, for receiving the retrieving information for car plate of user's input; Retrieval module, for the retrieving information according to user input, build the search condition that comprises car plate key word and the position of this key word in car plate, thereby and retrieved the deterministic retrieval result with described search condition in the car plate key word index.
When this index construct module increases the positional information of this key word in car plate in the car plate key word index, for the key word index with identical initial character adds identical positional information.
The search condition that this retrieval module builds comprises when several retrieve sub-condition, each is retrieved sub-condition and comprises a car plate key word and the position of this key word in car plate, retrieval module is retrieved sub-condition with each and is retrieved in the car plate key word index respectively, and these some result for retrieval is got to occur simultaneously and determine final result for retrieval.
The index construct module further further increases the length information of car plate in described car plate key word index; The search condition that described retrieval module builds further comprises the length information of retrieving car plate.When carrying out retrieval, only have those the consistent car plates of car plate length in the key word index of car plate length and foundation in search condition just can be retrieved out.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, be equal to replacement, improvement etc., within all should being included in the scope of protection of the invention.

Claims (10)

1. the method for a car plate retrieval, is characterized in that, the method comprises the steps:
A, the car plate key word index that uses the Sphinx technology to set up to each increase the positional information of this key word in car plate;
The retrieving information for car plate of B, reception user input;
C, according to the retrieving information of user input, build the search condition that comprises car plate key word and the position of this key word in car plate, thereby and retrieved the deterministic retrieval result with described search condition in the car plate key word index.
2. the method for claim 1, is characterized in that, when in the car plate key word index, increasing the positional information of this key word in car plate, for the key word with identical initial character adds identical positional information.
3. method as claimed in claim 2, it is characterized in that, described search condition comprises when several retrieve sub-condition, each is retrieved sub-condition and comprises a car plate key word and the position of this key word in car plate, retrieve sub-condition with each and retrieved in the car plate key word index respectively, and these some result for retrieval are got to occur simultaneously and determine final result for retrieval.
4. the method for claim 1, is characterized in that, the key word index that the Sphinx technology is set up for a n position car plate is (1+n) * n/2 bar.
5. the method for claim 1, is characterized in that, further increases the length information of car plate in described car plate key word index; Described search condition further comprises the length information of retrieving car plate.
6. the device of a car plate retrieval, is characterized in that, this device comprises: index construct module, retrieving information receiver module and retrieval module;
This index construct module, increase the positional information of this key word at car plate for the car plate key word index that uses the Sphinx technology to set up to each;
The retrieving information receiver module, for receiving the retrieving information for car plate of user's input;
Retrieval module, for the retrieving information according to user input, build the search condition that comprises car plate key word and the position of this key word in car plate, thereby and retrieved the deterministic retrieval result with described search condition in the car plate key word index.
7. car plate indexing unit as claimed in claim 6, it is characterized in that, when described index construct module increases the positional information of this key word in car plate in the car plate key word index, for the key word index with identical initial character adds identical positional information.
8. car plate indexing unit as claimed in claim 7, it is characterized in that, the search condition that described retrieval module builds comprises when several retrieve sub-condition, each is retrieved sub-condition and comprises a car plate key word and the position of this key word in car plate, retrieval module is retrieved sub-condition with each and is retrieved in the car plate key word index respectively, and these some result for retrieval is got to occur simultaneously and determine final result for retrieval.
9. car plate indexing unit as claimed in claim 6, is characterized in that, the key word index that the Sphinx technology is set up for a n position car plate is (1+n) * n/2 bar.
10. car plate indexing unit as claimed in claim 6, is characterized in that, described index construct module further further increases the length information of car plate in described car plate key word index; The search condition that described retrieval module builds further comprises the length information of retrieving car plate.
CN201310446238.2A 2013-09-25 2013-09-25 A kind of method and apparatus of license number search Active CN103455637B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310446238.2A CN103455637B (en) 2013-09-25 2013-09-25 A kind of method and apparatus of license number search

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310446238.2A CN103455637B (en) 2013-09-25 2013-09-25 A kind of method and apparatus of license number search

Publications (2)

Publication Number Publication Date
CN103455637A true CN103455637A (en) 2013-12-18
CN103455637B CN103455637B (en) 2017-06-13

Family

ID=49738000

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310446238.2A Active CN103455637B (en) 2013-09-25 2013-09-25 A kind of method and apparatus of license number search

Country Status (1)

Country Link
CN (1) CN103455637B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679829A (en) * 2015-01-28 2015-06-03 北京易华录信息技术股份有限公司 Quick search method and apparatus of license plate numbers
CN105589862A (en) * 2014-10-21 2016-05-18 杭州华为企业通信技术有限公司 License plate data index structure building method, retrieval method and device
CN109033435A (en) * 2018-08-14 2018-12-18 安徽云才信息技术有限公司 It is a kind of to search for method generally across micro services
CN109961632A (en) * 2017-12-26 2019-07-02 浙江宇视科技有限公司 A kind of quick search in a manner of routing crosses the method and device of vehicle record
CN110968648A (en) * 2018-09-28 2020-04-07 北京淘友天下技术有限公司 Efficient human vein indexing method based on SphinxMySQL

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080228578A1 (en) * 2007-01-25 2008-09-18 Governing Dynamics, Llc Digital rights management and data license management
CN102024047A (en) * 2010-12-14 2011-04-20 青岛普加智能信息有限公司 Data searching method and device thereof
CN103034734A (en) * 2012-12-27 2013-04-10 上海顶竹通讯技术有限公司 File storage and inquiry agency and information searching method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080228578A1 (en) * 2007-01-25 2008-09-18 Governing Dynamics, Llc Digital rights management and data license management
CN102024047A (en) * 2010-12-14 2011-04-20 青岛普加智能信息有限公司 Data searching method and device thereof
CN103034734A (en) * 2012-12-27 2013-04-10 上海顶竹通讯技术有限公司 File storage and inquiry agency and information searching method and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589862A (en) * 2014-10-21 2016-05-18 杭州华为企业通信技术有限公司 License plate data index structure building method, retrieval method and device
CN104679829A (en) * 2015-01-28 2015-06-03 北京易华录信息技术股份有限公司 Quick search method and apparatus of license plate numbers
CN109961632A (en) * 2017-12-26 2019-07-02 浙江宇视科技有限公司 A kind of quick search in a manner of routing crosses the method and device of vehicle record
CN109033435A (en) * 2018-08-14 2018-12-18 安徽云才信息技术有限公司 It is a kind of to search for method generally across micro services
CN110968648A (en) * 2018-09-28 2020-04-07 北京淘友天下技术有限公司 Efficient human vein indexing method based on SphinxMySQL

Also Published As

Publication number Publication date
CN103455637B (en) 2017-06-13

Similar Documents

Publication Publication Date Title
US11176124B2 (en) Managing a search
CN103455637A (en) License number search method and device
AU2013360077B2 (en) Systems and methods for computer assisted dispatch, incident report-based video search and tagging
CN104392005A (en) Automobile rapid loss setting method
US20130311506A1 (en) Method and apparatus for user query disambiguation
CN112989412A (en) Data desensitization method and device based on SQL statement analysis
CN110570264A (en) Unmanned aerial vehicle data evidence obtaining system and method based on block chain
CN110457346A (en) Data query method, apparatus and computer readable storage medium
CN105302869B (en) HBase secondary index query and storage system and query method thereof
US11609897B2 (en) Methods and systems for improved search for data loss prevention
CN104462347B (en) The sorting technique and device of keyword
CN104679764A (en) Method and device for searching graph data
CN106484788A (en) Patent search system based on industry keyword
CN103516801A (en) Information query system
CN112597192A (en) Data query method, device, server and medium
CN109165342A (en) Environmentally friendly laws and regulations data capture method, system and relevant device
CN112785266A (en) Electronic archive detection management system
CN105183729A (en) Method and device for retrieving audio/video content
US11146571B2 (en) Data transmission method, apparatus, terminal device, and medium
CN107633094B (en) Method and device for data retrieval in cluster environment
WO2023039075A1 (en) Systems and methods for high volume processing support of electronic signature tracking
CN112612817B (en) Data processing method, device, terminal equipment and computer readable storage medium
CN115470255A (en) Information retrieval analysis system based on data processing
CN109670114B (en) Drawing rule recommendation method and device
CN104899755A (en) Multi-dimensional complex condition advertisement indexing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Huang Jun

Inventor after: Zhang Pengguo

Inventor before: Huang Jun

CB03 Change of inventor or designer information