Geographical name completion method and apparatus
By building an index table and using the BERT model for geographic name completion, the problem of geographic name defects in the online service platform was solved, improving data utilization and query efficiency.
Patent Information
- Application Number
- CN202411919430.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2044-12-24
AI Technical Summary
In online service platforms, issues such as missing content, empty values, or inaccurate geographical names lead to low data utilization.
By constructing an index table, using partial content of geographic region identifiers and media numbers as indexes, and combining the BERT model and preprocessing techniques, the target geographic name is queried and determined for completion.
It improves the efficiency of geographical name completion and data utilization, and solves the problems of data loss and slow query.
Smart Images

Figure CN119848362B_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification belong to the field of computer technology, and in particular relate to a method and apparatus for completing geographical names. Background Technology
[0002] Online service platforms (such as UService) store users' geographic names for data users to query. Typically, these geographic names are obtained through offline tasks that extract, transform, and load (ETL) the initial geographic names collected online. These initial geographic names may contain missing content, null values, or inaccurate entries. Traditionally, these defective geographic names are discarded, significantly reducing data utilization. Summary of the Invention
[0003] The purpose of this invention is to provide a method and apparatus for completing geographical names, which can complete defective geographical names and thus greatly improve the utilization rate of data.
[0004] The first aspect of this specification provides a method for completing geographical names, including:
[0005] Obtain the geographic region identifier corresponding to the first geographic name to be processed;
[0006] Based on a pre-built index table, query several second geographical names corresponding to the geographical region identifier, wherein the index table uses at least the geographical region identifier as an index;
[0007] Determine the target geographical name corresponding to the first geographical name from the plurality of second geographical names;
[0008] The first geographical name is completed based on the target geographical name.
[0009] The second aspect of this specification provides a geographical name completion device, comprising:
[0010] The acquisition unit is used to acquire the geographic region identifier corresponding to the first geographic name to be processed.
[0011] The query unit is used to query a number of second geographical names corresponding to the geographical region identifier based on a pre-built index table, wherein the index table uses the geographical region identifier as an index at least;
[0012] A determining unit is configured to determine, from the plurality of second geographical names, a target geographical name corresponding to the first geographical name;
[0013] The completion unit is used to complete the first geographical name based on the target geographical name.
[0014] A third aspect of this specification provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method described in the first aspect.
[0015] A fourth aspect of this specification provides a computing device including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method described in the first aspect.
[0016] This specification provides a computer program product in a fifth aspect, including a computer program / instructions that, when executed by a processor, implement the steps of the method described in the first aspect.
[0017] This specification provides a geographical name completion method and apparatus through one or more embodiments. Based on the geographical region identifier corresponding to a defective geographical name (i.e., a first geographical name), an index table is queried to obtain multiple candidate geographical names (i.e., second geographical names) for completing the defective geographical name. It should be noted that since geographical region identifiers typically correspond to geographical names within a certain range, this solution can significantly reduce the number of recalled candidate geographical names. Furthermore, because the index table has the advantage of optimizing query performance, this solution can quickly retrieve candidate geographical names, which helps improve the efficiency of geographical name completion. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments in this specification, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram illustrating an implementation scenario of one embodiment disclosed in this specification;
[0020] Figure 2 This diagram illustrates a flowchart of a geographical name completion method according to one embodiment of this specification.
[0021] Figure 3 A schematic diagram of a geographical name completion device according to one embodiment of this specification is shown. Detailed Implementation
[0022] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0023] Figure 1 This is a schematic diagram illustrating an implementation scenario of one of the embodiments disclosed in this specification. Figure 1 First, the geographic region identifier corresponding to the geographic name add1 to be processed can be obtained. This geographic region identifier can be multiple geographic region identifiers from multiple preset regional levels. In a more specific embodiment, these preset regional levels can be provinces, cities, and districts / counties, etc. The geographic region identifier can refer to a region code or a region name. Next, based on this geographic region identifier, a pre-built index table can be queried to obtain several candidate geographic names add2. This index table uses at least the geographic region identifier as its index. Finally, the target geographic name corresponding to the geographic name add1 to be processed can be determined from the candidate geographic names add2, and the target geographic name add1 can be completed based on this target geographic name add2.
[0024] It should be noted that the index table described in this scheme can be created based on the geographic name details table (i.e., the final geographic name table), which is obtained by summarizing the geographic name tables table1 and table2. The following explains the summarization process:
[0025] The aforementioned geographic name table, table1, includes at least one field, column1, indicating the user's complete geographic name. This complete geographic name is a fixed and unchanging geographic name, which can include geographic names for any of the following addresses: registered address and document geographic name, etc. Because the complete geographic names in table1 are fixed and unchanging, table1 can also be called a static geographic name table.
[0026] In practice, in addition to column1, the geographic name table table1 may also include one or more of the following fields: column2, which indicates the media number associated with the full geographic name; column3, which indicates the strength of the association (i.e., the association between the full geographic name and the media number); column4, which indicates the user identifier (e.g., nickname); and so on.
[0027] Among these, the aforementioned media accounts may include, but are not limited to, mobile phone numbers, Weibo accounts, etc.
[0028] The range of values for the above-mentioned association strength can be [0,1], where a larger value indicates a stronger association between the complete geographic name and the media number.
[0029] In one example, the geographical name table table1 can be as shown in Table 1:
[0030] Table 1
[0031]
[0032] In this context, m and n represent the specific building number and room number, respectively.
[0033] It should be understood that Table 1 here is only an illustrative example. In practice, the user identifier mentioned above can also be a user identity identifier, etc., and this specification does not limit it in this way.
[0034] For the aforementioned geographical name table1, a field indicating a geographical region identifier can be added based on the field value of column1, which indicates the user's complete geographical name. Here, there can be multiple geographical region identifiers, each corresponding to a different preset regional level. In a specific embodiment, these preset regional levels can be provinces, cities, and districts / counties, etc.
[0035] It should be understood that when there are multiple geographic region identifiers, multiple fields corresponding to those multiple geographic region identifiers are added. More specifically, these multiple fields are a province field, a city field, and a district / county field.
[0036] For example, after adding a field indicating the geographic region identifier to Table 1, we can obtain Table 2.
[0037] Table 2
[0038]
[0039] In this context, the field values for the province, city, and district / county fields are regional codes. Specifically, the province field contains the province code, the city field contains the city code, and the district / county field contains the district / county code.
[0040] It should be understood that Table 2 is only an illustrative example. In practice, only the province field may be added, or only the province and city fields may be added. Furthermore, the field values for the province, city, and district / county fields mentioned above can also be region names; this specification does not impose any restrictions on this.
[0041] After adding a field indicating the geographic region identifier to the geographic name table (table1), preprocessing can be performed. This preprocessing can include one or more of the following: column trimming, partition filtering, and WHERE condition simplification. Column trimming refers to deleting columns that are irrelevant to completing the geographic name; for example, if Table2 includes other fields, these fields can be deleted. Partition filtering refers to filtering data for a target partition, such as filtering data corresponding to a partition with a given date (e.g., year, month, day). WHERE condition simplification refers to deleting data where the geographic name length is less than a preset threshold (e.g., 4 characters).
[0042] The aforementioned geographic name table, table2, includes at least one field, column1, which indicates the user's complete geographic name. This complete geographic name is dynamically changing and can include geographic names for any of the following addresses: invoice address, courier delivery address, and transaction delivery address, etc. Because the complete geographic names in table2 are dynamically changing, table2 can also be called a dynamic geographic name table.
[0043] Similarly, in addition to column1, the geographic name table table2 may also include one or more of the following fields: column2, which indicates the media number associated with the full geographic name; column3, which indicates the strength of the association (i.e., the association between the full geographic name and the media number); column4, which indicates the user identifier (e.g., nickname); and so on.
[0044] For the aforementioned geographical name table (table2), a field indicating the geographical region identifier can also be added based on the field value of column1, which indicates the user's complete geographical name. The geographical name table (table2) and the geographical name table (table2) with the added geographical region identifier field can be found in Tables 1 and 2 above, respectively.
[0045] It should be understood that after adding a field indicating the geographic region identifier to the geographic name table2, it can also be preprocessed.
[0046] Perform a unionall operation on the preprocessed geographic name tables table1 and table2 to obtain the above-mentioned geographic name details table.
[0047] Of course, in practice, the above union all association can also be replaced with union association, and this specification does not limit this.
[0048] It should be noted that in this solution, the geographical name tables table1 and table2 are preprocessed before performing the union all association, which can greatly reduce the amount of data after association. This can effectively utilize the characteristics of multi-machine parallelism and low single-machine resource utilization in offline big data research and development, and solve the problems of serious computation time and high resource consumption.
[0049] It should also be noted that the aggregation of the aforementioned geographic name details table can be performed on the Dataphin platform. The Dataphin platform supports both offline and real-time development methods, providing different development workflows to address the different needs of batch data processing and streaming data processing scenarios. The Dataphin platform offers a systematic, standardized, and complete offline development workflow for offline development scenarios and related requirements, providing data developers with coding and development capabilities for batch-based data production tasks, release and maintenance capabilities, and subsequent quality control capabilities.
[0050] The above explains the process of summarizing the detailed list of geographical names. A corresponding index table can be built for this detailed list of geographical names, and the following explains the construction process.
[0051] In one embodiment, the field indicating the geographic region identifier in the geographic name details table can be used as the index field in the index table. For example, the province, city, and district / county fields in Table 2 can be used as index fields, and the column1 field indicating the user's complete geographic name can be used as the query field to construct the index table.
[0052] It should be understood that in this scheme, the field indicating the geographic region is used as an index field, which can directly and accurately fix the geographic name to a certain district / county.
[0053] Of course, in practice, the above index fields can also include several subfields that split the column2 field, which indicates the media number, with each subfield indicating a portion of the media number. Taking a mobile phone number as an example, these subfields would consist of two subfields, each indicating the first three and last four digits of the media number, respectively.
[0054] By further splitting the column2 field for the media number into several subfields as index fields, the amount of data for geographic names can be reduced more precisely.
[0055] In addition, the query fields mentioned above may also include column3, which indicates the strength of the association, and / or column4, which indicates the user identifier.
[0056] In one example, the index table built for the geographic name details table can be shown in Table 3:
[0057] Table 3
[0058]
[0059]
[0060] It should be understood that Table 3 is only an illustrative example. In practice, the last four fields of the media number and the first three fields of the media number can be replaced with fields indicating the complete media number. This specification does not limit this.
[0061] It should be noted that the index table mentioned above can also be divided into several (e.g., 256) buckets based on the bucket key to ensure query efficiency for the index table.
[0062] In one specific embodiment, the district / county field and the last four fields of the indicator medium number can be used as the bucketing key, thereby reducing the data in a bucket to the data corresponding to a portion of users in a district / county.
[0063] Furthermore, to further improve query performance, the constructed index table can be stored in UCS storage. UCS storage supports hybrid row and column storage and supports multiple key scenarios such as online point-to-point queries, real-time analysis, and offline data processing. Experiments have shown that queries on index tables stored in UCS storage typically take around 20ms.
[0064] Furthermore, to ensure the real-time nature of the data in the index table, this solution can continuously update the data in the index table in a T+1 manner.
[0065] In summary, the index table in this solution is constructed by combining offline and online processing methods. Offline processing involves summarizing the geographic name tables (table1 and table2) to obtain the detailed geographic name table. Online processing involves storing the index table in UCS storage and updating it on a T+1 basis.
[0066] Finally, the index table constructed in this solution can also be used in online services to improve the query efficiency of users for the geographic name details table.
[0067] This completes the construction of the index table. Afterwards, the index table can be used to complete the defective geographical names. The following describes the completion process.
[0068] Figure 2 This diagram illustrates a flowchart of a geographic name completion method according to one embodiment of this specification. This method can be executed by any device, apparatus, platform, or cluster of devices with computing and processing capabilities. Figure 2As shown, the method may include the following steps:
[0069] Step S202: Obtain the geographic region identifier corresponding to the geographic name add1 to be processed.
[0070] Here, the geographic region identifier can be multiple geographic region identifiers across multiple preset regional levels. In a more specific embodiment, these multiple preset regional levels can be provinces, cities, and districts / counties, etc. Furthermore, the geographic region identifier can refer to a region code (e.g., province code, city code, district / county code) or a region name.
[0071] Of course, in practice, the above geographical area identifiers may only be province codes or province codes and city codes, and this manual does not limit this.
[0072] In one embodiment, the geographic name add1 to be processed is selected from a defective geographic name table tableN (i.e., the target geographic name table). This geographic name table tableN includes at least a field columnA indicating the defective geographic name of the user, and the geographic name add1 to be processed being any field value of field columnA. The defective geographic name here may include, but is not limited to, any of the following: a geographic name with missing content, an inaccurate geographic name, or a null value.
[0073] In addition to columnA, the aforementioned geographic name table tableN may also include columnB, which indicates a portion of the content related to the mediator number. Here, the mediator number is associated with the defective geographic name; it could be, for example, a mobile phone number or a Weibo account.
[0074] The aforementioned media number may include multiple components. Taking a mobile phone number as an example, these multiple media number components could include the first three digits, the last four digits, etc. It should be understood that the aforementioned geographical name table (tableN) may include multiple columns (columnB) corresponding to the various media number components.
[0075] Of course, in practice, the aforementioned geographical name table N may also include column C, which indicates the user's defective user identifier, and column D, which indicates the strength of the aforementioned association, etc. This specification does not limit this.
[0076] For the aforementioned geographical name table N, a field indicating a geographical region identifier can be added based on the field value of column A, which indicates a user's defective geographical name. Here, there can be multiple geographical region identifiers, each corresponding to a different preset regional level. In a specific embodiment, these preset regional levels can be provinces, cities, and districts / counties, etc.
[0077] It should be understood that when there are multiple geographic region identifiers, multiple fields corresponding to those multiple geographic region identifiers are added. More specifically, these multiple fields are a province field, a city field, and a district / county field.
[0078] It should be noted that, in the case where the geographic name to be processed, add1, is selected from the defective geographic name table tableN, the geographic region identifier corresponding to the geographic name to be processed, add1, can be determined based on the field value of the field indicating geographic region identifier corresponding to the geographic name to be processed, add1.
[0079] Step S204: Based on the pre-built index table, query several candidate geographic names add2 that correspond to the above geographic region identifier.
[0080] The definition of the index table here can be found above, which states that it is indexed at least by geographical region identifiers. Additionally, it can also be indexed by a portion of the media number.
[0081] In the case where the index table uses a geographic region identifier as the index and only the field indicating the geographic name is used as the query field, each row of the index table can be scanned to find each target row whose index field value is the geographic region identifier, and the field value of the query field contained in each target row can be determined as each candidate geographic name add2.
[0082] When the index table is indexed by both the geographic region identifier and the median number, the partial content of the median number associated with the geographic name add1 can be determined based on the field value of columnB corresponding to the geographic name add1 to be processed. Then, each target row that matches the partial content of both the geographic region identifier and the median number can be found.
[0083] Taking the geographical region identifier as the province code, city code, and district / county code, and part of the media number including the first three and last four digits of the media number as an example, the province code, city code, district / county code, the first three digits of the media number, and the last four digits of the media number can be encapsulated as a row key, and each row of the index table can be scanned based on this row key.
[0084] In summary, this solution can significantly improve the accuracy of the retrieved candidate geographic names (add2) when querying the index table based on geographic region identifiers, or a combination of geographic region identifiers and media numbers.
[0085] Step S206: Determine the target geographic name corresponding to the geographic name add1 to be processed from several candidate geographic names add2.
[0086] Specifically, the geographical name to be processed, add1, and several candidate geographical names, add2, can be preprocessed separately. The preprocessing can include one or more of the following: removing prefixes, removing spaces, removing special characters, and removing illegal characters.
[0087] Preprocessing for removing prefixes can be implemented by encapsulating user-defined functions (UDFs). UDFs allow users to extend the standard function library according to specific needs, thereby implementing more complex data processing logic. A UDF can accept zero or more single-line inputs and produce a single-line output.
[0088] It should be noted that in practice, some geographical names may include the province, city, district / county, while others may not. Therefore, this solution removes the prefix from the geographical name to be processed, add1, and the candidate geographical name, add2, which can improve the matching success rate.
[0089] In summary, this approach can improve the matching success rate by performing preprocessing on the geographic name to be processed (add1) and the candidate geographic name (add2) separately.
[0090] Of course, in practice, the above preprocessing may not be performed, and this instruction does not impose any restrictions on this.
[0091] In one embodiment, several candidate geographic names (add2) and the geographic name to be processed (add1) can be input into the target scoring model to obtain the matching scores of geographic name (add1) with each geographic name (add2). Then, based on the matching scores, the target geographic name is determined from each geographic name (add2).
[0092] It should be understood that, when performing the above preprocessing, the preprocessed geographic name add2 and the preprocessed geographic name add1 can be input into the target scoring model.
[0093] The target scoring model described above can be implemented as a BERT model, or as a Gradient Boosting Decision Tree (GBDT), Support Vector Machine (SVM), or Naive Bayes model. Bayesian Model (NBM), etc.
[0094] After obtaining the matching scores, the geographical names `add2` can be sorted from highest to lowest score, and the top n geographical names `add2` can be selected as the target geographical names. Alternatively, the geographical names `add2` with matching scores greater than a preset threshold can be selected as the target geographical names.
[0095] In another embodiment, before inputting several candidate geographical names add2 and the geographical name add1 to be processed into the target scoring model, the candidate geographical names add2 can be further filtered. The specific filtering process is as follows:
[0096] The common characters between the geographic name to be processed (add1) and several candidate geographic names (add2) are determined. Then, based on these common characters, the filtered geographic names (add2') are selected from the candidate geographic names (add2). For example, geographic names (add2) whose common character length is greater than a preset threshold can be selected as the filtered geographic names (add2').
[0097] Then, the filtered geographic names add2' and the geographic name to be processed add1 can be input into the target large model to obtain the matching scores of the geographic name to be processed add1 with each of the filtered geographic names add2', and the target geographic name can be determined from each of the filtered geographic names add2' based on the matching scores.
[0098] In another embodiment, the similarity (e.g., Jaccard similarity or cosine similarity) between several candidate geographical names add2 and the geographical name add1 to be processed can be calculated, and the target geographical name can be determined from several candidate geographical names add2 based on the similarity.
[0099] Of course, in practice, the latter two embodiments can also be combined to determine the target geographical name, and this specification does not limit this.
[0100] Step S208: Complete the geographic name to be processed, add1, based on the target geographic name.
[0101] It should be noted that the number of target geographical names identified above can be multiple, and these multiple target geographical names can be further filtered.
[0102] Specifically, the target geographic names can be filtered based on the field values of the fields indicating user identification and / or the field indicating relationship strength corresponding to each target geographic name to obtain the final geographic name. Based on the final geographic name, the geographic name to be processed, add1, is then completed.
[0103] Taking any target geographic name as an example, the field value of the corresponding user identifier field (i.e., the target user identifier corresponding to the target geographic name) or the field indicating the relationship strength (i.e., the target relationship strength corresponding to the target geographic name) can be obtained by querying the index table or the geographic name details table.
[0104] For example, the final geographical name can be determined from among multiple target geographical names, based on the longest character length of the corresponding target user identifier. Alternatively, the final geographical name can be determined from among multiple target geographical names, based on the strongest corresponding target relationship.
[0105] As mentioned above, the geographical name add1 to be processed in this solution may include, but is not limited to, any of the following: geographical names with missing content, inaccurate geographical names, or null values.
[0106] In cases where the geographical name add1 is partially missing, the missing information can be filled in based on the final geographical name mentioned above.
[0107] If the geographical name add1 is an inaccurate geographical name, it can be corrected based on the final geographical name mentioned above.
[0108] Finally, if the geographic name add1 is empty, the empty value can be replaced with the final geographic name mentioned above.
[0109] In summary, the geographical name completion method provided in the embodiments of this specification has the following innovative features:
[0110] First, through innovative indexing rules (using part of the geographic region identifier and media number as an index and storing it in UCS storage) and bucketing rules (using the district / county code and the last four digits of the media number as bucketing keys), the query volume based on the index is kept within a small range, and the overall query efficiency is high.
[0111] Second, by preprocessing the candidate geographic names and the geographic names to be processed, and combining them with the BERT model, the matching rate of defective geographic names can reach a high level.
[0112] Third, a completely new process was designed, combining offline and online processing methods and applying them to online services, which solved the problems of data loss, data quality, and slow data query.
[0113] Fourth, by using the completion method in this scheme to complete defective geographical names, the utilization rate of data can be improved.
[0114] Corresponding to the above-described geographical name completion method, one embodiment of this specification also provides a geographical name completion device, such as... Figure 3 As shown, the device may include:
[0115] The acquisition unit 302 is used to acquire the geographic region identifier corresponding to the first geographic name to be processed.
[0116] The query unit 304 is used to query a number of second geographical names corresponding to geographical region identifiers based on a pre-built index table, wherein the index table is indexed at least by the geographical region identifier.
[0117] The determining unit 306 is used to determine the target geographical name corresponding to the first geographical name from a plurality of second geographical names.
[0118] The completion unit 308 is used to complete the first geographical name based on the target geographical name.
[0119] In one embodiment, the first geographic name is selected from the field value of a first field in the target geographic name table, which is used to indicate a defective geographic name for the user.
[0120] In one embodiment, the target geographic name table further includes a second field for indicating a portion of the media number associated with the defective geographic name, and the index table is also indexed using a portion of the media number.
[0121] The determining unit 306 is further configured to determine a portion of the content of the first media number associated with the first geographical name based on the second field value of the second field corresponding to the first geographical name;
[0122] Query unit 304 is specifically used for:
[0123] Search for several second geographic names that correspond to portions of the geographic region identifier and the first median number.
[0124] In one embodiment, the geographic region identifier is multiple geographic region identifiers at multiple preset regional levels.
[0125] In one embodiment, the device further includes a connection unit 310 and a creation unit 312;
[0126] The acquisition unit 302 is also used to acquire a first geographical name table and a second geographical name table. Both the first geographical name table and the second geographical name table include a third field and a fourth field. The third field and the fourth field are used to indicate the user's complete geographical name and its corresponding geographical area identifier, respectively. The complete geographical name indicated by the third field in the first geographical name table is a fixed geographical name, while the complete geographical name indicated by the third field in the second geographical name table is a dynamically changing geographical name.
[0127] The connection unit 310 is used to perform a table join between the first geographical name table and the second geographical name table to obtain the final geographical name table.
[0128] Create cell 312 to create an index table corresponding to the final geographic name table, based at least on the third and fourth fields.
[0129] In one embodiment, the aforementioned fixed geographical name includes geographical names of any of the following addresses: registered address and document address; the aforementioned dynamically changing geographical name includes geographical names of any of the following addresses: invoice address, courier delivery address, and transaction delivery address.
[0130] In one embodiment, the first geographic name table and the second geographic name table further include a fifth field, which is used to indicate a portion of the media number that is associated with the full geographic name;
[0131] Unit 312 is specifically used for:
[0132] An index table is created by using the combination of the fourth and fifth fields as the index field and the third field as the query field corresponding to the index field. The aforementioned second geographical names are determined based on the field values of the query field.
[0133] In one embodiment, the index table is divided into several buckets according to geographical region identifiers.
[0134] In one embodiment, the determining unit 306 is specifically used for:
[0135] Input the first geographical name and several second geographical names into the target scoring model to obtain the matching scores of the first geographical name with several second geographical names respectively;
[0136] Based on the matching scores, the target geographical name is determined from several second geographical names.
[0137] In another embodiment, the determining unit 306 is specifically used for:
[0138] Identify the common characters between the first geographical name and several second geographical names;
[0139] Based on each common character, candidate geographical names are determined from several second geographical names;
[0140] Input the first geographical name and each candidate geographical name into the target scoring model to obtain the matching scores of the first geographical name with each candidate geographical name;
[0141] Based on the matching scores, the target geographical name is determined from the candidate geographical names.
[0142] In one embodiment, the device further includes:
[0143] The preprocessing unit 314 is used to preprocess the first geographical name and several second geographical names respectively. The preprocessing includes one or more of the following: deleting prefix words, deleting spaces, deleting special characters, and deleting illegal characters.
[0144] The determining unit 306 is also specifically used for:
[0145] Identify the common characters between the preprocessed first geographic name and several preprocessed second geographic names.
[0146] In one embodiment, the index table further includes a sixth field indicating a user's identifier and / or a seventh field indicating the strength of the association; the number of target geographic names is multiple; the device further includes:
[0147] The filtering unit 316 is used to filter each target geographic name according to the field values of the sixth field and / or the seventh field corresponding to each target geographic name, so as to obtain the final geographic name;
[0148] The completion unit 308 is also used to complete the first geographical name based on the final geographical name.
[0149] The functions of each functional unit of the apparatus in the above embodiments of this specification can be implemented through the steps of the above method embodiments. Therefore, the specific working process of the apparatus provided in one embodiment of this specification will not be repeated here.
[0150] This specification provides a geographical name completion device in one embodiment, which can greatly improve the utilization rate of data.
[0151] According to another embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed in a computer, causes the computer to perform a combination Figure 2 The method described.
[0152] According to another embodiment, a computing device is also provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements a combination... Figure 2 The method described.
[0153] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the medium or device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0154] The steps of the methods or algorithms described in conjunction with the disclosure in this specification can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in RAM, flash memory, ROM, EPROM, EEPROM, registers, hard disk, external hard disk, CD-ROM, or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Alternatively, the ASIC can reside in a server. Of course, the processor and storage medium can also exist as discrete components in the server.
[0155] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0156] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26k20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, ASICs, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0157] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. A typical implementation device is a server system. Of course, this application does not exclude the possibility that, with the future development of computer technology, the computer implementing the functions of the above embodiments can be, for example, a personal computer, a laptop computer, an in-vehicle human-machine interaction device, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0158] While one or more embodiments of this specification provide the operational steps of the methods described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive means. The order of steps listed in the embodiments is merely one possible order of execution among many steps and does not represent the only possible order. In actual device or end product execution, the methods shown in the embodiments or drawings may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in the process, method, product, or apparatus that includes the elements is not excluded. For example, the use of terms such as "first," "second," etc., is to denote names and does not indicate any particular order.
[0159] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, when implementing one or more of these specifications, the functions of each module can be implemented in one or more software and / or hardware components, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.
[0160] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0161] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0162] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0163] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0164] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0165] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0166] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0167] One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. One or more embodiments of this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0168] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, system embodiments are basically similar to method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. In the description of this specification, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this specification. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0169] The above description is merely an embodiment of one or more embodiments of this specification and is not intended to limit the scope of these embodiments. Various modifications and variations can be made to these embodiments by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims.
Claims
1. A method for completing geographical names, comprising: Obtain the geographic region identifier corresponding to the first geographic name to be processed; The geographic region identifier is multiple geographic region identifiers at multiple preset regional levels. The first geographical name is a defective geographical name used by the user; Based on a pre-built index table, several second geographical names corresponding to the geographical region identifier are queried, wherein the index table uses the geographical region identifier as an index field and the complete geographical name as a query field; the complete geographical name includes fixed geographical names and dynamically changing geographical names. Determine the target geographical name corresponding to the first geographical name from the plurality of second geographical names; The first geographical name is completed based on the target geographical name.
2. The method according to claim 1, wherein, The first geographic name is selected from the field value of the first field in the target geographic name table.
3. The method according to claim 2, wherein, The target geographic name table also includes a second field, which is used to indicate a portion of the media number associated with the defective geographic name; The index table also uses a portion of the media number as an index; The method further includes: Based on the value of the second field of the second field corresponding to the first geographical name, determine a portion of the content of the first media number associated with the first geographical name; The query corresponds to several second geographical names of the geographical region identifier, including: Query several second geographical names that correspond to a portion of the geographical region identifier and the first medium number.
4. The method according to claim 1, wherein, The index table is constructed through the following steps: Obtain a first geographic name table and a second geographic name table; both the first and second geographic name tables include a third field and a fourth field, the third field and the fourth field being used to indicate the user's complete geographic name and its corresponding geographic region identifier, respectively; and the complete geographic name indicated by the third field in the first geographic name table is a fixed geographic name; the complete geographic name indicated by the third field in the second geographic name table is a dynamically changing geographic name; Join the first and second geographical name tables to obtain the final geographical name table. An index table corresponding to the final geographic name table is created, based at least on the third and fourth fields.
5. The method according to claim 4, wherein, The fixed geographical name includes geographical names of any of the following addresses: registered address and document address; The dynamically changing geographic names include geographic names of any of the following types of addresses: invoice address, express delivery address, and transaction delivery address.
6. The method according to claim 4, wherein, The first and second geographical name tables also include a fifth field, which is used to indicate a portion of the media number that is associated with the complete geographical name; Creating the index table corresponding to the final geographic name table includes: The index table is created by using the combination of the fourth and fifth fields as the index field and the third field as the query field corresponding to the index field; the plurality of second geographical names are determined based on the field values of the query field.
7. The method according to claim 1, wherein, The index table is divided into several buckets according to the geographical region identifier.
8. The method according to claim 1, wherein, The step of determining the target geographical name corresponding to the first geographical name from the plurality of second geographical names includes: Input the first geographical name and the plurality of second geographical names into the target scoring model to obtain the matching scores of the first geographical name and the plurality of second geographical names respectively; Based on the matching scores, the target geographical name is determined from the plurality of second geographical names.
9. The method according to claim 1, wherein, The step of determining the target geographical name corresponding to the first geographical name from the plurality of second geographical names includes: Determine the common characters between the first geographical name and the plurality of second geographical names; Based on the aforementioned common characters, each candidate geographical name is determined from the plurality of second geographical names; Input the first geographical name and each of the candidate geographical names into the target scoring model to obtain the matching scores of the first geographical name and each of the candidate geographical names respectively; Based on the matching scores, the target geographical name is determined from the candidate geographical names.
10. The method of claim 9, further comprising: The first geographical name and the plurality of second geographical names are preprocessed respectively; The preprocessing includes one or more of the following: removing prefixes, removing spaces, removing special characters, and removing illegal characters; The step of determining the common characters between the first geographical name and each of the plurality of second geographical names includes: Determine the common characters between the preprocessed first geographical name and the preprocessed plurality of second geographical names.
11. The method according to claim 6, wherein, The index table also includes a sixth field indicating the user's identifier and / or a seventh field indicating the strength of the association; The number of target geographic names is multiple; the method further includes: Based on the field values of the sixth and / or seventh fields corresponding to each target geographic name, the target geographic names are filtered to obtain the final geographic names; The first geographical name is completed based on the final geographical name.
12. A geographical name completion device, comprising: The acquisition unit is used to acquire the geographic region identifier corresponding to the first geographic name to be processed. The geographic region identifier is multiple geographic region identifiers at multiple preset regional levels. The first geographical name is a defective geographical name used by the user; The query unit is used to query a number of second geographical names corresponding to the geographical region identifier based on a pre-built index table, wherein the index table uses the geographical region identifier as an index field and the complete geographical name as a query field; the complete geographical name includes fixed geographical names and dynamically changing geographical names. A determining unit is configured to determine, from the plurality of second geographical names, a target geographical name corresponding to the first geographical name; The completion unit is used to complete the first geographical name based on the target geographical name.
13. A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-11.
Citation Information
Patent Citations
System and method for matching of database records based on similarities to search queries
CA2792070A1
Address query method and system, equipment, and storage medium
CN113886650A