Address sequence sorting method, storage medium and computer equipment
By using multiple address scoring models and multi-dimensional features in freight scenarios, the problem of poor address sorting in the existing technology is solved, more accurate address sorting is achieved, and user experience is improved.
Patent Information
- Application Number
- CN202410671530.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-09-06
AI Technical Summary
The existing technology does not perform well in address sorting in freight scenarios. The address that the user wants is easily ranked at the back, while the address that he does not want is ranked at the front. As a result, the user needs to turn pages or slide down the list to find the desired address.
Use multiple address scoring models, each model corresponds to a text length range, select the matching model according to the length of the query text for address scoring and sorting, and combine multi-dimensional features such as time, distance and the relationship between the address name and the query text to generate a scalar features to improve ranking accuracy.
The accuracy of address sorting is improved, making it more likely that users can find the address they want, and improving the address search experience.
Smart Images

Figure CN118606572A
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of address sequence retrieval and sorting in freight scenarios, and in particular, relates to an address sequence sorting method, apparatus, computer-readable storage medium, and computer equipment. Background Art
[0002] In a freight scenario, when a user needs to place an order, he needs to select loading points, unloading points and other locations. When the user selects a location, he can enter a query text (i.e., query) in the location query interface. The smart terminal will initiate an address search request to the background server based on the query text entered by the user. The background server responds to the address search request, recalls multiple addresses based on the query text, and outputs a list of recommended addresses for the user to choose from. The recommended address list contains multiple addresses. Currently, the order of the addresses in the list is usually determined based on text similarity, that is, the higher the text similarity between the address name and the query text, the higher its ranking in the list. When implementing the relevant solution, the inventor found that only considering text similarity to sort the recalled addresses does not produce a good sorting effect, and it is easy for the address the user wants to be sorted at the back while the address the user does not want to be sorted at the back. This may require the user to turn pages or scroll down the list to find the address they want. Summary of the invention
[0003] The purpose of the present application is to provide an address sequence sorting method, apparatus, computer-readable storage medium and computer equipment, aiming to solve the problem that the prior art has poor address sorting effect and easily causes the address that the user wants to be sorted at the end while the address that the user does not want is sorted at the end.
[0004] In a first aspect, the present application provides an address sequence sorting method, the method comprising: In response to receiving an address retrieval request sent by a user terminal, performing address recall processing to obtain multiple recalled addresses; Get the text length of the query text carried in the address search request; According to the text length of the query text, determine an address scoring model that matches the query text from multiple address scoring models that have been pre-trained to a convergence state, and record it as a target model; Generate corresponding scalar features for each recalled address; Input the scalar features corresponding to each recalled address into the target model to obtain the score corresponding to each recalled address; The multiple recalled addresses are sorted according to the score corresponding to each recalled address, and a recommended address list is output.
[0005] In some embodiments, using the target dispute intent recognition model to recognize dispute intent sentences in the conversation text between the driver and the user includes: Break the conversation text between the driver and the user into multiple sentences; Use the target controversial intent identification model to identify whether each sentence has controversial intent; A sentence in which there is a disputed intention is obtained as a disputed intention sentence.
[0006] In some embodiments, before receiving the address retrieval request sent by the user terminal, the following model training process is also included: Collect multiple pieces of historical freight order data, process each piece of historical freight order data into sample data, and obtain multiple pieces of sample data; each piece of sample data includes a historical query text, multiple historical recall addresses, and classification labels and scalar features corresponding to each historical recall address; Setting multiple non-overlapping text length ranges, dividing all sample data whose text lengths of historical query texts belong to the same text length range into the same data set, and obtaining multiple training data sets corresponding to the multiple text length ranges one by one; The multiple address scoring models are obtained by training based on the multiple training data sets.
[0007] In some embodiments, each piece of historical freight order data includes a historical query text and a plurality of historical recall addresses; and processing each piece of historical freight order data into sample data includes: Each piece of historical freight order data is preprocessed, and then a corresponding classification label is set for each historical recall address included in each piece of historical freight order data, and a corresponding scalar feature is generated for each historical recall address included in each piece of historical freight order data.
[0008] In some embodiments, a corresponding classification label is set for each historical recall address included in each historical freight order data, including: For each historical recall address included in each historical freight order data, detect whether the historical recall address is clicked. If so, set a positive label for the historical recall address; if not, set a negative label for the historical recall address.
[0009] In some embodiments, a corresponding scalar feature is generated for each historical recall address included in each piece of historical freight order data, including: For each historical recall address included in each piece of historical freight order data, the historical freight order data is used as basic data and a corresponding scalar feature is generated for the historical recall address according to a pre-generated feature set.
[0010] In some embodiments, the plurality of address scoring models are obtained by training based on the plurality of training data sets, including: Build multiple ensemble tree models; For each ensemble tree model, a training data set is used to train the ensemble tree model until a preset training end condition is met; wherein different ensemble tree models are trained using different training data sets.
[0011] In some embodiments, each address scoring model corresponds to a text length range, and the text length ranges corresponding to any two address scoring models do not overlap; An address scoring model matching the query text is determined from multiple address scoring models pre-trained to a converged state according to the text length of the query text, including: Check whether the text length range corresponding to each address scoring model contains the text length of the query text; For any address scoring model, if the text length range corresponding to the address scoring model contains the text length of the query text, then it is determined that the address scoring model matches the query text.
[0012] In some embodiments, the text length range corresponding to each address scoring model is represented by one or two text length thresholds; accordingly, detecting whether the text length range corresponding to each address scoring model includes the text length of the query text includes: For each address scoring model, obtain the text length threshold corresponding to the address scoring model, compare the text length threshold with the text length of the query text, and determine whether the text length range corresponding to the address scoring model includes the text length of the query text based on the comparison result.
[0013] In a second aspect, the present application provides an address sequence sorting device, the device comprising: An address recall module, configured to perform address recall processing in response to receiving an address search request sent by a user terminal, and obtain multiple recalled addresses; A target model determination module is used to obtain the text length of the query text carried in the address search request, and determine an address scoring model that matches the query text from multiple address scoring models that have been pre-trained to a convergence state according to the text length of the query text, which is recorded as a target model; An address scoring module is used to generate a corresponding scalar feature for each recalled address, and input the scalar feature corresponding to each recalled address into the target model to obtain a score corresponding to each recalled address; The address sorting module is used to sort the multiple recalled addresses according to the score corresponding to each recalled address, and output a recommended address list.
[0014] In a third aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the address sequence sorting method provided in any of the above embodiments are implemented.
[0015] In a fourth aspect, the present application provides a computer device comprising one or more processors, a memory, and one or more computer programs, wherein the processor and the memory are connected via a bus, wherein the one or more computer programs are stored in the memory and are configured to be executed by the one or more processors, and characterized in that when the processor executes the computer program, the steps of the address sequence sorting method provided in any of the above embodiments are implemented.
[0016] In the present application, a computer device pre-deploys multiple address scoring models. After receiving an address search request from a user terminal, the computer device responds to the address search request, recalls multiple addresses, and then uses an address scoring model that matches the query text in the address search request to score each recalled address, and then sorts the addresses based on the scores of each address. The present application can improve the address sorting effect, making addresses with higher rankings more likely to be adopted by users, thereby improving the user's address search experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flowchart of an address sequence sorting method provided in one embodiment of the present application.
[0018] Figure 2 This is a flowchart of training multiple address scoring models provided by an embodiment of the present application.
[0019] Figure 3 It is a schematic diagram of the overall architecture of the model training provided by an embodiment of the present application.
[0020] Figure 4 It is a schematic diagram of splitting multiple scenarios according to the length of the query text and then training different address scoring models provided by an embodiment of the present application.
[0021] Figure 5 It is a functional module block diagram of an address sequence sorting device provided in one embodiment of the present application.
[0022] Figure 6 It is a specific structural block diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and beneficial effects of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0024] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0025] See also Figure 1 , is a flow chart of an address sequence sorting method provided in an embodiment of the present application. This embodiment mainly uses the address sequence sorting method applied to a computer device (such as a server for providing address retrieval service at a remote end, which may be referred to as an address retrieval server) as an example for explanation. The method includes the following steps: S101: In response to receiving an address search request sent by a user terminal, performing address recall processing to obtain multiple recalled addresses.
[0026] The user terminal can be a mobile intelligent terminal used by the user (such as a smart phone, tablet computer, etc.).
[0027] This embodiment mainly improves operations related to recalling address sorting, so the address recall processing implemented in this step can be implemented by using one or more existing or future possible address recall methods.
[0028] S102: Obtain the text length of the query text carried in the address search request, and determine an address scoring model that matches the query text from multiple address scoring models that have been pre-trained to a convergent state according to the text length of the query text, and record it as a target model.
[0029] There are multiple address scoring models in this embodiment, specifically, there can be 2 or more. These address scoring models have the same function, and their input and output are also the same, the input is the scalar feature of the recalled address, and the output is the score corresponding to the recalled address. The difference between the address scoring models is that the text length of the query text in the training sample selected for training is different. The training process of the address scoring model will be described in detail below.
[0030] Wherein, each address scoring model corresponds to a text length range, and the text length ranges corresponding to any two address scoring models do not overlap. Accordingly, the operation of determining an address scoring model that matches the query text from a plurality of address scoring models that have been pre-trained to a convergent state according to the text length of the query text may include: detecting whether the text length range corresponding to each address scoring model includes the text length of the query text; and, for any address scoring model, if the text length range corresponding to the address scoring model includes the text length of the query text, determining that the address scoring model matches the query text.
[0031] As mentioned above, different address scoring models use different text lengths of query texts in training samples during training. Therefore, when using the address scoring model for reasoning, in order to ensure the accuracy of the model scoring, it is necessary to select an address scoring model that corresponds to the text length range within which the text length of the query text falls to score each recalled address related to the query text.
[0032] Furthermore, the text length range corresponding to each address scoring model is represented by one or two text length thresholds. Accordingly, the operation of detecting whether the text length range corresponding to each address scoring model includes the text length of the query text may include: for each address scoring model, obtaining the text length threshold corresponding to the address scoring model, comparing the text length threshold with the text length of the query text, and judging whether the text length range corresponding to the address scoring model includes the text length of the query text based on the comparison result.
[0033] For example, assuming that there are two address scoring models, model A and model B, the text length range corresponding to model A is (0,4], and the text length range corresponding to model B is (4,K), where K represents the maximum input length of the preset query text, and its specific value can be set according to the actual situation. This embodiment does not impose any special restrictions, such as 100. Since there are only two text length ranges, the text length threshold corresponding to model A is 4, and the text length threshold corresponding to model B is also 4. Therefore, it is only necessary to compare the text length of the query text with 4. If the text length of the query text is greater than 4, it is determined that the text length range corresponding to model B includes the text length of the query text. If the text length of the query text is less than or equal to 4, it is determined that the text length range corresponding to model A includes the text length of the query text.
[0034] For another example, suppose there are three address scoring models, C model, D model and E model. The text length range corresponding to C model is (0,4], the text length range corresponding to D model is (4,10], and the text length range corresponding to E model is (10,K). Then the text length range corresponding to C model can be represented by 4, the text length range corresponding to D model can be represented by 4 and 10, and the text length range corresponding to E model can be represented by 10. If the text length of the query text is less than or equal to 4, then the text length range corresponding to C model is determined to include the text length of the query text. If the text length of the query text is greater than 4 and less than or equal to 10, then the text length range corresponding to D model is determined to include the text length of the query text. If the text length of the query text is greater than 10, then the text length range corresponding to E model is determined to include the text length of the query text.
[0035] S103: Generate a corresponding scalar feature for each recalled address, and input the scalar feature corresponding to each recalled address into the target model to obtain a score corresponding to each recalled address.
[0036] The scalar features corresponding to each recalled address specifically include multiple predetermined features that are highly relevant to user needs, including but not limited to time, distance, textual relationship between address name and query text, etc. By generating multi-dimensional features that are highly relevant to user needs for each recalled address, it is helpful for the model to more accurately determine the possibility that the recalled address is the address the user wants.
[0037] S104: Sort the multiple recalled addresses according to the score corresponding to each recalled address, and output a recommended address list.
[0038] After obtaining the score corresponding to each recalled address, the recalled addresses are sorted in descending order according to the score, and then the sorted addresses are converted into a recommended address list and sent to the user terminal for display.
[0039] The following is an explanation of the training process of the address scoring model. Figure 2 , the training process includes: S201: Collect multiple historical freight order data, process each historical freight order data into sample data, and obtain multiple sample data, each sample data includes a historical query text, multiple historical recall addresses, and classification labels and scalar features corresponding to each historical recall address.
[0040] After each user places an order, the backend server will automatically record the relevant data of the freight order into the log, so that the historical freight order data used to train the address scoring model can be collected from the historical order log. The historical freight order data includes the historical query text entered by the user when initiating an address retrieval request when placing an order and multiple historical recall addresses corresponding to the historical query text.
[0041] Each piece of historical freight order data includes a historical query text and multiple historical recall addresses, wherein the historical query text refers to the query text entered by the user related to the historical freight order data when searching for addresses; and the multiple historical recall addresses refer to the addresses recalled for the historical query text.
[0042] In some embodiments, the operation of processing each piece of historical freight order data into sample data includes preprocessing each piece of historical freight order data, then setting a corresponding classification label for each historical recall address included in each piece of historical freight order data, and generating a corresponding scalar feature for each historical recall address included in each piece of historical freight order data.
[0043] The above-mentioned preprocessing can be performed by preprocessing the historical freight order data through means such as null value processing, outlier processing, missing field processing, etc. The processed data can be used to generate model-dependent features.
[0044] This embodiment uses supervised learning to train the address scoring model. Therefore, when preparing training samples, it is necessary to mark each historical recall address in the historical freight order data with a corresponding classification label. There are two major types of classification labels, namely positive examples and negative examples. A positive example indicates that the relevant data is a correct classification result, and a negative example indicates that the relevant data is an incorrect classification result.
[0045] Correspondingly, the operation of setting a corresponding classification label for each historical recall address included in each historical freight order data includes: for each historical recall address included in each historical freight order data, detecting whether the historical recall address has been clicked, if so, setting a positive example label for the historical recall address, if not, setting a negative example label for the historical recall address.
[0046] Among them, when setting a classification label for a historically recalled address, whether the classification label corresponding to the historically recalled address is a positive example or a negative example is determined by whether the historically recalled address is clicked by the user. For example, in a historical freight order data, a historical query text entered by the user is "query_example", and the corresponding recalled addresses are "address_1", "address_2" and "address_3". After the user terminal presents the above addresses to the user, the user finally selects "address_1" by clicking. Then, when labeling each address, a positive example label is set for "address_1", and negative example labels are set for both "address_2" and "address_3".
[0047] Further, the operation of generating corresponding scalar features for each historical recall address included in each historical freight order data includes: for each historical recall address included in each historical freight order data, taking the historical freight order data as basic data, generating corresponding scalar features for the historical recall address according to a pre-generated feature set. The generation of scalar features will be described below by way of examples.
[0048] S202: Set multiple non-overlapping text length ranges, and divide all sample data including historical query texts whose text lengths belong to the same text length range into the same data set to obtain multiple training data sets corresponding to the multiple text length ranges.
[0049] For example, two text length ranges are set to (0, 4] and (4, K), and then after obtaining multiple sample data, the text length of the historical query text included in each sample data is obtained, and the text length is compared with 4. Then, all sample data including historical query texts with a text length greater than 4 are divided into the same data set, and all sample data including historical query texts with a text length less than or equal to 4 are divided into the same data set, thereby obtaining two training data sets.
[0050] S203: The multiple address scoring models are obtained by training based on the multiple training data sets.
[0051] Among them, obtaining the multiple address scoring models based on the multiple training data sets may include: constructing multiple integrated tree models; and, for each integrated tree model, using a training data set to train the integrated tree model until a preset training end condition is met; wherein different integrated tree models are trained using different training data sets.
[0052] In this embodiment, one training data set is used to train one address scoring model, and multiple training data sets can be used to train multiple address scoring models. Regarding model training, a mature and reliable model training method can be used for training, and this embodiment does not make any special restrictions.
[0053] It should be noted that this embodiment uses an integrated tree model to train the address scoring model. The "integrated tree model" is composed of multiple "binary tree" data structures (one root node, and at most two child nodes, respectively called left nodes and right nodes) connected in sequence. Each "root node" in a formal sense is used to store the division threshold (condition), and the two child nodes are used to store data that meets the condition and data that does not meet the condition. For the t-th tree, the received information is the numerical error between the output result of the t-1th tree for a certain feature (a floating point number between 0-1, indicating the possibility) and the label (0 or 1). The ultimate goal of the model is to reduce the overall error and make the value output by the model closer to the real label, so as to have a highly reliable classification ability for unknown data. Using an integrated tree model to train the address scoring model is conducive to improving training efficiency and the accuracy of model scoring.
[0054] The address sequence sorting method of this embodiment is described below through more detailed examples.
[0055] See also Figure 3 ,The training of the address scoring model mainly includes log extraction, multi-scenario splitting, feature engineering, model training and model reasoning, which are explained below.
[0056] 1. Log extraction In order to improve the model training effect, this embodiment collects (retrieval-address) data generated by users' address retrieval from real order data in the past (i.e., historical freight order data). The (retrieval-address) data includes historical query text and multiple historical recall addresses of the corresponding recall.
[0057] For the collected historical freight order data, it is necessary to preprocess the massive historical freight order data, mainly the (retrieval-address) data, through means such as null value processing, outlier processing, and missing field processing. The preprocessed data can be used to generate model-dependent features.
[0058] Furthermore, this solution adopts the "supervised learning" method to train the model, which requires labeling each piece of data (the classification label is a positive example or a negative example), so that during subsequent training, the corresponding loss can be calculated based on the pre-labeled true label and the model's prediction results, and the model parameters can be updated based on the loss.
[0059] 2. Multi-scene splitting The address data retrieved through address retrieval contains a large amount of address information. By disassembling the data from different angles, we can generate features of different dimensions (such as time, distance, textual relationship between address and query, etc.). These features are empirically helpful in judging which address users tend to click. Using these features as model input for model training helps to obtain the best address sorting sequence.
[0060] However, the inventors noticed that the above-mentioned model training operation is greatly affected by the training data. The reason is that the importance of features obtained from different training data is different. Even if the address sequence with the best measurement standard has been optimized, the address ranked at the top may not be the address that the user wants most. For example, the query text retrieved by the user is "No. 188, Huaihai Middle Road, Shanghai". Since there are many addresses on Huaihai Middle Road, Shanghai, if the importance of the house number matching feature of the model is low, the address of No. 188 may not be ranked at the top. For example, the address ranked at the top may be "No. 18, Huaihai Middle Road, Shanghai", "No. 1, Huaihai Middle Road, Shanghai", etc. If the query text entered by the user is "Beijing", the user may want the address that has been clicked before, but if the importance of the historical address feature of the model is low at this time, the address that the user has clicked before will be ranked at the back. In order to solve the above problems, this embodiment divides the retrieval scenarios according to the length of the query text (i.e., qurery), prepares corresponding training data sets for different scenarios, and then trains corresponding address scoring models for different scenarios. For example, please refer to Figure 4In this example, the query length (text length) of the user's search is divided. When the length is <= 4, it is a short query. The log data of the short query is extracted to train a model v1, and the log data of the long query is extracted to train another model v2. That is, according to the length of the query, the search scenario is divided into short query scenarios and long query scenarios. After the training is completed, in the online search system, when the length of the query retrieved by the user is <= 4, model v1 is used to score the relevant recall addresses. When the length of the query retrieved by the user is > 4, model v2 is used to score the relevant recall addresses. This can significantly improve the address sequence sorting effect.
[0061] 3. Feature Engineering (1) Feature selection Based on experience, we can first select features that may be related to user needs as a candidate set, then perform correlation analysis on the features in the candidate set based on historical freight order data, and filter out features in the candidate set that are weakly correlated with user needs based on the correlation analysis results, while retaining features that are strongly correlated with user needs. Finally, the remaining feature set in the candidate set is used as the final feature set.
[0062] (2) Feature generation According to the features in the feature set, the corresponding data is abstracted from the log data. For example, taking the order distance feature as an example, the feature value of the order distance feature can be generated based on the spherical distance between the user's location and the longitude and latitude of the order delivery location in a historical freight order data in the relevant log data.
[0063] Specifically, each search performed by the user can be used as a unit, and all addresses recalled in the search can be used as the basic data for generating features, and finally the user's feature scalar for each address can be generated, which can be recorded as <query, <address, feature>>.
[0064] 4. Model Training Taking into account the efficiency and accuracy of classification problems, this embodiment adopts an "integrated tree model" to train an address scoring model, wherein the "integrated tree model" is composed of multiple "binary tree" data structures (a root node and a maximum of two child nodes, respectively referred to as a left node and a right node) connected in sequence. Each "root node" in a formal sense is used to store a division threshold (condition), and the two child nodes are used to store data that meets the condition and data that does not meet the condition, respectively. For the t-th tree, the received information is the numerical error between the output result of the t-1th tree for a certain feature (a floating point number between 0 and 1, indicating the possibility) and the label (0 or 1). The ultimate goal of the model is to reduce the overall error and make the value output by the model closer to the true label, thereby having a highly reliable classification capability for unknown data.
[0065] 5. Prediction Prediction is the classification process. For a real data (<retrieval information, order information>), the feature engineering method introduced above can be used to convert the relevant order information into scalar features. <query, <address,feature>The data is input into a trained address scoring model that matches the length of the query. The model will automatically output the score of the recalled address based on the feature (used to characterize the possibility of the address being clicked by the user). After obtaining the scores of all recalled addresses, it will be sorted in reverse order and the sorting results will be output.
[0066] For example, suppose a user's address retrieval request includes the following information: "UID: 100001 User's location at the time of request: 116.4455821047886 (longitude), 39.79375645738044 (latitude) query: science and engineering Request time: 2021-11-18 10:41:10" Among them, the length of the query is 2, which is less than the preset text length threshold of 4. Therefore, the short query retrieval model v1 is selected as the target model.
[0067] Assume that two addresses can be recalled based on the query, "Polytechnic University" and "Polytechnic Technology Building", and then generate corresponding scalar features for the recalled addresses based on the above feature engineering operation method. Assume that the results are (Polytechnic University: 0.0, 4.49, 5.09e-5, 1.0, 0.0), (Polytechnic Technology Building: 1.0, 5.1, 0.0, 0.0, 3.2e-1).
[0068] The scalar features corresponding to "Polytechnic University" and "Polytechnic Technology Building" are input into model v1 respectively. Model v1 will output the scores corresponding to each recalled address, for example, (Polytechnic University: 0.6), (Polytechnic Technology Building: 0.1). Then, the recalled addresses are sorted in reverse order based on the scores, and the output is as follows: 1. Polytechnic University 2. Polytechnic Science and Technology Building The existing technology only considers the single dimension of text similarity, which will affect the address sorting effect. For example, the texts of many addresses may be similar, but the longitude and latitude or address components are completely different. For example, the two addresses "Nanjing Road, Shanghai" and "Shanghai Road, Nanjing" have high text similarity. Therefore, sorting the addresses based only on text similarity cannot sort the addresses well, so that users cannot get the desired addresses. In this embodiment, the use of an integrated tree model to train the address scoring model is conducive to adding more features, so that the model takes into account information of more dimensions, and does not judge whether the address may meet user needs only from the perspective of text similarity, which is conducive to improving the address sorting effect.
[0069] In addition, considering that the performance of the ensemble tree model depends on features and training data, if there is more data in the training data that relies on a certain feature, then the importance of this feature will be higher, and the model effect may vary greatly for different queries. Therefore, this embodiment also divides the retrieval scenario into multiple scenarios based on the length of the query text, and then trains multiple address scoring models for multiple scenarios. Then, when the user searches for an address online, a model with a matching text length is determined from the pre-trained multiple address scoring models based on the text length of the query text actually input by the user to score the relevant recalled addresses. Since the importance of the features of the target model will be more suitable for the query text of this text length, the address sorting effect can be improved in the end.
[0070] The address sequence sorting device provided in one embodiment of the present application may be a computer program or a program code running in a computer device, for example, the address sequence sorting device is an application software; the address sequence sorting device may be used to execute the corresponding steps in the address sequence sorting method provided in the embodiment of the present application. Figure 5 , an address sequence sorting device provided in an embodiment of the present application includes: An address recall module 11 is used to perform address recall processing in response to receiving an address search request sent by a user terminal, and obtain multiple recall addresses; A target model determination module 12 is used to obtain the text length of the query text carried in the address search request, and determine an address scoring model that matches the query text from multiple address scoring models that have been pre-trained to a convergent state according to the text length of the query text, which is recorded as a target model; An address scoring module 13 is used to generate a corresponding scalar feature for each recalled address, and input the scalar feature corresponding to each recalled address into a target model to obtain a score corresponding to each recalled address; The address sorting module 14 is used to sort the multiple recalled addresses according to the score corresponding to each recalled address, and output a recommended address list.
[0071] In some embodiments, the apparatus further comprises the following modules: A sample data processing module (not shown in the figure) is used to collect multiple historical freight order data, process each historical freight order data into sample data, and obtain multiple sample data; each sample data includes a historical query text, multiple historical recall addresses, and classification labels and scalar features corresponding to each historical recall address; A data partitioning module (not shown in the figure) is used to set multiple non-overlapping text length ranges, and to partition all sample data whose text lengths of historical query texts belong to the same text length range into the same data set, thereby obtaining multiple training data sets corresponding to the multiple text length ranges. A training module (not shown in the figure) is used to train the multiple address scoring models based on the multiple training data sets.
[0072] In some embodiments, each piece of historical freight order data includes a historical query text and multiple historical recall addresses; when the sample data processing module processes each piece of historical freight order data into sample data, it is used to pre-process each piece of historical freight order data, and then set a corresponding classification label for each historical recall address included in each piece of historical freight order data, and generate a corresponding scalar feature for each historical recall address included in each piece of historical freight order data.
[0073] In some embodiments, when the sample data processing module sets a corresponding classification label for each historical recall address included in each historical freight order data, it is used to detect whether the historical recall address included in each historical freight order data has been clicked. If so, a positive example label is set for the historical recall address; if not, a negative example label is set for the historical recall address.
[0074] In some embodiments, when the sample data processing module generates corresponding scalar features for each historical recall address included in each historical freight order data, it is used to generate corresponding scalar features for each historical recall address included in each historical freight order data, taking the historical freight order data as basic data, and according to a pre-generated feature set.
[0075] In some embodiments, the training module is used to construct multiple integrated tree models; for each integrated tree model, a training data set is used to train the integrated tree model until a preset training end condition is met; wherein different integrated tree models are trained using different training data sets.
[0076] In some embodiments, each address scoring model corresponds to a text length range, and the text length ranges corresponding to any two address scoring models do not overlap; the target model determination module 12 is specifically used to: detect whether the text length range corresponding to each address scoring model includes the text length of the query text; for any address scoring model, if the text length range corresponding to the address scoring model includes the text length of the query text, then it is determined that the address scoring model matches the query text.
[0077] In some embodiments, the text length range corresponding to each address scoring model is represented by one or two text length thresholds; when the target model determination module 12 detects whether the text length range corresponding to each address scoring model includes the text length of the query text, it is used to obtain the text length threshold corresponding to the address scoring model for each address scoring model, compare the text length threshold with the text length of the query text, and determine whether the text length range corresponding to the address scoring model includes the text length of the query text based on the comparison result.
[0078] The address sequence sorting device provided in one embodiment of the present application and the address sequence sorting method provided in one embodiment of the present application belong to the same concept, and the specific implementation process is detailed in the full text of the specification and will not be repeated here.
[0079] An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the address sequence sorting method provided in any embodiment of the present application are implemented.
[0080] Figure 6 A specific structural block diagram of a computer device provided in one embodiment of the present application is shown, and the computer device 100 includes: one or more processors 101, a memory 102, and one or more computer programs, wherein the processor 101 and the memory 102 are connected via a bus, and the one or more computer programs are stored in the memory 102 and are configured to be executed by the one or more processors 101, and the processor 101 implements the steps of the address sequence sorting method provided in any embodiment of the present application when executing the computer program. The above-mentioned computer device may include but is not limited to servers, terminals and other devices. The computer device may be a desktop computer, a mobile terminal or a vehicle-mounted device, and the mobile terminal includes at least one of a mobile phone, a tablet computer, a personal digital assistant or a wearable device.
[0081] It should be understood that each step in each embodiment of the present application is not necessarily performed in sequence according to the order indicated by the step number. Unless there is clear explanation in this article, the execution of these steps does not have strict order restriction, and these steps can be performed in other orders. Moreover, at least a part of the steps in each embodiment can include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
[0082] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink), DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0083] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0084] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for sorting address sequences, It is characterized in that The method comprises: In response to receiving an address retrieval request sent by a user terminal, performing address recall processing to obtain multiple recalled addresses; Obtaining the text length of the query text carried in the address search request; Determine, according to the text length of the query text, an address scoring model that matches the query text from a plurality of address scoring models that have been pre-trained to a convergence state, and record it as a target model; Generating a corresponding scalar feature for each of the recalled addresses; Inputting the scalar feature corresponding to each of the recalled addresses into the target model to obtain a score corresponding to each of the recalled addresses; The multiple recalled addresses are sorted according to the score corresponding to each of the recalled addresses, and a recommended address list is output.
2. The method according to claim 1, It is characterized in that Before receiving the address retrieval request sent by the user terminal, the following model training process is also included: Collect multiple pieces of historical freight order data, process each piece of the historical freight order data into sample data, and obtain multiple pieces of sample data; each piece of the sample data includes a historical query text, multiple historical recall addresses, and classification labels and scalar features corresponding to each of the historical recall addresses; Setting a plurality of non-overlapping text length ranges, dividing all sample data whose text lengths of historical query texts belong to the same text length range into the same data set, and obtaining a plurality of training data sets corresponding to the plurality of text length ranges one by one; The multiple address scoring models are obtained by training based on the multiple training data sets.
3. The method according to claim 2, It is characterized in that Each piece of the historical freight order data includes a historical query text and a plurality of historical recall addresses; Each piece of the historical freight order data is processed into sample data, including: Each piece of the historical freight order data is preprocessed, and then a corresponding classification label is set for each historical recall address included in each piece of the historical freight order data, and a corresponding scalar feature is generated for each historical recall address included in each piece of the historical freight order data.
4. The method according to claim 3, It is characterized in that A corresponding classification label is set for each historical recall address included in each piece of the historical freight order data, including: For each historical recall address included in each piece of the historical freight order data, it is detected whether the historical recall address has been clicked. If so, a positive label is set for the historical recall address; if not, a negative label is set for the historical recall address.
5. The method according to claim 3 or 4, It is characterized in that Generate corresponding scalar features for each historical recall address included in each piece of the historical freight order data, including: For each historical recall address included in each piece of the historical freight order data, the historical freight order data is used as basic data and a corresponding scalar feature is generated for the historical recall address according to a pre-generated feature set.
6. The method according to claim 2, It is characterized in that The plurality of address scoring models are obtained by training based on the plurality of training data sets, including: Build multiple ensemble tree models; For each of the ensemble tree models, one of the training data sets is used to train the ensemble tree model until a preset training end condition is met; wherein different ensemble tree models are trained using different training data sets.
7. The method according to claim 1, It is characterized in that Each of the address scoring models corresponds to a text length range, and the text length ranges corresponding to any two of the address scoring models do not overlap; Determining an address scoring model matching the query text from a plurality of address scoring models pre-trained to a converged state according to the text length of the query text includes: Detecting whether the text length range corresponding to each of the address scoring models includes the text length of the query text; For any of the address scoring models, if the text length range corresponding to the address scoring model includes the text length of the query text, it is determined that the address scoring model matches the query text.
8. The method according to claim 7, It is characterized in that The text length range corresponding to each of the address scoring models is represented by one or two text length thresholds; Detecting whether the text length range corresponding to each of the address scoring models includes the text length of the query text includes: For each of the address scoring models, a text length threshold corresponding to the address scoring model is obtained, the text length threshold is compared with the text length of the query text, and based on the comparison result, it is determined whether the text length range corresponding to the address scoring model includes the text length of the query text.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the address sequence sorting method according to any one of claims 1 to 8.
10. A computer device, It is characterized in that include: one or more processors; Memory; as well as One or more computer programs, the processor and the memory are connected via a bus, wherein the one or more computer programs are stored in the memory and are configured to be executed by the one or more processors, wherein the processor implements the steps of the address sequence sorting method as described in any one of claims 1 to 8 when executing the computer program.
