Request processing method and device, storage medium and electronic equipment

Training sample sets are automatically generated through preset configuration files and basic data sets, and freight rate search requests are processed using target recognition models, which solves the high cost problem caused by manual labeling and achieves efficient and low-cost information extraction.

CN120705384APending Publication Date: 2025-09-26TRAVELSKY TECHNOLOGY LIMITED
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510827304.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the prior art, a model is trained using a training sample set obtained through manual annotation to process user fare search requests, resulting in high labor costs.

Method used

The training sample set is automatically determined through the preset configuration file and basic data set, and the target recognition model is used to perform information recognition processing on the freight rate search request, generate training samples and automatically generate the training sample set, avoiding manual labeling work.

Benefits of technology

This eliminates the need for manual labeling during training, reduces labor costs, improves the efficiency and accuracy of training sample set generation, and enhances the efficiency of information extraction for freight rate search requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705384A_ABST
    Figure CN120705384A_ABST
Patent Text Reader

Abstract

The invention discloses a request processing method and device, a storage medium and electronic equipment. The method comprises the steps that text content sent by a target object is received through a target interaction interface, and a freight rate search request is determined based on the text content; information identification processing is conducted on the freight rate search request through a target identification model, target information is obtained, the target information comprises multiple search condition fields and the field value of each search condition field, the target identification model is obtained through training based on a training sample set, and the training sample set is determined based on a preset configuration file and a basic data set; the configuration file is used for recording a search condition field required by a to-be-generated sample search request in the training sample set. The technical problem of high labor cost due to the fact that a training sample set obtained through manual labeling is adopted to train a model and then key information is extracted from a freight rate search request of a user based on the trained model in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a request processing method, device, storage medium and electronic device. Background Art

[0002] Fare search systems play a crucial role in the digital transformation of the air transport industry. As passenger needs become increasingly personalized and diverse, fare searches are becoming increasingly complex, involving information retrieval across multiple dimensions, including flight date, origin, destination, and transit points. By parsing and understanding user search requests through machine learning models, we can more accurately and quickly understand user intent.

[0003] Currently, in related technologies, training such models relies on training sample sets obtained through manual labeling. Faced with massive amounts of data to be labeled, the labeling process is not only time-consuming but also costly, resulting in high labor costs when processing users' freight rate search requests.

[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0005] Embodiments of the present invention provide a request processing method, apparatus, storage medium, and electronic device to at least address the technical problem of high labor costs in related technologies of using a training sample set obtained by manual annotation to train a model, and then extracting key information from the user's fare search request based on the trained model.

[0006] According to one aspect of an embodiment of the present invention, a request processing method is provided, comprising: receiving text content sent by a target object through a target interaction interface, and determining a freight rate search request based on the text content, wherein the target interaction interface provides a freight rate search function to the target object through a question-and-answer interaction; performing information recognition processing on the freight rate search request through a target recognition model to obtain target information, wherein the target information includes multiple search condition fields and a field value for each search condition field, the target recognition model is trained based on a training sample set, the training sample set is determined based on a preset configuration file and a basic data set, the configuration file is used to record the search condition fields required for the sample search request to be generated in the training sample set, and the basic data set includes multiple field values ​​corresponding to different search condition fields.

[0007] Furthermore, the request processing method also includes: before performing information recognition processing on the freight rate search request through the target recognition model to obtain the target information, determining the search condition field required for the sample search request to be generated based on the configuration file to obtain the reference field; for each reference field, randomly selecting a field value from multiple field values ​​corresponding to the reference field in the basic data set as the target field value; determining the sample search request based on a preset text template, each reference field and the target field value corresponding to the reference field, determining the sample search request as a training sample, and determining the true label of the training sample based on each reference field and the target field value corresponding to the reference field; determining the training sample set based on the training sample and the true label.

[0008] Furthermore, the request processing method also includes: when the value of the first setting item in the configuration file is the first field value, all preset search condition fields are determined as reference fields, wherein the first setting item is used to indicate whether a sample search request is generated based on all search condition fields; when the value of the first setting item in the configuration file is the second field value, if the value of the second setting item in the configuration file is the first field value, the reference field is determined based on the first category of search condition fields and the second category of search condition fields in the preset search condition fields, wherein the second setting item is used to indicate whether a sample search request is generated based on the first category of search condition fields, the first category of search condition fields refers to search condition fields that can be missing when generating a sample search request, and the second category of search condition fields refers to search condition fields that cannot be missing when generating a sample search request; if the value of the second setting item in the configuration file is the second field value, the second category of search condition fields is determined as the reference field.

[0009] Furthermore, the request processing method also includes: when the value of the first setting item is the second field value and the value of the second setting item is the first field value, if the value of the third setting item in the configuration file is a non-empty value, the value of the third setting item is determined as the target search condition field, and the target search condition field and the second type of search condition field are determined as reference fields, wherein the third setting item is used to record the search condition field in the first type of search condition field used to generate a sample search request; if the value of the third setting item in the configuration file is an empty value, N search condition fields are randomly selected from the first type of search condition field, and the N search condition fields and the second type of search condition field are determined as reference fields, wherein N is a positive integer.

[0010] Furthermore, the request processing method also includes: generating an initial sample search request based on a preset text template, each reference field and the target field value corresponding to the reference field; converting the data format of the initial sample search request into a target format to obtain a sample search request.

[0011] Furthermore, the request processing method further includes: determining the search condition fields required for the sample search request to be generated based on the configuration file, and before obtaining the reference fields, determining the number of samples of the training samples to be generated from the configuration file.

[0012] Furthermore, the request processing method also includes: performing information identification processing on the fare search request through the target recognition model to obtain the fare search business data before obtaining the target information, wherein the fare search business data includes at least one of the following: airport data, aviation agency data, city data, and business object data; performing format detection on the data format of the fare search business data to obtain a format detection result; when the format detection result indicates that the data format of the fare search business data is accurate, determining the basic data set based on the fare search business data.

[0013] According to another aspect of an embodiment of the present invention, a request processing device is also provided, including: a first determination module, used to receive text content sent by a target object through a target interaction interface, and determine a freight rate search request based on the text content, wherein the target interaction interface provides a freight rate search function to the target object through a question-and-answer interaction; a first processing module, used to perform information recognition processing on the freight rate search request through a target recognition model to obtain target information, wherein the target information includes multiple search condition fields and field values ​​of each search condition field, the target recognition model is trained based on a training sample set, and the training sample set is determined based on a preset configuration file and a basic data set, the configuration file is used to record the search condition fields required for the sample search request to be generated in the training sample set, and the basic data set includes multiple field values ​​corresponding to different search condition fields.

[0014] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned request processing method when running.

[0015] According to another aspect of an embodiment of the present invention, an electronic device is also provided, which includes one or more processors; a memory for storing one or more programs, which enables the one or more processors to run the programs when the one or more programs are executed by the one or more processors, wherein the programs are configured to execute the above-mentioned request processing method when running.

[0016] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program / instruction, which implements the above-mentioned request processing method when executed by a processor.

[0017] In an embodiment of the present invention, a training sample set for training a model is automatically determined based on a preset configuration file and a basic data set. Key information is extracted from a freight rate search request using the trained model. Text content sent by a target object is received through a target interaction interface, and a freight rate search request is determined based on the text content. The freight rate search request is then processed by a target recognition model to obtain target information. The target interaction interface provides a freight rate search function to the target object through a question-and-answer interaction. The target information includes multiple search condition fields and a field value for each search condition field. The target recognition model is trained based on a training sample set, which is determined based on a preset configuration file and a basic data set. The configuration file is used to record the search condition fields required for a sample search request to be generated in the training sample set. The basic data set includes multiple field values ​​corresponding to different search condition fields.

[0018] In the above process, the training sample set is determined based on the preset configuration file and basic data set, thereby realizing automatic generation of the training sample set and avoiding manual labeling work. The target recognition model is obtained by training based on the training sample set, and the target recognition model is used to perform information recognition processing on the freight rate search request of the target object to obtain the target information. This realizes the use of a model that does not rely on manual labeling during the training process to extract information from the freight rate search request, thereby effectively reducing labor costs.

[0019] It can be seen that the solution provided by the present application achieves the purpose of automatically determining the training sample set for training the model based on the preset configuration file and basic data set, and extracting key information from the freight rate search request through the trained model, thereby achieving the technical effect of reducing labor costs, and further solving the technical problem of high labor costs in the related technology of using the training sample set obtained by manual annotation to train the model, and then extracting key information from the user's freight rate search request based on the trained model. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0021] Figure 1 is a schematic diagram of an optional request processing method according to an embodiment of the present invention;

[0022] Figure 2 is a schematic diagram of the operation of an optional target processing system according to an embodiment of the present invention;

[0023] Figure 3 is a schematic diagram of an optional request processing device according to an embodiment of the present invention;

[0024] Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0028] Example 1

[0029] According to an embodiment of the present invention, an embodiment of a request processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0030] Figure 1 is a schematic diagram of an optional request processing method according to an embodiment of the present invention, such as Figure 1 As shown, the method includes the following steps:

[0031] Step S101: receiving text content sent by a target object through a target interaction interface, and determining a fare search request based on the text content, wherein the target interaction interface provides a fare search function to the target object through a question-and-answer interaction.

[0032] Optionally, electronic devices, application systems, servers and other devices may be used as the execution subject of the present application. In this embodiment, the target processing system is used as the execution subject to execute the above-mentioned request processing method.

[0033] Alternatively, the target user may be a user, and the fares may be understood as flight prices. The target interactive interface may provide the target user with a fare search function through a question-and-answer interaction. For example, the target interactive interface may be a customer service inquiry interface, where the user enters a natural language description (i.e., the aforementioned text content) regarding a fare search, such as "I want to inquire about flight prices from City A to City B next week." The target processing system determines the fare search request based on the received natural language description.

[0034] In an optional embodiment, the target processing system may directly determine the received text content as a fare search request.

[0035] In an optional embodiment, to facilitate data recording and processing by the target processing system, the target processing system may convert the received text content into a target format, thereby identifying the text content in the target format as a fare search request. The target format may be understood as the data format required by the target processing system for data processing, for example, XML.

[0036] In step S102, the freight rate search request is subjected to information recognition processing through a target recognition model to obtain target information, wherein the target information includes multiple search condition fields and the field value of each search condition field. The target recognition model is trained based on a training sample set, and the training sample set is determined based on a preset configuration file and a basic data set. The configuration file is used to record the search condition fields required for the sample search request to be generated in the training sample set, and the basic data set includes multiple field values ​​corresponding to different search condition fields.

[0037] Optionally, the target recognition model can be a machine learning model that is used to extract key information from the fare search request, namely, extract the search condition fields and the field values ​​of each search condition field. For example, the search condition fields can be the origin, destination, departure date, arrival date, earliest departure time, latest departure time, designated airline, etc. If the search condition field is the origin, the field value of the search condition field can be City A, City B, etc. If the search condition field is the departure date, the field value of the search condition field can be March 2, Holiday C, etc.

[0038] In an optional embodiment, the target recognition model may be a neural network model.

[0039] In an optional embodiment, the object recognition model may be a large language model.

[0040] Optionally, the target processing system may input the freight rate search request into a target recognition model, and perform information recognition processing (ie, key information extraction) on the freight rate search request through the target recognition model, thereby obtaining target information output by the target recognition model.

[0041] Optionally, the target recognition model is trained based on a training sample set. The training samples in the training sample set are sample search requests, which can also be called sample freight rate search requests. The true label includes at least: the search condition field and field value included in the sample search request.

[0042] Optionally, the training sample set is determined based on a preset configuration file and a basic data set. The configuration file is used to record the search condition fields required for the sample search request to be generated in the training sample set. For example, the configuration file can be used to set parameters, such as the number of training samples generated, whether to include optional fields, whether to include all fields, etc.; it can also be used to set data preferences, such as whether to perform fuzzy search, date range, etc., and can also be used to set application scenarios, such as specifying the range of optional fields, etc. The basic data set includes multiple field values ​​corresponding to different search condition fields, such as the airport code, airline code, specific date, etc. corresponding to the origin and destination. For example, the basic data set can be determined based on airport data, aviation agency data, airport neighboring city data, customer coding data, and other business-related data.

[0043] For example, when constructing a training sample set, the target processing system can determine the search condition fields required to generate samples based on the configuration file, and then randomly determine the field values ​​corresponding to the search condition fields from the basic data set, thereby determining the training samples (i.e., sample search requests) and true labels based on the search condition fields and their corresponding field values.

[0044] Based on the scheme defined in steps S101 to S102 above, it can be learned that, in an embodiment of the present invention, a training sample set for training a model is automatically determined based on a preset configuration file and a basic data set, key information is extracted from the freight search request through the trained model, text content sent by the target object is received through the target interaction interface, and the freight search request is determined based on the text content, thereby performing information recognition processing on the freight search request through the target recognition model to obtain target information, wherein the target interaction interface provides the target object with a freight search function through a question-and-answer interaction, the target information includes multiple search condition fields and a field value for each search condition field, the target recognition model is trained based on the training sample set, and the training sample set is determined based on the preset configuration file and the basic data set, the configuration file is used to record the search condition fields required for the sample search request to be generated in the training sample set, and the basic data set includes multiple field values ​​corresponding to different search condition fields.

[0045] It is easy to notice that in the above process, by determining the training sample set based on the preset configuration file and basic data set, the training sample set is automatically generated, thus avoiding manual labeling work. By training based on the training sample set, a target recognition model is obtained, and the target recognition model is used to perform information recognition processing on the freight rate search request of the target object to obtain the target information. This realizes the use of a model that does not rely on manual labeling during the training process to extract information from the freight rate search request, thereby effectively reducing labor costs.

[0046] It can be seen that the solution provided by the present application achieves the purpose of automatically determining the training sample set for training the model based on the preset configuration file and basic data set, and extracting key information from the freight rate search request through the trained model, thereby achieving the technical effect of reducing labor costs, and further solving the technical problem of high labor costs in the related technology of using the training sample set obtained by manual annotation to train the model, and then extracting key information from the user's freight rate search request based on the trained model.

[0047] In an optional embodiment, before performing information recognition processing on the freight rate search request through the target recognition model to obtain the target information, the target processing system can determine the search condition fields required for the sample search request to be generated based on the configuration file to obtain the reference field; for each reference field, randomly select a field value from multiple field values ​​corresponding to the reference field in the basic data set as the target field value; determine the sample search request based on a preset text template, each reference field and the target field value corresponding to the reference field, determine the sample search request as a training sample, and determine the true label of the training sample based on each reference field and the target field value corresponding to the reference field; determine the training sample set based on the training sample and the true label.

[0048] Optionally, the configuration file records which fields should be included in the sample search request to be generated. These fields can be all required fields, all required fields plus all optional fields, or any combination in between. Based on the records in the configuration file, the target processing system can determine the search condition fields required for the sample search request to be generated and obtain the reference fields.

[0049] Optionally, after determining the reference field, the target processing system may randomly select a field value from multiple field values ​​corresponding to the reference field in the base dataset as the target field value for the reference field. For example, if the reference field is the origin, a value may be randomly selected from multiple locations corresponding to the origin in the base dataset (e.g., City A, City B, Airport A, Airport B, etc.) as the target field value.

[0050] Optionally, the target processing system may fill each reference field and the target field value corresponding to the reference field into a specific position in the text template to obtain a sample search request. For example, an optional text template may be "[] is [], [] is [], [] is []", wherein each group of "[] is []" is used to fill in a group of reference fields and the target field value corresponding to the reference field. For example, the filled-in text template may be "The origin is city A, the destination is city B, and the departure date is February 1, 2025". For another example, an optional text template may be "Query flights from [origin] to [destination] with [departure date]". After filling in the field values, the filled-in text template may be "Query flights from City A to City B on February 1, 2025". Optionally, a sample search request may be used as a training sample.

[0051] Optionally, a true label for the training sample is determined based on each reference field and the target field value corresponding to the reference field. The true label is used to represent at least the search condition fields and field values ​​included in the sample search request. The true label may also include the number of optional fields in the sample search request.

[0052] For example, for the sample search request "Query flights from City A to City B on February 1, 2025", its true label may include the following information: "Origin = City A, Destination = City B, Departure Date = February 1, 2025", and its true label may include "Number of optional fields = 0".

[0053] Alternatively, the target processing system may generate multiple training samples and true labels corresponding to the training samples based on the above method, thereby determining a training sample set based on the generated training samples and true labels. In an optional embodiment, the training samples and true labels in the training sample set may be stored in a table.

[0054] It should be noted that, through the above method, the automatic generation of training samples and true labels is achieved, thereby reducing the labor cost of generating the training sample set and improving the efficiency of generating the training sample set.

[0055] In an optional embodiment, before determining the search condition fields required for the sample search request to be generated based on the configuration file and obtaining the reference fields, the target processing system may determine the number of training samples to be generated from the configuration file.

[0056] Optionally, the configuration file may be manually pre-configured and may include the number of training samples to be generated. For example, a user may set "number of samples = 1000" in the configuration file, and the target processing system reads "number of samples = 1000" from the configuration file, thereby determining that the number of training samples to be generated is 1000.

[0057] In an optional embodiment, if the number of training samples to be generated in the configuration file is a null value, a preset value may be determined as the number of training samples to be generated, for example, the preset value may be 100.

[0058] It should be noted that the above method allows users to flexibly adjust the scale of training data according to the actual needs of model training, thereby improving the flexibility and applicability of model training.

[0059] In an optional embodiment, before performing information recognition processing on the fare search request through the target recognition model to obtain the target information, the target processing system can obtain fare search business data, wherein the fare search business data includes at least one of the following: airport data, aviation agency data, city data, and business object data; perform format detection on the data format of the fare search business data to obtain a format detection result; when the format detection result indicates that the data format of the fare search business data is accurate, determine the basic data set based on the fare search business data.

[0060] Optionally, fare search business data refers to business data associated with the fare search business, and the fare search business data includes field values ​​corresponding to the search condition fields. The fare search business data includes at least one of the following: airport data, aviation agency data, city data, and business object data. Among them, airport data may include the unique identifier of the airport and the unique identifier of the city where the airport is located; aviation agency data may include the unique identifier of the aviation agency, and aviation agency data may also include identifiers associated with the aviation agency in different ticketing channels; city data may include the correspondence between each airport and its neighboring cities (i.e., within the target range); business object data may include user identifiers of users of the aviation agency.

[0061] After acquiring the freight rate search service data, the processing system can use a format detection tool to detect whether the data format of the freight rate search service data is correct and obtain a format detection result. For example, the format detection tool can detect whether the data format of the freight rate search service data is in the format described in this document. The format detection result indicates whether the data format of the freight rate search service data is correct.

[0062] Optionally, if the format detection result indicates that the freight rate search service data is in the correct format, a basic data set is determined based on the freight rate search service data. For example, the freight rate search service data is added to the initial basic data set to obtain the basic data set. The initial basic data set may include some manually entered field values ​​for search criteria fields, and the freight rate search service data can be used to enrich the data content of the initial basic data set.

[0063] Optionally, if the format detection result indicates that the data format of the freight rate search service data is incorrect, determining the basic data set based on the freight rate search service data is prohibited. For example, the initial basic data set is directly used as the basic data set.

[0064] It should be noted that, through the above method, on the one hand, the content richness of the basic data set is improved, and on the other hand, the format accuracy of the data in the basic data set is improved.

[0065] In an optional embodiment, the search condition fields required for the sample search request to be generated are determined based on the configuration file to obtain a reference field, including: when the value of the first setting item in the configuration file is the first field value, all preset search condition fields are determined as reference fields, wherein the first setting item is used to characterize whether the sample search request is generated based on all search condition fields; when the value of the first setting item in the configuration file is the second field value, if the value of the second setting item in the configuration file is the first field value, the reference field is determined based on the first category of search condition fields and the second category of search condition fields in the preset search condition fields, wherein the second setting item is used to characterize whether the sample search request is generated based on the first category of search condition fields, the first category of search condition fields refers to search condition fields that can be missing when generating the sample search request, and the second category of search condition fields refers to search condition fields that cannot be missing when generating the sample search request; if the value of the second setting item in the configuration file is the second field value, the second category of search condition fields is determined as the reference field.

[0066] Optionally, the target processing system has a preset search condition field list. The search condition field list includes all possible search condition fields that may appear in a fare search request. The search condition fields in the search condition field list are also preset search condition fields. The search condition fields in the search condition field list can be divided into first-category search condition fields and second-category search condition fields. First-category search condition fields are search condition fields that can be omitted when generating a sample search request, such as seat class, and are equivalent to optional fields (i.e., non-mandatory fields). Second-category search condition fields are search condition fields that cannot be omitted when generating a sample search request, such as origin, destination, departure date, and are equivalent to mandatory fields.

[0067] For example, the configuration file includes a setting item "Whether to include all fields", which is equivalent to the first setting item, and its value range is true (i.e. "yes", which is also the first field value) or false (i.e. "no", which is also the second field value). The priority of this setting item is higher than the setting item "Whether to include optional fields" and the setting item "Specify the appearance of fields". When the setting item "Whether to include all fields" is set to true (i.e. the first field value), the target processing system determines all preset search condition fields as reference fields. When the setting item "Whether to include all fields" is set to false, the reference fields will be determined according to the setting item "Whether to include optional fields" or "Specify optional fields"; if the value of the setting item "Whether to include all fields" is empty, its value is false by default.

[0068] The configuration file includes a setting item called "Whether to include optional fields" which is equivalent to the second setting item. Its value range is true (i.e. "yes", which is the value of the first field) or false (i.e. "no", which is the value of the second field). The priority of the setting item "Whether to include optional fields" is lower than the setting item "Whether to include all fields". That is, when the setting item "Whether to include all fields" is false, the setting item "Whether to include optional fields" takes effect. When "Whether to include optional fields" is set to true, the reference field is determined based on the optional fields (i.e. the first type of search condition fields) and the required fields (i.e. the second type of search condition fields). When "Whether to include optional fields" is set to false, the required fields are determined as reference fields. If the value of the setting item "Whether to include optional fields" is empty, its default value is true.

[0069] It should be noted that, through the above method, it is possible to flexibly control the search condition fields contained in the sample search requests to be generated based on simple settings, thereby improving the diversity of the generated sample search requests and further improving the training effect of the model.

[0070] In an optional embodiment, when the value of the first setting item is the second field value and the value of the second setting item is the first field value, if the value of the third setting item in the configuration file is a non-empty value, the value of the third setting item is determined as the target search condition field, and the target search condition field and the second type of search condition field are determined as reference fields, wherein the third setting item is used to record the search condition field in the first type of search condition field for generating a sample search request; if the value of the third setting item in the configuration file is an empty value, N search condition fields are randomly selected from the first type of search condition field, and the N search condition fields and the second type of search condition field are determined as reference fields, wherein N is a positive integer.

[0071] For example, the configuration file includes a setting item called "Specify optional fields." This setting item is equivalent to the third setting item, and its value range is optional fields. This setting item has a lower priority than the setting items "Whether to include optional fields" and "Whether to include all fields." This setting item takes effect when the setting item "Whether to include all fields" is false and the setting item "Whether to include optional fields" is true. In this case, if the value of the setting item "Specify optional fields" is non-empty, the value corresponding to "Specify optional fields" (i.e., one or more optional fields) is determined as the target search condition field, and the target search condition field and the second-category search condition field are determined as reference fields.

[0072] If the "Specify optional fields" setting is left blank, no optional fields are specified by default, and fields are randomly selected. Therefore, N search condition fields can be randomly selected from the first category of search condition fields, and the N search condition fields from the second category of search condition fields can be determined as reference fields. For each sample search request, the N randomly selected search condition fields may not be exactly the same, and the number of fields in the N search condition fields (i.e., N) may also vary.

[0073] It should be noted that, through the above method, it is possible to flexibly control the search condition fields contained in the sample search requests to be generated based on simple settings, thereby improving the diversity of the generated sample search requests and further improving the training effect of the model.

[0074] In an optional embodiment, the configuration file may further include a setting item "Date Range," whose value is a date range. The field value corresponding to the date search condition field in the sample search request may be determined based on the set date range. In other words, the configuration file may also be used to determine the field values ​​of some search condition fields (e.g., the aforementioned date field) in the sample search request to be generated. If the value of the setting item "Date Range" is null, the date range is determined to be 90 days before and after the current date.

[0075] In an optional embodiment, the configuration file may further include a setting item "Whether to perform fuzzy search" whose value range is true (i.e., "yes", i.e., the first field value) or false (i.e., "no", i.e., the second field value). When the value of the setting item "Whether to perform fuzzy search" is true, the output type is fuzzy search, the value of the destination search condition field is determined to be fuzzy information, such as coastal cities, island cities, etc., and the field value of the date search condition field is identified as fuzzy information, such as National Day, early next month, etc. When the value of the setting item "Whether to perform fuzzy search" is false, the output type is precise search, and no fuzzy information will appear in the sample search request to be generated. If the value of the setting item "Whether to perform fuzzy search" is null, its default value is false.

[0076] In an optional embodiment, the configuration file may also include a setting item "business scenario", the value range of which is related to the business. For example, its value can be one-way or round-trip. If the value of the setting item "business scenario" is empty, its default value is one-way.

[0077] In an optional embodiment, a sample search request is determined based on a preset text template, each reference field, and a target field value corresponding to the reference field, including: generating an initial sample search request based on the preset text template, each reference field, and a target field value corresponding to the reference field; converting the data format of the initial sample search request into a target format to obtain a sample search request.

[0078] Optionally, the target processing system can fill each reference field and the target field value corresponding to the reference field into a specific position in the text template to obtain an initial sample search request. For example, an optional text template may be "[] is [], [] is [], [] is []", wherein each group of "[] is []" is used to fill in a group of reference fields and the target field value corresponding to the reference field. For example, the filled-in text template may be "The origin is city A, the destination is city B, and the departure date is February 1, 2025". For another example, an optional text template may be "Query flights from [origin] to [destination] with [departure date]". After filling in the field values, the filled-in text template may be "Query flights from City A to City B on February 1, 2025".

[0079] After obtaining the completed text template, i.e., the initial sample search request, the data format of the initial sample search request can be converted into a target format using a format conversion tool to obtain a sample search request. The target format can be understood as the data format required by the target processing system to process the data. For example, the target format can be XML.

[0080] It should be noted that through the above approach, the model can learn based on standardized and correctly formatted data, thereby demonstrating higher accuracy and robustness when processing actual freight rate search requests.

[0081] In an optional embodiment, the optional application process of this embodiment is described with the following three examples.

[0082] Example 1: Generate a fuzzy search request containing only required fields;

[0083] 1. Set parameters in the configuration file

[0084] Set the item "Number of generated results": 200.

[0085] Set the item "Whether to include all fields": false.

[0086] Set the item "Whether to include optional fields": false.

[0087] Setting item "Date range": empty.

[0088] Set the item "Fuzzy search": true.

[0089] Setting item "Specify optional fields": empty.

[0090] According to the configuration file, if the current date is December 13, 2024, the value range of the date-related fields in the generated sample search request is September 14, 2024 to March 13, 2025. The target processing system will automatically generate 200 sample search requests containing only required fields.

[0091] 2. Update the dataset

[0092] Prepare airport data and aviation agency data. Determine whether the airport data and aviation agency data exist, verify the data format, save the correctly formatted data to the data dictionary, and update the basic dataset.

[0093] 3. Generate data

[0094] The initial sample search request generated based on the configuration file can be "the origin is city A, the destination is city B, and the departure date is March 12, 2025", "the origin is airport U, the destination is city C, and the departure date is December 31, 2024", etc. Afterwards, the data format of the initial sample search request is converted into XML format to obtain a sample search request. For example, if an initial sample search request is "query the price of the 12JAN25 flight from SHA to PEK", then after converting its data format into XML format, the sample search request obtained can be "xml <flightrequest> <origin> SHA< / origin> <destination> PEK< / destination> <departuredate> 12JAN25< / departuredate> < / flightrequest> ”.

[0095] Optionally, the true label corresponding to the initial sample search request "the origin is city A, the destination is city B, and the departure date is March 12, 2025" can be "the origin is city A, the destination is city B, the departure date is March 12, 2025, and the number of optional fields is 0"; the true label corresponding to the initial sample search request "the origin is airport U, the destination is city C, and the departure date is December 31, 2024" can be "the origin is airport U, the destination is city C, the departure date is December 31, 2024, and the number of optional fields is 0".

[0096] Example 2: Generate an exact search request for a random optional field;

[0097] 1. Set parameters in the configuration file

[0098] Set the item "Number of generated results": 150.

[0099] Set the item "Whether to include all fields": false.

[0100] Set the item "Whether to include optional fields": true.

[0101] Set the "Date range" to: January 1, 2025 - May 31, 2025.

[0102] Set the item "Fuzzy search": false.

[0103] Setting item "Specify optional fields": empty.

[0104] According to the configuration file, in the sample search request generated, the value range of the date-related fields is from January 1, 2025 to May 31, 2025. The target processing system will automatically generate precise search requests for 150 randomly selected fields.

[0105] 2. Update the dataset

[0106] Prepare airport data, aviation agency data, city data, and business object data. Determine the existence of these data, aviation agency data, city data, and business object data in turn, verify the correct data format, save the correctly formatted data to the data dictionary, and update the base dataset.

[0107] 3. Generate data

[0108] The first sample search request generated based on the configuration file might be "origin is city C, destination is city S, departure date is February 13, 2025, latest departure time is 23:59, designated airlines are X, SC, and WU, destination adjacent cities are city K and city G, and package cabin flight number is K123." The second sample search request generated based on the configuration file might be "origin is airport SH, destination is city SJ, departure date is January 8, 2025, origin adjacent cities are city W, maximum flight time is 1046 minutes, transfer point is PEK, airport D is not a transfer point, query all flights, itinerary type is one-way." The data format of the initial sample search request is then converted to XML format to obtain a sample search request.

[0109] Optionally, the true label corresponding to the aforementioned initial sample search request No. 1 can be "the origin is city C, the destination is city S", the departure date is February 13, 2025, the latest departure time is 23:59, the designated airlines are X, SC, and WU, the destination neighboring cities are City K and City G, the package cabin flight number is K123, and the number of optional fields is 4". The true label corresponding to the aforementioned initial sample search request No. 2 can be "the origin is airport SH, the destination is city SJ, the departure date is January 8, 2025, the origin neighboring cities are City W, the maximum flight time is 1046 minutes, the transfer point is PEK, airport D is not a transfer point, query all flights, the itinerary type is one-way, and the number of optional fields is 6".

[0110] Example 3: Generate a fuzzy search request for a specified optional field;

[0111] 1. Set parameters in the configuration file

[0112] Set the item "Number of generated results": 150.

[0113] Set the item "Whether to include all fields": false.

[0114] Set the item "Whether to include optional fields": true.

[0115] Set the "Date range" to January 1, 2025 - December 31, 2025.

[0116] Set the item "Fuzzy search": true.

[0117] Setting item "Specify optional fields": minDuration (minimum flight time), maxDuration (maximum flight time).

[0118] According to the configuration file, in the sample search request generated, the value range of the date-related fields is from January 1, 2025 to December 31, 2025. The target processing system will automatically generate fuzzy search requests for 150 specified optional fields.

[0119] 2. Update the dataset

[0120] Prepare airport data, aviation agency data, city data, and business object data. Determine the existence of these data, aviation agency data, city data, and business object data in turn, verify the correct data format, save the correctly formatted data to the data dictionary, and update the base dataset.

[0121] 3. Generate data

[0122] The initial sample search request generated based on the configuration file might be "Origin is City C, Destination is City G, Departure date is February 14, 2025, Minimum flight time is 42 minutes, Maximum flight time is 1416 minutes." The data format of the initial sample search request is then converted into XML format to obtain a sample search request. Optionally, the actual label of this sample search request might be "Origin is City C, Destination is City G, Departure date is Holiday A, Minimum flight time is 42 minutes, Maximum flight time is 1416 minutes, Number of optional fields is 2."

[0123] In an optional embodiment, the target recognition model can be a large language model. The process of training the target recognition model based on the training sample set can be understood as a process of fine-tuning the pre-trained large language model. In this way, the large language model can fully learn the relevant knowledge of airline fare search, so as to accurately recognize the intention of the non-standard text description input by the user in actual applications.

[0124] In an optional embodiment, Figure 2 FIG. 1 is a schematic diagram of an optional target processing system according to an embodiment of the present invention. Figure 2As shown, the target processing system can include a parameter configuration module, a data processing module, a request generation module, an identification module, and a result output module. The parameter configuration module is used to respond to administrator (or other staff) operations to set configuration file parameters, such as the number of results generated, whether to include optional fields, or whether to include all fields; set data preferences, such as whether to use fuzzy search and date ranges; and set application scenarios, such as specifying the range of optional fields. After obtaining the configuration file, the data processing module can examine the freight rate search business data, save the accurately formatted data into the data dictionary, and update it to the base dataset. The request generation module then automatically generates sample search requests in XML format based on the base dataset and configuration file, and the identification module determines the true labels of the sample search requests. A training sample set is then constructed based on the sample search requests and true labels, and an initial recognition model (e.g., a pre-trained large language model) is trained to obtain a target recognition model. The result output module uses the target recognition model to perform information recognition processing on freight rate search requests in actual applications to obtain target information.

[0125] It can be seen that the solution provided by the present application achieves the purpose of automatically determining the training sample set for training the model based on the preset configuration file and basic data set, and extracting key information from the freight rate search request through the trained model, thereby achieving the technical effect of reducing labor costs, and further solving the technical problem of high labor costs in the related technology of using the training sample set obtained by manual annotation to train the model, and then extracting key information from the user's freight rate search request based on the trained model.

[0126] Example 2

[0127] According to an embodiment of the present invention, an embodiment of a request processing device is provided, wherein: Figure 3 is a schematic diagram of an optional request processing device according to an embodiment of the present invention, such as Figure 3 As shown, the device includes:

[0128] A first determining module 301 is configured to receive text content sent by a target subject via a target interaction interface and determine a fare search request based on the text content, wherein the target interaction interface provides a fare search function to the target subject via a question-and-answer interaction;

[0129] The first processing module 302 is used to perform information recognition processing on the freight rate search request through the target recognition model to obtain target information, wherein the target information includes multiple search condition fields and the field value of each search condition field. The target recognition model is trained based on a training sample set, and the training sample set is determined based on a preset configuration file and a basic data set. The configuration file is used to record the search condition fields required for the sample search request to be generated in the training sample set, and the basic data set includes multiple field values ​​corresponding to different search condition fields.

[0130] It should be noted that the above-mentioned first determination module 301 and first processing module 302 correspond to steps S101 to S102 in the above-mentioned embodiment. The examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.

[0131] Optionally, the request processing device also includes: a second determination module, used to determine the search condition field required for the sample search request to be generated based on the configuration file, and obtain the reference field; a second processing module, used to randomly select a field value as the target field value from multiple field values ​​corresponding to the reference field in the basic data set for each reference field; a third determination module, used to determine the sample search request based on a preset text template, each reference field and the target field value corresponding to the reference field, determine the sample search request as a training sample, and determine the true label of the training sample based on each reference field and the target field value corresponding to the reference field; a fourth determination module, used to determine the training sample set based on the training sample and the true label.

[0132] Optionally, the second determination module also includes: a first determination submodule, used to determine all preset search condition fields as reference fields when the value of the first setting item in the configuration file is the first field value, wherein the first setting item is used to indicate whether a sample search request is generated based on all search condition fields; a second determination submodule, used to determine the reference field based on the first category of search condition fields and the second category of search condition fields in the preset search condition fields when the value of the first setting item in the configuration file is the second field value, if the value of the second setting item in the configuration file is the first field value, wherein the second setting item is used to indicate whether a sample search request is generated based on the first category of search condition fields, the first category of search condition fields refers to search condition fields that can be missing when generating a sample search request, and the second category of search condition fields refers to search condition fields that cannot be missing when generating a sample search request; a third determination submodule, used to determine the second category of search condition fields as the reference field if the value of the second setting item in the configuration file is the second field value.

[0133] Optionally, the request processing device also includes: a fifth determination module, which is used to, when the value of the first setting item is the second field value and the value of the second setting item is the first field value, if the value of the third setting item in the configuration file is a non-empty value, determine the value of the third setting item as the target search condition field, and determine the target search condition field and the second type of search condition field as reference fields, wherein the third setting item is used to record the search condition field in the first type of search condition field used to generate a sample search request; a sixth determination module, which is used to randomly select N search condition fields from the first type of search condition field if the value of the third setting item in the configuration file is an empty value, and determine the N search condition fields and the second type of search condition field as reference fields, wherein N is a positive integer.

[0134] Optionally, the third determination module also includes: a generation submodule, used to generate an initial sample search request based on a preset text template, each reference field and the target field value corresponding to the reference field; a processing submodule, used to convert the data format of the initial sample search request into a target format to obtain a sample search request.

[0135] Optionally, the request processing device further includes: a seventh determination module, configured to determine the number of training samples to be generated from a configuration file.

[0136] Optionally, the request processing device also includes: an acquisition module for acquiring fare search business data, wherein the fare search business data includes at least one of the following: airport data, aviation agency data, city data, and business object data; a detection module for performing format detection on the data format of the fare search business data to obtain a format detection result; and an eighth determination module for determining a basic data set based on the fare search business data when the format detection result indicates that the data format of the fare search business data is accurate.

[0137] Example 3

[0138] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned request processing method when running.

[0139] Example 4

[0140] According to another aspect of an embodiment of the present invention, an electronic device is provided, wherein: Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present invention, such as Figure 4As shown, the electronic device includes one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the above-mentioned request processing method when running.

[0141] Example 5

[0142] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program / instruction, which implements the above-mentioned request processing method when executed by a processor.

[0143] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0144] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0145] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0146] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected to achieve the purpose of the present embodiment according to actual needs.

[0147] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0148] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.

[0149] The above are only preferred embodiments of the present invention. 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 invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A request processing method, characterized in that: The method comprises: receiving text content sent by a target object through a target interaction interface, and determining a fare search request based on the text content, wherein the target interaction interface provides a fare search function to the target object through a question-and-answer interaction; The fare search request is subjected to information recognition processing through a target recognition model to obtain target information, wherein the target information includes multiple search condition fields and a field value for each search condition field. The target recognition model is trained based on a training sample set, and the training sample set is determined based on a preset configuration file and a basic data set. The configuration file is used to record the search condition fields required for a sample search request to be generated in the training sample set, and the basic data set includes multiple field values ​​corresponding to different search condition fields.

2. The method according to claim 1, characterized in that Before performing information recognition processing on the freight rate search request using a target recognition model to obtain target information, the method further includes: Determine, based on the configuration file, the search condition fields required for the sample search request to be generated, and obtain reference fields; For each reference field, randomly select a field value from multiple field values ​​corresponding to the reference field in the basic data set as the target field value; Determine a sample search request based on a preset text template, each reference field, and a target field value corresponding to the reference field, determine the sample search request as a training sample, and determine a true label of the training sample based on each reference field and the target field value corresponding to the reference field; The training sample set is determined based on the training samples and the true labels.

3. The method according to claim 2, characterized in that Determine search condition fields required for the sample search request to be generated based on the configuration file, and obtain reference fields, including: In a case where the value of a first setting item in the configuration file is a first field value, determining all preset search condition fields as the reference fields, wherein the first setting item is used to indicate whether to generate a sample search request based on all search condition fields; In a case where the value of the first setting item in the configuration file is the second field value, if the value of the second setting item in the configuration file is the first field value, determining the reference field based on a first-category search condition field and a second-category search condition field in the preset search condition field, wherein the second setting item is used to indicate whether to generate a sample search request based on the first-category search condition field, the first-category search condition field refers to a search condition field that can be absent when generating the sample search request, and the second-category search condition field refers to a search condition field that cannot be absent when generating the sample search request; If the value of the second setting item in the configuration file is a second field value, the second-category search condition field is determined as the reference field.

4. The method according to claim 3, characterized in that The method further comprises: In a case where the value of the first setting item is the second field value and the value of the second setting item is the first field value, if the value of the third setting item in the configuration file is a non-null value, the value of the third setting item is determined as the target search condition field, and the target search condition field and the second-category search condition field are determined as the reference field, wherein the third setting item is used to record the search condition field in the first-category search condition field used to generate the sample search request; If the value of the third setting item in the configuration file is a null value, N search condition fields are randomly selected from the first category of search condition fields, and the N search condition fields and the second category of search condition fields are determined as the reference fields, where N is a positive integer.

5. The method according to claim 2, characterized in that A sample search request is determined based on a preset text template, each reference field, and a target field value corresponding to the reference field, including: Generate an initial sample search request based on a preset text template, each reference field, and a target field value corresponding to the reference field; The data format of the initial sample search request is converted into a target format to obtain the sample search request.

6. The method according to claim 2, characterized in that Before determining the search condition fields required for the sample search request to be generated based on the configuration file and obtaining the reference fields, the method further includes: The number of training samples to be generated is determined from the configuration file.

7. The method according to claim 1, characterized in that Before performing information recognition processing on the freight rate search request using a target recognition model to obtain target information, the method further includes: Acquiring fare search service data, wherein the fare search service data includes at least one of the following: airport data, aviation agency data, city data, and service object data; Performing format detection on the data format of the freight rate search business data to obtain a format detection result; If the format detection result indicates that the data format of the freight rate search service data is correct, the basic data set is determined based on the freight rate search service data.

8. A request processing device, characterized in that: The device comprises: a first determining module configured to receive text content sent by a target subject via a target interaction interface and determine a fare search request based on the text content, wherein the target interaction interface provides a fare search function to the target subject via a question-and-answer interaction; A first processing module is configured to perform information recognition processing on the freight rate search request through a target recognition model to obtain target information, wherein the target information includes multiple search condition fields and a field value for each search condition field. The target recognition model is trained based on a training sample set, and the training sample set is determined based on a preset configuration file and a basic data set. The configuration file is used to record the search condition fields required for a sample search request to be generated in the training sample set, and the basic data set includes multiple field values ​​corresponding to different search condition fields.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the request processing method according to any one of claims 1 to 7 when running.

10. An electronic device, characterized in that: The electronic device includes one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the request processing method described in any one of claims 1 to 7 when run.