Training method and system of quality inspection model in freight scene
By obtaining historical data on the freight platform, extracting samples of keywords and related search results, and training the quality inspection model, the problem of poor quality inspection model effect in freight scenarios is solved, and more efficient correlation detection is achieved.
Patent Information
- Application Number
- CN202411937733.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-11
AI Technical Summary
In the freight scenario, it is difficult for the prior art to effectively measure the correlation between the keywords entered by users and the search results, resulting in poor quality inspection models.
By obtaining the historical data of users' search services using the freight platform, extracting search results of keywords with high correlation and low correlation as sample data, and training the quality inspection model to optimize correlation detection.
The effect of the quality inspection model in freight scenarios is improved, sample error is reduced, and correlation detection capabilities are enhanced.
Smart Images

Figure CN119807748A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of logistics retrieval, and specifically relates to a training method and system for a quality inspection model in a freight scenario. Background Art
[0002] As people's daily lives gradually rely on Internet platforms, their search needs in applications are also increasing. Currently, there are search quality inspection services in location-based services (LBS) search. Generally, the relevance score between user requests (queries) and search results (POIs) is calculated based on classification models, and the quality inspection pass rate is controlled according to the matching score of each search result. Another common method is to calculate the relevance score between user requests and the search result list, and control the quality inspection pass rate according to the matching score of the search result list.
[0003] Most existing methods for measuring text relevance are based on semantic understanding, such as sentence relevance, etc. This method is good at understanding corpus and can be transformed into semantic vectors with the help of BERT (Bidirectional Encoder Representation from Transformers) to train quality inspection models. However, semantic understanding is difficult to apply in freight scenarios, which do not focus on semantics but on address structure, synonyms, error correction, etc. Adding semantic understanding will make the quality inspection model in freight scenarios worse, because users often enter redundant queries. In LBS retrieval services, it is important to extract valid address information in the query, rather than transforming redundant information into semantic vectors. Summary of the invention
[0004] In view of the shortcomings of the prior art mentioned above, the purpose of the present invention is to propose a training method for a quality inspection model in a freight scenario, which measures the correlation between query and POI and then optimizes the samples to adjust the quality inspection model. Click samples are no longer used solely as positive samples, which greatly improves the effect of the quality inspection model in the freight scenario.
[0005] To achieve the above-mentioned purpose and other related purposes, the present invention provides a training method for a quality inspection model in a freight scenario, wherein the quality inspection model is applied to the retrieval service of a freight platform; wherein the retrieval service is used to match and output corresponding retrieval results based on keywords related to the freight address input by the user for user selection; the quality inspection model is used to confirm the correlation between the keywords and the corresponding retrieval results; the training method comprises: obtaining historical data of users using the retrieval service of the freight platform; extracting keywords and corresponding highly correlated and lowly correlated retrieval results from the historical data as sample data; and using the sample data to train the quality inspection model to optimize the correlation detection of the quality inspection model.
[0006] According to a specific embodiment of the present invention, the step of extracting keywords and their corresponding highly correlated and lowly correlated search results from the historical data as sample data includes: for any keyword, identifying the relevance of each search result matched by the keyword; taking the keyword and its corresponding highly correlated search results as positive samples, and taking the keyword and its corresponding lowly correlated search results as negative samples, and integrating them to obtain the sample data; wherein the search results matched by the keyword are obtained by outputting the search service of the freight platform, and when the output search results are all lowly correlated, calling the third-party supplementary recall through the quality inspection model to obtain highly correlated search results.
[0007] According to a specific embodiment of the present invention, the recall methods include: vector recall, personalized recall, rewrite recall, error correction recall, and component recall.
[0008] According to a specific embodiment of the present invention, for any keyword, the step of identifying the relevance of each search result matched by the keyword includes: when the keyword contains multiple address attribute information and name attribute information, extracting key features in the keyword by comparing the keyword with the search results selected by the user; identifying the relevance of each search result matched by the keyword based on the key features; wherein, the search results containing the key features are identified as highly relevant search results, and the search results not containing the key features are identified as low relevant search results.
[0009] According to a specific embodiment of the present invention, the step of extracting key features includes: when the search results selected by the user hit one or more address attribute information and / or name attribute information in the keyword, the hit address attribute information and / or name attribute information is used as the key feature of the keyword.
[0010] According to a specific embodiment of the present invention, for any keyword, the step of identifying the relevance of each search result matched by the keyword includes: when the keyword only contains address attribute information, filtering out the most detailed address information from the keyword; identifying the relevance of each search result matched by the keyword based on the most detailed address information; wherein, the search results whose longitude and latitude are consistent with the most detailed address information are identified as highly relevant search results, and the search results whose longitude and latitude are inconsistent with the most detailed address information are identified as low-relevance search results.
[0011] According to a specific embodiment of the present invention, for any keyword, the step of identifying the relevance of each search result matched by the keyword includes: when the keyword only contains name attribute information, filtering out the most important name information from the keyword; identifying the relevance of each search result matched by the keyword based on the most important name information; wherein, the search result containing the most important name information is identified as a highly relevant search result, and the search result not containing the most important name information is identified as a low relevant search result.
[0012] According to a specific embodiment of the present invention, when the search service outputs corresponding search results based on the keyword matching related to the shipping address input by the user, it also includes: correcting the keyword.
[0013] According to a specific embodiment of the present invention, when the search service outputs corresponding search results based on the keyword matching related to the shipping address input by the user, it also includes: rewriting the keyword.
[0014] A training system for a quality inspection model in a freight scenario, wherein the quality inspection model is applied to a retrieval service of a freight platform; wherein the retrieval service is used to match and output corresponding retrieval results based on keywords related to the freight address input by the user for user selection; the quality inspection model is used to confirm the correlation between the keywords and the corresponding retrieval results; the training system includes: a data collection module, used to obtain historical data of users using the retrieval service of the freight platform; a sample extraction module, used to extract keywords and their corresponding highly correlated and lowly correlated retrieval results from the historical data as sample data; and a model training module, used to train the quality inspection model using the sample data to optimize the correlation detection of the quality inspection model.
[0015] An electronic device includes a processor, wherein the processor is coupled to a memory, and the memory stores program instructions. When the program instructions stored in the memory are executed by the processor, the above-mentioned method is implemented.
[0016] A computer-readable storage medium includes a program. When the program is run on a computer, the computer is enabled to execute the method described above.
[0017] The present invention provides a training method for a quality inspection model in a freight scenario. According to the conditions unique to the freight scenario, the correlation between the query and the POI is measured to obtain better correlation samples. At the same time, POIs with strong correlation are screened according to multiple strategies, almost all POIs with strong correlation are included, the error of the samples is reduced, and the quality inspection model is trained and optimized with positive and negative samples to improve its corresponding correlation detection.
[0018] In addition, after sample modification, the quality inspection model can adopt a tree model or a simple MLP model, both of which have good results. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A flowchart of a specific embodiment of a method for training a quality inspection model in a freight scenario provided by the present invention; Figure 2 A flowchart of another specific embodiment of a method for training a quality inspection model in a freight scenario provided by the present invention; Figure 3 A structural schematic diagram of a specific embodiment of a training system for a quality inspection model in a freight scenario provided by the present invention; Figure 4 The present invention provides a structural block diagram of a specific embodiment of an electronic device. DETAILED DESCRIPTION
[0020] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0022] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0023] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0024] Example 1 See also Figure 1 , a training method for a quality inspection model in a freight scenario shown in 2, the quality inspection model mentioned in this application is applied to the retrieval service of the freight platform. When the user uses the retrieval service of the freight platform, for example, when creating an order and need to enter the freight address, the user usually enters a relatively short keyword for convenience, and does not enter the complete address. This requires the retrieval service to match the corresponding retrieval results based on the keywords related to the freight address entered by the user and output them, so that the user can select the correct retrieval results from them. In a specific embodiment, assuming that the complete freight address should be XX District, XX Street, XX Road, XX Community, XX City, XX Province, and the user may directly enter the keyword XX Community for convenience. The corresponding retrieval service needs to retrieve all locations related to XX Community and display the retrieval results to the user in the form of a list, so that the user can click the correct one from multiple retrieval results to directly generate a complete freight address, simplifying the user's operation in an automated way.
[0025] The quality inspection model is used to determine whether the freight address search service has passed the quality inspection. For example, it is necessary to confirm whether there is at least one search result (poi) in the search list that is related to the keyword (query) entered by the user. This requires the quality inspection model to measure the correlation between query and poi to determine whether this search result exists. In a specific embodiment, it is assumed that the search results are not related to the keywords entered by the user, that is, the quality inspection fails, and the search results matched by the search service cannot be fed back to the user. This will reduce the user's experience and require other methods to obtain relevant search results. If the search results are all related to the keywords entered by the user, then they can be directly fed back to the user to further select the correct answer, so as to directly generate the freight address.
[0026] Therefore, in order to optimize the quality inspection model's measurement method of the correlation between query and POI in the freight scenario, this application extracts samples by collecting historical data of users when using the retrieval service of the freight platform, and then trains and optimizes the quality inspection model through the samples. Specifically, the training method of the quality inspection model is as follows: Step S100, obtaining historical data of the user's use of the retrieval service of the freight platform.
[0027] Step S200: extract keywords and corresponding highly relevant and low relevant search results from the historical data as sample data.
[0028] Step S300: training the quality inspection model using the sample data to optimize the correlation detection of the quality inspection model.
[0029] First, the data generated by users calling the search service when using the freight platform can be collected. For example, users with freight needs can enter the freight address on the freight platform, such as the loading address or the unloading address. Users can enter the freight address through text input or voice input. When the user enters keywords related to the freight address, it is assumed that the user has a search request for the freight address. Accordingly, the backend of the freight platform starts to enable the search service to identify the text content entered by the user, and feedbacks and displays the search results to the user in the form of a list, and finally confirms a search result actually selected by the user to automatically generate a complete freight address to simplify the user's operation.
[0030] Therefore, each time the search service is enabled, a POI corresponding to the query will be generated, and sample data can be extracted from it based on the correlation between the query and the POI. Specifically, when the query contains more address attribute information and name attribute information, for example: query = Shanghai (city) Fushan Road (road) 111 Lane (house number) Songshan Community (name component-community), it is compared with the user's final confirmation, that is, the component of the clicked POI. When the clicked POI hits the key component, for example, the clicked POI contains the address information and / or name information of the query, such as the road, house number, or community, etc., then this part of the content can be used as the key feature of the query and compared with other POIs.
[0031] It can be understood here that multiple POIs can be retrieved according to a query, but in fact there is only one POI confirmed by the user, and there are many other remaining POIs. In order to better measure the correlation between the query and the POI, the clicked POI is no longer used as a single sample. In this embodiment, the query and all POIs can be specifically analyzed to comprehensively extract sample data so that the quality inspection model can be closer to the freight scenario.
[0032] Furthermore, after comparing the key feature with other POIs, if other POIs also contain the key feature, then the POI is regarded as a highly relevant search result, otherwise it is regarded as a low-relevant search result. Therefore, based on the query, the corresponding highly relevant POIs and low-relevant POIs can be distinguished. Accordingly, the query and the corresponding highly relevant POIs can be used as positive samples, and the query and the corresponding low-relevant POIs can be used as negative samples. The quality inspection model can be trained in two different directions to optimize the measurement of the correlation between the query and the POI in the freight scenario corresponding to the quality inspection model.
[0033] In addition, when the query only has address attribute information, the most detailed address information can be screened out from it. Road information is more detailed than city, town and village information, and so on. Specifically, the smallest geographical location in the query can be used as the most detailed address information according to the actual situation, that is, the city is smaller than the province, the district is smaller than the city, the street is smaller than the district, the road is smaller than the street, and the community is smaller than the road. And so on, the POI with the longitude and latitude that meets the most detailed address information can be regarded as a highly relevant search result, and the remaining POI, that is, the POI with the longitude and latitude that does not contain the most detailed address information, can be regarded as a low-relevant search result. Furthermore, based on the query, the high-relevant POI and the low-relevant POI corresponding to it can be distinguished. Accordingly, the query and the high-relevant POI corresponding to it can be used as positive samples, and the query and the low-relevant POI corresponding to it can be used as negative samples. The quality inspection model is trained in two different directions to optimize the measurement of the correlation between the query and the POI corresponding to the freight scenario of the quality inspection model.
[0034] When the query only has name attribute information, the most important and critical name information can be filtered out. For example, query = Songshan Community (community name) East Gate (direction). At this time, the community name is the most critical name information. In the freight scenario, other gates of the community should also be retrieved. Therefore, the POI containing the most important name information can be regarded as a highly relevant search result, that is, when POI = Songshan Community South Gate, it is also highly relevant. Conversely, the POI that does not contain the most important name information is a low-relevant search result. Similarly, based on the query, the corresponding high-relevant POI and low-relevant POI can be distinguished. Accordingly, the query and the corresponding high-relevant POI can be used as positive samples, and the query and the corresponding low-relevant POI can be used as negative samples. The quality inspection model is trained in two different directions to optimize the quality inspection model's measurement of the correlation between the query and the POI in the freight scenario.
[0035] Based on the above, positive and negative samples of query and POI can be extracted from the historical data of the retrieval service of the freight platform to train and optimize the quality inspection model.
[0036] It should also be noted that when the freight platform detects that the user has entered a query, it will activate the deceleration service to feedback the corresponding poi. However, the query entered by the user may be incorrect, especially when the user enters it by hand. In this case, it is necessary to use correctQuery to correct the user's original query to obtain several error-corrected queries. At the same time, it may also happen that the query entered by the user is more colloquial, such as xx auto repair, but the actual full name may be xx auto repair. In this case, it is necessary to use the rewrite query to rewrite the user's original query through the rewrite model. Therefore, when analyzing the correlation between query and poi above, the query has been corrected and rewritten, and is not the query originally entered by the user.
[0037] In addition, if after the user inputs the query, all POIs have a low correlation with the query, that is, during the quality inspection of the query and POI, the quality inspection model detects that the POI fed back by the search service has a low correlation with the query, indicating that all the search results are most likely not the correct answer, and feedback to the user may reduce the user experience. Correspondingly, a third-party supplementary recall can be called, that is, a highly relevant POI can be obtained through the recall method of POI. In this embodiment, the recall method for POI includes but is not limited to vector recall, personalized recall, rewrite recall, error correction recall, and component recall. Without departing from the spirit of the present invention, the modifications and embellishments made to the embodiments of the present invention by those skilled in the art still fall within the scope of the invention application of the present invention.
[0038] It should be noted that the step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they contain the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0039] Example 2 See also Figure 3 As shown, this embodiment also provides a training system for a quality inspection model in a freight scenario, wherein the quality inspection model is applied to a retrieval service of a freight platform; wherein the retrieval service is used to match and output corresponding retrieval results according to keywords related to the freight address input by the user, for the user to select; the quality inspection model is used to confirm the correlation between the keywords and the corresponding retrieval results; the training system includes: The data collection module 10 is used to obtain historical data of users using the retrieval service of the freight platform.
[0040] The sample extraction module 20 is used to extract keywords and the corresponding highly relevant and low relevant search results from the historical data as sample data.
[0041] The model training module 30 is used to train the quality inspection model using the sample data to optimize the correlation detection of the quality inspection model.
[0042] It should be noted that the training system for the quality inspection model in the freight scenario provided in the above embodiment and the training method for the quality inspection model in the freight scenario provided in the above embodiment 1 belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here. In actual application, the training method for the quality inspection model in the freight scenario provided in the above embodiment 1 can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0043] Example 3 See also Figure 4 As shown, an embodiment of the present application further provides an electronic device, comprising a memory 2, a processor 1, and a program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above methods when executing the program.
[0044] Among them, the memory includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory can be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory can also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory can also include both an internal storage unit of the electronic device and an external storage device. The memory can not only be used to store application software and various types of data installed in the electronic device, but also can be used to temporarily store data that has been output or is to be output.
[0045] In some embodiments, the processor may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor is the control core (Control Unit) of the electronic device, which connects the various components of the entire electronic device using various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing programs or modules stored in the memory, and calling data stored in the memory.
[0046] The processor executes the operating system of the electronic device and various installed application programs. The processor executes the application programs to implement the steps in the above method embodiment.
[0047] Exemplarily, the program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of program instruction segments capable of completing specific functions, which are used to describe the execution process of the program in the electronic device.
[0048] The above-mentioned integrated unit implemented in the form of software function modules can be stored in a computer-readable storage medium. The above-mentioned software function modules are stored in a storage medium and include several instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to perform part of the functions of various embodiments of the present invention.
[0049] In summary, the present invention provides a training method for a quality inspection model in a freight scenario, which measures the correlation between query and POI under the unique conditions of the freight scenario and obtains better correlation samples. At the same time, POIs with strong correlation are screened according to multiple strategies, almost all POIs with strong correlation are included, reducing the error of samples, and using positive and negative samples to train and optimize the quality inspection model to improve its corresponding correlation detection.
[0050] In addition, after sample modification, the quality inspection model can adopt a tree model or a simple MLP model, both of which have good results.
[0051] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed by the present invention should still be covered by the claims of the present invention.
Claims
1. A method for training a quality inspection model in a freight scenario, characterized in that: The quality inspection model is applied to the search service of the freight platform; wherein the search service is used to match and output corresponding search results according to the keywords related to the freight address input by the user for the user to select; the quality inspection model is used to confirm the correlation between the keywords and the corresponding search results; the training method includes: Obtain historical data of users’ use of the freight platform’s retrieval service; Extracting keywords and corresponding highly relevant and less relevant search results from the historical data as sample data; The quality inspection model is trained using the sample data to optimize the correlation detection of the quality inspection model.
2. The method for training a quality inspection model in a freight scenario according to claim 1, characterized in that: The steps of extracting keywords and the corresponding highly relevant and less relevant search results from the historical data as sample data include: For any keyword, identify the relevance of each search result matching the keyword; The keyword and the search results with high correlation therewith are taken as positive samples, and the keyword and the search results with low correlation therewith are taken as negative samples, and they are integrated to obtain the sample data; Among them, the search results of the keyword matching are obtained by using the search service output of the freight platform, and when the output search results are all low-relevance, the third-party supplementary recall is called through the quality inspection model to obtain high-relevance search results.
3. The method for training a quality inspection model in a freight scenario according to claim 2, characterized in that: Recall methods include: vector recall, personalized recall, rewrite recall, error correction recall, and component recall.
4. The method for training a quality inspection model in a freight scenario according to claim 2, characterized in that: For any keyword, the step of identifying the relevance of each search result matching the keyword includes: When the keyword contains multiple address attribute information and name attribute information, extracting key features of the keyword by comparing the keyword with the search results selected by the user; The relevance of each search result matching the keyword is identified based on the key feature; wherein the search results containing the key feature are identified as highly relevant search results, and the search results not containing the key feature are identified as low relevant search results.
5. The method for training a quality inspection model in a freight scenario according to claim 4, characterized in that: The steps to extract key features include: When the search result selected by the user hits one or more address attribute information and / or name attribute information in the keyword, the hit address attribute information and / or name attribute information is used as the key feature of the keyword.
6. The method for training a quality inspection model in a freight scenario according to claim 2, characterized in that: For any keyword, the step of identifying the relevance of each search result matching the keyword includes: When the keyword only contains address attribute information, the most detailed address information is filtered out from the keyword; Identify the relevance of each search result that matches the keyword based on the most detailed address information; wherein, identify the search results that match the longitude and latitude of the most detailed address information as highly relevant search results, and identify the search results that do not match the longitude and latitude of the most detailed address information as low relevant search results.
7. The method for training a quality inspection model in a freight scenario according to claim 2, characterized in that: For any keyword, the step of identifying the relevance of each search result matching the keyword includes: When the keyword only contains name attribute information, the most important name information is filtered out from the keyword; Based on the most important name information, the relevance of each search result matching the keyword is identified; wherein, the search result containing the most important name information is identified as a highly relevant search result, and the search result not containing the most important name information is identified as a low relevant search result.
8. The method for training a quality inspection model in a freight scenario according to claim 1, characterized in that: When the search service outputs corresponding search results according to the keyword matching related to the shipping address input by the user, Also includes: Correct the keywords.
9. The method for training a quality inspection model in a freight scenario according to claim 1, characterized in that: When the search service outputs corresponding search results according to the keyword matching related to the shipping address input by the user, Also includes: The keywords are rewritten.
10. A training system for a quality inspection model in a freight scenario, characterized in that: The quality inspection model is applied to the search service of the freight platform; wherein the search service is used to match and output corresponding search results according to the keywords related to the freight address input by the user for the user to select; the quality inspection model is used to confirm the correlation between the keywords and the corresponding search results; the training system includes: A data collection module is used to obtain historical data of users using the retrieval service of the freight platform; A sample extraction module, used to extract keywords and corresponding highly relevant and less relevant search results from the historical data as sample data; The model training module is used to train the quality inspection model using the sample data to optimize the correlation detection of the quality inspection model.