Communication address association method and its device, equipment, medium, and product
By obtaining user address text sets from e-commerce platforms and calling multiple recall interfaces and deep semantic matching models, the problem of inaccurate address association in existing technologies is solved, more efficient address recommendations are achieved, and user experience is improved.
Patent Information
- Application Number
- CN202211032819.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-08-26
AI Technical Summary
Existing address association methods on e-commerce platforms are based on edit distance algorithms or shallow semantic matching, resulting in inaccurate candidate addresses and poor user experience.
By obtaining the user's address text set, calling multiple recall interfaces to recall a subset of candidate addresses from the standard address library, calculating the semantic similarity between the entered address text and the standard address text, and determining the sorting score based on the recall frequency and weight, a deep semantic matching model is used for accurate sorting.
The recall rate and accuracy of address association are improved, the user experience is enhanced, and the recalled address set is ensured to be consistent with user usage habits and semantic relevance.
Smart Images

Figure CN115205085B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of e-commerce information processing technology, and in particular to a communication address association method and its corresponding device, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] Logistics services are particularly important in the e-commerce sector. Logistics services encompass all the activities from receiving a customer order to delivering the goods to the customer, adding value to the products or services being traded. Their essence is to better meet customer needs, ensuring that the goods they need are delivered on time and within their desired timeframe, and that the service they receive meets their expectations.
[0003] To improve user experience, e-commerce platforms provide address association services when users enter logistics delivery addresses. Traditionally, due to the generally short nature of address texts, edit distance algorithms are often used, or shallow semantics of address texts are used to semantically match candidate addresses with user-entered addresses. The matching candidate addresses are then recommended to users.
[0004] In practice, matching methods based solely on edit distance algorithms or shallow semantics often result in inaccurate matching of candidate addresses, leading to a poor user experience of address association and thus needs to be improved. Summary of the Invention
[0005] The primary purpose of this application is to solve the above problems and provide a communication address association method and its corresponding device, computer equipment, computer-readable storage medium, and computer program product.
[0006] In order to meet the various objectives of this application, this application adopts the following technical solutions:
[0007] A communication address association method provided to meet one of the purposes of this application includes the following steps:
[0008] Obtaining the user's address text set, wherein the address text set includes the input address text submitted by the user and the historical address texts used by the user;
[0009] Calling at least two recall interfaces to implement data recall, each recall interface recalling corresponding multiple candidate address subsets from the standard address library based on each address text in the address text set, each candidate address subset including the recalled standard address text;
[0010] Merge each candidate address subset into a recalled address set, and determine the frequency of each standard address text appearing in all candidate address subsets as the recall weight of the corresponding standard address text;
[0011] The semantic similarity between the input address text and each standard address text in the recalled address set is calculated, and the ranking score is obtained by matching the corresponding recall weight. The recalled address set is sorted according to the ranking score and then pushed to the user.
[0012] Optionally, calculating the ranking scores obtained by matching the semantic similarity between the input address text and each standard address text in the recalled address set with their corresponding recall weights includes:
[0013] Perform word segmentation processing of two or more granularities on the input address text and each standard address in the recalled address set, and construct a word segmentation sequence corresponding to each granularity;
[0014] For each address text, convert its word segmentation sequences of various granularities into embedding vectors respectively;
[0015] Extract the deep semantic information of each address text based on all embedded vectors, and obtain the address feature vector of the corresponding address text;
[0016] Apply a preset data distance algorithm to calculate the data distance between the address feature vector of the entered address text and the address feature vector of each standard address text in the recalled address set as the semantic similarity, and multiply the semantic similarity of each standard address text by its recall weight to obtain a ranking score.
[0017] Optionally, extracting deep semantic information based on all embedding vectors of each address text to obtain the address feature vector of the corresponding address text includes:
[0018] For all the embedding vectors of each address text, each of them is used as the query vector in turn, and the remaining embedding vectors are used as key vectors and value vectors. They are input into the attention layer to perform attention operation and obtain the key feature vectors corresponding to each embedding vector;
[0019] Perform pooling operations on all embedding vectors of each address text and then concatenate them to obtain the compressed feature vectors corresponding to each embedding vector;
[0020] For each address text, all its key feature vectors and all compressed feature vectors are concatenated into an address feature vector.
[0021] Optionally, in the step of calculating the ranking score obtained by matching the semantic similarity between the entered address text and each standard address text in the recalled address set with its corresponding recall weight, an address text matching model pre-trained to a convergent state is used to implement the calculation of the semantic similarity between the entered address text and the standard address text to determine the ranking score of each standard address text in the recalled address set corresponding to the entered address text.
[0022] Optionally, the working process of the address text matching model includes:
[0023] Applying an encoding layer to encode the input address text and a single standard address text in the recalled address set respectively to obtain their corresponding embedding vectors;
[0024] Applying a feature extraction layer to perform attention-based and pooling operations on the embedding vectors of the input address text and the single standard address text, respectively, to obtain address feature vectors corresponding to the respective address texts;
[0025] Applying a linear layer to calculate the semantic similarity between the address feature vectors of the input address text and the single standard address text to obtain a similarity vector;
[0026] A classifier is applied to perform classification mapping on the product matrix of the recall weight and the similarity vector, and the classification probability of the positive category mapped to the preset classification space is obtained as the ranking score, wherein the positive category is the category determined by the address text matching model to correspond to the input positive sample during the training phase.
[0027] Optionally, the training process of the address text matching model includes:
[0028] Calling a single training sample in a data set, where the training sample includes two address texts and an association is set to a supervision label representing whether the two address texts point to the same address;
[0029] Synchronously inputting the two address texts of the training sample into the address text matching model, and predicting the corresponding classification results mapped to the classification space by the address text matching model;
[0030] The loss value of the classification result is calculated based on the supervisory label of the training sample. When the loss value does not reach the preset convergence condition, the address text matching model is gradient updated, and the training samples are continuously called from the data set to perform iterative training until the preset convergence condition is reached.
[0031] A communication address association device provided to meet one of the purposes of the present application includes: a user address acquisition module, a multi-way recall execution module, a recall weight determination module, and a similarity matching ranking module, wherein: the user address acquisition module is configured to obtain a user's address text set, the address text set including the input address text submitted by the user and the historical address text used by the user; the multi-way recall execution module is configured to call at least two recall interfaces to implement data recall, each recall interface recalling a corresponding plurality of candidate address subsets from a standard address library based on each address text in the address text set, each candidate address subset including the recalled standard address text; the recall weight determination module is configured to merge each candidate address subset into a recalled address set, and determine the frequency of occurrence of each standard address text in all candidate address subsets as the recall weight of the corresponding standard address text; the similarity matching ranking module is configured to calculate the semantic similarity between the input address text and each standard address text in the recalled address set, and match the corresponding recall weight to obtain a ranking score, sort the recalled address set according to the ranking score, and push it to the user.
[0032] Optionally, the similarity matching ranking module includes: a word segmentation processing submodule, which is configured to perform word segmentation processing of two or more granularities on the input address text and each standard address in the recalled address set, and construct a word segmentation sequence corresponding to each granularity; a word embedding submodule, which is configured to correspond to each address text and convert its word segmentation sequences of multiple granularities into embedding vectors respectively; a semantic mining submodule, which is configured to extract its deep semantic information based on all the embedding vectors of each address text, and obtain the address feature vector of the corresponding address text; a score calculation submodule, which is configured to apply a preset data distance algorithm, calculate the data distance between the address feature vector of the input address text and the address feature vector of each standard address text in the recalled address set as the semantic similarity, and multiply the semantic similarity of each standard address text by its recall weight to obtain the ranking score.
[0033] Optionally, the semantic mining submodule includes: an attention operation unit, which is configured to take each of the embedding vectors of each address text as a query vector in turn, and take the remaining embedding vectors as key vectors and value vectors, input them into the attention layer to perform attention operation, and obtain the key feature vectors corresponding to each embedding vector; a feature compression unit, which is configured to perform pooling operation on all the embedding vectors of each address text and then splice them to obtain the compressed feature vectors corresponding to each embedding vector; a feature synthesis unit, which is configured to splice all the key feature vectors and all the compressed feature vectors of each address text into an address feature vector.
[0034] Optionally, in the similarity matching sorting module, an address text matching model pre-trained to a convergent state is used to calculate the semantic similarity between the entered address text and the standard address text, so as to determine the sorting score of each standard address text in the recalled address set corresponding to the entered address text.
[0035] Optionally, a device constructed to adapt to the working process of the address text matching model: an encoding processing module, configured to apply an encoding layer to encode the input address text and a single standard address text in the recalled address set respectively, to obtain their corresponding embedding vectors; a feature processing module, configured to apply a feature extraction layer to perform attention and pooling operations on the embedding vectors of the input address text and the single standard address text respectively, to obtain the address feature vectors corresponding to each address text; a calculation processing module, configured to apply a linear layer to calculate the semantic similarity between the address feature vectors of the input address text and the single standard address text respectively, to obtain a similarity vector; a classification processing module, configured to apply a classifier to perform classification mapping on the product matrix of the recall weight and the similarity vector, to obtain the classification probability of the positive category mapped to the preset classification space as the ranking score, wherein the positive category is the category determined by the address text matching model as corresponding to the input positive sample during the training phase.
[0036] Optionally, a device constructed to adapt to the training process of the address text matching model: a sample calling module, configured to call a single training sample in a data set, wherein the training sample includes two address texts and is associated with a supervisory label that characterizes whether the two address texts point to the same address; a model inference module, configured to synchronously input the two address texts of the training sample into the address text matching model, and the address text matching model predicts the corresponding classification result mapped to the classification space; an iterative decision module, configured to calculate the loss value of the classification result based on the supervisory label of the training sample, and perform gradient update on the address text matching model when the loss value does not reach a preset convergence condition, and continue to call training samples from the data set to perform iterative training until the preset convergence condition is reached.
[0037] A computer device provided to meet one of the purposes of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the communication address association method described in the present application.
[0038] A computer-readable storage medium is provided to meet another purpose of the present application, which stores a computer program implemented according to the communication address association method in the form of computer-readable instructions. When the computer program is called and executed by a computer, the steps included in the method are executed.
[0039] A computer program product provided to meet another purpose of the present application includes a computer program / instruction, which, when executed by a processor, implements the steps of the method described in any embodiment of the present application.
[0040] Compared with the existing technology, the present application recalls multiple candidate address subsets from the standard address library through multiple recall interfaces based on the user-entered address text and the user's historical address text, which not only integrates the user's usage habits of historical addresses, but also ensures the improvement of the recall rate. Furthermore, the recall weight of each standard address text is determined according to the frequency of occurrence of the same standard address text in each candidate address subset. After the subsequent calculation of the semantic similarity between the entered address text and the standard address text, the corresponding recall weight is matched to obtain the ranking score, so that the ranking score carries information such as user usage habits and semantic correlation degree. On the basis of all the fully recalled standard address texts, accurate sorting is performed, and the recalled address set is efficiently determined for user selection, thereby improving the quality of address association service. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0042] Figure 1 A flow chart of a communication address association method according to an embodiment of the present application;
[0043] Figure 2 A schematic diagram of a process for determining a ranking score between two address texts in an embodiment of the present application;
[0044] Figure 3 A schematic diagram of a process for constructing a corresponding address feature vector based on an embedded vector of an address text in an embodiment of the present application;
[0045] Figure 4 This is a schematic diagram of the network architecture of an exemplary address text matching model of this application;
[0046] Figure 5 This is a schematic diagram of the workflow of the address text matching model described in this application;
[0047] Figure 6 This is a diagram of the training process of the address text matching model described in this application;
[0048] Figure 7 A block diagram of the communication address association device for this application;
[0049] Figure 8 This is a schematic diagram of the structure of a computer device used in this application. DETAILED DESCRIPTION
[0050] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limiting the present application.
[0051] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" used herein includes all or any units and all combinations of one or more associated listed items.
[0052] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0053] It will be understood by those skilled in the art that the terms "client," "terminal," and "terminal device" as used herein include both devices that are wireless signal receivers, i.e., devices that only have wireless signal receivers without transmission capabilities, and devices that have receiving and transmitting hardware capable of two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers and tablet computers, which have single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service), which may combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / Intranet access, a web browser, a notepad, a calendar, and / or a GPS (Global Positioning System) receiver; and conventional laptop and / or palmtop computers or other devices, which have and / or include a radio frequency receiver. As used herein, the terms "client," "terminal," or "terminal device" may be portable, transportable, or installed in a vehicle (air, sea, and / or land), or may be adapted and / or configured to operate locally and / or in a distributed manner at any other location on Earth and / or in space. As used herein, the terms "client," "terminal," or "terminal device" may also refer to a communication terminal, an Internet terminal, or a music / video playback terminal, such as a PDA, an MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or may include a smart TV, a set-top box, or other device.
[0054] The hardware referred to by names such as "server", "client", and "service node" in this application is essentially an electronic device with capabilities equivalent to those of a personal computer. It is a hardware device that has the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. Computer programs are stored in its memory, and the central processing unit loads the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.
[0055] It should be noted that the concept of "server" referred to in this application can also be extended to server clusters. Based on the network deployment principles understood by those skilled in the art, the servers described should be logically divided. In physical space, these servers can be independent of each other but callable through interfaces, or integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method of this application.
[0056] Unless expressly specified, one or more technical features of the present application can be deployed on a server for implementation and accessed by a client through a remote call to obtain an online service interface provided by the server, or can be directly deployed and run on a client for implementation.
[0057] Unless expressly specified otherwise, the neural network models referenced or may be referenced in this application may be deployed on a remote server and remotely called on the client, or may be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence may be obtained through transfer learning to reduce the requirements for the client's hardware operating resources and avoid excessive occupation of the client's hardware operating resources.
[0058] Unless explicitly specified, the various data involved in this application can be stored remotely on a server or on a local terminal device, as long as they are suitable for being called by the technical solution of this application.
[0059] Those skilled in the art should be aware that although the various methods of this application are described based on the same concept and thus exhibit commonality, unless otherwise specified, these methods can be independently executed. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept. Therefore, concepts with the same expression, as well as concepts that are appropriately transformed for convenience despite different expression, should be understood as equivalent.
[0060] Unless expressly stated to be mutually exclusive, the various embodiments disclosed in this application may be cross-combined with the relevant technical features of the various embodiments to flexibly construct new embodiments, as long as such combination does not deviate from the creative spirit of this application and can meet the needs of the prior art or resolve certain deficiencies in the prior art. Those skilled in the art should be aware of such flexibility.
[0061] A communication address association method of the present application can be programmed as a computer program product and deployed in a client and / or server for execution. For example, in the e-commerce platform application scenario of the present application, it can be implemented in a website page by coordinating information interaction between the client and the server.
[0062] See also Figure 1 In a typical embodiment, the communication address association method of the present application includes the following steps:
[0063] Step S1100: Acquire a user's address text set, where the address text set includes the input address text submitted by the user and the historical address texts used by the user;
[0064] In an e-commerce platform, when a user enters address information on the order settlement page or the logistics address editing page, the business logic of the corresponding page can submit the address information entered by the user to the server of the e-commerce platform during operation. The address information entered and submitted by the user is the entered address text, which usually includes prefix information consisting of official administrative divisions at all levels, such as "Huangpu District, Guangzhou City, Guangdong Province", and can also include detailed address information immediately following the prefix information. The address association service focuses on intervening in the process of users entering the prefix information, but does not rule out the possibility of being applicable to the prediction of the detailed address information.
[0065] The user's entered address text is only used to indicate the target address that the user currently needs to enter, but the user's permanent residence usually does not change significantly, and their commonly used delivery address is usually relatively fixed. Therefore, the user's previously confirmed logistics delivery address can be referenced as a historical address text, which is used as reference information for data retrieval in this application.
[0066] In order to achieve data completeness, in one embodiment, after the server receives the input address text submitted by the user, it obtains the historical address text used by the user from the user's personal account, and then combines the historical address text and the input address text to form the user's address text set.
[0067] When obtaining the user's historical address text, you can obtain it according to a preset historical period, for example, obtain the historical address text within six months from now.
[0068] In one embodiment, the address text entered by the user may contain typos or other invalid characters. Therefore, the entered address text may be pre-processed to correct typos and delete invalid characters. For example, in the address "Huangpu District, Guangzhou City, Guangdong Province", "Huangpu District" is actually a district under the jurisdiction of Shanghai City, and the district under the jurisdiction of Guangzhou City should be "Huangpu District". Therefore, the address can be corrected to "Huangpu District, Guangzhou City, Guangdong Province".
[0069] Typically, when users in each country enter their address information, the country of their location will be omitted by default. Therefore, in one embodiment, the country name can be further spliced based on the address text entered by the user and its historical address text, so as to be compatible with the multi-country address association service through the country name.
[0070] Step S1200: Call at least two recall interfaces to implement data recall, each recall interface recalling corresponding multiple candidate address subsets from the standard address library based on each address text in the address text set, each candidate address subset including the recalled standard address text;
[0071] To avoid incomplete data recall, in this application, two or more recall interfaces implemented using different recall algorithms are set up, and the standard address text is recalled from a preset standard address library by synchronously calling each recall interface. All standard address texts recalled by each recall interface constitute the candidate address subset corresponding to the recall interface.
[0072] The function implemented by each recall interface is to perform similarity matching between a given address text, i.e., the input address text or a historical address text, and each preset standard address text in the standard address library according to the similarity matching algorithm preset by the recall interface, calculate the similarity between each other, and then, according to the preset threshold, filter out all standard address texts whose similarity exceeds the preset threshold, so as to construct the candidate address subset corresponding to the recall interface.
[0073] The similarity matching algorithm can be any one of the following algorithms:
[0074] 1. Jaccard algorithm, whose exemplary formula is expressed as:
[0075]
[0076] According to this formula, the address text passed as input to the recall interface using the Jaccard algorithm, as well as any standard address text in the standard address library, is first segmented into word sets through word segmentation. The similarity between the two word sets is then calculated as the product of the intersection of the two word sets and the difference between their union minus the intersection. Each standard address text in the standard address library is then assigned a similarity relative to the input address text. Finally, the standard address library is filtered according to a preset threshold to obtain a corresponding subset of candidate addresses.
[0077] 2. Levenshtein algorithm, whose exemplary formula is expressed as:
[0078] |L N ( s)∩L N (t)|÷(|L N (s)|+0.001)
[0079] According to this formula, the address text passed as input to the recall interface using the Levenshtein algorithm and any standard address text in the standard address library are treated as two strings. The longer string is cut to the length of the shorter string. The minimum number of edit operations required to convert one into the other is then calculated, and the similarity is quantified. Similarly, each standard address text in the standard address library can be determined to have a corresponding similarity with the input address text. Finally, the standard address library is filtered according to a preset threshold to obtain the corresponding candidate address subset.
[0080] 3. The longest common substring algorithm calculates the length of the longest continuous identical substring between the input address text and any standard address text in the standard address library, and quantifies this length into similarity. This allows each standard address text in the standard address library to determine its corresponding similarity relative to the input address text. The standard address library is then screened according to a preset threshold to obtain the corresponding candidate address subset.
[0081] In one embodiment, three recall interfaces can be provided, each employing the three algorithms above to implement its business logic for invocation by this application. Thus, each invocation of a recall interface can obtain a corresponding subset of candidate addresses, which may include multiple standard address texts from the standard address library. It is readily apparent that employing two or more recall interfaces to recall standard address texts from the standard address library allows for more comprehensive acquisition of similar data within the user's address text set, achieving complete data retrieval.
[0082] The standard address text in the standard address library can be a text composed of official administrative divisions at all levels with a hierarchical jurisdiction relationship based on various official administrative divisions. It is authoritative and can be used as a standard to guide users in the process of entering address information.
[0083] Step S1300: Merge each candidate address subset into a recalled address set, and determine the frequency of occurrence of each standard address text in all candidate address subsets as the recall weight of the corresponding standard address text;
[0084] All the candidate address texts obtained by each recall interface are all the standard address data recalled based on the user address text set. Therefore, all the candidate address texts can be merged to obtain a recalled address set. During the merging process, the same standard address texts should be deduplicated so that the standard address texts in the recalled address set are unique. Since the same standard address text may be recalled through different recall channels, a standard address text may appear in multiple candidate address texts, and its number of appearances, that is, the number of candidate address texts in which the standard address text appears, can be used to characterize the recall weight of the standard address text. It is not difficult to understand that the higher the recall weight, the higher the probability that the corresponding standard address text is similar to the address text passed to each recall interface, and it also represents a higher recall accuracy. Therefore, the recall weight can be used to correct the semantic similarity between the corresponding standard address text and the input address text to obtain the corresponding ranking score.
[0085] Step S1400: Calculate the semantic similarity between the input address text and each standard address text in the recalled address set and match the corresponding recall weight to obtain a ranking score, sort the recalled address set according to the ranking score, and then push it to the user.
[0086] The recalled address set includes all standard address texts recalled from the standard address library based on the various address texts in the user address text set. The similarity between these standard address texts and the input address texts varies, so all standard address texts in the recalled address set need to be sorted.
[0087] In one embodiment, any semantic similarity algorithm can be used to first calculate the semantic similarity between the input address text and each standard address text in the recalled address set. For each standard address text, the semantic similarity corresponding to the standard address text is multiplied by the recall weight corresponding to the standard address text to obtain the corresponding product as the ranking score of the standard address text. It is not difficult to understand that the ranking score not only carries the reference information provided by the user's historical address text, but also carries the similarity between the recalled standard address text and the input address text, and thus can more accurately represent the relevance of the recalled standard address text to the input address text. Accordingly, all standard address texts in the recalled address set are sorted according to the ranking score, and the sorted recalled address set is then pushed to the user for selection, so that the address association results can be presented to the user according to the similarity between each standard address text and the input address text.
[0088] In another embodiment, based on the previous embodiment, the recalled address set after sorting can be filtered according to a preset number, and several standard address texts with the largest sorting scores can be filtered out according to the preset number, and other standard address texts can be deleted from the recalled address set, and then the filtered recalled address set can be pushed to the user for use.
[0089] According to the above embodiments, the present application recalls multiple candidate address subsets from the standard address library through multiple recall interfaces based on the user-entered address text and the user's historical address text, which not only integrates the user's usage habits of historical addresses, but also ensures the improvement of the recall rate. Furthermore, the recall weight of each standard address text is determined according to the frequency of occurrence of the same standard address text in each candidate address subset. After the subsequent calculation of the semantic similarity between the entered address text and the standard address text, the corresponding recall weight is matched to obtain the ranking score, so that the ranking score carries information such as user usage habits and semantic correlation degree. On the basis of all the fully recalled standard address texts, accurate sorting is performed, and the recalled address set is efficiently determined for user selection, thereby improving the quality of address association service.
[0090] Based on any embodiment of this application, please refer to Figure 2 , calculating the ranking scores obtained by matching the semantic similarity between the input address text and each standard address text in the recalled address set with their corresponding recall weights, including:
[0091] Step S1410: performing word segmentation processing at two or more granularities on the input address text and each standard address in the recalled address set, and constructing a word segmentation sequence corresponding to each granularity;
[0092] When it is necessary to determine the ranking score, since the ranking score depends on the semantic similarity between the two address texts, in order to adapt to the need of determining the semantic similarity, the two address texts can be optionally vectorized so as to determine the semantic similarity based on the vectors.
[0093] For two address texts whose semantic similarity needs to be calculated, namely the input address text and any standard address text in the selected recalled address set, the vectorization process is the same. Therefore, the following description is based on the case of a single address text.
[0094] For each address text, two word segmentation granularities are performed in parallel. Specifically, the N-Gram algorithm can be used, with N set to binary and ternary, respectively. This is equivalent to implementing two word segmenters with different word segmentation granularities. These two word segmenters perform word segmentation in parallel on the same address text, thereby obtaining word segmentation sequences corresponding to binary and ternary words. The binary word segmentation sequence is the set of word segmentations obtained by sliding the address text with a sliding window length of 2 characters at a time, while the ternary word segmentation sequence is the set of word segmentations obtained by sliding the address text with a sliding window length of 3 characters at a time.
[0095] It can be seen that for two address texts whose semantic similarity needs to be calculated, the construction of word segmentation sequences can be performed in parallel with each other, and for each address text, the construction of word segmentation sequences of different granularities can also be performed in parallel.
[0096] Step S1420: For each address text, convert its word segmentation sequences of various granularities into embedding vectors respectively;
[0097] For each of the two address texts, multiple segmentation sequences have been obtained through word segmentation, such as the binary segmentation sequence and the tri-gram segmentation sequence. Based on this, for each segmentation sequence, by referencing a preset reference word table, the encoding value of each segmentation in the segmentation sequence is queried. According to the corresponding position of each segmentation in its corresponding segmentation sequence, the encoding values of all segmentations are orderly constructed into an embedding vector, thereby achieving word embedding for the segmentation sequence. As can be seen from this, according to the previous example, each of the two address texts can obtain its corresponding binary embedding vector and tri-gram embedding vector.
[0098] Step S1430: extracting deep semantic information of each address text based on all embedded vectors to obtain an address feature vector of the corresponding address text;
[0099] For each of the two address texts, deep semantic information can be extracted using a text feature extraction model based on all of the embedding vectors obtained, such as the binary and ternary embedding vectors in the aforementioned examples. In one embodiment, for the same address text, the binary and ternary embedding vectors are first concatenated into a comprehensive feature matrix. This matrix is then input into the text feature extraction model to extract its deep semantic information. This deep semantic information is then represented as a high-dimensional vector, which can then be used as an address feature vector.
[0100] In other embodiments to be disclosed later, various deep semantic mining methods can be further combined to perform deeper semantic mining on the embedding vectors corresponding to each address text, so that the address feature vectors can more accurately represent the semantics of the corresponding address text, in order to further improve the accuracy of the semantic similarity calculated based on the address feature vectors.
[0101] According to the above principle, each of the two address texts can obtain its corresponding address feature vector, thereby realizing a deep semantic representation of the corresponding address text.
[0102] Step S1440: Apply a preset data distance algorithm to calculate the data distance between the address feature vector of the input address text and the address feature vector of each standard address text in the recalled address set as the semantic similarity, and multiply the semantic similarity of each standard address text by its recall weight to obtain a ranking score.
[0103] On the basis of determining the address feature vectors corresponding to the two address texts, any preset data distance algorithm can be applied to calculate the semantic similarity between them.
[0104] The data distance algorithm can be any available data distance algorithm, including but not limited to any of the following: cosine similarity algorithm, vector dot product algorithm, Euclidean distance algorithm, Pearson correlation coefficient, etc. By using any data distance algorithm to calculate the data distance between the two address texts, and then normalizing the corresponding data distances of all standard address texts in the recalled address set, it can be converted into the corresponding semantic similarity. It can be seen that the semantic similarity corresponding to each standard address text represents the degree of semantic association between the standard address text and the input address text. The higher the semantic similarity, the more consistent the text content of the two. Conversely, the lower the semantic similarity, the more inconsistent the text content of the two.
[0105] According to the above embodiments, it can be seen that in the vectorization process before calculating the semantic similarity of the two address texts that need to calculate the semantic similarity between each other, namely the input standard text and any standard address text in the recalled address set, each address text is first synchronously segmented with different granularities to obtain its multiple embedding vectors. The semantic expression of the address is more accurately achieved through segmentation of different granularities. For example, for "Huangpu District, Guangzhou City, Guangdong Province", the segmentation sequence that can be obtained through binary segmentation is [Guangdong; East Province; Province Guang; Guangzhou; City; City Huang; Huangpu; Pu District], and through the tri-gram segmentation, the segmentation sequence can be obtained as [Guangdong Province; Dong Province; Guangzhou; Guangzhou City; Huangzhou City; Huangpu City; Huangpu District]. It can be seen that the segmentation words [Guangdong Province; Guangzhou; Huangpu] in the binary segmentation sequence can accurately represent the address, and the segmentation words [Guangdong Province; Guangzhou City; Huangpu District] in the tri-gram segmentation sequence can also accurately represent the address. It can be seen that segmentations of different granularities can more accurately discover various possible expressions of address information, provide the necessary information foundation for subsequent semantic mining, and make the determination of semantic similarity more accurate.
[0106] Based on any embodiment of this application, please refer to Figure 3 , based on the entire embedding vector of each address text, extract its deep semantic information and obtain the address feature vector of the corresponding address text, including:
[0107] Step S1431: For all the embedding vectors of each address text, take each of them as the query vector in turn, and use the remaining embedding vectors as key vectors and value vectors, input them into the attention layer to perform attention operation, and obtain the key feature vector corresponding to each embedding vector;
[0108] In order to achieve deeper semantic mining, in this embodiment, an attention layer can be further applied to perform attention operations on all embedding vectors of each address text to obtain the corresponding address feature vector.
[0109] The mechanism of attention operation is to use a given query vector to query the key weight information from a given key vector, and then extract the key feature vector from the value vector based on the normalized result of the key weight information.
[0110] Based on this mechanism, in this embodiment, for all embedding vectors of each address text, the first embedding vector is determined as the query vector, the other embedding vectors are determined as key vectors and value vectors, and then the first key feature vector corresponding to the first embedding vector is retrieved. Each of these embedding vectors is alternately used as the first embedding vector and then subjected to the aforementioned attention operation alongside the other embedding vectors. As a result, each embedding vector in the same address text can obtain the key feature vector corresponding to the query vector. Consequently, multiple key feature vectors can be obtained for the same address text. For example, two key feature vectors can be obtained for the binary and ternary embedding vectors in the same address text.
[0111] In this embodiment, the corresponding key feature vector is determined for each embedding vector in the same address text one by one. This is to enable mutual query between different embedding vectors and ensure that the key feature vector set finally obtained does not omit key semantic information in the address text.
[0112] It is not difficult to understand that according to this step, each address text can obtain its corresponding key feature vector set, that is, each address text has multiple key feature vectors corresponding to the number of its embedded vectors.
[0113] Step S1432: Perform a pooling operation on all embedding vectors of each address text and then concatenate them to obtain a compressed feature vector corresponding to each embedding vector;
[0114] On the other hand, although the previous step can mine the deep semantics of the address text, all the embedding vectors of the address text themselves have original semantics and can also be used when determining semantic similarity. Accordingly, this step can be performed in parallel with the previous step to perform a pooling operation on all the embedding vectors of each address text, thereby compressing each embedding vector and obtaining a compressed feature vector corresponding to each embedding vector. It can be seen that each embedding vector of each address text will be feature compressed to obtain its corresponding compressed feature vector. Although the compressed feature vector has fewer dimensions, the semantics it represents are relatively original. For the same address text, the compressed feature vector of the address text and the key feature vector of the address text complement each other and bring out the best in each other.
[0115] Step S1433: For each address text, all key feature vectors and all compressed feature vectors are concatenated into an address feature vector.
[0116] In order to simplify the feature representation of each address text, all key feature vectors and all compressed feature vectors corresponding to each address text can be spliced front and back, and the splicing order can follow a unified preset order, thereby obtaining the address feature vector corresponding to the address text.
[0117] It is not difficult to understand from the above embodiments that by using the attention layer to conduct in-depth and comprehensive deep semantic mining on the embedding vector of each address text to obtain the corresponding key feature vector, and then combining the compressed feature vector carrying the original semantics of the address text obtained by compressing the embedding vector, the address feature vector of the address text is jointly constituted by the key feature vector and the compressed feature vector, which can realize effective, comprehensive and accurate feature representation of the address text, and provide a reliable information basis for accurately calculating the semantic similarity between different address texts.
[0118] On the basis of any embodiment of the present application, in the step of calculating the ranking score obtained by matching the semantic similarity between the entered address text and each standard address text in the recalled address set with its corresponding recall weight, an address text matching model pre-trained to a convergent state is used to implement the calculation of the semantic similarity between the entered address text and the standard address text to determine the ranking score of each standard address text in the recalled address set corresponding to the entered address text.
[0119] Adapting the previous embodiment, as Figure 4 As shown, the address text matching model is pre-constructed and is structured as a dual-tower model, that is, it includes two processing branches, each of which includes exactly the same network structure. In each processing branch, along the direction from input to output, it includes an encoding layer and a feature extraction layer. Then, the outputs of the two processing branches are respectively connected to the linear layer to calculate the semantic similarity. Finally, the similarity calculation result is input into the classifier, and the recall weight is superimposed on the semantic similarity in the classifier to determine the ranking score.
[0120] according to Figure 4 For further examples of the address text matching model, please refer to Figure 5 The working process of the address text matching model includes:
[0121] Step S2100: Apply the coding layer to encode the input address text and the single standard address text in the recalled address set respectively to obtain their corresponding embedding vectors;
[0122] First, for the two address texts that need to be encoded, typically each input includes the input address text and a single standard address text retrieved from the recalled address set. The two address texts are respectively input into the two branches of the address text matching model, first entering the encoding layer of each branch for encoding. The encoding principle is as described in steps S1410 and S1420 above and will not be repeated here. Through encoding, multiple embedding vectors corresponding to each address text are obtained.
[0123] Step S2200: Applying a feature extraction layer to perform attention and pooling operations on the embedding vectors of the input address text and the single standard address text, respectively, to obtain address feature vectors corresponding to the respective address texts;
[0124] After the encoding layer of each processing branch obtains all the embedding vectors of its corresponding address text, all the embedding vectors can be input into the feature extraction layer of the processing branch to construct the corresponding address feature vector.
[0125] The feature extraction layer includes two modules, namely, an attention layer module, a pooling operation module, and a splicing layer. The attention layer module is used to execute the previous step S1431 to determine the key feature vector, and the pooling operation module is used to execute the previous step S1432 to determine the compressed feature vector, and then the previous step S1433 is executed through the splicing layer to obtain the address feature vector of the corresponding address text.
[0126] Step S2300: Apply a linear layer to calculate the semantic similarity between the address feature vectors of the input address text and the single standard address text to obtain a similarity vector;
[0127] After the two branches respectively obtain the address feature vectors of their corresponding input address texts, the two address feature vectors are input into the linear layer of the address text matching model, and the linear layer performs the operation process of step S1440 as described above to calculate the semantic similarity between the two address feature vectors, which can be expressed as a similarity vector.
[0128] Step S2400: Apply a classifier to perform classification mapping on the product matrix of the recall weight and the similarity vector, and obtain the classification probability of the positive category mapped to the preset classification space as the ranking score, wherein the positive category is the category determined by the address text matching model during the training phase as corresponding to the input positive sample.
[0129] Finally, the similarity vector is input into the classifier of the address text matching model. In the classifier, a fully connected layer is first used to fully connect the similarity vector, and then its classification is mapped to the output layer. The output layer applies the Softmax function to calculate the product of the similarity vector and the recall weight corresponding to the standard address text as the input, and then maps it to the classification probability of each category in the preset classification space. The classification probability belonging to the positive category is directly used as the ranking score corresponding to the standard address text.
[0130] The positive category in the classification space refers to the category used to correspond to positive samples during the training of the address text matching model. The classifier can be a multi-classifier or a binary classifier, but during the training phase, one category is designated as the positive category, and the corresponding positive samples are used to supervise the results. During the inference phase, the classification probability of this positive category is used to represent the ranking score.
[0131] According to the above embodiment, the address text matching model is used to calculate the ranking score of the input address text and any standard address text in the recalled address set, which is faster and can serve a large number of requests, thereby improving the service efficiency of address association.
[0132] Based on any embodiment of this application, please refer to Figure 6 The training process of the address text matching model includes:
[0133] Step S3100: calling a single training sample in the data set, wherein the training sample includes two address texts and is associated with a supervisory label indicating whether the two address texts point to the same address;
[0134] The training of the model can be started by preparing a data set containing sufficient training samples to train the address text matching model to convergence.
[0135] Each training sample in the dataset has the same organizational structure and consists of two address texts. The two address texts can be expressed using exactly the same text content or different text content. A supervisory label is associated with each training sample to indicate whether the training sample actually points to the same address.
[0136] The training of the address text matching model is performed iteratively. In each iteration, a single training sample is called as the input of the model, and its corresponding supervision label is called to supervise the classification results of the model.
[0137] Step S3200: synchronously input the two address texts of the training sample into the address text matching model, and the address text matching model predicts the corresponding classification result mapped to the classification space;
[0138] correspond Figure 4From the network architecture of the address text matching model illustrated in the example, it can be seen that the two address texts of the training sample should be input into the two processing branches of the address text matching model respectively. After processing by each branch, the feature representation of each address text is realized, and the corresponding address feature vector is obtained. Then, the linear layer is performed to calculate the semantic similarity between the two address feature vectors, and then the classification mapping is performed by the classifier to obtain the classification probability corresponding to each category mapped to the preset classification space, which constitutes the classification result.
[0139] Step S3300: Calculate the loss value of the classification result based on the supervisory label of the training sample, implement gradient update on the address text matching model when the loss value does not reach the preset convergence condition, and continue to call training samples from the data set to implement iterative training until the preset convergence condition is reached.
[0140] After each training sample obtains a corresponding classification result, its corresponding supervisory label is used to calculate the loss value corresponding to its classification result. Then, with reaching a preset threshold as the preset convergence condition, the loss value is compared with the preset threshold. When the loss value reaches the preset threshold, it indicates that the model has converged, and training of the address text matching model can be terminated and put into use. If the loss value does not reach the preset threshold, it indicates that the model has not yet converged. Based on this, a gradient update is performed on the model based on the loss value, and the weight parameters of each link are corrected through backpropagation to further approach convergence. Then, it is continued from step S3100, and the address text matching model is trained to a converged state through continuous iteration.
[0141] Based on the above embodiments, it is not difficult to conclude that using word segmentation methods of different granularities to segment the address text in the encoding stage can obtain richer original semantics, and then obtain the address feature vector through deep semantic mining. The rich semantic representation capability can effectively prevent overfitting, and can make the entire address text matching model easier to train to converge, saving training costs and improving training efficiency.
[0142] See also Figure 7, a communication address association device provided to meet one of the purposes of the present application is a functional embodiment of the communication address association method of the present application, the device includes: a user address acquisition module 1100, a multi-way recall execution module 1200, a recall weight determination module 1300, and a similar matching sorting module 1400, wherein: the user address acquisition module 1100 is configured to obtain the user's address text set, the address text set includes the input address text submitted by the user and the historical address text used by the user in the past; the multi-way recall execution module 1200 is configured to call at least two recall interfaces to implement data recall, each recall interface is based on the address text Each address text in the set recalls a corresponding plurality of candidate address subsets from the standard address library, and each candidate address subset contains the recalled standard address text; the recall weight determination module 1300 is configured to merge each candidate address subset into a recalled address set, and determine the frequency of occurrence of each standard address text in all candidate address subsets as the recall weight of the corresponding standard address text; the similarity matching sorting module 1400 is configured to calculate the semantic similarity between the input address text and each standard address text in the recalled address set, and match the corresponding recall weight to obtain a sorting score, sort the recalled address set according to the sorting score, and push it to the user.
[0143] Based on any embodiment of the present application, the similarity matching ranking module 1400 includes: a word segmentation processing submodule, which is configured to perform word segmentation processing of two or more granularities on the input address text and each standard address in the recalled address set, and construct a word segmentation sequence corresponding to each granularity; a word embedding submodule, which is configured to correspond to each address text and convert its word segmentation sequences of multiple granularities into embedding vectors respectively; a semantic mining submodule, which is configured to extract its deep semantic information based on all the embedding vectors of each address text and obtain the address feature vector of the corresponding address text; a score calculation submodule, which is configured to apply a preset data distance algorithm to calculate the data distance between the address feature vector of the input address text and the address feature vector of each standard address text in the recalled address set as the semantic similarity, and multiply the semantic similarity of each standard address text by its recall weight to obtain the ranking score.
[0144] Based on any embodiment of the present application, the semantic mining submodule includes: an attention operation unit, which is configured to take each of the embedding vectors of each address text as a query vector in turn, and take the remaining embedding vectors as key vectors and value vectors, input them into the attention layer to perform attention operation, and obtain key feature vectors corresponding to each embedding vector; a feature compression unit, which is configured to perform pooling operations on all the embedding vectors of each address text and then splice them to obtain compressed feature vectors corresponding to each embedding vector; a feature synthesis unit, which is configured to splice all the key feature vectors and all the compressed feature vectors of each address text into an address feature vector.
[0145] Based on any embodiment of the present application, in the similarity matching sorting module 1400, an address text matching model pre-trained to a convergent state is used to calculate the semantic similarity between the entered address text and the standard address text, so as to determine the sorting score of each standard address text in the recalled address set corresponding to the entered address text.
[0146] On the basis of any embodiment of the present application, a device adapted to the working process of the address text matching model is constructed: an encoding processing module is configured to apply an encoding layer to encode the input address text and a single standard address text in the recalled address set respectively to obtain their corresponding embedding vectors; a feature processing module is configured to apply a feature extraction layer to perform attention and pooling operations on the embedding vectors of the input address text and the single standard address text respectively to obtain the address feature vectors corresponding to each address text; a calculation processing module is configured to apply a linear layer to calculate the semantic similarity between the address feature vectors of the input address text and the single standard address text respectively to obtain a similarity vector; a classification processing module is configured to apply a classifier to perform classification mapping on the product matrix of the recall weight and the similarity vector to obtain the classification probability of the positive category mapped to the preset classification space as the ranking score, wherein the positive category is the category determined by the address text matching model as corresponding to the input positive sample during the training phase.
[0147] On the basis of any embodiment of the present application, an apparatus adapted to the training process of the address text matching model is constructed: a sample calling module is configured to call a single training sample in a data set, wherein the training sample includes two address texts and is associated with a supervisory label representing whether the two address texts point to the same address; a model inference module is configured to synchronously input the two address texts of the training sample into the address text matching model, and the address text matching model predicts the corresponding classification result mapped to the classification space; an iterative decision module is configured to calculate the loss value of the classification result according to the supervisory label of the training sample, and implement a gradient update on the address text matching model when the loss value does not reach a preset convergence condition, and continue to call training samples from the data set to implement iterative training until the preset convergence condition is reached.
[0148] In order to solve the above technical problems, the embodiment of the present application also provides a computer device. Figure 8 As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store control information vectors. When the computer-readable instructions are executed by the processor, the processor may implement a communication address association method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor may execute the communication address association method of the present application. The network interface of the computer device is used to connect and communicate with the terminal. Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0149] In this embodiment, the processor is used to execute Figure 7 The memory stores the program code and data required to execute the modules or submodules. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules / submodules in the communication address Lenovo device of this application, and the server can call the server's program code and data to execute the functions of all submodules.
[0150] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the communication address association method of any embodiment of the present application.
[0151] The present application also provides a computer program product, comprising a computer program / instruction, which implements the steps of the method described in any embodiment of the present application when executed by one or more processors.
[0152] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of the method. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0153] To sum up, this application can, on the basis of comprehensively recalling standard address texts that are similar to the user's entered address text, achieve accurate sorting of the recalled standard address texts based on the semantic similarity between the two, efficiently determine a high-quality recalled address set for users to choose from, and achieve an improvement in the quality of address association services.
[0154] Those skilled in the art will appreciate that the steps, measures, and schemes in the various operations, methods, and processes discussed in this application may be interchanged, modified, combined, or deleted. Furthermore, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be interchanged, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and schemes in the prior art that are similar to those disclosed in this application may also be interchanged, modified, rearranged, decomposed, combined, or deleted.
[0155] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A communication address association method, characterized in that: The steps include: Obtaining a user's address text set, the address text set including the input address text submitted by the user and the historical address texts used by the user in the past; the method comprising: after receiving the input address text submitted by the user, obtaining the historical address texts used by the user in the past within a preset historical period from the user's personal account, and then combining the historical address texts and the input address text to form the user's address text set; Calling at least two recall interfaces to implement data recall, each recall interface recalling corresponding multiple candidate address subsets from the standard address library based on each address text in the address text set, each candidate address subset including the recalled standard address text; Merge each candidate address subset into a recalled address set, and determine the frequency of each standard address text appearing in all candidate address subsets as the recall weight of the corresponding standard address text; Using an address text matching model that has been pre-trained to a convergent state, the semantic similarity between the input address text and each standard address text in the recalled address set is calculated, and the ranking score is obtained by matching the corresponding recall weight. The recalled address set is sorted according to the ranking score and then pushed to the user; The working process of the address text matching model includes: Applying an encoding layer to encode the input address text and a single standard address text in the recalled address set respectively to obtain their corresponding embedding vectors; Applying a feature extraction layer to perform attention-based and pooling operations on the embedding vectors of the input address text and the single standard address text, respectively, to obtain address feature vectors corresponding to the respective address texts; Applying a linear layer to calculate the semantic similarity between the address feature vectors of the input address text and the single standard address text to obtain a similarity vector; A classifier is applied to perform classification mapping on the product matrix of the recall weight and the similarity vector, and the classification probability of the positive category mapped to the preset classification space is obtained as the ranking score, wherein the positive category is the category determined by the address text matching model to correspond to the input positive sample during the training phase.
2. The communication address association method according to claim 1, characterized in that: Calculating the semantic similarity between the input address text and each standard address text in the recalled address set and matching the corresponding recall weight to obtain a ranking score, including: Perform word segmentation processing of two or more granularities on the input address text and each standard address in the recalled address set, and construct a word segmentation sequence corresponding to each granularity; For each address text, convert its word segmentation sequences of various granularities into embedding vectors respectively; Extract the deep semantic information of each address text based on all embedded vectors, and obtain the address feature vector of the corresponding address text; Apply a preset data distance algorithm to calculate the data distance between the address feature vector of the entered address text and the address feature vector of each standard address text in the recalled address set as the semantic similarity, and multiply the semantic similarity of each standard address text by its recall weight to obtain a ranking score.
3. The communication address association method according to claim 2, characterized in that: Based on the entire embedding vector of each address text, its deep semantic information is extracted to obtain the address feature vector of the corresponding address text, including: For all the embedding vectors of each address text, each of them is used as the query vector in turn, and the remaining embedding vectors are used as key vectors and value vectors. They are input into the attention layer to perform attention operation and obtain the key feature vectors corresponding to each embedding vector; Perform pooling operations on all embedding vectors of each address text and then concatenate them to obtain the compressed feature vectors corresponding to each embedding vector; For each address text, all its key feature vectors and all compressed feature vectors are concatenated into an address feature vector.
4. The communication address association method according to claim 3, characterized in that: In the step of calculating the ranking score obtained by matching the semantic similarity between the entered address text and each standard address text in the recalled address set with its corresponding recall weight, an address text matching model pre-trained to a convergent state is used to implement the calculation of the semantic similarity between the entered address text and the standard address text to determine the ranking score of each standard address text in the recalled address set corresponding to the entered address text.
5. The communication address association method according to any one of claims 1 to 4, characterized in that: The training process of the address text matching model includes: Calling a single training sample in a data set, where the training sample includes two address texts and an association is set to a supervision label representing whether the two address texts point to the same address; Synchronously inputting the two address texts of the training sample into the address text matching model, and predicting the corresponding classification results mapped to the classification space by the address text matching model; The loss value of the classification result is calculated based on the supervisory label of the training sample. When the loss value does not reach the preset convergence condition, the address text matching model is gradient updated, and the training samples are continuously called from the data set to perform iterative training until the preset convergence condition is reached.
6. A communication address association device, characterized in that: include: A user address acquisition module configured to acquire a user's address text set, wherein the address text set includes the input address text submitted by the user and the historical address texts used by the user; The method includes: after receiving the input address text submitted by the user, obtaining the historical address text used by the user in a preset historical period from the user's personal account, and then combining the historical address text and the input address text to form the user's address text set; a multi-way recall execution module configured to call at least two recall interfaces to implement data recall, each recall interface recalling a corresponding plurality of candidate address subsets from a standard address library based on each address text in the address text set, each candidate address subset including the recalled standard address text; a recall weight determination module configured to combine each candidate address subset into a recall address set using an address text matching model pre-trained to a convergent state, and determine the frequency of occurrence of each standard address text in all candidate address subsets as the recall weight of the corresponding standard address text; a similarity matching sorting module configured to calculate the semantic similarity between the input address text and each standard address text in the recalled address set and to obtain a sorting score based on the corresponding recall weight, sort the recalled address set according to the sorting score, and then push it to the user; The working process of the address text matching model includes: Applying an encoding layer to encode the input address text and a single standard address text in the recalled address set respectively to obtain their corresponding embedding vectors; Applying a feature extraction layer to perform attention-based and pooling operations on the embedding vectors of the input address text and the single standard address text, respectively, to obtain address feature vectors corresponding to the respective address texts; Applying a linear layer to calculate the semantic similarity between the address feature vectors of the input address text and the single standard address text to obtain a similarity vector; A classifier is applied to perform classification mapping on the product matrix of the recall weight and the similarity vector, and the classification probability of the positive category mapped to the preset classification space is obtained as the ranking score, wherein the positive category is the category determined by the address text matching model to correspond to the input positive sample during the training phase.
7. The communication address association device according to claim 6, characterized in that: The similarity matching sorting module includes: A word segmentation processing submodule is configured to perform word segmentation processing of two or more granularities on the input address text and each standard address in the recalled address set, and construct a word segmentation sequence corresponding to each granularity; a word embedding submodule is configured to convert the word segmentation sequence of each address text into an embedding vector of each granularity; The semantic mining submodule is configured to extract the deep semantic information of each address text based on all embedded vectors, and obtain the address feature vector of the corresponding address text; The score calculation submodule is configured to apply a preset data distance algorithm to calculate the data distance between the address feature vector of the input address text and the address feature vector of each standard address text in the recalled address set as the semantic similarity, and multiply the semantic similarity of each standard address text by its recall weight to obtain a ranking score.
8. A computer device comprising a central processing unit and a memory, characterized in that: The central processing unit is configured to call and run a computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that It stores a computer program implemented according to the method described in any one of claims 1 to 5 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
10. A computer program product, characterized in that The method comprises a computer program / instruction, which implements the steps of the method according to any one of claims 1 to 5 when executed by a processor.
Citation Information
Patent Citations
Address matching method and device, electronic equipment and storage medium
CN112818685A
Article recall method and device
CN113762535A
Commodity object searching method and device, equipment, medium and product
CN113869048A