Building entry method and device of customer data, electronic equipment and storage medium
By extracting text features and matching customer addresses with building addresses using cosine similarity, combined with latitude and longitude verification, customer data is automatically entered into the building database. This solves the problems of low efficiency and privacy risks associated with manual identification, and achieves efficient and accurate customer data management.
Patent Information
- Application Number
- CN202410870398.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2044-06-28
AI Technical Summary
Current technologies rely on manual identification for customer data entry into buildings, which is inefficient, prone to errors, and poses a risk of privacy leaks, while also incurring high labor costs.
The system uses text feature extraction algorithms and cosine similarity to match customer addresses with building addresses, and combines latitude and longitude coordinates to verify the matching level, automatically executing the building entry operation.
It enables intelligent and automated management of customer data entering the building, improving the accuracy and efficiency of entry and saving labor costs.
Smart Images

Figure CN118820798B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, electronic device, and computer-readable storage medium for storing customer data in buildings. Background Technology
[0002] In existing technologies, customers are typically identified manually and their entry into the building is completed. However, existing technologies have the following shortcomings:
[0003] 1. Relying entirely on manual daily visits and surveys to obtain customer information results in low data acquisition efficiency, slow manual data entry speed, and a high risk of errors.
[0004] 2. Manual processing of sensitive business data and building information may pose a risk of privacy and trade secret leakage;
[0005] 3. Relying on account managers to perform a large amount of repetitive data processing will lead to high labor costs, and as labor costs rise, economic benefits will further decline. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to address the above-mentioned shortcomings of the prior art by providing a method, apparatus, electronic device and computer-readable storage medium for entering customer data into buildings. This method can realize intelligent and automated management of customer data entering into buildings, improve the accuracy and efficiency of customer data entering into buildings, and save labor costs.
[0007] In a first aspect, the present invention provides a method for entering customer data into a building, comprising: acquiring structured data of building addresses and customer addresses; matching the structured data of building addresses and customer addresses based on text feature extraction algorithms and cosine similarity to obtain a target matching level between customer addresses and building addresses; and performing a corresponding entry operation on the customer data based on the target matching level.
[0008] Preferably, the acquisition of structured data of building addresses and customer addresses specifically includes: acquiring standard building address data and customer business address data; and segmenting and structuring the standard building address data and customer business address data according to a preset slicing level to obtain structured data of building addresses and customer addresses.
[0009] Preferably, the structured data includes text data and latitude and longitude coordinate data. The matching of the structured data of building addresses and customer addresses based on text feature extraction algorithms and cosine similarity to obtain a target matching level between the customer address and the building address specifically includes: extracting features from the text data of building addresses and customer addresses based on the TF-IDF algorithm to obtain the final-level address feature vectors of the building address and the customer address; calculating the cosine similarity between the final-level address feature vectors of the building address and the final-level address feature vectors of the customer address to obtain a target cosine similarity between the customer address and the building address; matching an initial matching level between the customer address and the building address according to the target cosine similarity and a first mapping relationship, wherein the first mapping relationship includes the correspondence between cosine similarity and the initial matching level; and verifying the initial matching level based on the latitude and longitude coordinate data of the building address and the customer address to obtain the target matching level between the customer address and the building address.
[0010] Preferably, the step of extracting features from the text data of building addresses and customer addresses based on the TF-IDF algorithm to obtain the final-level address feature vectors of building addresses and customer addresses specifically includes: preprocessing the text data of building addresses and customer addresses to obtain the final-level address data of building addresses and customer addresses; calculating the TF-IDF value of each term in the final-level address data of building addresses and customer addresses based on the TF-IDF model and the final-level address data of building addresses and customer addresses; and extracting features from the final-level address data of building addresses and customer addresses based on the TF-IDF values of each term in the final-level address data of building addresses and customer addresses to obtain the final-level address feature vectors of building addresses and customer addresses.
[0011] Preferably, the TF-IDF model includes:
[0012] TF-IDF(t,d)=TF(t,d)*IDF(t) (1), where d represents the final address data, t represents each term in the final address data, TF(t,d) represents the number of times each term in the final address data appears in the final address data, IDF(t) represents the uniqueness or universality of each term in the final address data, and TF-IDF(t,d) represents the TF-IDF value of each term in the final address data.
[0013] Preferably, the verification of the initial matching level based on the latitude and longitude coordinate data of the building address and the customer address to obtain the target matching level between the customer address and the building address specifically includes: calculating the spherical distance between the latitude and longitude coordinates of the building address and the customer address to obtain the distance between the customer address and the building address; determining whether the distance is within a reasonable radius; in response to the distance being within a reasonable radius, upgrading the initial matching level to obtain the target matching level between the building address and the customer address; in response to the distance not being within a reasonable radius, determining the initial matching level as the target matching level between the building address and the customer address.
[0014] Preferably, the target matching level includes a first matching level, a second matching level, a third matching level, and a fourth matching level. The step of performing the corresponding building entry operation on the customer data based on the target matching level specifically includes: binding the customer address and building address corresponding to the first matching level; confirming the customer address and building address corresponding to the second matching level and the third matching level; binding the customer address and building address corresponding to the second matching level in response to the confirmation of the second matching level; marking the customer address and building address corresponding to the third matching level in response to the confirmation of the third matching level; and re-determining the target matching level based on the marked customer address and building address corresponding to the third matching level and the fourth matching level, so as to perform the corresponding building entry action on the customer data based on the re-determined target matching level.
[0015] Secondly, the present invention also provides a customer data entry device, comprising: an acquisition module, a determination module, and an entry module. The acquisition module is used to acquire structured data of building addresses and customer addresses, wherein the structured data includes text data and latitude and longitude coordinate data. The determination module is connected to the acquisition module and is used to match the structured data of building addresses and customer addresses according to a text feature extraction algorithm and cosine similarity to obtain a target matching level between the customer address and the building address. The entry module is connected to the determination module and is used to perform a corresponding entry operation on the customer data based on the target matching level.
[0016] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to implement the customer data entry method provided in the first aspect above.
[0017] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the method for entering customer data into the building as described in the first aspect.
[0018] This invention provides a method, apparatus, electronic device, and computer-readable storage medium for entering customer data into buildings. By acquiring customer addresses and building addresses, and matching them using text feature extraction algorithms and cosine similarity, a target matching level is obtained, eliminating the need for manual identification and matching. Based on the target matching level, corresponding building entry operations are performed on the customer data. Therefore, this invention enables intelligent and automated building entry management of customer data, improving the accuracy and efficiency of customer data entry and saving labor costs. Attached Figure Description
[0019] Figure 1 This is a flowchart of a method for entering customer data into a building according to Embodiment 1 of the present invention;
[0020] Figure 2 This is a flowchart of a text data preprocessing method according to Embodiment 1 of the present invention;
[0021] Figure 3 This is a flowchart of a method for entering customer data into a building according to Embodiment 2 of the present invention;
[0022] Figure 4 This is a flowchart of a method for matching customer addresses and building addresses according to Embodiment 3 of the present invention;
[0023] Figure 5 This is a schematic diagram of a customer data entry device according to Embodiment 4 of the present invention. Detailed Implementation
[0024] To enable those skilled in the art to better understand the technical solution of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0025] It is understood that the specific embodiments and accompanying drawings described herein are merely for explaining the invention and are not intended to limit the invention.
[0026] It is understood that, without conflict, the various embodiments and features in the embodiments of the present invention can be combined with each other.
[0027] It is understood that, for ease of description, only the parts related to the present invention are shown in the accompanying drawings, while the parts unrelated to the present invention are not shown in the drawings.
[0028] It is understood that each unit or module involved in the embodiments of the present invention may correspond to only one entity structure, or may be composed of multiple entity structures, or multiple units or modules may be integrated into one entity structure.
[0029] It is understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of this invention may occur in a different order than that marked in the accompanying drawings.
[0030] It is understood that the flowcharts and block diagrams of this invention illustrate the possible architecture, functions, and operations of systems, apparatuses, devices, and methods according to various embodiments of this invention. Each block in the flowchart or block diagram may represent a unit, module, program segment, or code, containing executable instructions for implementing the specified function. Furthermore, each block or combination of blocks in the block diagram and flowchart can be implemented using a hardware-based system to achieve the specified function, or using a combination of hardware and computer instructions.
[0031] It is understood that the units and modules involved in the embodiments of the present invention can be implemented by software or by hardware. For example, the units and modules can be located in a processor.
[0032] Example 1:
[0033] like Figure 1 As shown, this embodiment provides a method for importing customer data into a building. The method for importing customer data into a building includes:
[0034] S101, obtain structured data of building addresses and customer addresses.
[0035] Specifically, S101: Obtain structured data of building addresses and customer addresses, including steps S1011-S1012:
[0036] S1011, Obtain standard building address data and customer business address data;
[0037] S1012, based on the preset slice level, segments and structures the standard building address data and customer business address data to obtain structured data of building addresses and customer addresses.
[0038] In this embodiment, the prerequisite for automatically importing customer data into the building is obtaining customer business address data and building standard address data for the matching algorithm to perform matching analysis. This embodiment uses the customer's registered business address instead of their actual office address. First, the "Basic Information of Industrial and Commercial Enterprises" data is extracted from the customer data through the data platform to obtain the customer's business address data. Second, building standard address data is obtained from the building system and provincial branch line system using OSS2.0 (Open Source Software). The customer business address data includes: company name, company name (old), social registration code, customer address information, and latitude and longitude information. The building standard address data includes: community ID, building ID, building name, building address information, and latitude and longitude information. The customer business address data and building standard address data can be summarized into a table as shown in Table 1. Finally, the precise mode of the jieba (a powerful Chinese word segmentation tool used to segment Chinese text into individual words) library is used to segment and structure the customer business address data and building standard address data according to a preset slice level, resulting in structured data for building addresses and customer addresses. This embodiment uses the preset slice level of provincial, municipal, and district administrative levels as an example. By segmenting and structuring building standard address data and customer business address data according to provincial, municipal, and district administrative levels, this embodiment facilitates the integration and sharing of data between different systems, improves data utilization efficiency, enables accurate location and search of address information, enhances data accuracy, searchability, and geographic information analysis capabilities, and provides better support for data management and business decision-making.
[0039] Table 1 Customer Business Address Data and Building Standard Address Data
[0040]
[0041] Table 2 Structured data of building addresses
[0042]
[0043]
[0044] Table 3 Structured data of customer addresses
[0045]
[0046] It should be noted that in the structured data of building addresses and customer addresses, a customer address must have a corresponding building address. However, the number of customer addresses and the number of building addresses may not be consistent. That is, a building address may not have a corresponding customer address, or a building address may have multiple corresponding customer addresses. For example, the address of Company M and Company T is No. 217, F Road, D Street, C District, B City, A Province, and the address of Company Z is No. 588, Y Road, T Street, R District, G City, A Province. Assuming that the customer addresses include: Company M at No. 217, F Road, D Street, C District, B City, A Province, Company T at No. 217, F Road, D Street, C District, B City, A Province, and Company Z at No. 588, Y Road, T Street, R District, G City, A Province, the building addresses may also include No. 239, Y Road, T Street, R District, G City, A Province, in addition to No. 217, F Road, D Street, C District, B City, A Province, and No. 588, Y Road, T Street, R District, G City, A Province.
[0047] S102, based on text feature extraction algorithms and cosine similarity, matches the structured data of building addresses and customer addresses to obtain the target matching level between customer addresses and building addresses.
[0048] In this embodiment, the text feature extraction algorithms include, but are not limited to: Term Frequency-Inverse Document Frequency (TF-IDF) algorithm, Word Embedding algorithm, Topic Modeling, Language Model (LM), and Bag of Words model. This embodiment uses the TF-IDF algorithm as an example for text feature extraction.
[0049] Specifically, structured data includes text data and latitude and longitude coordinate data.
[0050] Specifically, S102: Based on text feature extraction algorithms and cosine similarity, the structured data of building addresses and customer addresses are matched to obtain the target matching level between customer addresses and building addresses, including steps S1021-S1024:
[0051] S1021, based on the term frequency-inverse document frequency (TF-IDF) algorithm, extracts features from the text data of building addresses and customer addresses to obtain the final-level address feature vectors of building addresses and customer addresses.
[0052] Specifically, S1021: Based on the TF-IDF algorithm (Term Frequency-Inverse Document Frequency), feature extraction is performed on the text data of building addresses and customer addresses to obtain the final-level address feature vectors of building addresses and customer addresses. This includes: preprocessing the text data of building addresses and customer addresses to obtain the final-level address data of building addresses and customer addresses; calculating the TF-IDF value of each term in the final-level address data of building addresses and customer addresses based on the TF-IDF model and the final-level address data of building addresses and customer addresses; and extracting features from the final-level address data of building addresses and customer addresses based on the TF-IDF values of each term in the final-level address data of building addresses and customer addresses to obtain the final-level address feature vectors of building addresses and customer addresses.
[0053] In this embodiment, before performing TF-IDF calculation, it is necessary to preprocess the text data of building addresses and customer addresses. The data preprocessing process is as follows: Figure 2 As shown, this includes: ① Removing invalid data: removing noisy data, meaningless characters, and ambiguous addresses, such as "across the street," "turn right at the intersection," and "about 200 meters across the street"; ② Standardizing the descriptions of administrative districts, community streets, and residential buildings: converting words in the text data into a unified format to reduce vocabulary diversity. That is, for specific entities or keywords, stemming or word form restoration is performed to merge words with different formats into a consistent format. For example, different expressions of "street," "main street," and "street" are unified into "street," and different expressions of "building" and "building" are unified into "building." This embodiment preprocesses the text data of building addresses and customer addresses to obtain the final-level address data of building addresses and customer addresses for subsequent feature extraction and feature matching, reducing interference word frequencies and improving the accuracy of feature extraction and feature matching of building addresses and customer addresses.
[0054] Specifically, the TF-IDF model includes:
[0055] TF-IDF(t,d)=TF(t,d)*IDF(t) (1), where d represents the final address data, t represents each term in the final address data, TF(t,d) represents the number of times each term in the final address data appears in the final address data, IDF(t) represents the uniqueness or universality of each term in the final address data, and TF-IDF(t,d) represents the TF-IDF value of each term in the final address data.
[0056] In this embodiment, after preprocessing the text data of building addresses and customer addresses, each end-level address data is treated as an independent document, and a document-term matrix is constructed. Each row of the document-term matrix corresponds to one end-level address data (i.e., document), and each column corresponds to a term that appears in any end-level address data. Using the TfidfVectorizer of the TF-IDF model, a vocabulary containing all unique terms is created, and the matrix is filled according to the occurrence of each term in each address. In addition, the TfidfVectorizer counts the occurrence of each term in each document to obtain the term frequency TF(t,d), evaluates the uniqueness or prevalence of each term in all document sets to obtain the inverse document frequency IDF(t), and multiplies the term frequency TF(t,d) and the inverse document frequency IDF(t) to obtain the TF-IDF value.
[0057] TF-IDF values reflect the importance of a term in a document. Terms with consistent TF-IDF values are filtered from the final-level address data of customer and building addresses to obtain the final-level address features of building and customer addresses. Then, based on the administrative level structure and preset criteria of the final-level address features of building and customer addresses, final-level address features with consistent administrative level structures are filtered out, while those with inconsistent administrative level structures are removed, ultimately yielding the final-level address feature vectors of building and customer addresses. This embodiment uses a preset criterion of retaining the last-level address features with consistent provincial, municipal, and district / county structures, while allowing inconsistencies in street structures. For example, customer addresses are: Company M at No. 217, F Road, D Street, C District, B City, A Province; Company T at No. 217, F Road, D Street, C District, B City, A Province; and Company Z at No. 588, Y Road, T Street, R District, G City, A Province. Building addresses are: No. 217, F Road, D Street, C District, B City, A Province; No. 588, Y Road, T Street, R District, G City, A Province; No. 239, Y Road, T Street, R District, G City, K Province; and No. 239, Y Road, P Street, R District, G City, K Province. The building addresses of No. 217, F Road, D Street, C District, B City, A Province; No. 588, Y Road, T Street, R District, G City, A Province; and No. 239, Y Road, T Street, R District, G City, K Province are retained.
[0058] S1022, calculate the cosine similarity between the final address feature vector of the building address and the final address feature vector of the customer address to obtain the target cosine similarity between the customer address and the building address.
[0059] In this embodiment, after obtaining the final-level address feature vectors of building addresses and customer addresses, a recursive approach is used to calculate the cosine similarity between the final-level address feature vectors of building addresses and customer addresses. Specifically, the cosine similarity between the final-level address feature vector of the customer address and the final-level address feature vectors of each building address is calculated recursively. For example, if the customer address is Company Z at No. 588, Y Road, T Street, R District, G City, A Province, and the building addresses are No. 588, Y Road, T Street, R District, G City, A Province, and No. 239, Y Road, T Street, R District, G City, A Province, the cosine similarity between Company Z at No. 588, Y Road, T Street, R District, G City, A Province, and No. 239, Y Road, T Street, R District, G City, A Province, is calculated. The cosine similarity value is between 0 and 1; the closer the value is to 1, the more similar the contents of the two final-level address feature vectors are. Cosine similarity can quantitatively determine the degree of content matching between different final-level address feature vectors. In this embodiment, the highest cosine similarity between the final-level address feature vectors of the customer address and the building address can be used as the target cosine similarity between the customer address and the building address.
[0060] S1023, Based on the target cosine similarity and the first mapping relationship, match the initial matching level between the customer address and the building address, wherein the first mapping relationship includes the correspondence between cosine similarity and the initial matching level.
[0061] In this embodiment, before matching the initial matching level between customer addresses and building addresses according to the first mapping relationship, a cosine similarity threshold is set based on test result data and business dimensions. A mapping relationship between the cosine similarity threshold and the initial matching level is constructed, resulting in the first mapping relationship, as shown in Table 4. The initial matching level includes a first matching level, a second matching level, a third matching level, and a fourth matching level. This embodiment uses the first matching level as a complete match level, the second matching level as a suspected match level, the third matching level as a pending confirmation level, and the fourth matching level as a non-match level. This embodiment automatically completes the initial matching of customer addresses and building addresses based on TF-IDF and cosine similarity algorithms. The TF-IDF algorithm helps identify keywords in customer addresses and building addresses and calculates their importance in the text. The cosine similarity algorithm calculates the similarity between customer addresses and building addresses, thereby achieving an intelligent matching process, improving matching accuracy, and completing the matching of customer addresses and building addresses without manual intervention, improving work efficiency, and significantly saving time and human resource costs.
[0062] Table 4 First Mapping Relationship
[0063] Cosine similarity [0.95-1] [0.8-0.95) [0.6-0.8) [0-0.6) Initial matching level Exact match Suspected match Pending confirmation Mismatch
[0064] S1024, Verify the initial matching level based on the latitude and longitude coordinate data of the building address and the customer address to obtain the target matching level between the customer address and the building address.
[0065] Specifically, S1024: Verifying the initial matching level based on the latitude and longitude coordinate data of the building address and the customer address to obtain the target matching level between the customer address and the building address includes: calculating the spherical distance between the latitude and longitude coordinates of the building address and the customer address to obtain the distance between the customer address and the building address; determining whether the distance is within a reasonable radius; in response to the distance being within a reasonable radius, upgrading the initial matching level to obtain the target matching level between the building address and the customer address; in response to the distance not being within a reasonable radius, determining the initial matching level as the target matching level between the building address and the customer address.
[0066] In this embodiment, the spherical distance between the latitude and longitude coordinates of the building address and the latitude and longitude coordinates of the customer address is calculated according to the spherical model function, and the distance between the customer address and the building address is obtained, as shown in Table 5.
[0067] Table 5 Distance between Customer Address and Building Address
[0068] id latitude longitude distance 544 23.163292 113.3114676 0 545 23.163292 113.3114676 0 699 23.1685033 113.3116807 581 698 23.1685033 113.3116807 581 697 23.1685033 113.3116807 581 695 231685033 113.3116807 581 693 23.1685033 113.3116807 581 691 23.1685033 113.3116807 581 701 23.1685033 113.3116807 581
[0069] The sphere model functions include: Where R is the radius of the sphere, arccos() is the inverse cosine function, jA and wA are the latitude and longitude coordinates of point A, and jB and wB are the latitude and longitude coordinates of point B. In geographic coordinate systems, latitude and longitude coordinates are usually expressed in degrees. When performing trigonometric calculations, radians must be used as the unit. Therefore, the angle value must be converted to a radian value by multiplying the angle value by π (pi, approximately equal to 3.14) and then dividing by 180.
[0070] The building system has categorized building addresses into factory zones and non-factory zones according to type. Non-factory zones include commercial buildings, professional markets, commercial complexes, and other types. In other words, in addition to the following, the standard building address data also includes building type information, as shown in Table 6: community ID, building ID, building name, building address information, latitude and longitude information.
[0071] Table 6 Standard Building Address Data
[0072]
[0073]
[0074] After calculating the distance between the customer address and the building address, it is determined whether the building address is a factory park type or a non-factory park type. Based on the reasonable radius range corresponding to the factory park type and non-factory park type, it is verified whether the initial matching level needs to be upgraded, that is, whether the distance between the customer address and the building address is within the reasonable radius range corresponding to the factory park type or non-factory park type. If it is within the reasonable radius range corresponding to the factory park type or non-factory park type, the initial matching level is upgraded to obtain the target matching level between the customer address and the building address; if it is not within the reasonable radius range corresponding to the factory park type or non-factory park type, the initial matching level is used as the target matching level between the customer address and the building address, as shown in Table 7. The highest matching level of the target matching level and the initial matching level can be the same, and the highest matching level of the target matching level can also be higher than the highest matching level of the initial matching level. That is, in addition to including the first matching level, the second matching level, the third matching level, and the fourth matching level, the target matching level can also include a zero matching level, which is the highest matching level of the target matching level. In this embodiment, the zero matching level is used as the precise matching level. When the initial matching level is the first matching level, i.e., a perfect match, and the distance between the customer address and the building address is within a reasonable radius corresponding to either the factory park type or the non-factory park type, the initial matching level can be upgraded from the first matching level to the zeroth matching level, i.e., from a perfect match to a precise match. In this embodiment, after automatically matching the customer address and building address based on TF-IDF and cosine similarity algorithms, the target matching level is scientifically evaluated and determined by combining the physical distance between the customer address and building address and the building type. The matching level is then dynamically updated to reduce erroneous matches, further improve the matching degree, and enhance the reliability and accuracy of the matching.
[0075] Table 7 Target Matching Levels
[0076]
[0077]
[0078] This embodiment can dynamically adjust the reasonable radius range according to the building address type, as shown in Table 8. If it is a factory park type, this embodiment takes a reasonable radius range of 3 kilometers between the customer address and the building address as an example. If it is not a factory park, this embodiment takes a reasonable radius range of 300 meters between the customer address and the building address as an example.
[0079] Table 8. Reasonable radius range for customer address and building address
[0080] Building address type Factory Park Non-factory park Reasonable radius range [0-3000] [0-300]
[0081] Finally, the customer address, the building address corresponding to the customer address, the target cosine similarity between the customer address and the building address, and the distance between the customer address and the building address are written into the database as matching data between building address and customer address, as shown in Table 9.
[0082] Table 9: Matching data between building addresses and customer addresses
[0083]
[0084] S103, perform the corresponding building entry operation on the customer data based on the target matching level.
[0085] Specifically, the target matching levels include the first matching level, the second matching level, the third matching level, and the fourth matching level.
[0086] Specifically, S103: Perform the corresponding building entry operation on the customer data based on the target matching level, including steps S1031-S1035:
[0087] S1031, bind the customer address and building address corresponding to the first matching level.
[0088] S1032, confirm the customer address and building address corresponding to the second matching level and the customer address and building address corresponding to the third matching level.
[0089] S1033, in response to the confirmation of the customer address and building address corresponding to the second matching level, bind the customer address and building address corresponding to the second matching level.
[0090] S1034, in response to the confirmation of the customer address and building address corresponding to the third matching level, mark the customer address and building address corresponding to the third matching level.
[0091] S1035, the customer address and building address corresponding to the marked third matching level and the customer address and building address corresponding to the fourth matching level are redefined to determine the target matching level, so as to perform the corresponding building entry action on the customer data based on the redefined target matching level.
[0092] In this embodiment, taking the highest matching level of the target matching level as the precise matching level as an example, in addition to directly calling the customer data entry interface to bind relationships for customer addresses and building addresses corresponding to the complete matching level, the same direct calling of the customer data entry interface is used to bind relationships for customer addresses and building addresses corresponding to the precise matching level. After binding customer addresses and building addresses, the data is recorded in the building management system and pushed to the group customer center for subsequent business analysis and development of customer data. For customer addresses and building addresses corresponding to suspected matching levels, the data is automatically pushed to the account manager, forming an entry confirmation function task, which is executed by the account manager to complete the entry of customer data into the building. The customer addresses and building addresses corresponding to the unconfirmed levels are exported in batches and handed over to the account manager for manual confirmation. After manual confirmation, the data is marked, with the number of markings including but not limited to 2. The marked customer addresses and building addresses corresponding to the unconfirmed levels and non-matching levels are returned to step S1012 for re-segmentation and structuring, and then steps S102 to S103 are executed.
[0093] This embodiment provides a method for incorporating customer data into building information. By acquiring customer addresses and building addresses, and using text feature extraction algorithms and cosine similarity to match customer addresses and building addresses, a target matching level is obtained. This eliminates the need for manual identification and matching. Based on the target matching level, corresponding incorporation operations are performed on the customer data, achieving intelligent and automated management of customer data incorporation, improving the accuracy and efficiency of customer data incorporation, and saving labor costs. Furthermore, by segmenting and structuring standard building address data and customer business address data according to provincial, municipal, and district administrative levels, it facilitates data integration and sharing between different systems, improves data utilization efficiency, and enables precise location and search of address information. This enhances data accuracy, traceability, and geographic information analysis capabilities, providing better support for data management and business decision-making. By preprocessing the text data of building addresses and customer addresses, the final-level address data of building addresses and customer addresses is obtained for subsequent feature extraction and feature matching, reducing interference word frequencies and improving the accuracy of feature extraction and feature matching for building addresses and customer addresses. The system automatically performs initial matching of customer addresses and building addresses based on TF-IDF and cosine similarity algorithms. TF-IDF helps identify keywords in customer and building addresses and calculates their importance in the text. Cosine similarity calculates the similarity between customer and building addresses, thus achieving an intelligent matching process, improving matching accuracy, and completing the matching without manual intervention, improving work efficiency, and significantly saving time and human resource costs. After automatically matching customer and building addresses based on TF-IDF and cosine similarity algorithms, the system further combines the physical distance between customer and building addresses and building type to scientifically evaluate and determine the target matching level, and dynamically update the matching level to reduce the occurrence of erroneous matches, further improving the matching degree and enhancing the reliability and accuracy of the matching process.
[0094] Example 2:
[0095] like Figure 3 As shown, this embodiment provides a method for importing customer data into a building. The method for importing customer data into a building includes:
[0096] S201 segments and structures the customer's business address data and the building's standard address data to obtain structured data of building addresses and customer addresses.
[0097] In this embodiment, the prerequisite for automatically importing customer data into the building is obtaining customer business address data and building standard address data, which are then used by the slice matching algorithm to perform slice matching analysis. This embodiment uses the customer's business registration address instead of their actual office address. First, the "Basic Information of Industrial and Commercial Enterprises" data is extracted from the customer data through the data platform to obtain the customer's business address data. Second, building standard address data is obtained from the building system and provincial branch line system using OSS2.0 (Open Source Software). The customer business address data includes: company name, company name (old), social registration code, customer address information, and latitude and longitude information. The building standard address data includes: community ID, building ID, building name, building address information, and latitude and longitude information. The customer business address data and building standard address data can be summarized into a table as shown in Table 1. Finally, the precise mode of the jieba (a powerful Chinese word segmentation tool used to segment Chinese text into individual words) library is used to segment and structure the customer business address data and building standard address data according to a preset slice level, resulting in structured data for building addresses and customer addresses. This embodiment uses the preset slice level of provincial, municipal, and district administrative levels as an example. By segmenting and structuring building standard address data and customer business address data according to provincial, municipal, and district administrative levels, this embodiment facilitates the integration and sharing of data between different systems, improves data utilization efficiency, enables accurate location and search of address information, enhances data accuracy, searchability, and geographic information analysis capabilities, and provides better support for data management and business decision-making.
[0098] It should be noted that in the structured data of building addresses and customer addresses, a customer address must have a corresponding building address. However, the number of customer addresses and the number of building addresses may not be consistent. That is, a building address may not have a corresponding customer address, or a building address may have multiple corresponding customer addresses. For example, the address of Company M and Company T is No. 217, F Road, D Street, C District, B City, A Province, and the address of Company Z is No. 588, Y Road, T Street, R District, G City, A Province. Assuming that the customer addresses include: Company M at No. 217, F Road, D Street, C District, B City, A Province, Company T at No. 217, F Road, D Street, C District, B City, A Province, and Company Z at No. 588, Y Road, T Street, R District, G City, A Province, the building addresses may also include No. 239, Y Road, T Street, R District, G City, A Province, in addition to No. 217, F Road, D Street, C District, B City, A Province, and No. 588, Y Road, T Street, R District, G City, A Province.
[0099] S202, based on text feature extraction algorithms and cosine similarity, matches structured data of building addresses and customer addresses to obtain the initial matching level between customer addresses and building addresses.
[0100] In this embodiment, the text feature extraction algorithms include, but are not limited to: Term Frequency-Inverse Document Frequency (TF-IDF) algorithm, Word Embedding algorithm, Topic Modeling, Language Model (LM), and Bag of Words model. This embodiment uses the TF-IDF algorithm as an example for text feature extraction.
[0101] Before performing TF-IDF calculation, the text data of building addresses and customer addresses needs to be preprocessed. The data preprocessing process is as follows: Figure 2 As shown, this includes: ① Removing invalid data: removing noisy data, meaningless characters, and ambiguous addresses, such as "across the street," "turn right at the intersection," and "about 200 meters across the street"; ② Standardizing the descriptions of administrative districts, community streets, and residential buildings: converting words in the text data into a unified format to reduce vocabulary diversity. That is, for specific entities or keywords, stemming or word form restoration is performed to merge words with different formats into a consistent format. For example, different expressions of "street," "main street," and "street" are unified into "street," and different expressions of "building" and "building" are unified into "building." This embodiment preprocesses the text data of building addresses and customer addresses to obtain the final-level address data of building addresses and customer addresses for subsequent feature extraction and feature matching, reducing interference word frequencies and improving the accuracy of feature extraction and feature matching of building addresses and customer addresses.
[0102] After preprocessing the text data of building addresses and customer addresses, each end-level address is treated as an independent document, and a document-term matrix is constructed. Each row of the document-term matrix corresponds to one end-level address (i.e., document), and each column corresponds to a term that appears in any end-level address. Using the TfidfVectorizer of the TF-IDF model, a vocabulary containing all unique terms is created, and the matrix is populated according to the occurrence of each term in each address. In addition, the TfidfVectorizer counts the occurrence of each term in each document to obtain the term frequency TF(t,d), evaluates the uniqueness or prevalence of each term in all document sets to obtain the inverse document frequency IDF(t), and multiplies the term frequency TF(t,d) and inverse document frequency IDF(t) to obtain the TF-IDF value.
[0103] TF-IDF values reflect the importance of a term in a document. Terms with consistent TF-IDF values are filtered from the final-level address data of customer and building addresses to obtain the final-level address features of building and customer addresses. Then, based on the administrative level structure and preset criteria of the final-level address features of building and customer addresses, final-level address features with consistent administrative level structures are filtered out, while those with inconsistent administrative level structures are removed, ultimately yielding the final-level address feature vectors of building and customer addresses. This embodiment uses a preset criterion of retaining the last-level address features with consistent provincial, municipal, and district / county structures, while allowing inconsistencies in street structures. For example, customer addresses are: Company M at No. 217, F Road, D Street, C District, B City, A Province; Company T at No. 217, F Road, D Street, C District, B City, A Province; and Company Z at No. 588, Y Road, T Street, R District, G City, A Province. Building addresses are: No. 217, F Road, D Street, C District, B City, A Province; No. 588, Y Road, T Street, R District, G City, A Province; No. 239, Y Road, T Street, R District, G City, K Province; and No. 239, Y Road, P Street, R District, G City, K Province. The building addresses of No. 217, F Road, D Street, C District, B City, A Province; No. 588, Y Road, T Street, R District, G City, A Province; and No. 239, Y Road, T Street, R District, G City, K Province are retained.
[0104] After obtaining the final-level address feature vectors of building addresses and customer addresses, a recursive approach is used to calculate the cosine similarity between these vectors. Specifically, the cosine similarity is recursively calculated between the final-level address feature vector of the customer address and the final-level address feature vectors of each building address. For example, if the customer address is Company Z at No. 588, Y Road, T Street, R District, G City, A Province, and the building addresses are No. 588, Y Road, T Street, R District, G City, A Province, and No. 239, Y Road, T Street, R District, G City, A Province, the cosine similarity is calculated between Company Z at No. 588, Y Road, T Street, R District, G City, A Province, and No. 588, Y Road, T Street, R District, G City, A Province, and No. 239, Y Road, T Street, R District, G City, A Province, respectively. The cosine similarity value ranges from 0 to 1; the closer the value is to 1, the more similar the contents of the two final-level address feature vectors are. Cosine similarity can quantitatively determine the degree of content matching between different final-level address feature vectors. In this embodiment, the highest cosine similarity between the final-level address feature vectors of the customer address and the building address can be used as the target cosine similarity between the customer address and the building address.
[0105] Before matching the initial matching level between customer addresses and building addresses based on the first mapping relationship, a cosine similarity threshold is set according to the test results data and business dimensions. A mapping relationship between the cosine similarity threshold and the initial matching level is constructed, resulting in the first mapping relationship, as shown in Table 4. The initial matching level includes a first matching level, a second matching level, a third matching level, and a fourth matching level. In this embodiment, the first matching level is taken as a perfect match level, the second matching level as a suspected match level, the third matching level as a pending confirmation level, and the fourth matching level as a non-match level. This embodiment automatically completes the initial matching of customer addresses and building addresses based on TF-IDF and cosine similarity algorithms. The TF-IDF algorithm helps identify keywords in customer addresses and building addresses and calculates their importance in the text. The cosine similarity algorithm calculates the similarity between customer addresses and building addresses, thereby achieving an intelligent matching process, improving matching accuracy, and completing the matching of customer addresses and building addresses without manual intervention, improving work efficiency, and significantly saving time and human resource costs.
[0106] S203, verify the initial matching level based on the latitude and longitude coordinate data of the building address and the customer address to obtain the target matching level between the customer address and the building address.
[0107] In this embodiment, the spherical distance between the latitude and longitude coordinates of the building address and the latitude and longitude coordinates of the customer address is calculated according to the spherical model function, and the distance between the customer address and the building address is obtained, as shown in Table 5.
[0108] The sphere model functions include: Where R is the radius of the sphere, arccos() is the inverse cosine function, jA and wA are the latitude and longitude coordinates of point A, and jB and wB are the latitude and longitude coordinates of point B. In geographic coordinate systems, latitude and longitude coordinates are usually expressed in degrees. When performing trigonometric calculations, radians must be used as the unit. Therefore, the angle value must be converted to a radian value by multiplying the angle value by π (pi, approximately equal to 3.14) and then dividing by 180.
[0109] The building system has categorized building addresses into factory zones and non-factory zones according to type. Non-factory zones include commercial buildings, professional markets, commercial complexes, and other types. In other words, in addition to the following, the standard building address data also includes building type information, as shown in Table 6: community ID, building ID, building name, building address information, latitude and longitude information.
[0110] After calculating the distance between the customer address and the building address, it is determined whether the building address is a factory park type or a non-factory park type. Based on the reasonable radius range corresponding to the factory park type and non-factory park type, it is verified whether the initial matching level needs to be upgraded, that is, whether the distance between the customer address and the building address is within the reasonable radius range corresponding to the factory park type or non-factory park type. If it is within the reasonable radius range corresponding to the factory park type or non-factory park type, the initial matching level is upgraded to obtain the target matching level between the customer address and the building address; if it is not within the reasonable radius range corresponding to the factory park type or non-factory park type, the initial matching level is used as the target matching level between the customer address and the building address, as shown in Table 7. The highest matching level of the target matching level and the initial matching level can be the same, and the highest matching level of the target matching level can also be higher than the highest matching level of the initial matching level. That is, in addition to including the first matching level, the second matching level, the third matching level, and the fourth matching level, the target matching level can also include a zero matching level, which is the highest matching level of the target matching level. In this embodiment, the zero matching level is used as the precise matching level. When the initial matching level is the first matching level, i.e., a perfect match, and the distance between the customer address and the building address is within a reasonable radius corresponding to either the factory park type or the non-factory park type, the initial matching level can be upgraded from the first matching level to the zeroth matching level, i.e., from a perfect match to a precise match. In this embodiment, after automatically matching the customer address and building address based on TF-IDF and cosine similarity algorithms, the target matching level is scientifically evaluated and determined by combining the physical distance between the customer address and building address and the building type. The matching level is then dynamically updated to reduce erroneous matches, further improve the matching degree, and enhance the reliability and accuracy of the matching.
[0111] This embodiment can dynamically adjust the reasonable radius range according to the building address type, as shown in Table 8. If it is a factory park type, this embodiment takes a reasonable radius range of 3 kilometers between the customer address and the building address as an example. If it is not a factory park, this embodiment takes a reasonable radius range of 300 meters between the customer address and the building address as an example.
[0112] Finally, the customer address, the building address corresponding to the customer address, the target cosine similarity between the customer address and the building address, and the distance between the customer address and the building address are written into the database as matching data between building address and customer address, as shown in Table 9.
[0113] S204, Perform the corresponding building entry operation on the customer data based on the target matching level.
[0114] In this embodiment, taking the highest matching level of the target matching level as the precise matching level as an example, in addition to directly calling the customer data entry interface to bind relationships for customer addresses and building addresses corresponding to the complete matching level, the same direct calling of the customer data entry interface is used to bind relationships for customer addresses and building addresses corresponding to the precise matching level. After binding customer addresses and building addresses, the data is recorded in the building management system and pushed to the group customer center for subsequent business analysis and development of customer data. For customer addresses and building addresses corresponding to suspected matching levels, the data is automatically pushed to the account manager, forming an entry confirmation function task, which is executed by the account manager to complete the entry of customer data into the building. The customer addresses and building addresses corresponding to the unconfirmed levels are exported in batches and handed over to the account manager for manual confirmation. After manual confirmation, the data is marked, with the number of markings including but not limited to 2. The marked customer addresses and building addresses corresponding to the unconfirmed levels and non-matching levels are returned to step S1012 for re-segmentation and structuring, and then steps S102 to S103 are executed.
[0115] This embodiment provides a method for incorporating customer data into building information. By acquiring customer addresses and building addresses, and using text feature extraction algorithms and cosine similarity to match customer addresses and building addresses, a target matching level is obtained. This eliminates the need for manual identification and matching. Based on the target matching level, corresponding incorporation operations are performed on the customer data, achieving intelligent and automated management of customer data incorporation, improving the accuracy and efficiency of customer data incorporation, and saving labor costs. Furthermore, by segmenting and structuring standard building address data and customer business address data according to provincial, municipal, and district administrative levels, it facilitates data integration and sharing between different systems, improves data utilization efficiency, and enables precise location and search of address information. This enhances data accuracy, traceability, and geographic information analysis capabilities, providing better support for data management and business decision-making. By preprocessing the text data of building addresses and customer addresses, the final-level address data of building addresses and customer addresses is obtained for subsequent feature extraction and feature matching, reducing interference word frequencies and improving the accuracy of feature extraction and feature matching for building addresses and customer addresses. The system automatically performs initial matching of customer addresses and building addresses based on TF-IDF and cosine similarity algorithms. TF-IDF helps identify keywords in customer and building addresses and calculates their importance in the text. Cosine similarity calculates the similarity between customer and building addresses, thus achieving an intelligent matching process, improving matching accuracy, and completing the matching without manual intervention, improving work efficiency, and significantly saving time and human resource costs. After automatically matching customer and building addresses based on TF-IDF and cosine similarity algorithms, the system further combines the physical distance between customer and building addresses and building type to scientifically evaluate and determine the target matching level, and dynamically update the matching level to reduce the occurrence of erroneous matches, further improving the matching degree and enhancing the reliability and accuracy of the matching process.
[0116] Example 3:
[0117] like Figure 4 As shown, this embodiment provides a method for matching customer addresses and building addresses. The method for matching customer addresses and building addresses includes:
[0118] S301, retrieve text data of building address and customer address.
[0119] In this embodiment, the text data of the building address is... Figure 4 The building address information and customer address text data are included. Figure 4 The system retrieves customer address information. After obtaining the text data of building addresses and customer addresses, it stores the text data of building addresses and customer addresses into the database of the government and enterprise data platform.
[0120] S302, perform data preprocessing on the text data of building addresses and customer addresses to obtain the final address data of building addresses and customer addresses.
[0121] In this embodiment, the final-level address data of the building address is... Figure 4 The building's last-level information and the customer's last-level address data are... Figure 4 The lowest-level customer information. The data preprocessing process is as follows: Figure 2 As shown, this includes: ① Removing invalid data: removing noisy data, meaningless characters, and ambiguous addresses, such as "across the street," "turn right at the intersection," and "about 200 meters across the street"; ② Standardizing the descriptions of administrative districts, community streets, and residential buildings: converting words in the text data into a unified format to reduce vocabulary diversity. That is, for specific entities or keywords, stemming or word form restoration is performed to merge words with different formats into a consistent format. For example, different expressions of "street," "main street," and "street" are unified into "street," and different expressions of "building" and "building" are unified into "building." This embodiment preprocesses the text data of building addresses and customer addresses to obtain the final-level address data of building addresses and customer addresses for subsequent feature extraction and feature matching, reducing interference word frequencies and improving the accuracy of feature extraction and feature matching of building addresses and customer addresses.
[0122] S303, calculate the TF value and IDF value of each term in the final address data of building address and customer address to calculate the TF-IDF value; based on the TF-IDF value of each term in the final address data of building address and customer address, perform feature extraction on the final address data of building address and customer address to obtain the final address feature vector of building address and customer address.
[0123] In this embodiment, after preprocessing the text data of building addresses and customer addresses, each end-level address data is treated as an independent document, and a document-term matrix is constructed. Each row of the document-term matrix corresponds to one end-level address data (i.e., document), and each column corresponds to a term that appears in any end-level address data. Using the TfidfVectorizer of the TF-IDF model, a vocabulary containing all unique terms is created, and the matrix is filled according to the occurrence of each term in each address. In addition, the TfidfVectorizer counts the occurrence of each term in each document to obtain the term frequency TF(t,d), evaluates the uniqueness or prevalence of each term in all document sets to obtain the inverse document frequency IDF(t), and multiplies the term frequency TF(t,d) and the inverse document frequency IDF(t) to obtain the TF-IDF value.
[0124] TF-IDF values reflect the importance of a term in a document. Terms with consistent TF-IDF values are filtered from the final-level address data of customer and building addresses to obtain the final-level address features of building and customer addresses. Then, based on the administrative level structure and preset criteria of the final-level address features of building and customer addresses, final-level address features with consistent administrative level structures are filtered out, while those with inconsistent administrative level structures are removed, ultimately yielding the final-level address feature vectors of building and customer addresses. This embodiment uses a preset criterion of retaining the last-level address features with consistent provincial, municipal, and district / county structures, while allowing inconsistencies in street structures. For example, customer addresses are: Company M at No. 217, F Road, D Street, C District, B City, A Province; Company T at No. 217, F Road, D Street, C District, B City, A Province; and Company Z at No. 588, Y Road, T Street, R District, G City, A Province. Building addresses are: No. 217, F Road, D Street, C District, B City, A Province; No. 588, Y Road, T Street, R District, G City, A Province; No. 239, Y Road, T Street, R District, G City, K Province; and No. 239, Y Road, P Street, R District, G City, K Province. The building addresses of No. 217, F Road, D Street, C District, B City, A Province; No. 588, Y Road, T Street, R District, G City, A Province; and No. 239, Y Road, T Street, R District, G City, K Province are retained.
[0125] S304, calculate the cosine similarity between the final address feature vector of the building address and the final address feature vector of the customer address to obtain the target cosine similarity between the customer address and the building address, so as to match the customer address and the building address based on the target cosine similarity.
[0126] In this embodiment, after obtaining the final-level address feature vectors of building addresses and customer addresses, a recursive approach is used to calculate the cosine similarity between the final-level address feature vectors of building addresses and customer addresses. Specifically, the cosine similarity between the final-level address feature vector of the customer address and the final-level address feature vectors of each building address is calculated recursively. For example, if the customer address is Company Z at No. 588, Y Road, T Street, R District, G City, A Province, and the building addresses are No. 588, Y Road, T Street, R District, G City, A Province, and No. 239, Y Road, T Street, R District, G City, A Province, the cosine similarity between Company Z at No. 588, Y Road, T Street, R District, G City, A Province, and No. 239, Y Road, T Street, R District, G City, A Province, is calculated. The cosine similarity value is between 0 and 1; the closer the value is to 1, the more similar the contents of the two final-level address feature vectors are. Cosine similarity can quantitatively determine the degree of content matching between different final-level address feature vectors. In this embodiment, the highest cosine similarity between the final-level address feature vectors of the customer address and the building address can be used as the target cosine similarity between the customer address and the building address.
[0127] Before matching the initial matching level between customer addresses and building addresses based on the first mapping relationship, a cosine similarity threshold is set according to the test result data and business dimensions. A mapping relationship between the cosine similarity threshold and the initial matching level is constructed to obtain the first mapping relationship, as shown in Table 4. The initial matching level includes the first matching level, the second matching level, the third matching level, and the fourth matching level. In this embodiment, the first matching level is the complete matching level, the second matching level is the suspected matching level, the third matching level is the pending confirmation level, and the fourth matching level is the non-matching level.
[0128] This embodiment provides a method for matching customer addresses and building addresses. Based on TF-IDF and cosine similarity algorithms, it automatically completes the initial matching of customer and building addresses. The TF-IDF algorithm helps identify keywords in customer and building addresses and calculates their importance in the text. The cosine similarity algorithm calculates the similarity between customer and building addresses, thus achieving an intelligent matching process, improving matching accuracy, and completing the matching of customer and building addresses without manual intervention, improving work efficiency and significantly saving time and human resource costs. Furthermore, by preprocessing the text data of building and customer addresses, the final-level address data of building and customer addresses is obtained for subsequent feature extraction and feature matching, reducing interference word frequencies and improving the accuracy of feature extraction and feature matching for building and customer addresses.
[0129] Example 4:
[0130] like Figure 5 As shown, this embodiment also provides a customer data entry device, including: an acquisition module 51, a determination module 52, and an entry module 53. The acquisition module 51 is used to acquire structured data of building addresses and customer addresses, wherein the structured data includes text data and latitude and longitude coordinate data. The determination module 52 is connected to the acquisition module 51 and is used to match the structured data of building addresses and customer addresses according to text feature extraction algorithms and cosine similarity to obtain a target matching level between customer addresses and building addresses. The entry module 53 is connected to the determination module 52 and is used to perform corresponding entry operations on customer data based on the target matching level.
[0131] Specifically, the acquisition module 51 includes an acquisition unit 511 and a segmentation unit 512. The acquisition unit 511 is used to acquire building standard address data and customer business address data. The segmentation unit 512 is used to segment and structure the building standard address data and customer business address data according to a preset slice level to obtain structured data of building addresses and customer addresses.
[0132] Specifically, the determining module 52 includes an extraction unit 521, a calculation unit 522, a matching unit 523, and a verification unit 524. The extraction unit 521 is used to extract features from the text data of building addresses and customer addresses based on the TF-IDF algorithm to obtain the final-level address feature vectors of building addresses and customer addresses. The calculation unit 522 is used to calculate the cosine similarity between the final-level address feature vectors of building addresses and customer addresses to obtain the target cosine similarity between customer addresses and building addresses. The matching unit 523 is used to match the initial matching level between customer addresses and building addresses according to the target cosine similarity and a first mapping relationship, wherein the first mapping relationship includes the correspondence between cosine similarity and the initial matching level. The verification unit 524 is used to verify the initial matching level based on the latitude and longitude coordinate data of building addresses and customer addresses to obtain the target matching level between customer addresses and building addresses.
[0133] Specifically, the extraction unit 521 includes a data preprocessing subunit, a first calculation subunit, and an extraction subunit. The data preprocessing subunit is used to preprocess the text data of building addresses and customer addresses to obtain the final-level address data of building addresses and customer addresses. The first calculation subunit is used to calculate the TF-IDF value of each term in the final-level address data of building addresses and customer addresses based on the TF-IDF model and the final-level address data of building addresses and customer addresses. The extraction subunit is used to extract features from the final-level address data of building addresses and customer addresses based on the TF-IDF values of each term in the final-level address data of building addresses and customer addresses to obtain the final-level address feature vector of building addresses and customer addresses.
[0134] Specifically, the verification unit 524 includes a second calculation subunit, a judgment subunit, an upgrade subunit, and a determination subunit. The second calculation subunit is used to calculate the spherical distance between the latitude and longitude coordinates of the building address and the latitude and longitude coordinates of the customer address to obtain the distance between the customer address and the building address. The judgment subunit is used to determine whether the distance is within a reasonable radius. The upgrade subunit is used to upgrade the initial matching level in response to the distance being within a reasonable radius to obtain the target matching level between the building address and the customer address. The determination subunit is used to determine the initial matching level as the target matching level between the building address and the customer address in response to the distance not being within a reasonable radius.
[0135] Specifically, the building entry module 53 includes a first binding unit 531, a first confirmation unit 532, a second binding unit 533, a second confirmation unit 534, and a re-determination unit 535. The first binding unit 531 is used to bind the customer address and building address corresponding to the first matching level. The first confirmation unit 532 is used to confirm the customer address and building address corresponding to the second matching level and the third matching level. The second binding unit 533 is used to bind the customer address and building address corresponding to the second matching level in response to the confirmation of the customer address and building address corresponding to the second matching level. The second confirmation unit 534 is used to mark the customer address and building address corresponding to the third matching level in response to the confirmation of the customer address and building address corresponding to the third matching level. The re-determination unit 535 is used to re-determine the target matching level based on the marked customer address and building address corresponding to the third matching level and the customer address and building address corresponding to the fourth matching level, so as to perform the corresponding building entry action on the customer data based on the re-determined target matching level.
[0136] Understandably, the customer data entry device provided above performs the customer data entry method corresponding to Embodiment 1 provided above. Therefore, the beneficial effects it can achieve can be referred to the beneficial effects of the customer data entry method in Embodiment 1 above and the corresponding solutions in the detailed embodiments below, which will not be repeated here.
[0137] Example 5:
[0138] This embodiment also provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to implement the method for determining the antenna deployment of a building in Embodiment 1 above.
[0139] Example 6:
[0140] This embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method for determining the antenna deployment location in the building described in Embodiment 1 above.
[0141] It is understood that the above embodiments are merely exemplary implementations used to illustrate the principles of the present invention, and the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A method for entering customer data into a building, characterized in that, include: Obtain structured data of building addresses and customer addresses; Based on text feature extraction algorithms and cosine similarity, structured data of building addresses and customer addresses are matched to obtain target matching levels between customer addresses and building addresses; wherein, the target matching levels include a first matching level, a second matching level, a third matching level, and a fourth matching level; Based on the target matching level, perform the corresponding entry operation on the customer data, specifically including: Bind the customer address and building address corresponding to the first matching level; Confirm the customer addresses and building addresses corresponding to the second matching level and the third matching level; In response to the confirmation of the customer address and building address corresponding to the second matching level, the customer address and building address corresponding to the second matching level are bound together; In response to the confirmation of the customer address and building address corresponding to the third matching level, mark the customer address and building address corresponding to the third matching level; The target matching level is redefined by taking the customer address and building address corresponding to the third matching level and the customer address and building address corresponding to the fourth matching level, and then performing the corresponding building entry action on the customer data based on the redefined target matching level.
2. The method for entering customer data into a building according to claim 1, characterized in that, The acquisition of structured data for building addresses and customer addresses specifically includes: Obtain standard building address data and customer business address data; Based on the preset slice levels, the standard building address data and customer business address data are segmented and structured to obtain structured data of building addresses and customer addresses.
3. The method for entering customer data into a building according to claim 1, characterized in that, in, Structured data includes text data and latitude / longitude coordinate data. The method of matching structured data of building addresses and customer addresses based on text feature extraction algorithms and cosine similarity to obtain the target matching level between customer addresses and building addresses specifically includes: Based on the term frequency-inverse document frequency (TF-IDF) algorithm, feature extraction is performed on the text data of building addresses and customer addresses to obtain the final-level address feature vectors of building addresses and customer addresses; Calculate the cosine similarity between the final address feature vector of the building address and the final address feature vector of the customer address to obtain the target cosine similarity between the customer address and the building address; Based on the target cosine similarity and the first mapping relationship, an initial matching level is matched between customer addresses and building addresses, wherein the first mapping relationship includes the correspondence between cosine similarity and the initial matching level; The initial matching level is verified based on the latitude and longitude coordinates of the building address and the customer address to obtain the target matching level between the customer address and the building address.
4. The method for entering customer data into a building according to claim 3, characterized in that, The term frequency-inverse document frequency (TF-IDF) algorithm is used to extract features from the text data of building addresses and customer addresses, obtaining the final-level address feature vectors of building addresses and customer addresses, specifically including: Data preprocessing is performed on the text data of building addresses and customer addresses to obtain the final address data of building addresses and customer addresses; Based on the TF-IDF model, the final address data of building addresses and customer addresses, calculate the TF-IDF value of each term in the final address data of building addresses and customer addresses; Based on the TF-IDF values of each term in the final-level address data of building addresses and customer addresses, feature extraction is performed on the final-level address data of building addresses and customer addresses to obtain the final-level address feature vectors of building addresses and customer addresses.
5. The method for entering customer data into a building according to claim 4, characterized in that, The TF-IDF model includes: (1), in, Represents the last-level address data. This represents each term in the final address data. This indicates the number of times each term appears in the final-level address data. This indicates the uniqueness or prevalence of each term in the final-level address data. This represents the TF-IDF value of each term in the final address data.
6. The method for entering customer data into a building according to claim 3, characterized in that, The verification of the initial matching level based on the latitude and longitude coordinate data of the building address and the customer address to obtain the target matching level between the customer address and the building address specifically includes: Calculate the spherical distance between the latitude and longitude coordinates of the building address and the latitude and longitude coordinates of the customer address to obtain the distance between the customer address and the building address; Determine whether the distance is within a reasonable radius. In response to the distance being within a reasonable radius, the initial matching level is increased to obtain the target matching level between the building address and the customer address; In response to the distance being outside a reasonable radius, the initial matching level is determined to be the target matching level between the building address and the customer address.
7. A customer data entry device, characterized in that, include: Acquisition module, confirmation module, and building entry module; The acquisition module is used to acquire structured data of building addresses and customer addresses, including text data and latitude and longitude coordinate data. The determination module, connected to the acquisition module, is used to match structured data of building addresses and customer addresses based on text feature extraction algorithms and cosine similarity to obtain the target matching level between customer addresses and building addresses; wherein, the target matching level includes a first matching level, a second matching level, a third matching level, and a fourth matching level; The building entry module, connected to the determination module, is used to perform corresponding building entry operations on customer data based on the target matching level. The building entrance module is specifically used for: Bind the customer address and building address corresponding to the first matching level; Confirm the customer addresses and building addresses corresponding to the second matching level and the third matching level; In response to the confirmation of the customer address and building address corresponding to the second matching level, the customer address and building address corresponding to the second matching level are bound together; In response to the confirmation of the customer address and building address corresponding to the third matching level, mark the customer address and building address corresponding to the third matching level; The target matching level is redefined by taking the customer address and building address corresponding to the third matching level and the customer address and building address corresponding to the fourth matching level, and then performing the corresponding building entry action on the customer data based on the redefined target matching level.
8. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to implement a method for entering customer data into a building as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a method for entering customer data into a building as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Broadband resource coverage state identification method and apparatus, and electronic device
CN114356952A
Merchant and business building matching method and device, equipment and storage medium
CN117291636A
