Geographic name completion method and device
By obtaining the geographical area identification of the geographical name and querying the index table, determining the target geographical name to complete the original geographical name, the problem of low data utilization caused by geographical name defects in the online service platform is solved, and efficient geographic name completion is achieved.
Patent Information
- Application Number
- CN202411919430.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-24
AI Technical Summary
In the online service platform, the initial geographical name may have missing content, empty values or inaccurate filling during the ETL processing process, resulting in the defective geographical name being directly discarded, reducing the utilization rate of data.
By obtaining the geographical area identifier corresponding to the to be processed, several candidate geographical names corresponding to the geographical area identifier are queryed based on the pre-constructed index table, the target geographical name is determined and the original geographical name is completed.
This method can effectively complete defective geographical names, improve data utilization, and improve the efficiency of geographic name completion by optimizing index table query performance.
Smart Images

Figure CN119848362A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification belong to the field of computer technology, and more particularly, to a method and device for completing a geographic name. Background Art
[0002] The user's geographic name is stored in the online service platform (for example, UService) for query by data users. Usually, these geographic names are obtained by extracting, transforming, and loading (ETL) the initial geographic names collected online through offline tasks. The initial geographic names may have defects such as partial missing content, empty values, or inaccurate filling. In traditional technologies, these defective geographic names will be directly discarded, which will greatly reduce the utilization rate of the data. Summary of the invention
[0003] The purpose of the present invention is to provide a geographical name completion method and device, which can complete defective geographical names and thus greatly improve the utilization rate of data.
[0004] The first aspect of the present specification provides a method for completing a geographic name, comprising:
[0005] Obtaining a geographic area identifier corresponding to a first geographic name to be processed;
[0006] Based on a pre-built index table, querying a plurality of second geographical names corresponding to the geographical area identifier, wherein the index table uses at least the geographical area identifier as an index;
[0007] Determine a target geographical name corresponding to the first geographical name from the plurality of second geographical names;
[0008] The first geographic name is completed based on the target geographic name.
[0009] A second aspect of the present specification provides a geographic name completion device, comprising:
[0010] An acquisition unit, used for acquiring a geographic area identifier corresponding to a first geographic name to be processed;
[0011] A query unit, configured to query a plurality of second geographic names corresponding to the geographic area identifier based on a pre-constructed index table, wherein the index table uses at least the geographic area identifier as an index;
[0012] a determining unit, configured to determine a target geographical name corresponding to the first geographical name from the plurality of second geographical names;
[0013] A completion unit is used to complete the first geographical name based on the target geographical name.
[0014] A third aspect of the present specification provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method described in the first aspect.
[0015] A fourth aspect of the specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the first aspect is implemented.
[0016] The fifth aspect of this specification provides a computer program product, including a computer program / instruction, which implements the steps of the method described in the first aspect when executed by a processor.
[0017] One or more embodiments of the present specification provide a method and device for completing a geographic name, which queries an index table based on a geographic area identifier corresponding to a defective geographic name (i.e., a first geographic name) to obtain multiple candidate geographic names (i.e., a second geographic name) for completing the defective geographic name. It should be noted that, since the geographic area identifier usually corresponds to a geographic name within a certain range, this solution can greatly reduce the number of candidate geographic names recalled. In addition, since the index table has the advantage of optimizing query performance, this solution can quickly query and obtain candidate geographic names, which helps to improve the efficiency of geographic name completion. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use 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 ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0019] Figure 1 A schematic diagram of an implementation scenario of an embodiment disclosed in this specification;
[0020] Figure 2 A flow chart of a geographic name completion method according to an embodiment of the present specification is shown;
[0021] Figure 3 A schematic diagram of a geographic name completion device according to an embodiment of the present specification is shown. DETAILED DESCRIPTION
[0022] In order 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 in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0023] Figure 1 A schematic diagram of an implementation scenario of an embodiment disclosed in this specification. Figure 1 In the process, first, the geographic area identifier corresponding to the geographic name add1 to be processed can be obtained. The geographic area identifier here can be multiple geographic area identifiers of multiple preset regional levels. In a more specific embodiment, the multiple preset regional levels can be provinces, cities, districts / counties, etc. And the geographic area identifier here can refer to an area code (code) or an area name. Then, based on the geographic area identifier, a pre-constructed index table can be queried to obtain several candidate geographic names add2. The index table here uses at least the geographic area identifier as an index. Finally, the target geographic name corresponding to the geographic name add1 to be processed can be determined from the above-mentioned candidate geographic names add2, and the geographic name add1 to be processed can be completed based on it.
[0024] It should be noted that the index table described in this solution can be created for the geographic name detailed table (i.e., the final geographic name table), and the geographic name detailed table is obtained by summarizing the geographic name table table1 and the geographic name table table2. The following is an explanation of the summarization process:
[0025] The above-mentioned geographic name table table1 at least includes: a field column1 indicating the user's full geographic name, wherein the full geographic name here is a fixed geographic name, which may include any of the following address geographic names: registered address and certificate geography, etc. Since the full geographic name in the geographic name table table1 is a fixed geographic name, the geographic name table table1 can also be called a static geographic name table.
[0026] In practice, in addition to field column1, the geographic name table table1 may also include one or more of the following fields: field column2 indicating the media number associated with the complete geographic name, field column3 indicating the strength of the association (i.e. the association between the complete geographic name and the media number), field column4 indicating the user ID (such as nickname, etc.), and so on.
[0027] Among them, the above-mentioned media number may include but is not limited to mobile phone numbers, Weibo accounts, etc.
[0028] The value range of the above-mentioned association relationship strength can be: [0,1], where a larger value represents a stronger strength of the association relationship between the complete geographic name and the media number.
[0029] In an example, the geographic name table table1 may be as shown in Table 1:
[0030] Table 1
[0031]
[0032] The above m and n represent the specific building number and room number respectively.
[0033] It should be understood that Table 1 here is only an exemplary description. In practice, the above user identifier may also be an identity identifier of the user, etc., and this specification does not limit this.
[0034] For the above-mentioned geographic name table table1, a field indicating a geographic region identifier can be added based on the field value of the field column1 indicating the user's full geographic name. There can be multiple geographic region identifiers, and the multiple geographic region identifiers correspond to multiple preset regional levels. In a specific embodiment, the multiple preset regional levels can be provinces, cities, districts / counties, etc.
[0035] It should be understood that, in the case where there are multiple geographical area identifiers, multiple fields corresponding to the multiple geographical area identifiers are added. More specifically, the multiple fields are province fields, city fields, and district / county fields.
[0036] For example, after adding a field indicating a geographic area identifier to Table 1, Table 2 may be obtained.
[0037] Table 2
[0038]
[0039] The field values of the province, city and district / county fields are the area codes. Specifically, the field value of the province field is the province code, the field value of the city field is the city code, and the field value of the district / county field is the district / county code.
[0040] It should be understood that Table 2 is only an exemplary description. In practice, only the province field or only the province and city fields may be added. In addition, the field values of the above-mentioned province, city and district / county fields may also be regional names, which is not limited in this specification.
[0041] After adding a field indicating the geographic area identifier to the geographic name table table1, it can be preprocessed, where the preprocessing here can include one or more of the following: column pruning, partition filtering, and Where condition simplification. Column pruning refers to deleting columns that are not related to completing the geographic name. For example, when Table 2 also includes other fields, these fields can be deleted. Partition filtering refers to filtering out the data of the target partition, for example, filtering out the data of the partition corresponding to XX year XX month XX day. Where condition simplification refers to deleting data whose geographic name length is less than a preset threshold (for example, 4).
[0042] The above-mentioned geographic name table table2 at least includes: a field column1 indicating the user's full geographic name, wherein the full geographic name here is a dynamically changing geographic name, which may include any of the following address geographic names: invoice address, express delivery address, transaction delivery address, etc. Since the full geographic name in the geographic name table table2 is a dynamically changing geographic name, the geographic name table table2 may also be called a dynamic geographic name table.
[0043] Similarly, in addition to field column1, the geographic name table table2 may also include one or more of the following fields: field column2 indicating the media number that is associated with the complete geographic name, field column3 indicating the strength of the association (i.e. the association between the complete geographic name and the media number), field column4 indicating the user ID (for example, nickname, etc.), and so on.
[0044] For the above-mentioned geographic name table 2, a field indicating a geographic region identifier may also be added based on the field value of the field column 1 indicating the user's full geographic name. The geographic name table 2 and the geographic name table 2 after adding the field indicating the geographic region identifier may refer to the above-mentioned Table 1 and Table 2, respectively.
[0045] It should be understood that after adding a field indicating a geographic area identifier to the geographic name table 2, it may also be preprocessed.
[0046] A unionall association (that is, table connection) is performed on the preprocessed geographic name table table1 and the preprocessed geographic name table table2 to obtain the above-mentioned geographic name detailed table.
[0047] Of course, in practice, the above-mentioned union all association may also be replaced by a union association, and this specification does not limit this.
[0048] It should be noted that in this solution, the geographic name table table1 and the geographic name table table2 are preprocessed before the union all association is performed, which can greatly reduce the amount of data after the association. It can effectively utilize the multi-machine parallel and single-machine low-resource characteristics of offline big data research and development, and solve the problems of serious computing time and resource consumption.
[0049] It should also be noted that the above-mentioned geographic name list can be summarized on the Dataphin platform. The Dataphin platform supports two R&D modes: offline R&D and real-time R&D, which provide different R&D links for different demands of batch data processing scenarios and stream data processing scenarios. On the Dataphin platform, a set of systematic, standard, and complete offline R&D links is provided for offline R&D scenarios and related demands, providing data R&D personnel with coding R&D capabilities, publishing and maintenance capabilities, and subsequent quality supervision capabilities for batch-based data production tasks.
[0050] The above is an explanation of the summary process of the geographic name detail table. A corresponding index table can be constructed for the geographic name detail table. The construction process is explained below.
[0051] In one embodiment, the field indicating the geographic region identifier in the geographic name detail table can be used as the index field in the index table. For example, the province, city and district / county fields in Table 2 are used as index fields, and the field column1 indicating the user's full geographic name is used as the query field to construct the index table.
[0052] It should be understood that in this solution, by using the above-mentioned field indicating the geographic area identifier as an index field, the geographic name can be directly and accurately fixed to a certain district / county.
[0053] Of course, in practice, the above index field may also include several subfields split from the field column2 indicating the media number, each of which indicates part of the content of the media number. Taking the media number as a mobile phone number as an example, the several subfields are two subfields, and the two subfields respectively indicate the first three digits and the last four digits of the media number.
[0054] When several subfields obtained by splitting the field column2 indicating the medium number are used as index fields, the data volume of the geographical name can be reduced more accurately.
[0055] In addition, the query fields mentioned above may also include a field column3 indicating the strength of the association relationship and / or a field column4 indicating the user identification.
[0056] In an example, the index table constructed for the geographic name detail table may be as shown in Table 3:
[0057] Table 3
[0058]
[0059]
[0060] It should be understood that Table 3 is only an exemplary description. In practice, the above-mentioned fields indicating the last four of the media number and the fields indicating the first three of the media number can also be replaced by fields indicating the complete media number, and this specification does not limit this.
[0061] It should be noted that for the above index table, the data therein may also be divided into a number (for example, 256) of buckets based on the bucket key to ensure the query efficiency of the index table.
[0062] In a specific embodiment, the district / county field and the last four fields indicating the media number may be used as bucket keys, thereby narrowing the data in a bucket to data corresponding to some users in a district / county.
[0063] In addition, in order to further improve query performance, the index table constructed above can be stored in UCS storage, which supports mixed row and column storage, and supports multiple key scenarios such as online point query, instant analysis, and offline data processing. Experiments have shown that the query time for the index table stored in UCS storage is generally around 20ms.
[0064] Furthermore, in order to ensure the real-time performance of the data in the index table, the present 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 refers to aggregating geographic name tables table1 and table2 to obtain a detailed geographic name table. Online processing is to store the index table in UCS storage and update it in a T+1 manner.
[0066] Finally, the index table constructed by this solution can also be used in online services to improve the query efficiency of users for the geographic name detail table.
[0067] At this point, the construction of the index table is completed. Afterwards, the defective geographical names can be completed based on the index table. The completion process is described below.
[0068] Figure 2 A flowchart of a geographic name completion method according to an embodiment of the present specification is shown. The method can be executed by any device, equipment, platform, or device cluster with computing and processing capabilities. Figure 2As shown, the method may include the following steps:
[0069] Step S202, obtaining the geographical area identifier corresponding to the geographical name add1 to be processed.
[0070] The geographic region identifier here may be multiple geographic region identifiers of multiple preset region levels. In a more specific embodiment, the multiple preset region levels may be provinces, cities, districts / counties, etc. The geographic region identifier here may refer to a region code (e.g., a province code, a city code, a district / county code), or may refer to a region name.
[0071] Of course, in practice, the above-mentioned geographical area identifier may also be only a province code or a province code and a city code, and this specification 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., a target geographic name table), and the geographic name tableN at least includes a field columnA indicating a defective geographic name of the user, and the geographic name add1 to be processed is any field value of the field columnA. The defective geographic name here may include but is not limited to any of the following: a geographic name with some content missing, an inaccurate geographic name, or a null value, etc.
[0073] In addition to the field columnA, the above-mentioned geographic name table tableN may also include a field columnB indicating part of the content of the media number. The media number here is associated with the defective geographic name, which may be a mobile phone number or a Weibo account, for example.
[0074] The part of the media number may include multiple types. For example, when the media number is a mobile phone number, the multiple media number contents include: the first three digits of the media number, the last four digits of the media number, etc. It should be understood that the geographic name table tableN may include multiple fields columnB corresponding to the multiple media number contents.
[0075] Of course, in practice, the above-mentioned geographic name table tableN may also include a field columnC indicating a defective user identifier of a user and a field columnD indicating the strength of the above-mentioned association relationship, etc., and this specification does not limit this.
[0076] For the above-mentioned geographic name table tableN, a field indicating a geographic region identifier may be added based on the field value of the field columnA indicating the user's defective geographic name. There may be multiple geographic region identifiers, and the multiple geographic region identifiers correspond to multiple preset regional levels. In a specific embodiment, the multiple preset regional levels may be provinces, cities, districts / counties, etc.
[0077] It should be understood that, in the case where there are multiple geographical area identifiers, multiple fields corresponding to the multiple geographical area identifiers are added. More specifically, the multiple fields are province fields, city fields, and district / county fields.
[0078] It should be noted that, when the above-mentioned geographic name add1 to be processed is selected from the defective geographic name table tableN, the geographic area identifier corresponding to the geographic name add1 to be processed can be determined based on the field value of the indicating geographic area identifier field corresponding to the geographic name add1 to be processed.
[0079] Step S204: Based on the pre-built index table, query several candidate geographic names add2 corresponding to the above-mentioned geographic area identifier.
[0080] The definition of the index table here can be referred to above, that is, it uses at least the geographical area identifier as an index. In addition, part of the content of the media number can also be used as an index.
[0081] Among them, when the index table uses the geographic area 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 the target rows whose field value of the index field is the geographic area identifier, and the field value of the query field contained in each target row is determined as the candidate geographic name add2.
[0082] When the index table is indexed by both the geographic area identifier and partial content of the media number, the partial content of the media number associated with the geographic name add1 to be processed can be determined based on the field value of field columnB corresponding to the geographic name add1 to be processed, and then the target rows that match both the geographic area identifier and partial content of the media number can be searched.
[0083] Taking the example of a geographical area identifier consisting of a province code, a city code, and a district / county code, and part of the media number including the first three digits and the last four digits of the media number, the province code, the city code, the district / county code, the first three digits of the media number, ... can be encapsulated as a row key, and the rows of the index table can be scanned based on the row key.
[0084] In summary, this solution can greatly improve the accuracy of the recalled candidate geographic name add2 when querying the index table based on the geographic area identifier, or based on the geographic area identifier and part of the media number.
[0085] Step S206: determining a target geographical name corresponding to the geographical name add1 to be processed from a plurality of candidate geographical names add2.
[0086] Specifically, the geographic name add1 to be processed and several candidate geographic names add2 may be preprocessed respectively, wherein the preprocessing here may include one or more of the following: deleting prefix words, deleting spaces, deleting special characters, deleting illegal characters, etc.
[0087] The preprocessing for removing prefix words can be implemented by encapsulating a user-defined function (UDF). UDF allows users to extend the standard function library according to specific needs, thereby implementing more complex data processing logic. UDF can accept zero or more single-line inputs and produce a single-line output.
[0088] It should be noted that in practice, some geographic names may include provinces, cities, districts, and counties, while others may not. Therefore, this solution can improve the matching success rate by deleting the prefix of the geographic name add1 to be processed and the candidate geographic name add2.
[0089] In summary, in this solution, by performing preprocessing on the geographic name add1 to be processed and the candidate geographic name add2 respectively, the matching success rate can be improved.
[0090] Of course, in practice, the above preprocessing may not be performed, and this description does not limit this.
[0091] In one embodiment, several candidate geographic names add2 and the geographic name add1 to be processed may be input into the target scoring model to obtain the matching scores of the geographic name add1 and each geographic name add2. Then, the target geographic name is determined from each geographic name add2 according to the matching scores.
[0092] It should be understood that when performing the above preprocessing, the preprocessed geographic name add2 and the preprocessed geographic name add1 may be input into the target scoring model.
[0093] The above target scoring model can be implemented as a BERT model, or as a gradient boosting decision tree (GBDT), a support vector machine (SVM), or a naive Bayes model ( Bayesian Model, NBM) etc.
[0094] After obtaining each matching score, the geographical names add2 can be sorted from high to low according to each matching score, and the top n geographical names add2 can be determined as target geographical names. Alternatively, the geographical names add2 whose corresponding matching scores are greater than a preset threshold can be determined as target geographical names.
[0095] In another embodiment, before inputting the plurality of candidate geographical names add2 and the geographical name to be processed add1 into the target scoring model, the plurality of candidate geographical names add2 may be further screened. The specific screening process is as follows:
[0096] Determine each common character between the geographic name add1 to be processed and the plurality of candidate geographic names add2, and then determine the selected geographic names add2' from the plurality of candidate geographic names add2 according to each common character. For example, the geographic names add2 whose corresponding common character lengths are greater than a preset threshold value among the plurality of candidate geographic names add2 can be determined as the selected geographic names add2'.
[0097] Afterwards, the screened geographical names add2' and the geographical names add1 to be processed can be input into the target large model to obtain the matching scores of the geographical names add1 to be processed and the screened geographical names add2', and according to the matching scores, the target geographical name can be determined from the screened geographical names add2'.
[0098] In another embodiment, the similarities (eg, Jaccard similarity or cosine similarity, etc.) between several candidate geographic names add2 and the geographic name to be processed add1 may be calculated, and based on the similarities, the target geographic name may be determined from the several candidate geographic names add2.
[0099] Of course, in practice, the latter two embodiments may be combined to determine the target geographical name, and this specification does not limit this.
[0100] Step S208, completing the geographic name add1 to be processed based on the target geographic name.
[0101] It should be noted that the number of the target geographical names determined above may be multiple, and the multiple target geographical names may be further screened.
[0102] Specifically, each target geographical name may be screened according to the field value of the field indicating the user identifier and / or the field indicating the relationship strength corresponding to each target geographical name to obtain a final geographical name. According to the final geographical name, the geographical name add1 to be processed is completed.
[0103] Taking any target geographic name as an example, the field value of the field indicating the user ID corresponding to it (i.e., the target user ID 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 detail table.
[0104] For example, the target geographical name with the longest character length corresponding to the target user identification among multiple target geographical names may be determined as the final geographical name, or the target geographical name with the greatest target relationship strength among multiple target geographical names may be determined as the final geographical name.
[0105] As mentioned above, the geographic name add1 to be processed in this solution may include but is not limited to any of the following: a geographic name with some content missing, an inaccurate geographic name, or a null value, etc.
[0106] Among them, when the geographical name add1 is a geographical name with some content missing, the missing part can be supplemented according to the above-mentioned final geographical name.
[0107] In the case where the geographical name add1 is an inaccurate geographical name, the inaccurate geographical name can be corrected according to the above-mentioned final geographical name.
[0108] Finally, when the geographic name add1 is a null value, the null value may be replaced by the above-mentioned final geographic name.
[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 (i.e., taking geographic area identifiers and part of the media number as indexes and storing them in UCS storage) and bucketing rules (i.e., taking the district / county code and the last four digits of the media number as bucket keys for bucketing), the amount of index-based queries is controlled within a smaller 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 reaches a high level;
[0112] Third, we designed a completely new process that combined offline and online processing methods and applied it to online services, solving the problems of data loss, data quality, and slow data query.
[0113] Fourth, by completing the defective geographical names through the completion method of this solution, the utilization rate of the data can be improved.
[0114] Corresponding to the above-mentioned geographic name completion method, an embodiment of the present specification also provides a geographic name completion device, such as Figure 3 As shown, the device may include:
[0115] The acquisition unit 302 is used to acquire the geographic area identifier corresponding to the first geographic name to be processed.
[0116] The query unit 304 is used to query a plurality of second geographic names corresponding to the geographic area identifier based on a pre-built index table, wherein the index table uses at least the geographic area identifier as an index.
[0117] The determination unit 306 is used to determine a 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 a field value of a first field in a target geographic name table, where the first field is used to indicate a user's defective geographic name.
[0120] In one embodiment, the target geographic name table further includes a second field, the second field being used to indicate a portion of the content of the medium number associated with the defective geographic name, and the index table further uses the portion of the content of the medium number as an index;
[0121] The determination unit 306 is further configured to determine a portion of the first medium number associated with the first geographical name according to a second field value of the second field corresponding to the first geographical name;
[0122] The query unit 304 is specifically used for:
[0123] A plurality of second geographic names corresponding to the geographic area identifier and part of the first medium number are queried.
[0124] In one embodiment, the geographic area identifier is a plurality of geographic area identifiers of a plurality of preset area levels.
[0125] In one embodiment, the apparatus further includes: a connecting unit 310 and a creating unit 312;
[0126] The acquisition unit 302 is further used to acquire a first geographic name table and a second geographic name table, wherein both the first geographic name table and the second geographic name table include a third field and a fourth field, wherein the third field and the fourth field are respectively used to indicate a complete geographic name of a user and a corresponding geographic area identifier, and the complete geographic name indicated by the third field in the first geographic name table is a fixed geographic name, and the complete geographic name indicated by the third field in the second geographic name table is a dynamically changing geographic name;
[0127] A connection unit 310 is used to connect the first geographic name table and the second geographic name table to obtain a final geographic name table;
[0128] The creation unit 312 is used to create an index table corresponding to the final geographic name table based on at least the third field and the fourth field.
[0129] In one embodiment, the above-mentioned fixed geographical name includes any one of the following geographical names of the address: registration address and certificate address; the above-mentioned dynamically changing geographical name includes any one of the following geographical names of the address: invoice address, express 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, the fifth field being used to indicate a portion of the media number associated with the complete geographic name;
[0131] The creation unit 312 is specifically used for:
[0132] An index table is created by using a combination of the fourth field and the fifth field as an index field, and using the third field as a query field corresponding to the index field. The plurality of second geographic names are determined based on the field value of the query field.
[0133] In one embodiment, the index table is divided into several buckets according to geographic area identifiers.
[0134] In one embodiment, the determining unit 306 is specifically configured to:
[0135] Inputting 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;
[0136] A target geographical name is determined from the plurality of second geographical names according to the matching scores.
[0137] In another embodiment, the determining unit 306 is specifically configured to:
[0138] Determine common characters between the first geographical name and a plurality of second geographical names;
[0139] Determining candidate geographic names from a plurality of second geographic names based on the common characters;
[0140] Inputting the first geographical name and each candidate geographical name into the target scoring model to obtain each matching score between the first geographical name and each candidate geographical name;
[0141] According to each matching score, a target geographical name is determined from each candidate geographical name.
[0142] In one embodiment, the apparatus further comprises:
[0143] A preprocessing unit 314 is used to preprocess the first geographic name and the plurality of second geographic names respectively, wherein 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 further specifically configured to:
[0145] Common characters between the preprocessed first geographic name and the preprocessed second geographic names are determined.
[0146] In one embodiment, the index table further includes a sixth field indicating a user ID of the user and / or a seventh field indicating the strength of the association relationship; the number of target geographic names is multiple; and the device further includes:
[0147] A screening unit 316, configured to screen each target geographical name according to the field value of the sixth field and / or the seventh field corresponding to each target geographical name to obtain a final geographical name;
[0148] The completion unit 308 is further used to complete the first geographical name according to the final geographical name.
[0149] The functions of the functional units of the device in the above-mentioned embodiment of this specification can be implemented through the steps of the above-mentioned method embodiment. Therefore, the specific working process of the device provided by one embodiment of this specification will not be repeated here.
[0150] An embodiment of the present specification provides a geographic name completion device that can greatly improve data utilization.
[0151] According to another embodiment, there is also provided a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute a combination of Figure 2 The method described.
[0152] According to another embodiment of the present invention, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the Figure 2 The method described.
[0153] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the medium or device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0154] The steps of the method or algorithm described in conjunction with the disclosure of this specification can be implemented in hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, register, hard disk, mobile hard disk, CD-ROM or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a server. Of course, the processor and the storage medium can also be present in the server as discrete components.
[0155] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, 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, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0156] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26k20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0157] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, the present application does not exclude that with the development of computer technology in the future, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0158] Although one or more embodiments of the present specification provide method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.
[0159] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing one or more of the present specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0160] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0161] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions 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] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0165] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, graphene storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0166] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of the present 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 the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0168] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.
[0169] The above description is only an example of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. For those skilled in the art, one or more embodiments of the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims.
Claims
1. A geographical name completion method, comprising: Obtaining a geographic area identifier corresponding to a first geographic name to be processed; Based on a pre-built index table, querying a plurality of second geographical names corresponding to the geographical area identifier, wherein the index table uses at least the geographical area identifier as an index; Determine a target geographical name corresponding to the first geographical name from the plurality of second geographical names; The first geographic name is completed based on the target geographic name.
2. The method according to claim 1, wherein: The first geographic name is selected from a field value of a first field in a target geographic name table, where the first field is used to indicate a user's defective geographic name.
3. The method according to claim 2, wherein: The target geographic name table further includes a second field, the second field being used to indicate a portion of the media number associated with the defective geographic name; The index table also uses part of the content of the medium number as an index; The method further comprises: Determining, based on a second field value of a second field corresponding to the first geographic name, a portion of a first media number associated with the first geographic name; The querying of a plurality of second geographical names corresponding to the geographical area identifier includes: A plurality of second geographic names corresponding to the geographic area identifier and part of the first media number are queried.
4. The method according to claim 1, wherein: The geographic area identifiers are multiple geographic area identifiers of multiple preset area levels.
5. The method according to claim 1, wherein: The index table is constructed by the following steps: Obtain a first geographic name table and a second geographic name table; the first geographic name table and the second geographic name table both include a third field and a fourth field, the third field and the fourth field are respectively used to indicate the user's full geographic name and its corresponding geographic area identifier; and the full geographic name indicated by the third field in the first geographic name table is a fixed geographic name; the full geographic name indicated by the third field in the second geographic name table is a dynamically changing geographic name; Performing table connection on the first geographic name table and the second geographic name table to obtain a final geographic name table; The index table corresponding to the final geographic name table is created based on at least the third field and the fourth field.
6. The method according to claim 5, wherein: The fixed geographical name includes any of the following geographical names of addresses: registered address and certificate address; The dynamically changing geographical name includes any of the following geographical names of addresses: invoice address, express delivery address and transaction delivery address.
7. The method according to claim 5, wherein: The first geographic name table and the second geographic name table further include a fifth field, the fifth field being used to indicate a portion of the media number associated with the complete geographic name; The step of creating the index table corresponding to the final geographic name table comprises: The index table is created by using the combination of the fourth field and the fifth field as an index field and the third field as a query field corresponding to the index field; and the plurality of second geographic names are determined based on the field value of the query field.
8. The method according to claim 1, wherein: The index table is divided into a number of buckets according to the geographic area identifier.
9. The method according to claim 1, wherein: The determining a target geographical name corresponding to the first geographical name from the plurality of second geographical names comprises: Inputting the first geographical name and the plurality of second geographical names into a target scoring model to obtain respective matching scores of the first geographical name and the plurality of second geographical names; The target geographical name is determined from the plurality of second geographical names according to the matching scores.
10. The method according to claim 1, wherein: The determining a target geographical name corresponding to the first geographical name from the plurality of second geographical names comprises: Determine common characters between the first geographical name and the plurality of second geographical names; Determining candidate geographic names from the plurality of second geographic names according to the common characters; Inputting the first geographical name and the candidate geographical names into a target scoring model to obtain matching scores between the first geographical name and the candidate geographical names; The target geographical name is determined from the candidate geographical names according to the matching scores.
11. The method according to claim 10, further comprising: Preprocessing the first geographical name and the plurality of 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; The determining of common characters between the first geographical name and the plurality of second geographical names comprises: Determine each common character between the preprocessed first geographic name and the preprocessed plurality of second geographic names.
12. The method according to claim 7, wherein: The index table further includes a sixth field indicating a user identification of the user and / or a seventh field indicating the strength of the association relationship; The number of the target geographic names is multiple; the method further includes: Screening each target geographical name according to the field value of the sixth field and / or the seventh field corresponding to each target geographical name to obtain a final geographical name; The first geographical name is completed according to the final geographical name.
13. A geographical name completion device, comprising: An acquisition unit, used for acquiring a geographic area identifier corresponding to a first geographic name to be processed; A query unit, configured to query a plurality of second geographic names corresponding to the geographic area identifier based on a pre-constructed index table, wherein the index table uses at least the geographic area identifier as an index; a determining unit, configured to determine a target geographical name corresponding to the first geographical name from the plurality of second geographical names; A completion unit is used to complete the first geographical name based on the target geographical name.
14. A computing device, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 12 is implemented.
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
Geographic entity positioning analysis method and device and computer equipment
CN116431625A
Data processing method, device and equipment
CN116628010A
Data processing method, data processing device, computer equipment and storage medium
CN117349451A