A kind of isomery address standard handovers and matching process
Technical field
The invention belongs to area of geographic information, it is related to a kind of isomery address standard handovers and matching process.
Background technology
With the development of big data, address cloud platform is external application, service platform based on space criteria address, is realized
The real-time extraction of business datum, cleaning, matching, upper figure, system by positive, negative relational matching, realize business datum it is complete on
Figure, and thematic charting and issue are carried out to the business datum after upper figure, individual demand of all trades and professions to map is served, beat
Make the exclusive map of every profession and trade.Address matching be the description address of character property is set up with the geographical position coordinates in its space it is right
The process that should be related to.Address matching service is that address search matches object according to specific step.First have to Address Standardization;
Then server search address matching reference data, searches potential position;It is each candidate according to the degree of closeness with address
Score value is specified in position, and this address is finally matched with score value highest.
CN 105005577 discloses a kind of address matching process, and it takes the matching process of Progression and hierarchy formula, specific bag
Include Rapid matching, longitude and latitude matching, fuzzy matching and manually judge four steps, Rapid matching is carried out to high-quality destination address
Accurately mate, with the appropriate complementary matching of chain type added machinery;The longitude and latitude that longitude and latitude matching is provided according to mapping service provider
Degree information is matched to destination address and its adjacent cell;Fuzzy matching is with fuzzy index to destination address and similar cell
Matched;Artificial decision mechanism is tested and is checked on to the result for matching.The invention its also include address participle technique and
Address matches the confidence index mechanism of accuracy.Although the invention has used multiaddress (multi-address) matching technique composite application problem, but
It is that address is standardized, therefore, it is difficult to adapt to demand of the different field to address.
The content of the invention
The invention provides a kind of isomery address standard handovers and matching process, it is difficult to standardize to solve address, adapts to
Property not strong, accuracy rate deficiency not high.
To achieve the above object, the invention provides a kind of isomery address standard handovers and matching process, including following step
Suddenly:
Step 1:Checking data validation:Step S2 is performed if data are legal, otherwise, direct throw exception performs knot
Beam;
Step 2:Judge the positive matching of data, if then obtaining matching administrative division message identification, and carry out positive matching;
If data are unsatisfactory for positive matching, negative relational matching is carried out;
Step 3:Judge that the forward direction in step 2 is matched or whether the result of negative relational matching is empty, if matching result is for sky
Throw exception, execution terminates;If matching result is not sky, matching result information data is obtained;
Step 4:Match management area under one's jurisdiction is judged whether according to the matching result information data in step 3, is carried out if meeting
Ownership matching returns again to result;Otherwise direct returning result, execution terminates.
Preferably, the specific steps of the positive matching are followed successively by:
S11:According to the incoming detailed location information of data, the legitimacy of provinces and cities' district Information Authentication data, if data are legal
Carry out step S12;If data are illegal, direct throw exception, execution terminates;
S12:Data be divided into the information data of the other conditions such as information point, detailed location information data, provinces and cities district;
Administrative division completion and standardization field treatment are carried out if information data of the data for provinces and cities district;
S13:Judge incoming data whether simultaneously without information point and detailed location according to step S12;If incoming data are same
When there is no information point and detailed location, then perform without detailed location and information point treatment and returning result;If incoming data are information point
Or detailed location information, then correspondingly execution information Point matching and detailed location match.
Further, the step of administrative division completion and standardization field are processed is followed successively by:
S121:By incoming data carry out splicing assembling inquiry address, the address include provinces and cities district, small towns, neighbourhood committee,
Jie Lu lanes;
S122:The address of the splicing is split, correspondence phrase is obtained;
S123:It is defined by selected administrative division, solves administrative division collision problem;
S124:Solr address lookups are performed, to provinces and cities' district field completion, standardized phrase list after participle is obtained.
Further, the step of administrative division completion and standardization field are processed also includes standardization ground again
Location, is followed successively by:
First, normal address SolrBean is obtained;
Then according to word type standardization administrative district address, and return to normal address Solr objects;If described Solr pairs
As in the absence of or there is a plurality of, inquiry upper level address, if do not found, continue to inquire about upper level address until Solr objects only
One;
Finally, whether criterion address whether there is and match nearest address, if then matching nearest address, specially
Door is matched for doorplate, unit, room;If not existing nearest address, the standard value SolrBean for obtaining is returned.
Preferably, the concretely comprising the following steps without detailed location and information point in the step S13:
S131:Again standardized address, sets and returns the administrative region normal address of minimal level;
S132:Judge that the normal address for returning whether there is:If in the presence of, matching rate score is set, then obtain minimum level
The normal address information of other administrative division, obtains ultimate criterion address information;If not existing, throw exception treatment, execution terminates.
Preferably, the step of described information Point matching is followed successively by:
First determine whether that information point normal address whether there is, if in the presence of, the normal address information according to information point is performed,
If not existing, detailed location matching is performed;
Then according to the normal address information for obtaining, administrative division code and title are set;
Finally carry out matching rate to walk around, obtain finally returning that result object data.
7. a kind of isomery address standard handovers and matching process according to claim 2 or 4, it is characterised in that institute
State the step of detailed location matches and be followed successively by:
Administrative division collision problem is solved first;
Then according to address extension object completion phrase list;
Next carries out standardized address again, sets and return the administrative division normal address of minimal level;
Then judge that the normal address for returning whether there is, if not finding administrative division normal address, at throw exception
Reason, judges whether longitude and latitude is all zero if it there is normal address:If latitude and longitude coordinates are all zero, upper level standard is up looked for
Address is until obtain normal address data;If latitude and longitude coordinates are not zero, normal address data are obtained;
Then whether criterion address date need to only match a record, if then setting matching rate, set and return to knot
Fruit object, obtains matching result object data;If being not required to one record of matching, solr inquiries are performed, match a plurality of result, obtained
To matching result object data;
Finally according to matching result object data, the administrative division code and title, returning result are set.
Preferably, the step of negative relational matching is:
Longitude and latitude XY coordinates, search radius are input into first;
Then according to the nearest information point of longitude and latitude XY coordinates, search radius detection range;
Whether information point is had in final search radius, if the nearest information point address information of the layback in the presence of if, then
Returning result;If not existing, it is that the result object for not matching proper address returns again to result that setting obtains matching status.
Preferably, the specific steps of the ownership matching are followed successively by:
Incoming address fragment object-related information, comprising administrative division code, management jurisdiction code, longitude and latitude;
Judge whether to need " ownership matching ", returning result object and returning result are set if without ownership matching, if
Ownership matching is needed, then determines whether to manage jurisdiction code:If there is management jurisdiction code, searched according to management jurisdiction code
Management area under one's jurisdiction relevant information, sets returning result object and returning result, if not finding management jurisdictional information, is managed
Jurisdictional information is inquired about.
Further, what the management area under one's jurisdiction was inquired about concretely comprises the following steps:
Administrative the encoding list is assembled according to address fragment objects first, is put in order from small to large with administrative division, judged
Whether administrative division code listing size is more than 1:If code listing is drawn in administrative division is not more than 1, according to incoming latitude and longitude coordinates
Solr space queryings are carried out, the minimum management jurisdictional information for being matched, the minimum management jurisdictional information that will be obtained is set to return
Return result object and returning result;If administrative division code listing is more than 1, execution " takes according to incoming administrative the encoding list
1st, it is managed area under one's jurisdiction incidence relation and inquires about ";
Then judge whether root management area under one's jurisdiction incidence relation inquiry has result:If coming to nothing, perform " from administrative division
Current administrative division code is removed in code column, new administrative division list is obtained ", it is then back to " the judgement administration
Whether zoning code listing size is more than 1 " step;If inquiry has result, judge whether unique;
If Query Result uniquely if obtain manage jurisdictional information, will management jurisdictional information be set to returning result object and return
Return result;If Query Result is not unique, judge whether management area under one's jurisdiction incidence relation is Jie Lu lanes rank:If Jie Lu lanes level
Not, then administrative coding is gradually judged downwards until matching the management jurisdictional information of minimum, the minimum management area under one's jurisdiction letter that will be obtained
Breath is set to returning result object and returning result;If not Jie Lu lanes rank, then " moved in administrative division code column described in return
Except current administrative division code " step.
The beneficial effects of the invention are as follows:
1st, configuration service data (database, table or other forms data) are facilitated by instrument, specifies occurrence and matching
Output item;
2nd, the forward and reverse matching of address is capable of achieving by service, to matching result evaluation;Ownership matching can improve routine
The accuracy of forward direction matching.
3rd, requirement of the met different field of administrative division completion and standardization field treatment to address, improves address
Adaptability, can export into thematic maps table by matching result;.
4th, multistage matching process and Returning process is provided with, the result to single association and various associations carries out effective district
Point, serious forgiveness is higher, improves the accuracy of matching.
Brief description of the drawings
Fig. 1 is the general flow chart of address matching process of the invention;
Fig. 2 is the flow chart of positive matching process of the invention;
Fig. 3 is the flow chart of administrative division completion of the invention and standardization field treatment;
Fig. 4 is the flow chart of standardized address again of the invention;
Fig. 5 is the flow chart without detailed location and information point of the invention;
Fig. 6 is the flow chart of information Point matching of the invention;
Fig. 7 is the flow chart of detailed location matching of the invention;
Fig. 8 is the flow chart of negative relational matching of the invention;
Fig. 9 is the flow chart of ownership matching of the invention.
Specific embodiment
In order to be better understood from technical scheme proposed by the invention, below in conjunction with the accompanying drawings with specific embodiment to this hair
It is bright to be further elaborated.
As shown in figure 1, a kind of isomery address standard handovers and matching process, it is characterised in that in turn include the following steps:
Step 1:Checking data validation:If whether incoming information is verified not comprising address information, if data are closed
Rule performs step S2, and otherwise, direct throw exception, execution terminates;
Step 2:Judge the positive matching of data, if then obtaining matching administrative division message identification, and carry out positive matching;
If data are unsatisfactory for positive matching, negative relational matching is carried out;
Step 3:Judge whether the result that the positive matching in S2 or direction match is empty, is dished out if matching result is for sky
Abnormal, execution terminates;If matching result is not sky, matching result information data is obtained;
Step 4:Matching result information data in S3 judges whether match management area under one's jurisdiction, is belonged to if meeting
Matching returns again to result;Otherwise direct returning result, execution terminates.
1st, positive matching
As shown in Fig. 2 the specific steps of the positive matching are followed successively by:
S11:According to the legitimacy of the other conditions Information Authentication data such as the incoming detailed location information of data, provinces and cities district, if
Data are legal, carry out step S12;If data are illegal, direct throw exception, execution terminates;
S12:Data be divided into the information data of the other conditions such as information point, detailed location information data, provinces and cities district;
Administrative division completion and standardization field treatment are carried out if the information data that data are the other conditions such as provinces and cities district;
S13:Judge incoming data whether simultaneously without information point and detailed location according to step 12;If incoming data are simultaneously
There is no information point and detailed location, then perform without detailed location and information point treatment and returning result;If incoming data be information point or
Detailed location information, then correspondingly execution information Point matching and detailed location match.
1.1 administrative division completions and standardization field treatment
As shown in figure 3, administrative division completion and standardization field are followed successively by the step for the treatment of:
S121:By incoming data carry out splicing assembling inquiry address, the address include provinces and cities district, small towns, neighbourhood committee,
Jie Lu lanes;
S122:The address of the splicing is split, correspondence phrase is obtained;
S123:It is defined by selected administrative division, solves administrative division collision problem;
S124:Solr address lookups are performed, to provinces and cities' district field completion, standardized phrase list after participle is obtained.
1.2 standardized address again
As shown in figure 4, again standardized address the step of be:
First, normal address SolrBean is obtained;
Then according to word type standardization administrative district address, and return to normal address Solr objects;If described Solr pairs
As in the absence of or there is a plurality of, inquiry upper level address, if do not found, continue to inquire about upper level address until Solr objects only
One;Finally, whether criterion address whether there is and match nearest address, if then matching nearest address, special pin
Doorplate, unit, room are matched;If not existing nearest address, the standard value SolrBean for obtaining is returned.
1.3 without detailed location and information point
As shown in figure 5, concretely comprising the following steps without detailed location and information point:
S131:Again standardized address, sets and returns the administrative region normal address of minimal level;
S132:Judge that the normal address for returning whether there is:If in the presence of, matching rate score is set, then obtain minimum level
The normal address information of other administrative division, obtains ultimate criterion address information;If not existing, throw exception treatment, execution terminates.
1.4 information Point matchings
As shown in fig. 6, information Point matching is concretely comprised the following steps:
First determine whether that information point normal address whether there is, if in the presence of, the normal address information according to information point is performed,
If not existing, detailed location matching is performed;
Then according to the normal address information for obtaining, administrative division code and title are set;
Finally carry out matching rate to walk around, obtain finally returning that result object data.
1.5 detailed location matchings
As shown in fig. 7, the step of location matches in detail is followed successively by:
Administrative division collision problem is solved first;Then according to address extension object completion phrase list;Next carries out weight
New standardized address, sets and returns the administrative division normal address of minimal level;Then judge return normal address whether
In the presence of if not finding administrative division normal address, whether all throw exception treatment judge longitude and latitude if it there is normal address
It is zero:If latitude and longitude coordinates are all zero, upper level normal address is up looked for until obtaining normal address data;If longitude and latitude is sat
Mark is not zero, and obtains normal address data;
Then whether criterion address date need to only match a record, if then setting matching rate, set and return to knot
Fruit object, obtains matching result object data;If being not required to one record of matching, solr inquiries are performed, match a plurality of result, obtained
To matching result object data;
Finally according to matching result object data, the administrative division code and title, returning result are set.
2nd, negative relational matching:
As shown in figure 8, negative relational matching is concretely comprised the following steps:
Longitude and latitude XY coordinates, search radius are input into first;
Then the nearest information point of detection range;Can search for closest in buffering area by solr spacing query methods
Information point.Secondly, whether there is information point in search radius, if the nearest information point address information of the layback in the presence of and if return
As a result, if not existing, it is that the result object for not matching proper address returns again to result that setting obtains matching status.
3rd, ownership matching
As shown in figure 9, the specific steps of ownership matching are followed successively by:
Incoming address fragment object-related information, comprising administrative division code, management jurisdiction code, longitude and latitude;
Judge whether to need " ownership matching ", returning result object and returning result are set if without ownership matching, if
Ownership matching is needed, then determines whether to manage jurisdiction code:If there is management jurisdiction code, searched according to management jurisdiction code
Management area under one's jurisdiction relevant information, sets returning result object and returning result, if not finding management jurisdictional information, is managed
Jurisdictional information is inquired about.
3.1 management jurisdictional information inquiries
Concretely comprise the following steps:
Administrative the encoding list is assembled according to address fragment objects first, is put in order from small to large with administrative division, judged
Whether administrative division code listing size is more than 1:If code listing is drawn in administrative division is not more than 1, according to incoming latitude and longitude coordinates
Solr space queryings are carried out, the minimum management jurisdictional information for being matched, the minimum management jurisdictional information that will be obtained is set to return
Return result object and returning result;If administrative division code listing is more than 1, execution " takes according to incoming administrative the encoding list
1st, it is managed area under one's jurisdiction incidence relation and inquires about ";
Then judge whether root management area under one's jurisdiction incidence relation inquiry has result:If coming to nothing, perform " from administrative division
Current administrative division code is removed in code column, new administrative division list is obtained ", it is then back to " the judgement administration
Whether zoning code listing size is more than 1 " step;If inquiry has result, judge whether unique;
If Query Result uniquely if obtain manage jurisdictional information, will management jurisdictional information be set to returning result object and return
Return result;If Query Result is not unique, judge whether management area under one's jurisdiction incidence relation is Jie Lu lanes rank:If Jie Lu lanes level
Not, then administrative coding is gradually judged downwards until matching the management jurisdictional information of minimum, the minimum management area under one's jurisdiction letter that will be obtained
Breath is set to returning result object and returning result;If not Jie Lu lanes rank, then " moved in administrative division code column described in return
Except current administrative division code " step.
The announcement and teaching of book according to the above description, those skilled in the art in the invention can also be to above-mentioned embodiment party
The correlation module and software architecture of formula make adaptability change and change.Therefore, the invention is not limited in being disclosed above and describe
Specific embodiment, to invent some modifications and changes should also be as falling into scope of the claims of the invention.
Although additionally, used some specific terms in this specification, these terms merely for convenience of description, not to this hair
It is bright to constitute any limitation.