CN110704564B - Address error correction method and device - Google Patents
Address error correction method and device Download PDFInfo
- Publication number
- CN110704564B CN110704564B CN201910925029.3A CN201910925029A CN110704564B CN 110704564 B CN110704564 B CN 110704564B CN 201910925029 A CN201910925029 A CN 201910925029A CN 110704564 B CN110704564 B CN 110704564B
- Authority
- CN
- China
- Prior art keywords
- address
- address information
- target
- undirected graph
- entries
- 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.)
- Active
Links
- 238000012937 correction Methods 0.000 title claims abstract description 53
- 238000000034 method Methods 0.000 title claims abstract description 49
- 238000012795 verification Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 10
- 230000011218 segmentation Effects 0.000 claims description 9
- 230000002457 bidirectional effect Effects 0.000 abstract description 14
- 238000010586 diagram Methods 0.000 description 15
- 238000012545 processing Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 238000010276 construction Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012015 optical character recognition Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000002243 precursor Substances 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/08—Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q10/083—Shipping
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Economics (AREA)
- General Physics & Mathematics (AREA)
- Human Resources & Organizations (AREA)
- Entrepreneurship & Innovation (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- Operations Research (AREA)
- General Business, Economics & Management (AREA)
- Marketing (AREA)
- Quality & Reliability (AREA)
- Development Economics (AREA)
- Remote Sensing (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses an address error correction method and device, and relates to the technical field of computers. One embodiment of the method comprises the following steps: acquiring target address information, and dividing the target address information into a first part and a second part; forward searching is carried out in a pre-constructed address undirected graph to obtain address entries which are the same as the lowest level administrative region address in the first part and serve as reference address entries; respectively comparing the address entries belonging to the reference address entries in the address undirected graph with the second part; and if the address entry is not identical to the second part, performing reverse search in the address undirected graph according to the second part so as to correct the target address information according to a reverse search result. According to the method, after the target address information is divided, bidirectional retrieval is carried out by combining the address undirected graph, and the target address information is automatically corrected according to a reverse retrieval result, so that delivery failure caused by address errors is avoided.
Description
Technical Field
The present invention relates to the field of computers, and in particular, to an address error correction method and apparatus.
Background
Currently, a logistics distribution party generally directly adopts addresses filled in or selected by a user when the user places an order for logistics distribution. However, when the user places an order, the user fills in or frequently has error information in the selected receiving address, and the dispatcher finds that the address has error in the process of dispatching the package according to the address, only the package can be sent back to the site for dispatching again, or the user can directly do return processing.
In the process of implementing the present invention, the inventor finds that at least the following problems exist in the prior art: the prior art does not provide effective address correction and does not verify the complete address that the user filled in, or selected.
Disclosure of Invention
In view of this, an embodiment of the present invention provides an address error correction method and apparatus, which divide target address information, perform bidirectional search in combination with an address undirected graph, and automatically correct the target address information according to a reverse search result, so as to avoid delivery failure caused by address error.
To achieve the above object, according to one aspect of an embodiment of the present invention, there is provided an address error correction method.
The address error correction method of the embodiment of the invention comprises the following steps: acquiring target address information, and dividing the target address information into a first part and a second part; the first part comprises an administrative area address, and the second part is the address information of the first part divided by the target address information; forward searching is carried out in a pre-constructed address undirected graph to obtain address entries which are the same as the lowest level administrative region address in the first part and serve as reference address entries; the address undirected graph is obtained by dividing a plurality of pieces of reference address information into multi-level address entries respectively, and then correlating the address entries according to the levels; respectively comparing the address entries belonging to the reference address entries in the address undirected graph with the second part; and if the address entry is not identical to the second part, performing reverse search in the address undirected graph according to the second part so as to correct the target address information according to a reverse search result.
Optionally, after dividing the plurality of pieces of reference address information into multi-stage address entries, associating the address entries according to the grades to obtain an address undirected graph, including: dividing the pieces of reference address information according to the positions of the set feature words in the pieces of reference address information to obtain a plurality of corresponding address entries; associating address entries belonging to the same reference address information according to the grades to construct the address undirected graph; wherein a node of the address undirected graph represents an address entry.
Optionally, the correcting the target address information according to the reverse search result includes: and arranging the reverse search results in a reverse order to obtain complete address information, and replacing the target address information by using the complete address information.
Optionally, the dividing the target address information into a first portion and a second portion includes: dividing the target address information according to the position of the feature words in the target address information; the segmentation result is taken as a first part except for the last part, and the last part is taken as a second part.
Optionally, the method further comprises: acquiring the plurality of pieces of reference address information to construct an address information base; wherein the reference address information is identity card address information; checking the complete address information according to the reference address information in the address information base; said replacing the target address information with the complete address information comprises: and in the case of verification passing, replacing the target address information with the complete address information.
Optionally, the method further comprises: and outputting verification failure information to prompt a user to modify the target address information under the condition that verification fails.
Optionally, the feature words include a combination of any of province, city, district, county, town, street.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an address error correction apparatus.
An address error correction device according to an embodiment of the present invention includes: the dividing module is used for acquiring target address information and dividing the target address information into a first part and a second part; the first part comprises an administrative area address, and the second part is the address information of the first part divided by the target address information; the searching module is used for carrying out forward searching in the pre-constructed address undirected graph so as to obtain an address entry which is the same as the lowest level administrative region address in the first part and is used as a reference address entry; the address undirected graph is obtained by dividing a plurality of pieces of reference address information into multi-level address entries respectively, and then correlating the address entries according to the levels; the comparison module is used for respectively comparing the address entries belonging to the reference address entries in the address undirected graph with the second part; and the correction module is used for carrying out reverse search in the address undirected graph according to the second part when no address entry is identical to the second part, so as to correct the target address information according to a reverse search result.
Optionally, the apparatus further comprises: the construction module is used for dividing the plurality of pieces of reference address information respectively according to the positions of the set feature words in the plurality of pieces of reference address information to obtain a plurality of corresponding address entries; and associating address entries belonging to the same reference address information according to the grades to construct the address undirected graph; wherein a node of the address undirected graph represents an address entry.
Optionally, the correction module is further configured to: and arranging the reverse search results in a reverse order to obtain complete address information, and replacing the target address information by using the complete address information.
Optionally, the dividing module is further configured to: dividing the target address information according to the position of the feature words in the target address information; and taking the last part as a second part in the segmentation result except the last part as a first part.
Optionally, the apparatus further comprises: the verification module is used for acquiring the plurality of pieces of reference address information to construct an address information base; wherein the reference address information is identity card address information; checking the complete address information according to the reference address information in the address information base; the correction module is further configured to: and in the case of verification passing, replacing the target address information with the complete address information.
Optionally, the apparatus further comprises: and the prompting module is used for outputting verification failure information under the condition of verification failure so as to prompt a user to modify the target address information.
Optionally, the feature words include a combination of any of province, city, district, county, town, street.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided an electronic device.
An electronic device according to an embodiment of the present invention includes: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize an address error correction method of the embodiment of the invention.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable medium.
A computer readable medium of an embodiment of the present invention has stored thereon a computer program which, when executed by a processor, implements an address error correction method of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: after dividing the target address information, combining the address undirected graph to perform bidirectional retrieval, and automatically correcting the target address information according to a reverse retrieval result to avoid delivery failure caused by address errors; segmenting reference address information according to feature words, and further constructing an address undirected graph, so that bidirectional retrieval is convenient to follow; the complete address information obtained by reverse retrieval results is used for correcting the target address information, so that the accuracy of the address is ensured, the user operation is not needed, and the user experience is improved; dividing target address information according to feature words to obtain a first part and a second part, and further combining an address undirected graph to perform bidirectional retrieval and address correction, so that the accuracy of the corrected address is ensured; the provincial certificate address information is used as reference address information, and the complete address information is checked, so that the accuracy of the corrected address is further ensured; and feature words are selected based on the characteristics of the address information, so that the subsequent address information segmentation is facilitated.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of main steps of an address error correction method according to a first embodiment of the present invention;
FIG. 2 is a schematic flow chart of an address error correction method according to a second embodiment of the invention;
FIG. 3 is a schematic diagram of an address undirected graph according to a second embodiment of the present invention;
FIG. 4 is a schematic flow chart of an address error correction method according to a third embodiment of the present invention;
FIG. 5 is a schematic diagram of the main blocks of an address error correction device according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 7 is a schematic structural diagram of a computer device suitable for use in an electronic apparatus to implement an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of main steps of an address error correction method according to a first embodiment of the present invention. As shown in fig. 1, the address error correction method according to the first embodiment of the present invention mainly includes the following steps:
step S101: acquiring target address information, and dividing the target address information into a first part and a second part; the first part comprises an administrative area address, and the second part is the address information of the first part divided in the target address information. Target address information input or selected by a user is acquired, the target address information is segmented according to the position of the set feature words in the target address information, and the address information except the last part in the segmentation result is used as a first part and the address information of the last part is used as a second part. The feature words are selected based on the characteristics of the address information, such as any combination of provinces, cities, regions, counties, towns and streets.
Step S102: forward searching is carried out in a pre-constructed address undirected graph to obtain address entries which are the same as the lowest level administrative region address in the first part and serve as reference address entries; the address undirected graph is obtained by dividing a plurality of pieces of reference address information into multi-level address entries respectively, and then correlating the address entries according to the levels. The reference address information is correct address information, and an address undirected graph is constructed in advance based on a plurality of pieces of reference address information, and each node of the address undirected graph represents an address entry. And acquiring an address entry which is the same as the lowest-level administrative region address in the first part from the address undirected graph, and taking the address entry as a reference address entry.
Step S103: and respectively comparing the address entries belonging to the standard address entries in the address undirected graph with the second part. Searching address entries belonging to the standard address entries in the address undirected graph, namely searching all sub-nodes belonging to the standard address entries, respectively comparing each sub-node with a second part of the target address information, and if the sub-node exists and is the same as the second part, considering that the first part and the second part in the target address information are matched without correction; if there is no child node identical to the second portion, then the first portion and the second portion of the target address information are considered to be mismatched and need to be corrected.
Step S104: and if the address entry is not identical to the second part, performing reverse search in the address undirected graph according to the second part so as to correct the target address information according to a reverse search result. Searching a child node which is the same as the second part of the target address information in the address undirected graph, performing reverse search from the child node until reaching the root node, and performing reverse order arrangement on reverse search results to obtain complete address information, and replacing the target address information by the complete address information to finish address error correction.
Fig. 2 is a main flow chart of an address error correction method according to a second embodiment of the invention. As shown in fig. 2, the address error correction method in the second embodiment of the present invention mainly includes the following steps:
Step S201: multiple pieces of reference address information are acquired to construct an address information base. The reference address information is correct address information, and the address information with no verification error can be used as the reference address information, and the identity card address information can also be used as the reference address information. Taking the reference address information as the identity card address information as an example, utilizing OCR (Optical Character Recongnition) identification technology to identify the identity card, the reference address information can be obtained, and the reference address information is stored in an address information base.
Step S202: after dividing a plurality of pieces of reference address information of an address information base into a plurality of levels of address entries, respectively, correlating the address entries according to the levels to construct an address undirected graph. Dividing each piece of reference address information according to the position of the set feature word in each piece of reference address information to obtain a plurality of corresponding address entries; and then, according to the grade, the address entries belonging to the same reference address information are associated, and the address undirected graph can be obtained. The feature words are selected based on the characteristics of the address information, such as any combination of provinces, cities, regions, counties, towns and streets.
In the embodiment, the province and city in the reference address information are divided into a first-level address entry X0, the area is divided into a second-level address entry X1, the street is divided into a third-level address entry X2, and the cell and the specific house number plate are divided into a fourth-level address entry X3.
The undirected graph is composed of a number of vertices (Vertices) and edges (Edges) connected to each other, each edge being connected by only two vertices and no direction. The address undirected graph in the invention comprises a root node and a plurality of child nodes, each node directly establishes an association relation through a precursor (namely a father node) and a successor (namely a child node), and the address undirected graph can be obtained and is stored by using a bidirectional linked list. If a node has multiple child nodes, then an array is pointed to by a pointer to the head node of the child node linked list.
Fig. 3 is a schematic diagram of an address undirected graph in a second embodiment of the present invention. As shown in fig. 3, the root node is beijing city, and the node includes a plurality of child nodes (for example, the morning sun area and Changping area) below the root node, each child node also includes a plurality of child nodes, and the parent child nodes are connected to form an address undirected graph.
Step S203: target address information is acquired, and the target address information is divided into a first part and a second part. The first part comprises an administrative region address, and the second part is address information of the first part divided in the target address information. Acquiring target address information input or selected and generated by a user, and dividing the target address information according to the position of the feature words in the target address information; the address information of the last part is used as a second part, and the address information of the last part is used as a first part in the segmentation result. The feature words here include the feature words at the lowest level in step S202.
In the embodiment, the target address information is divided according to the feature words set in step S202 at the target address information position. Namely, the province and city in the target address information is divided into a first-level target entry S0, the region is divided into a second-level target entry S1, the street is divided into a third-level target entry S2, and the community and the specific house number plate input by the user are divided into a fourth-level target entry S3. The first part is a first-level target entry S0, a second-level target entry S1 and a third-level target entry S2, and the second part is a fourth-level target entry S3.
Taking the target address information as an example of "the cell number 1 building 401 room in the subfortune village street An Huibei in the morning of Beijing city", the "Beijing city" is the first-level target entry S0, the "morning of the sun" is the second-level target entry S1, the "subfortune village street" is the third-level target entry S2, and the "the cell number 1 building 401 room in the An Huibei" is the fourth-level target entry S3.
Step S204: and carrying out forward search in the address undirected graph to acquire an address entry which is the same as the address of the lowest-level administrative region in the first part as a reference address entry. Assuming that the lowest level administrative area address in the first portion is "subvillage street", a child node with the same name as the street is positively retrieved from the root node in the address undirected graph, and the child node is used as a reference address entry. Where the forward search is used for matching.
Step S205: comparing the address vocabulary entries belonging to the basic address vocabulary entries in the address undirected graph with the second part respectively, and executing step S206 if the address vocabulary entries are not identical to the second part; if the address entry is the same as the second part, no processing is performed. For example, all sub-nodes under the node of the subfortune village street are respectively compared with the second part (namely the four-level target entry), and if the comparison is the same, the first part and the second part in the target address information are considered to be matched, and error correction is not needed. If the child node is not identical to the second part, the first part and the second part in the target address information are not matched, and error correction is needed.
Step S206: and performing reverse search in the address undirected graph according to the second part, and performing reverse arrangement on reverse search results to obtain complete address information, and replacing target address information with the complete address information. In the embodiment, the second part is matched with the lowest-level address entry in the address undirected graph in character string, if the matching is successful, reverse search is performed in the address undirected graph from the lowest-level address entry, reverse search results are arranged in reverse order to obtain complete address information, and then the complete address information is used for replacing target address information, so that the address error correction is completed.
The second part of the target address information may be defaulted to correct in this step, the preceding part of the address information being automatically complemented by a reverse search. In an embodiment, the reverse search result is: the complete address information formed by reverse arrangement and arrangement of the district-subfortune village street-towards the sun region-Beijing city in An Huibei is as follows: cells in the subfortune village street An Huibei in the morning sun area of Beijing city.
The automatic error correction process in the second embodiment performs error correction based on the existing reference address information in the address information library, and the address information library cannot cover all the address information, so that 100% fault tolerance cannot be achieved, and thus the user can be prompted to re-input the address information. See embodiment three for specific implementations.
Fig. 4 is a main flow chart of an address error correction method according to a third embodiment of the present invention. As shown in fig. 4, the address error correction method according to the third embodiment of the present invention mainly includes the following steps:
Step S401: and acquiring address information of a plurality of identity cards to construct an address information base. And identifying the identity card of the real-name authentication user by utilizing an OCR (optical character recognition) technology, obtaining the address information of the identity card, storing the address information of the identity card into an address information base, wherein the address information base can be placed in a server, and the terminal equipment performs cloud verification by calling an interface.
Step S402: according to the set characteristic words, dividing the address information of the identity cards of the address information base into multi-stage address entries respectively, and then associating the address entries according to the grades to construct the address undirected graph. The implementation principle of this step is the same as step S202. The feature words in this embodiment are province, city, county, village and town, and street.
Step S403: target address information input or selected by a user is acquired, and the target address information is divided into a first part and a second part according to a plurality of feature words. The target address information is the address information to be corrected, the first part comprises all administrative area addresses, and the second part is the address information of the target address information except the first part. The target address information is divided using the same feature words as those of step S402, resulting in a first portion and a second portion.
In practical application, the target address information, namely the receiving address information, is formed by splicing the address information selected by the user through the drop-down frame and the address information input by the user. The address information selected by the user is an address corresponding to a national administrative area, such as a provincial region, for example: subfortune village streets in the morning sun area of Beijing city; address information entered by the user, such as: an Huibei building 4 in district, the spliced target address information is "building 4 in district in street An Huibei in the sub-fortune village of the Chaoyang district of Beijing city".
Because the user may not determine which street and which area the receiving position belongs to, the user does not determine whether the receiving address information selected or input by the user is wrong, when dividing, the address information selected by the user can be divided into a first part, the address information input by the user is divided into a second part, and whether the two parts of the target address information are matched is checked according to the subsequent processing process so as to carry out address error correction.
Step S404: and carrying out forward search in the address undirected graph to acquire an address entry which is the same as the address of the lowest-level administrative region in the first part as a reference address entry. The implementation principle of this step is the same as that of step S204, namely, the address entry identical to the subfortune village street is obtained from the address undirected graph as the reference address entry.
Step S405: comparing the address vocabulary entries belonging to the standard address vocabulary entries in the address undirected graph with the second part respectively, and executing step S406 if the address vocabulary entries are not identical to the second part; if the address entry is the same as the second part, no processing is performed. The implementation principle of the step is the same as that of the step S405, namely all address entries of the node belonging to the subfortune village street in the address undirected graph are respectively compared with 'An Huibei district No.4 building'.
Step S406: and carrying out reverse search in the address undirected graph according to the second part, and carrying out reverse order arrangement on reverse search results to obtain complete address information. And carrying out character string matching on the second part and the lowest-level address entry in the address undirected graph, and if the matching is successful, carrying out reverse search in the address undirected graph from the lowest-level address entry, and carrying out reverse order arrangement on reverse search results to obtain complete address information. If the match fails, step S409 may be performed.
Step S407: checking the complete address information, and if the verification is passed, executing step S408; if the verification is not passed, step S409 is performed. Matching the complete address information with the identity card address information of the address information library, and if the matching is successful, checking the complete address information; if the match fails, the check cannot pass.
Step S408: and replacing the target address information with the complete address information, and ending the flow. The automatic error correction is realized in the case that the cell, the house number and the like input by the user are correct, but the selected provincial street and the like are wrong.
Step S409: outputting verification failure information to prompt the user that the address detection fails and modifying the target address information. Because the identity card address information of the address information base cannot cover all the address information, 100% fault tolerance cannot be achieved, and therefore a user can be prompted to input the address information again.
In a preferred embodiment, the second part may be further divided, such as into cells and specific house numbers. Correspondingly, the address entry divided in the identification card address information in step S402 correspondingly includes a cell and a specific number plate. In step S405, the address entry belonging to the reference address entry may be compared with the highest-level target entry of the second portion, and in the same case of comparison, the subsequent level comparison may be sequentially performed, so as to improve the comparison efficiency.
According to the address error correction method, after the target address information is divided, the bidirectional retrieval is carried out by combining the address undirected graph, and the target address information is automatically corrected according to the reverse retrieval result, so that delivery failure caused by address errors is avoided; segmenting reference address information according to feature words, and further constructing an address undirected graph, so that bidirectional retrieval is convenient to follow; the complete address information obtained by reverse retrieval results is used for correcting the target address information, so that the accuracy of the address is ensured, the user operation is not needed, and the user experience is improved; dividing target address information according to feature words to obtain a first part and a second part, and further combining an address undirected graph to perform bidirectional retrieval and address correction, so that the accuracy of the corrected address is ensured; the provincial certificate address information is used as reference address information, and the complete address information is checked, so that the accuracy of the corrected address is further ensured; and feature words are selected based on the characteristics of the address information, so that the subsequent address information segmentation is facilitated.
Fig. 5 is a schematic diagram of main modules of an address error correction device according to an embodiment of the present invention. As shown in fig. 5, the address error correction device 500 according to the embodiment of the present invention mainly includes:
A dividing module 501, configured to obtain target address information, and divide the target address information into a first portion and a second portion; the first part comprises an administrative area address, and the second part is the address information of the first part divided in the target address information. Target address information input or selected by a user is acquired, the target address information is segmented according to the position of the set feature words in the target address information, and the address information except the last part in the segmentation result is used as a first part and the address information of the last part is used as a second part. The feature words are selected based on the characteristics of the address information, such as any combination of provinces, cities, regions, counties, towns and streets.
The searching module 502 is configured to perform forward searching in a pre-constructed address undirected graph, so as to obtain an address entry that is the same as the lowest level administrative area address in the first portion, as a reference address entry; the address undirected graph is obtained by dividing a plurality of pieces of reference address information into multi-level address entries respectively, and then correlating the address entries according to the levels. The reference address information is correct address information, and an address undirected graph is constructed in advance based on a plurality of pieces of reference address information, and each node of the address undirected graph represents an address entry. And acquiring an address entry which is the same as the lowest-level administrative region address in the first part from the address undirected graph, and taking the address entry as a reference address entry.
And a comparison module 503, configured to compare the address entries belonging to the reference address entries in the address undirected graph with the second portion, respectively. Searching address entries belonging to the standard address entries in the address undirected graph, namely searching all sub-nodes belonging to the standard address entries, respectively comparing each sub-node with a second part of the target address information, and if the sub-node exists and is the same as the second part, considering that the first part and the second part in the target address information are matched without correction; if there is no child node identical to the second portion, then the first portion and the second portion of the target address information are considered to be mismatched and need to be corrected.
And the correction module 504 is configured to, if there is no address entry that is the same as the second portion, perform reverse search in the address undirected graph according to the second portion, so as to correct the target address information according to a reverse search result. Searching a child node which is the same as the second part of the target address information in the address undirected graph, performing reverse search from the child node until reaching the root node, and performing reverse order arrangement on reverse search results to obtain complete address information, and replacing the target address information by the complete address information to finish address error correction.
In addition, the address error correction apparatus 500 of the embodiment of the present invention may further include: a build module, a check module, and a hint module (not shown in fig. 5). The construction module is used for dividing the pieces of reference address information respectively according to the positions of the set feature words in the pieces of reference address information to obtain a plurality of corresponding address entries; and associating address entries belonging to the same reference address information according to the grades to construct an address undirected graph; wherein a node of the address undirected graph represents an address entry.
The verification module is used for acquiring a plurality of pieces of reference address information to construct an address information base; wherein the reference address information is identity card address information; and verifying the complete address information according to the reference address information in the address information base. And the prompting module is used for outputting verification failure information under the condition of verification failure so as to prompt a user to modify target address information.
It can be seen from the above description that after the target address information is divided, the bidirectional retrieval is performed by combining the address undirected graph, and the target address information is automatically corrected according to the reverse retrieval result, so that the delivery failure caused by address errors is avoided; segmenting reference address information according to feature words, and further constructing an address undirected graph, so that bidirectional retrieval is convenient to follow; the complete address information obtained by reverse retrieval results is used for correcting the target address information, so that the accuracy of the address is ensured, the user operation is not needed, and the user experience is improved; dividing target address information according to feature words to obtain a first part and a second part, and further combining an address undirected graph to perform bidirectional retrieval and address correction, so that the accuracy of the corrected address is ensured; the provincial certificate address information is used as reference address information, and the complete address information is checked, so that the accuracy of the corrected address is further ensured; and feature words are selected based on the characteristics of the address information, so that the subsequent address information segmentation is facilitated.
Fig. 6 illustrates an exemplary system architecture 600 to which the address error correction method or apparatus of embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 is used as a medium to provide communication links between the terminal devices 601, 602, 603 and the server 605. The network 604 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 605 via the network 604 using the terminal devices 601, 602, 603 to receive or send messages, etc. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc., may be installed on the terminal devices 601, 602, 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 605 may be a server providing various services, for example, a background management server processing an administrator to provide support target address information and reference address information by using the terminal devices 601, 602, 603. The background management server can divide the received target address information, perform bidirectional retrieval in the map undirected graph and the like, and feed back the processing result (such as complete address information) to the terminal equipment.
It should be noted that, the address error correction method provided in the embodiment of the present application is generally executed by the server 605, and accordingly, the address error correction device is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
According to an embodiment of the invention, the invention further provides an electronic device and a computer readable medium.
The electronic device of the present invention includes: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize an address error correction method of the embodiment of the invention.
The computer readable medium of the present invention has stored thereon a computer program which, when executed by a processor, implements an address error correction method of an embodiment of the present invention.
Referring now to FIG. 7, there is illustrated a schematic diagram of a computer system 700 suitable for use in implementing an embodiment of the present invention. The electronic device shown in fig. 7 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the computer system 700 are also stored. The CPU 701, ROM 702, and RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
In particular, the processes described above in the main step diagrams may be implemented as computer software programs according to the disclosed embodiments of the invention. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the main step diagrams. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 701.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes a partitioning module, a retrieving module, an alignment module, and a correction module. The names of these modules do not constitute a limitation on the module itself in some cases, and for example, the dividing module may also be described as "a module that acquires target address information, divides the target address information into a first portion and a second portion".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: acquiring target address information, and dividing the target address information into a first part and a second part; the first part comprises an administrative area address, and the second part is the address information of the first part divided by the target address information; forward searching is carried out in a pre-constructed address undirected graph to obtain address entries which are the same as the lowest level administrative region address in the first part and serve as reference address entries; the address undirected graph is obtained by dividing a plurality of pieces of reference address information into multi-level address entries respectively, and then correlating the address entries according to the levels; respectively comparing the address entries belonging to the reference address entries in the address undirected graph with the second part; and if the address entry is not identical to the second part, performing reverse search in the address undirected graph according to the second part so as to correct the target address information according to a reverse search result.
It can be seen from the above description that after the target address information is divided, bidirectional retrieval is performed by combining the address undirected graph, and the target address information is automatically corrected according to the reverse retrieval result, so that delivery failure caused by address errors is avoided.
The product can execute the method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the methods provided in the embodiments of the present invention.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.
Claims (10)
1. An address error correction method, comprising:
Acquiring target address information, and dividing the target address information into a first part and a second part; the first part comprises an administrative area address, and the second part is the address information of the first part divided by the target address information;
Forward searching is carried out in a pre-constructed address undirected graph to obtain address entries which are the same as the lowest level administrative region address in the first part and serve as reference address entries; the address undirected graph is obtained by dividing a plurality of pieces of reference address information into multi-level address entries respectively, and then correlating the address entries according to the levels;
Respectively comparing the address entries belonging to the reference address entries in the address undirected graph with the second part;
And if the address entry is not identical to the second part, performing reverse search in the address undirected graph according to the second part so as to correct the target address information according to a reverse search result.
2. The method of claim 1, wherein after dividing the plurality of pieces of reference address information into a plurality of levels of address entries, respectively, associating the address entries by level to obtain an address undirected graph, comprises:
Dividing the pieces of reference address information according to the positions of the set feature words in the pieces of reference address information to obtain a plurality of corresponding address entries;
Associating address entries belonging to the same reference address information according to the grades to construct the address undirected graph; wherein a node of the address undirected graph represents an address entry.
3. The method of claim 1, wherein correcting the target address information based on the reverse search result comprises:
And arranging the reverse search results in a reverse order to obtain complete address information, and replacing the target address information by using the complete address information.
4. The method of claim 2, wherein the dividing the destination address information into a first portion and a second portion comprises:
Dividing the target address information according to the position of the feature words in the target address information;
The segmentation result is taken as a first part except for the last part, and the last part is taken as a second part.
5. A method according to claim 3, characterized in that the method further comprises:
acquiring the plurality of pieces of reference address information to construct an address information base; wherein the reference address information is identity card address information;
checking the complete address information according to the reference address information in the address information base;
Said replacing the target address information with the complete address information comprises:
And in the case of verification passing, replacing the target address information with the complete address information.
6. The method of claim 5, wherein the method further comprises:
And outputting verification failure information to prompt a user to modify the target address information under the condition that verification fails.
7. The method of claim 2 or 4, wherein the feature words comprise a combination of any of provinces, cities, regions, counties, towns, streets.
8. An address error correction apparatus, comprising:
The dividing module is used for acquiring target address information and dividing the target address information into a first part and a second part; the first part comprises an administrative area address, and the second part is the address information of the first part divided by the target address information;
The searching module is used for carrying out forward searching in the pre-constructed address undirected graph so as to obtain an address entry which is the same as the lowest level administrative region address in the first part and is used as a reference address entry; the address undirected graph is obtained by dividing a plurality of pieces of reference address information into multi-level address entries respectively, and then correlating the address entries according to the levels;
The comparison module is used for respectively comparing the address entries belonging to the reference address entries in the address undirected graph with the second part;
And the correction module is used for carrying out reverse search in the address undirected graph according to the second part when no address entry is identical to the second part, so as to correct the target address information according to a reverse search result.
9. An electronic device, comprising:
One or more processors;
storage means for storing one or more programs,
When executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
10. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910925029.3A CN110704564B (en) | 2019-09-27 | 2019-09-27 | Address error correction method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910925029.3A CN110704564B (en) | 2019-09-27 | 2019-09-27 | Address error correction method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110704564A CN110704564A (en) | 2020-01-17 |
CN110704564B true CN110704564B (en) | 2024-09-24 |
Family
ID=69198215
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910925029.3A Active CN110704564B (en) | 2019-09-27 | 2019-09-27 | Address error correction method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110704564B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113779370B (en) * | 2020-11-03 | 2023-09-26 | 北京京东振世信息技术有限公司 | Address retrieval method and device |
CN112364113A (en) * | 2020-11-13 | 2021-02-12 | 北京明略软件系统有限公司 | Address error correction method and system |
CN114820096A (en) * | 2021-01-29 | 2022-07-29 | 上海寻梦信息技术有限公司 | Abnormal order identification method, system, electronic equipment and storage medium |
CN113438280B (en) * | 2021-06-03 | 2023-02-17 | 多点生活(成都)科技有限公司 | Vehicle starting control method and device |
CN113112353B (en) * | 2021-06-15 | 2021-11-23 | 红盾大数据(北京)有限公司 | Address information perfecting method and device, electronic equipment and readable storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106033460A (en) * | 2015-03-19 | 2016-10-19 | 阿里巴巴集团控股有限公司 | Address data processing method and apparatus |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101719128B (en) * | 2009-12-31 | 2012-05-23 | 浙江工业大学 | Fuzzy matching-based Chinese geo-code determination method |
CN106055635B (en) * | 2016-05-30 | 2019-11-19 | 深圳市华傲数据技术有限公司 | Address information lookup method and device |
CN107016084A (en) * | 2017-03-31 | 2017-08-04 | 江苏速度信息科技股份有限公司 | A kind of place name address quickly positions the method with inquiry |
CN106875264A (en) * | 2017-03-31 | 2017-06-20 | 北京京东尚科信息技术有限公司 | Sequence information management method, device and order sorting system |
CN109615290A (en) * | 2018-11-28 | 2019-04-12 | 北京京东尚科信息技术有限公司 | For obtaining the method, apparatus, system and medium of address for service |
-
2019
- 2019-09-27 CN CN201910925029.3A patent/CN110704564B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106033460A (en) * | 2015-03-19 | 2016-10-19 | 阿里巴巴集团控股有限公司 | Address data processing method and apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN110704564A (en) | 2020-01-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110704564B (en) | Address error correction method and device | |
US11550826B2 (en) | Method and system for generating a geocode trie and facilitating reverse geocode lookups | |
CN108628811B (en) | Address text matching method and device | |
CN111325022B (en) | Method and device for identifying hierarchical address | |
CN111814664B (en) | Method, device, computer equipment and storage medium for identifying labels in drawing | |
CN111038906B (en) | Order sorting method and device | |
US10628465B2 (en) | Generating a ranked list of best fitting place names | |
CN113032257B (en) | Automated testing method, apparatus, computer system, and readable storage medium | |
CN111238507A (en) | Method and system for determining geographic position of cell, electronic device and storage medium | |
CN103324749A (en) | Spatial analysis and correction method based on standard text addresses | |
CN111831682A (en) | Method, device, equipment and computer readable medium for processing accumulation fund service | |
CN113032256B (en) | Automated testing method, apparatus, computer system, and readable storage medium | |
CN111401051B (en) | Express information analysis method and system | |
CN113742485A (en) | Method and device for processing text | |
CN110377675B (en) | Address verification method, address verification device, computer equipment and storage medium | |
CN111026629A (en) | Method and device for automatically generating test script | |
CN116069725A (en) | File migration method, device, apparatus, medium and program product | |
CN112749169A (en) | Address tree construction method, address planning specification method, device and electronic equipment | |
CN112148847B (en) | Voice information processing method and device | |
CN113761909B (en) | Address identification method and device | |
CN116107971A (en) | Model data processing method and device, electronic equipment and storage medium | |
CN113468037A (en) | Data quality evaluation method, device, medium and electronic equipment | |
CN111475742A (en) | Address extraction method and device | |
CN110851561A (en) | Matching method and device for distribution sites | |
CN113762864A (en) | Logistics site location method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | 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 |