Address processing method and device, equipment, medium and product
Through automated address segmentation and matching processing, the problems of low efficiency and poor accuracy of address information standardization processing are solved, and efficient and accurate address processing are achieved.
Patent Information
- Application Number
- CN202411078525.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, the standardized processing of address information is inefficient and poorly accurate, which mainly relies on manual operations of users, resulting in low efficiency and low accuracy.
By obtaining the source address and reference address array, address segmentation and matching are performed, address processing is automated using the slicing order and matching order. If the match fails, the slicing results are merged and the matching is repeated, improving processing efficiency and accuracy.
The automatic processing of addresses is realized, processing efficiency is improved, and the accuracy of processing results is improved through multiple matching and merging, reducing the error of human operations.
Smart Images

Figure CN118939888A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an address processing method, device, equipment, medium and product. Background Art
[0002] Address information is an indispensable resource in social development. It is increasingly used in various industries, and communication address technology is closely related to people's lives. For example, express delivery, finance and other industries all need to store, identify, and update communication addresses. If the communication address is not standardized or standard, it will bring many inconveniences to people.
[0003] For example, due to the irregularities in user addresses, the express delivery industry needs to invest a lot of manpower and material resources to identify the correct address. Otherwise, it is easy to cause problems such as wrong delivery and repeated delivery. Therefore, it is of great significance to standardize the address.
[0004] Currently, a large amount of address information is mainly processed manually by users, which has problems of low efficiency and poor accuracy. Summary of the invention
[0005] The embodiments of the present application provide an address processing method, device, equipment, medium and product, which can solve the problems of low efficiency and poor accuracy in the related art when performing standardized processing of address information.
[0006] In a first aspect, an embodiment of the present application provides an address processing method, including:
[0007] Obtaining a source address and a reference address array, the reference address array being used to store at least two reference addresses, each reference address comprising at least two reference address levels, the reference address levels comprising a standard address and an address associated with a name of the standard address;
[0008] Segmenting the source address to obtain at least one segmentation result, each segmentation result including at least one word;
[0009] Selecting a segmentation result from each segmentation result according to the segmentation order as a first segmentation result, and matching the first segmentation result with at least one reference address level in the reference address according to the matching order to obtain at least one first matching result;
[0010] In the case that there is a first matching result that matches successfully, output the standard address of the segmentation result corresponding to the first matching result that matches successfully, use the next segmentation result as the first segmentation result, and return to perform the operation of matching with at least one reference address level in the reference address;
[0011] When all first matching results fail to match, the first segmentation result is merged with the next segmentation result of the first segmentation result to obtain a new first segmentation result, and the operation of matching with at least one reference address level in the reference address is returned.
[0012] In a second aspect, an embodiment of the present application provides an address processing device, including: an acquisition module, a segmentation module and a processing module;
[0013] An acquisition module, used for acquiring a source address and a reference address array, wherein the reference address array is used for storing at least two reference addresses, and each reference address includes at least two reference address levels;
[0014] A segmentation module, used for segmenting the source address to obtain at least one segmentation result, each segmentation result including at least one word;
[0015] A processing module, configured to select a segmentation result from each segmentation result according to the segmentation order as a first segmentation result, and match the first segmentation result with at least one reference address level in the reference address according to the matching order to obtain at least one first matching result;
[0016] The processing module is further configured to output the standard address of the segmentation result corresponding to the first matching result that successfully matches, and use the next segmentation result as the first segmentation result, and return to perform the operation of matching with at least one reference address level in the reference address, if there is a first matching result that successfully matches;
[0017] The processing module is also used to merge the first segmentation result with the next segmentation result of the first segmentation result to obtain a new first segmentation result when all first matching results fail to match, and return to perform the operation of matching with at least one reference address level in the reference address.
[0018] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0019] processor;
[0020] a memory for storing computer program instructions;
[0021] When the computer program instructions are executed by a processor, the method according to the first aspect is implemented.
[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon, which implement the method described in the first aspect when the computer program instructions are executed by a processor.
[0023] In a fifth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method described in the first aspect.
[0024] In an embodiment of the present application, a source address and a reference address array are obtained, wherein the reference address array is used to store at least two reference addresses, each reference address includes at least two reference address levels, and the reference address level includes a standard address and an address associated with a name of the standard address; the source address is segmented to obtain at least one segmentation result, each segmentation result includes at least one word; according to the segmentation order, one segmentation result is selected from each segmentation result as a first segmentation result, and the first segmentation result is matched with at least one reference address level in the reference address according to the matching order to obtain at least one first matching result; in the case of a first matching result that matches successfully, the standard address of the segmentation result corresponding to the first matching result that matches successfully is output, and the next segmentation result is used as the first segmentation result, and the operation of matching with at least one reference address level in the reference address is returned; in the case of each first matching result failing to match, the first segmentation result is merged with the next segmentation result of the first segmentation result to obtain a new first segmentation result, and the operation of matching with at least one reference address level in the reference address is returned. That is, the automatic processing of the address is realized, and the processing efficiency is improved. At the same time, by matching each segmentation result with at least one reference address level in the reference address, and when the same segmentation result fails to match with all reference address levels, the segmentation results are merged, and then the above matching process is repeated, thereby improving the accuracy of the processing results. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1 A flowchart of an address processing method provided in an embodiment of the present application;
[0027] Figure 2 A flowchart of another address processing method provided in an embodiment of the present application;
[0028] Figure 3 A flowchart of another address processing method provided in an embodiment of the present application;
[0029] Figure 4 A structural diagram of an address processing device provided in an embodiment of the present application;
[0030] Figure 5 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only configured to explain the present application and are not configured to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0032] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0033] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0034] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0035] As mentioned above, in the related technology, when standardizing address information, it is mainly processed manually by users, which has the problems of low efficiency and poor accuracy.
[0036] To this end, the embodiments of the present application provide an address processing method, device, equipment, medium and product, which realize automatic processing of addresses and improve processing efficiency. At the same time, by matching each segmentation result with at least one reference address level in the reference address, and when the same segmentation result fails to match all reference address levels, the segmentation results are merged, and then the above matching process is repeated, thereby improving the accuracy of the processing results.
[0037] The address processing method, device, equipment, medium and product provided in the embodiments of the present application are described below in conjunction with specific embodiments.
[0038] Figure 1 The following is a flowchart of an address processing method provided in an embodiment of the present application. The address processing method can be applied to electronic devices such as mobile phones, tablet computers, notebook computers, servers, etc. Figure 1 As shown, the address processing method may include the following steps:
[0039] S110. Obtain source address and reference address arrays.
[0040] The reference address array is used to store at least two reference addresses, each reference address includes at least two reference address levels, and the reference address level includes a standard address and an address associated with the name of the standard address.
[0041] S120, segment the source address to obtain at least one segmentation result, each segmentation result including at least one word.
[0042] S130 . Select one segmentation result from each segmentation result according to the segmentation order as a first segmentation result, and match the first segmentation result with at least one reference address level in the reference address according to the matching order to obtain at least one first matching result.
[0043] S140. When there is a successfully matched first matching result, output the standard address of the segmentation result corresponding to the successfully matched first matching result, use the next segmentation result as the first segmentation result, and return to perform the operation of matching with at least one reference address level in the reference address.
[0044] S150: When all first matching results fail to match, merge the first segmentation result with the next segmentation result of the first segmentation result to obtain a new first segmentation result, and return to perform an operation of matching at least one reference address level in the reference address.
[0045] In an embodiment of the present application, a source address and a reference address array are obtained, wherein the reference address array is used to store at least two reference addresses, each reference address includes at least two reference address levels, and the reference address level includes a standard address and an address associated with a name of the standard address; the source address is segmented to obtain at least one segmentation result, each segmentation result includes at least one word; according to the segmentation order, one segmentation result is selected from each segmentation result as a first segmentation result, and the first segmentation result is matched with at least one reference address level in the reference address according to the matching order to obtain at least one first matching result; in the case of a first matching result that matches successfully, the standard address of the segmentation result corresponding to the first matching result that matches successfully is output, and the next segmentation result is used as the first segmentation result, and the operation of matching with at least one reference address level in the reference address is returned; in the case of each first matching result failing to match, the first segmentation result is merged with the next segmentation result of the first segmentation result to obtain a new first segmentation result, and the operation of matching with at least one reference address level in the reference address is returned. That is, the automatic processing of the address is realized, and the processing efficiency is improved. At the same time, by matching each segmentation result with at least one reference address level in the reference address, and when the same segmentation result fails to match with all reference address levels, the segmentation results are merged, and then the above matching process is repeated, thereby improving the accuracy of the processing results.
[0046] In S110, the source address may be an address to be standardized, and the source address may be a Chinese address, an English address, a Chinese and English address, or an address in another language. The embodiment of the present application does not limit the language type of the source address.
[0047] The reference address array may be an array containing at least two reference addresses, and the reference address may include a standard address and an address processed from a standard address. The standard address may be an address in a standard form at each level. For example, for the "province" level, taking xx province as an example, the standard form is xx province, and xx is a non-standard form because it lacks "province".
[0048] The standard address processing may be to perform alias processing, language form processing, etc. on the standard form address to obtain an address associated with the name of the standard address, thereby expanding the standard address and improving the accuracy of the standardization processing result.
[0049] Each reference address may include at least two reference address levels, and different reference address levels correspond to different levels. For example, the reference address may include 3 reference address levels, 5 reference address levels, or a greater number of reference address levels.
[0050] Taking five reference address levels as an example, it may include provinces or municipalities, prefecture-level cities, districts or counties, towns or townships or streets, villages or neighborhood committees. Of course, each level may also be other situations, as long as the levels are arranged in order.
[0051] The standard address can be obtained from the standard address library, which can be obtained from the official website.
[0052] In S120, taking the source address in Chinese as an example, illustratively, the source address can be segmented word by word to obtain each word, and each word here is called a segmentation result. Exemplarily, the source address can also be segmented using the word segmentation tool Jieba to obtain a word segmentation result, and each word segmentation result is called a segmentation result. Of course, other methods can also be used to segment the source address, which is not limited in the embodiment of the present application.
[0053] By segmenting the source address, at least one segmentation result is obtained, so that each segmentation result can be subsequently standardized, thereby improving the accuracy of the processing result.
[0054] In S130 , the segmentation order may be from front to back or from back to front. Taking segmenting the source address from front to back as an example, illustratively, one of the segmentation results may be selected as the first segmentation result.
[0055] For example, in the first cycle, the first segmentation result can be used as the first segmentation result, in the second cycle, the second segmentation result, or the combined result of the first segmentation result and the second segmentation result can be used as the first segmentation result, in the third cycle, the third segmentation result, or the combined result of the first segmentation result, the second segmentation result and the third segmentation result can be used as the first segmentation result, and so on.
[0056] After obtaining the first segmentation result, the first segmentation result may be matched with at least one reference address level in the reference address in a matching order to obtain at least one first matching result.
[0057] The matching order here may be from a low level to a high level, or from a high level to a low level. Of course, it may also be other matching orders, which are not limited in the embodiments of the present application.
[0058] Taking the matching from the lower level to the higher level as an example, exemplarily, if the first segmentation result matches successfully with the lower level, the matching ends and the subsequent matching process is not executed. If the first segmentation result fails to match with the lower level, the first segmentation result can continue to be matched with a higher level, and so on. That is, in the embodiment of the present application, the first segmentation result will be matched with at least one reference address level to obtain at least one first matching result. In the embodiment of the present application, the matching results of the first segmentation result with each level are all called first matching results.
[0059] Among them, a failed match means that at least one character of the first segmentation result is different from the reference address level being matched, and a successful match means that the first segmentation result is exactly the same as the reference address level being matched. Taking the first segmentation result as "river" as an example, assuming that the reference address levels are all "river x", where "x" represents that there are other characters after the river, it is considered that the first segmentation result fails to match with this reference address level.
[0060] In S140, exemplarily, there being a successfully matched first matching result can be that when there is only one first matching result, this first matching result is the successfully matched one. When there are multiple first matching results, the successfully matched first matching result here is the last one among the multiple first matching results. That is, the first matching results before the last first matching result are all failed matches.
[0061] Taking the first matching results including three as an example, from the lower level to the higher level are the first matching result A, the first matching result B, and the first matching result C. If there is a successfully matched first matching result, then this successfully matched first matching result is the first matching result C, and the first matching result A and the first matching result B are both failed matches.
[0062] Exemplarily, if there is a successfully matched first matching result, the standard address corresponding to the segmentation result of the successfully matched first matching result can be directly obtained. Still taking the first matching result C as the successfully matched one as an example, if the first segmentation result matches successfully with the third reference address level, the standard address corresponding to the third reference address level can be used as the standard address of this first segmentation result and output. Thus, the standardization process of this first segmentation result is realized.
[0063] Taking the first segmentation result as "xx" as an example, assuming that this first segmentation result matches successfully with the third reference address level, and the standard address corresponding to the third reference address level is "xx Province", then the standardized address of the first segmentation result "xx" can be determined as "xx Province".
[0064] After that, the next segmentation result can continue to be used as the first segmentation result, and the above matching process is executed in a loop.
[0065] In S150, if the first segmentation result fails to match all the reference address levels, the first segmentation result can be merged with the next segmentation result to obtain a new first segmentation result, and the above matching process is looped for the new first segmentation result.
[0066] Taking the first segmentation result as "river" as an example, if the first segmentation result fails to match all three reference address levels, the first segmentation result "river" can be merged with the next segmentation result "x" to obtain a new first segmentation result "riverx", and then the above matching process is looped. Here, "x" represents the next segmentation result of the first segmentation result "river".
[0067] After obtaining the source address and the reference address array in the embodiment of the present application, the source address can be automatically segmented, and the segmentation result can be automatically matched with the reference address array, realizing the automatic processing of the source address, improving the processing efficiency. At the same time, by segmenting the source address, the one-by-one matching of each segmentation result is realized, improving the accuracy of the matching result, so that the source address can be processed more accurately.
[0068] Taking that at least two reference address levels include a first reference address level and a second reference address level, the level of the first reference address level is higher than that of the second reference address level, and the matching order includes from the lower level to the higher level as an example, exemplarily, after "merging the first segmentation result with the next segmentation result of the first segmentation result to obtain a new first segmentation result", and before "returning to execute the operation of matching with at least one reference address level in the reference address", the address processing method may further include the following steps:
[0069] Judge whether the length of the new first segmentation result exceeds the reference length of the corresponding reference address level;
[0070] Correspondingly, the above "returning to execute the operation of matching with at least one reference address level in the reference address" may include the following steps:
[0071] In the case that the length of the new first segmentation result does not exceed the reference length of the second reference address level, return to execute the process of matching the new first segmentation result with the second reference address level;
[0072] In the case that the length of the new first segmentation result exceeds the reference length of the second reference address level, output a first prompt message to prompt that the source address lacks at least two reference address levels.
[0073] Each reference address level may correspond to a reference length, which is used to characterize the maximum length of the reference address level. That is, each reference address level corresponds to a maximum length, for example, a reference length for the "province" level, a reference length for the "city" level, and a reference length for the "district" level. The reference lengths corresponding to different reference address levels may be the same or different.
[0074] That is, when matching the first segmentation result with the corresponding reference address level, the length of the first segmentation result needs to be considered. If the length of the first segmentation result exceeds the maximum length of the corresponding reference address level, matching is stopped, thereby improving matching efficiency.
[0075] In particular, when a new first segmentation result is obtained, it is necessary to compare the new first segmentation result with the maximum length of the corresponding reference address level. For example, when the reference address array includes two reference address levels, and the second reference address level and the first reference address level are respectively from the low level to the high level, the length of the new first segmentation result can be compared with the reference length of the second reference address level. When the length of the new first segmentation result is less than or equal to the reference length of the second reference address level, the new first segmentation result can be matched with the second reference address level to obtain the corresponding first matching result.
[0076] Exemplarily, if the length of the new first segmentation result is greater than the reference length of the second reference address level, the new first segmentation result will no longer be matched with the second reference address level and the first reference address level, that is, the matching will be stopped, and a first prompt message will be output to prompt the user that the source address lacks at least two reference address levels.
[0077] The embodiment of the present application does not limit the output method of the first prompt information. For example, the first prompt information can be output through voice, text, etc.
[0078] Before matching the merged first segmentation result with the reference address array, the embodiment of the present application first compares the length of the merged first segmentation result with the reference length of the corresponding reference address level. Only when the length of the merged first segmentation result is less than or equal to the reference length of the corresponding reference address level will the merged first segmentation result be matched with the corresponding reference address level. Otherwise, the matching is stopped, thereby improving the matching efficiency and standardized processing efficiency.
[0079] Figure 2 A flowchart of another address processing method provided in an embodiment of the present application, Figure 2Taking the example that at least two reference address levels include a first reference address level, a second reference address level, and a third reference address level, and the levels of the first reference address level, the second reference address level, and the third reference address level are successively decreased, Figure 2 and Figure 1 The difference is that Figure 1 The S130 in can be refined into Figure 2 S1301-S1303 in.
[0080] In S1301, the first segmentation result is matched with the third reference address level to obtain a first matching result.
[0081] The third reference address level here is the lowest level among all reference address levels, that is, in the embodiment of the present application, the first reference address level may include the second reference address level, and the second reference address level may include the third reference address level.
[0082] When matching, the first segmentation result is first matched with the third reference address level to obtain a first matching result. The first matching result is used to indicate whether a next level of matching is required. For example, when the first matching result is a successful match, the subsequent matching process is stopped, and when the first matching result is a failed match, the matching process with the next level is continued.
[0083] In S1302, when the first matching result is a successful match, the matching process of the first segmentation result with the second reference address level and the first reference address level is terminated.
[0084] Exemplarily, when the first segmentation result successfully matches the third reference address level, the first segmentation result is no longer matched with the second reference address level, nor is the first segmentation result matched with the first reference address level. At this time, the standard address of the first segmentation result can be directly output based on the third reference address level.
[0085] In S1303, when the first matching result is a matching failure, the first segmentation result is matched with the second reference address level; and when the first segmentation result fails to match the second reference address level, the first segmentation result is matched with the first reference address level; and when the first segmentation result successfully matches the second reference address level, the matching process of the first segmentation result and the first reference address level is terminated.
[0086] Exemplarily, when the first segmentation result fails to match the third reference address level, the first segmentation result may continue to be matched with the second reference address level. If the first segmentation result fails to match the second reference address level, the first segmentation result continues to be matched with the first reference address level, and if the first segmentation result successfully matches the second reference address level, the first segmentation result is no longer matched with the first reference address level.
[0087] Taking the example that the third reference address level includes "district", the second reference address level includes "city", and the first reference address level includes "province", illustratively, the first segmentation result can be matched with the third reference address level "district" first. If the match fails, the first segmentation result can be matched with the second reference address level "city". If the match still fails, the first segmentation result can be matched with the first reference address level "province".
[0088] If a certain level matches successfully, the standard address of the first segmentation result can be output based on the successfully matched level, and the standardization process of the first segmentation result is now completed.
[0089] The embodiment of the present application matches the first segmentation result with each reference address level one by one in a certain matching order, and will only continue to match with the next level if the match with the lower level fails. Otherwise, the standardized result can be directly output without executing the subsequent matching process, thereby saving system resources.
[0090] Figure 3 A flowchart of another address processing method provided in an embodiment of the present application, Figure 3 and Figure 2 The difference is that Figure 3 Also includes S160-S180.
[0091] In S160, when the source address lacks the second reference address level, the output first reference address level of the source address and the third reference address level of the source address are matched with the reference address array respectively to obtain candidate address levels.
[0092] After the above matching process is completed, the standardized address corresponding to each segmentation result can be obtained. If the output standard address of the source address only contains the first reference address level and the third reference address level of the source address, that is, the second reference address level is missing, the first reference address level and the third reference address level of the output source address can be matched with the reference address array respectively to obtain the candidate address level that is the same as the first reference address level and the third reference address level. There can be one or more candidate address levels here.
[0093] In S170 , when the candidate address hierarchy includes one, the candidate address hierarchy is determined as the second reference address hierarchy of the source address and outputted.
[0094] Exemplarily, when there is only one candidate address level, the candidate address level can be directly determined as the second reference address level where the source address is missing. For example, if the first reference address level is "province" and the third reference address level is "district", the "city" where the source address is missing can be filled in based on "province" and "district", effectively solving the problem of partial missing source address.
[0095] In S180, when the candidate address levels include at least two, second prompt information is output to prompt that the source address lacks the second reference address level.
[0096] Exemplarily, when there are multiple candidate address levels, it is impossible to determine which second reference address level the source address is missing from, so the electronic device can output second prompt information to prompt that the source address is missing from the second reference address level. The second reference address level that the source address is missing from can be further determined in other ways later.
[0097] The embodiment of the present application does not limit the output method of the second prompt information, for example, it may include but is not limited to voice method and text method.
[0098] The embodiment of the present application can not only standardize the non-standardized source address, but also use the reference address array to fill the missing part of the source address, thereby improving the accuracy of the standardization result.
[0099] In some embodiments, before S110, the address processing method may further include the following steps:
[0100] Acquire a standard address library, the standard address library includes at least one standard address, and each standard address includes at least two standard address levels;
[0101] For each standard address in the standard address library, the name of each standard address level of the standard address is processed to obtain a reference address level corresponding to each standard address level.
[0102] The standard address library can be obtained from the official website. The standard address library includes multiple standard addresses, each of which includes at least two standard address levels, so that a certain address can be accurately and uniquely identified.
[0103] Taking into account that in actual applications, the source address may contain aliases, abbreviated place names, or place names in other languages, in order to improve the accuracy of the standardization results, after obtaining the standard address library, each standard address in the standard address library can be preprocessed. For example, the name of the standard address can be processed, and the processed address and the standard address can be collectively referred to as a reference address.
[0104] Taking the alias processing of the standard address hierarchy as an example, illustratively, the "province", "city", "district" and the like in the standard address hierarchy can be removed to obtain the alias hierarchy of the standard address hierarchy.
[0105] Taking the standard address level "xx city" as an example, after the standard address level is processed as an alias, the alias level "xx" can be obtained. At this time, "xx city" and "xx" can be collectively referred to as one level, that is, the reference address level. Taking the standard address level "xx Special Administrative Region" as an example, after the standard address level is processed as an alias, the alias level "xx" can be obtained. At this time, "xx Special Administrative Region" and "xx" can be collectively referred to as one level, that is, the reference address level.
[0106] During subsequent matching, if the first segmentation result successfully matches "xx" in the reference address level, it can be determined that the standard address of the first segmentation result is "xx city".
[0107] The embodiment of the present application processes the names of the standard addresses in the standard address library on the basis of the standard address library, thereby expanding the standard address library and standardizing the source addresses more accurately.
[0108] In some embodiments, the above S120 may include the following steps:
[0109] Segment the source address word by word, and determine each word as a segmentation result; or,
[0110] Perform word segmentation on the source address and determine each word segmentation result.
[0111] The source address is segmented word by word, and each word is used as a segmentation result, so that it can be matched with the reference address array word by word later, which can improve the accuracy of the matching result.
[0112] The source address is segmented, and each segmentation is used as a segmentation result, so that it can be matched with the reference address array word by word in the subsequent process, which can improve the matching efficiency. The segmentation method is not limited in the embodiment of the present application. In actual application, a suitable segmentation method can be selected as needed.
[0113] The embodiment of the present application segments the source address so that subsequent automatic matching can be performed based on the segmentation results, thereby achieving standardized processing of the source address, no longer relying on manual labor, and realizing rapid standardization of a large number of addresses.
[0114] In some embodiments, the first reference address level may include provinces or municipalities, the second reference address level may include prefecture-level cities, and the third reference address level may include districts or counties. That is, the embodiments of the present application may automate the processing of higher-level address levels, thereby improving processing efficiency while taking into account accuracy.
[0115] In actual application, the first reference address level, the second reference address level and the third reference address level may also include other contents, as long as the levels are in descending or increasing order.
[0116] The embodiment of the present application matches the segmentation results obtained by segmenting the source address with each reference address level of the reference address array one by one in the matching order. When the match is successful, the corresponding standard address is directly output. If the match with each level fails, the segmentation results are merged and the next cycle is entered, thereby realizing automatic processing of the address and improving processing efficiency. At the same time, it can avoid errors caused by human operations and improve the accuracy of the processing results.
[0117] Figure 4 A structural diagram of an address processing device provided in an embodiment of the present application, such as Figure 4 As shown, the address processing device 400 may include: an acquisition module 401, a segmentation module 402 and a processing module 403;
[0118] An acquisition module 401 is used to acquire a source address and a reference address array, where the reference address array is used to store at least two reference addresses, and each reference address includes at least two reference address levels;
[0119] A segmentation module 402 is used to segment the source address to obtain at least one segmentation result, each segmentation result includes at least one word;
[0120] The processing module 403 is used to select a segmentation result from each segmentation result according to the segmentation order as a first segmentation result, and match the first segmentation result with at least one reference address level in the reference address according to the matching order to obtain at least one first matching result;
[0121] The processing module 403 is further configured to output the standard address of the segmentation result corresponding to the first matching result that successfully matches, and use the next segmentation result as the first segmentation result, and return to perform the operation of matching with at least one reference address level in the reference address, if there is a first matching result that successfully matches;
[0122] The processing module 403 is also used to merge the first segmentation result with the next segmentation result of the first segmentation result to obtain a new first segmentation result when all first matching results fail to match, and return to perform the operation of matching with at least one reference address level in the reference address.
[0123] In an embodiment of the present application, a source address and a reference address array are obtained, wherein the reference address array is used to store at least two reference addresses, each reference address includes at least two reference address levels, and the reference address level includes a standard address and an address associated with a name of the standard address; the source address is segmented to obtain at least one segmentation result, each segmentation result includes at least one word; according to the segmentation order, one segmentation result is selected from each segmentation result as a first segmentation result, and the first segmentation result is matched with at least one reference address level in the reference address according to the matching order to obtain at least one first matching result; in the case of a first matching result that matches successfully, the standard address of the segmentation result corresponding to the first matching result that matches successfully is output, and the next segmentation result is used as the first segmentation result, and the operation of matching with at least one reference address level in the reference address is returned; in the case of each first matching result failing to match, the first segmentation result is merged with the next segmentation result of the first segmentation result to obtain a new first segmentation result, and the operation of matching with at least one reference address level in the reference address is returned. That is, the automatic processing of the address is realized, and the processing efficiency is improved. At the same time, by matching each segmentation result with at least one reference address level in the reference address, and when the same segmentation result fails to match with all reference address levels, the segmentation results are merged, and then the above matching process is repeated, thereby improving the accuracy of the processing results.
[0124] In some embodiments, the at least two reference address levels include a first reference address level and a second reference address level, the first reference address level is higher than the second reference address level, and the matching order includes from low level to high level;
[0125] The processing module 403 is further configured to, after merging the first segmentation result with the next segmentation result of the first segmentation result to obtain a new first segmentation result and before returning to perform the operation of matching with at least one reference address level in the reference address, determine whether the length of the new first segmentation result exceeds the reference length of the corresponding reference address level;
[0126] The processing module 403 is specifically used for:
[0127] If the length of the new first segmentation result does not exceed the reference length of the second reference address level, returning to execute the process of matching the new first segmentation result with the second reference address level;
[0128] When the length of the new first segmentation result exceeds the reference length of the second reference address level, first prompt information is output to prompt that the source address lacks at least two reference address levels.
[0129] In some embodiments, the at least two reference address levels include a first reference address level, a second reference address level, and a third reference address level, and the levels of the first reference address level, the second reference address level, and the third reference address level are successively decreased;
[0130] The processing module 403 is specifically used for:
[0131] Matching the first segmentation result with the third reference address level to obtain a first matching result;
[0132] When the first matching result is a successful match, terminating the matching process of the first segmentation result with the second reference address level and the first reference address level;
[0133] When the first matching result is a matching failure, the first segmentation result is matched with the second reference address level; and when the first segmentation result fails to match the second reference address level, the first segmentation result is matched with the first reference address level; and when the first segmentation result successfully matches the second reference address level, the matching process of the first segmentation result and the first reference address level is terminated.
[0134] In some embodiments, the processing module 403 is further configured to, when the source address lacks the second reference address level, match the output first reference address level of the source address and the third reference address level of the source address with the reference address array respectively to obtain a candidate address level;
[0135] In the case that the candidate address level includes one, determining the candidate address level as the second reference address level of the source address and outputting it;
[0136] In the case that the candidate address levels include at least two, second prompt information is output to prompt that the source address lacks the second reference address level.
[0137] In some embodiments, the acquisition module 401 is further used to acquire a standard address library before acquiring the source address and the reference address array, the standard address library including at least one standard address, each standard address including at least two standard address levels;
[0138] The processing module 403 is further used to process the name of each standard address level of the standard address for each standard address in the standard address library to obtain a reference address level corresponding to each standard address level.
[0139] In some embodiments, the segmentation module 402 is specifically configured to:
[0140] Segment the source address word by word, and determine each word as a segmentation result; or,
[0141] Perform word segmentation on the source address and determine each word segmentation result.
[0142] In some embodiments, the first reference address level includes provinces or municipalities, the second reference address level includes prefecture-level cities, and the third reference address level includes districts or counties.
[0143] Figure 4 Each module in the device shown has the function of realizing Figure 1-Figure 3 The functions of each step in the process can achieve the corresponding technical effects, so for the sake of brevity, they will not be described in detail here.
[0144] Based on the same inventive concept, the embodiment of the present application also provides an electronic device, which may be, for example, a mobile phone, a tablet computer, a laptop computer, a PDA, etc. Figure 5 The electronic device provided in the embodiments of the present application is described in detail.
[0145] like Figure 5 As shown, the electronic device 500 may include a processor 510 and a memory 520 for storing computer program instructions.
[0146] The processor 510 may include a central processing unit (CPU) or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0147] The memory 520 may include a large capacity memory for data or instructions. For example, but not limitation, the memory 520 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In one example, the memory 520 may include a removable or non-removable (or fixed) medium, or the memory 520 is a non-volatile solid-state memory. In one example, the memory 520 may be a read-only memory (ROM). In one example, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.
[0148] The processor 510 reads and executes the computer program instructions stored in the memory 520 to implement Figure 1-Figure 3 The method in the embodiment shown in the figure is achieved Figure 1-Figure 3 The corresponding technical effects achieved by executing the method in the illustrated embodiment are not described in detail here for the sake of brevity.
[0149] In one example, the electronic device 500 may further include a communication interface 530 and a bus 540. Figure 5 As shown, the processor 510, the memory 520, and the communication interface 530 are connected via a bus 540 and communicate with each other.
[0150] The communication interface 530 is mainly used to implement communication between various modules, devices and / or equipment in the embodiments of the present application.
[0151] Bus 540 includes hardware, software or both, and each component of electronic device 500 is coupled to each other. For example, but not limitation, bus 540 may include accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, front side bus (Front Side Bus, FSB), Hyper Transport (Hyper Transport, HT) interconnection, industry standard architecture (Industry Standard Architecture, ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 540 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0152] After obtaining the source address and the reference address array, the electronic device can execute the address processing method in the embodiment of the present application, thereby realizing the combination Figure 1-Figure 3 The address processing method described and Figure 4 Describes the address processing device.
[0153] In addition, in combination with the address processing method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the address processing methods in the above embodiment is implemented.
[0154] In addition, in combination with the address processing method in the above embodiments, the embodiments of the present application also provide a computer program product, including a computer program, which is executed by at least one processor to implement the various processes of any one of the address processing methods in the above embodiments, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0155] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0156] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0157] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0158] The above reference is according to the method of the present application embodiment, the flow chart of the device (system) and the computer program product and / or the block diagram of the present application embodiment. It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.
[0159] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. An address processing method, It is characterized in that include: Obtaining a source address and a reference address array, wherein the reference address array is used to store at least two reference addresses, each of the reference addresses includes at least two reference address levels, and the reference address levels include a standard address and an address associated with a name of the standard address; Segmenting the source address to obtain at least one segmentation result, each segmentation result including at least one word; Selecting a segmentation result from each of the segmentation results according to the segmentation order as a first segmentation result, and matching the first segmentation result with at least one reference address level in the reference address according to the matching order to obtain at least one first matching result; In the case that there is a first matching result that matches successfully, output the standard address of the segmentation result corresponding to the first matching result that matches successfully, use the next segmentation result as the first segmentation result, and return to perform the operation of matching with at least one reference address level in the reference address; When all the first matching results fail to match, the first segmentation result is merged with the next segmentation result of the first segmentation result to obtain a new first segmentation result, and the operation of matching with at least one reference address level in the reference address is returned.
2. The method according to claim 1, It is characterized in that The at least two reference address levels include a first reference address level and a second reference address level, the first reference address level is higher than the second reference address level, and the matching order includes from low level to high level; After merging the first segmentation result with the next segmentation result of the first segmentation result to obtain a new first segmentation result, and before returning to perform the operation of matching at least one reference address level in the reference address, the method further includes: Determining whether the length of the new first segmentation result exceeds the reference length of the corresponding reference address level; The returning operation of performing matching with at least one reference address level in the reference address includes: If the length of the new first segmentation result does not exceed the reference length of the second reference address level, returning to execute the process of matching the new first segmentation result with the second reference address level; When the length of the new first segmentation result exceeds the reference length of the second reference address level, first prompt information is output to prompt that the source address lacks at least two of the reference address levels.
3. The method according to claim 1, It is characterized in that The at least two reference address levels include a first reference address level, a second reference address level, and a third reference address level, wherein the levels of the first reference address level, the second reference address level, and the third reference address level are sequentially decreased; The step of matching the first segmentation result with at least one reference address level in the reference address in a matching order to obtain at least one first matching result includes: Matching the first segmentation result with the third reference address level to obtain a first matching result; When the first matching result is a successful match, terminating the matching process of the first segmentation result with the second reference address level and the first reference address level; In the case where the first matching result is a matching failure, the first segmentation result is matched with the second reference address level; and in the case where the first segmentation result fails to match the second reference address level, the first segmentation result is matched with the first reference address level; and in the case where the first segmentation result matches the second reference address level successfully, the matching process of the first segmentation result and the first reference address level is terminated.
4. The method according to claim 3, It is characterized in that The method further comprises: In the case that the source address lacks a second reference address level, matching the output first reference address level of the source address and the output third reference address level of the source address with the reference address array respectively to obtain a candidate address level; In the case that the candidate address level includes one, determining the candidate address level as the second reference address level of the source address and outputting the level; In the case that the candidate address levels include at least two, second prompt information is output to prompt that the source address lacks a second reference address level.
5. The method according to any one of claims 1 to 4, It is characterized in that Before obtaining the source address and reference address arrays, the method further includes: Acquire a standard address library, wherein the standard address library includes at least one standard address, and each of the standard addresses includes at least two standard address levels; For each of the standard addresses in the standard address library, the name of each standard address level of the standard address is processed to obtain a reference address level corresponding to each of the standard address levels.
6. The method according to any one of claims 1 to 4, It is characterized in that The segmenting of the source address to obtain at least one segmentation result includes: Segment the source address word by word, and determine each word as a segmentation result; or, The source address is segmented, and each segmented word is determined as a segmentation result.
7. The method according to claim 3 or 4, It is characterized in that The first reference address level includes provinces or municipalities, the second reference address level includes prefecture-level cities, and the third reference address level includes districts or counties.
8. An address processing device, It is characterized in that include: Acquisition module, segmentation module and processing module; The acquisition module is used to acquire a source address and a reference address array, wherein the reference address array is used to store at least two reference addresses, and each of the reference addresses includes at least two reference address levels; The segmentation module is used to segment the source address to obtain at least one segmentation result, each segmentation result including at least one word; The processing module is used to select a segmentation result from each of the segmentation results according to the segmentation order as a first segmentation result, and match the first segmentation result with at least one reference address level in the reference address according to the matching order to obtain at least one first matching result; The processing module is further configured to, when there is a successfully matched first matching result, output a standard address of a segmentation result corresponding to the successfully matched first matching result, use a next segmentation result as the first segmentation result, and return to perform an operation of matching at least one reference address level in the reference address; The processing module is also used to merge the first segmentation result with the next segmentation result of the first segmentation result to obtain a new first segmentation result when all the first matching results fail to match, and return to perform an operation of matching with at least one reference address level in the reference address.
9. An electronic device, It is characterized in that include: processor; a memory for storing computer program instructions; When the computer program instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having computer program instructions stored thereon, It is characterized in that When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, It is characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method according to any one of claims 1 to 7.
