Model training method and device, text sorting result generation method and device and electronic equipment
By using a large language model to adjust the initial sorting results and training the teacher and student models, the problems of high training costs and long response time are solved, and efficient and accurate text sorting model training is achieved.
Patent Information
- Application Number
- CN202411833950.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-04
AI Technical Summary
The prior art requires a large amount of training data when training the sorting model, which leads to high cost of calling the large language model API. Moreover, due to the many query requests, the input context of the sorting task is long, resulting in a long response time.
By obtaining the target text set and text query information set, the initial text sorting results are determined, and the sorting results are adjusted using the large language model to generate optimization results. Then, the initial teacher model is trained, the teacher model is generated, and the student model is trained to generate an accurate student model.
It effectively reduces the number of calls and response time of the large language model API, reduces training costs, and improves the accuracy and training efficiency of the student model.
Smart Images

Figure CN119760124A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a model training method, a text sorting result generating method, a device, and an electronic device. Background Art
[0002] At present, in text query, it is very important to sort text in real time and accurately to meet the query requirements of the corresponding target text query information. The usual method to determine the text sorting result is: through knowledge distillation, a large-scale teacher model is used to generate labels, and a small-scale student model imitates the teacher's performance to perform online text sorting.
[0003] However, the inventors have found that when the above method is adopted, the following technical problems often occur:
[0004] Training a sorting model requires a large amount of training data, and a large number of calls to the API (Application Programming Interface) of the large language model are required to generate data. The total call cost is very high. In addition, due to the large number of query requests and the long input context of the sorting task, the response time of calling the API interface of the large language model is long.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0006] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0007] Some embodiments of the present disclosure propose a model training method, a text sorting result generating method, an apparatus and an electronic device to solve the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide a model training method, comprising: obtaining a target text set and a text query information set; for each text query information in at least one text query information, executing a first generation step: determining an initial text sorting result corresponding to the text query information according to the target text set; adjusting the sorting result of the initial text sorting result using a target large language model to generate a first text sorting optimization result; performing model training on at least one initial teacher model according to the obtained at least one first text sorting optimization result to generate at least one teacher model; adjusting the sorting result of the initial text sorting result set corresponding to the text query information set according to the at least one teacher model to generate a second text sorting optimization result set; performing model training on the initial student model according to the second text sorting optimization result set to generate a student model.
[0009] Optionally, the above-mentioned method of performing model training on at least one initial teacher model based on at least one first text sorting optimization result to generate at least one teacher model includes: for each first text sorting optimization result of the above-mentioned at least one first text sorting optimization result, executing a second generation step: determining a first positive and negative sample set based on the above-mentioned first text sorting optimization result, wherein the text order difference between the positive text and the negative text included in the first positive and negative samples satisfies a preset condition; generating at least one first training data based on the above-mentioned first positive and negative sample sets and the text query information corresponding to the above-mentioned first text sorting optimization result; and performing model training on the above-mentioned at least one initial teacher model based on the obtained first training data set to generate at least one teacher model.
[0010] Optionally, the above-mentioned method of performing model training on the initial student model according to the above-mentioned second text sorting optimization result set to generate a student model includes: for each second text sorting optimization result in the above-mentioned second text sorting optimization result set, executing a third generation step: determining a second positive and negative sample set according to the above-mentioned second text sorting optimization result, wherein the text order difference between the positive text and the negative text included in the second positive and negative samples meets a preset condition; generating at least one second training data according to the above-mentioned second positive and negative sample sets and the text query information corresponding to the above-mentioned second text sorting optimization result; and performing model training on the above-mentioned initial student model according to the obtained second training data set to generate a student model.
[0011] Optionally, the above-mentioned generating at least one second training data according to the text query information corresponding to the above-mentioned second positive and negative sample sets and the above-mentioned second text sorting optimization result includes: for each second positive and negative sample in the above-mentioned second positive and negative sample sets, executing a fourth generation step: determining the positive samples and negative samples corresponding to the above-mentioned second positive and negative samples as target positive samples and target negative samples; using the above-mentioned at least one teacher model, generating a first score for the above-mentioned target positive sample and the above-mentioned text query information and a second score for the above-mentioned target negative sample and the above-mentioned text query information; determining whether to generate second training data for the above-mentioned target positive sample and the target negative sample according to the above-mentioned first score and the above-mentioned second score; in response to determining to generate, combining the above-mentioned target positive sample, the above-mentioned target negative sample and the above-mentioned text query information to generate second training data.
[0012] Optionally, the above-mentioned use of the target large language model to adjust the sorting result of the above-mentioned initial text sorting result to generate a first text sorting optimization result includes: sorting a text subset in the above-mentioned target text set according to the above-mentioned initial text sorting result to generate a text sequence; combining each text in the above-mentioned text sequence in the form of a window according to a pre-set text combination window to obtain a text group set; generating prompt information representing the text sorting of each text group in the above-mentioned text group set; inputting the above-mentioned prompt information and the above-mentioned text query information into the above-mentioned target large language model to generate a text group sorting result corresponding to each text group in the above-mentioned text group set to obtain a text group sorting result set; and generating a text sorting result corresponding to the above-mentioned text subset according to the above-mentioned text group sorting result set as the above-mentioned first text sorting optimization result.
[0013] Optionally, after acquiring the target text set and the text query information set, the method further comprises: screening out a target number of text query information from the text query information set to obtain the at least one text query information.
[0014] In a second aspect, some embodiments of the present disclosure provide a model training device, comprising: a first acquisition unit, configured to acquire a target text set and a text query information set; an execution unit, configured to execute a first generation step for each text query information in at least one text query information: determining an initial text sorting result corresponding to the text query information according to the target text set; adjusting the sorting result of the initial text sorting result using a target large language model to generate a first text sorting optimization result; a first training unit, configured to perform model training on at least one initial teacher model according to the obtained at least one first text sorting optimization result to generate at least one teacher model; an adjustment unit, configured to perform sorting result adjustment on the initial text sorting result set corresponding to the text query information set according to the at least one teacher model to generate a second text sorting optimization result set; a second training unit, configured to perform model training on the initial student model according to the second text sorting optimization result set to generate a student model.
[0015] Optionally, the first training unit can be configured to: for each first text sorting optimization result of the above-mentioned at least one first text sorting optimization result, execute the second generation step: determine a first positive and negative sample set based on the above-mentioned first text sorting optimization result, wherein the text order difference between the positive text and the negative text included in the first positive and negative samples satisfies a preset condition; generate at least one first training data based on the above-mentioned first positive and negative sample sets and the text query information corresponding to the above-mentioned first text sorting optimization result; and perform model training on the above-mentioned at least one initial teacher model based on the obtained first training data set to generate at least one teacher model.
[0016] Optionally, the second training unit can be configured to: for each second text sorting optimization result in the above-mentioned second text sorting optimization result set, execute a third generation step: determine a second positive and negative sample set based on the above-mentioned second text sorting optimization result, wherein the text order difference between the positive text and the negative text included in the second positive and negative samples meets a preset condition; generate at least one second training data based on the above-mentioned second positive and negative sample sets and the text query information corresponding to the above-mentioned second text sorting optimization result; and perform model training on the above-mentioned initial student model based on the obtained second training data set to generate a student model.
[0017] Optionally, the second training unit can be configured to: for each second positive and negative sample in the above-mentioned second positive and negative sample set, perform a fourth generation step: determine the positive samples and negative samples corresponding to the above-mentioned second positive and negative samples as target positive samples and target negative samples; use the above-mentioned at least one teacher model to generate a first score for the above-mentioned target positive sample and the above-mentioned text query information and a second score for the above-mentioned target negative sample and the above-mentioned text query information; determine whether to generate second training data for the above-mentioned target positive sample and the target negative sample based on the above-mentioned first score and the above-mentioned second score; in response to determining to generate, combine the above-mentioned target positive sample, the above-mentioned target negative sample and the above-mentioned text query information to generate second training data.
[0018] Optionally, the execution unit can be configured to: sort the text subset in the above-mentioned target text set according to the above-mentioned initial text sorting result to generate a text sequence; combine the individual texts in the above-mentioned text sequence in the form of a window according to a pre-set text combination window to obtain a text group set; generate prompt information representing the text sorting of each text group in the above-mentioned text group set; input the above-mentioned prompt information and the above-mentioned text query information into the above-mentioned target large language model to generate a text group sorting result corresponding to each text group in the above-mentioned text group set to obtain a text group sorting result set; based on the above-mentioned text group sorting result set, generate a text sorting result corresponding to the above-mentioned text subset as the above-mentioned first text sorting optimization result.
[0019] Optionally, the device further includes: screening out a target number of text query information from the text query information set to obtain the at least one text query information.
[0020] In a third aspect, some embodiments of the present disclosure provide a method for generating text sorting results, comprising: obtaining target text query information and a text set; inputting the above target text query information and the above text set into a pre-trained student model to generate a text sorting result, wherein the above student model is generated based on a model training method.
[0021] In a fourth aspect, some embodiments of the present disclosure provide a text sorting result generating device, comprising: a second acquisition unit, configured to acquire target text query information and a text set; an input unit, configured to input the above target text query information and the above text set into a pre-trained student model to generate a text sorting result, wherein the above student model is generated based on a model training method.
[0022] In a fifth aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the implementation methods in the first and third aspects.
[0023] In a sixth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any one of the implementation modes of the first aspect and the third aspect is implemented.
[0024] In a seventh aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which implements the method described in any implementation manner in the above-mentioned first aspect when executed by a processor.
[0025] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the model training method of some embodiments of the present disclosure can solve the problem of insufficient number of labeled samples, effectively realize the model training of the teacher model and the student model, and generate a student model that can accurately realize text sorting. Specifically, the reason why the relevant student model is not accurate enough and the training efficiency is low is that the training of the sorting model requires a large amount of training data, and a large number of calls to the API of the large language model are required to generate data, and the total call cost is very high. Moreover, due to the large number of query requests, the input context of the sorting task is long, and the response time of calling the API interface of the large language model is long. Based on this, the model training method of some embodiments of the present disclosure first obtains the target text set and the text query information set to facilitate the subsequent generation of each text sorting result, and performs model training on the model training of the initial teacher model and the initial student model. Then, for each text query information in at least one text query information, the first generation step is performed: the first step is to accurately determine the initial text sorting result corresponding to the above text query information according to the above target text set. By generating the initial text sorting result, the calculation amount of the subsequent target large language model to generate a more accurate sorting result can be greatly reduced. In the second step, the target large language model can be used to accurately adjust the sorting results of the above initial text sorting results to generate the first text sorting optimization results. Here, through the target large language model, at least one first text sorting optimization result can be obtained in small batches based on at least one text query information in the text query information set, so as to greatly reduce the number of API calls of the large language model, avoid the occurrence of high total call costs, and avoid the problem of long response time. Then, according to the obtained at least one first text sorting optimization result, at least one initial teacher model can be accurately trained to generate at least one teacher model to obtain at least one teacher model after preliminary model training. Furthermore, according to the above at least one teacher model, the sorting result of the initial text sorting result set corresponding to the above text query information set is adjusted to generate a second text sorting optimization result set to obtain a second text sorting optimization result with a more accurate sorting result. Finally, according to the above second text sorting optimization result set, the initial student model is trained to generate a student model with more accurate text sorting. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0027] Figure 1is a schematic diagram of an application scenario of a model training method according to some embodiments of the present disclosure;
[0028] Figure 2 is a flowchart of some embodiments of the model training method according to the present disclosure;
[0029] Figure 3 is a schematic diagram of selecting the first positive and negative sample sets according to the model training method disclosed in the present invention;
[0030] Figure 4 is a flowchart of other embodiments of the model training method according to the present disclosure;
[0031] Figure 5 is a schematic diagram of prompt information according to the model training method disclosed herein;
[0032] Figure 6 is a flowchart of some embodiments of the text sorting result generating method according to the present disclosure;
[0033] Figure 7 is a schematic diagram of the structure of some embodiments of the model training device according to the present disclosure;
[0034] Figure 8 It is a schematic diagram of the structure of some embodiments of the text sorting result generating device according to the present disclosure;
[0035] Fig. 9 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0036] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0037] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0038] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0039] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0040] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0041] With regard to the collection, storage, and use of user personal information (such as text query information) involved in this disclosure, before performing the corresponding operations, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, fulfilling the obligation to inform the personal information subject, and obtaining the authorization and consent of the personal information subject in advance.
[0042] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0043] Figure 1 It is a schematic diagram of an application scenario of the model training method according to some embodiments of the present disclosure.
[0044] exist Figure 1In the application scenario, first, the electronic device 101 can obtain the target text set 102 and the text query information set 103. Then, for each text query information in at least one text query information 104, the electronic device 101 can perform a first generation step: the first step is to determine the initial text sorting result 105 corresponding to the text query information 1041 according to the target text set 102. In this application scenario, the text query information 1041 can be text query information A. The initial text sorting result 105 can be "[text 1, text 2, text 4, text 3...text 20]". The second step is to use the target large language model 106 to adjust the sorting result of the initial text sorting result 105 to generate a first text sorting optimization result 1071. In this application scenario, the first text sorting optimization result 1071 can be "[text 2, text 1, text 5, text 3...text 20]". Then, the electronic device 101 can perform model training on at least one initial teacher model 108 according to the obtained at least one first text sorting optimization result 107 to generate at least one teacher model 109. In this application scenario, at least one initial teacher model 108 may include: initial teacher model A, initial teacher model B and initial teacher model C. At least one teacher model 109 may include: teacher model A corresponding to initial teacher model A, teacher model B corresponding to initial teacher model B, and teacher model C corresponding to initial teacher model C. Furthermore, the electronic device 101 may adjust the sorting result of the initial text sorting result set 110 corresponding to the text query information set 103 according to the at least one teacher model 109 to generate a second text sorting optimization result set 111. Finally, the electronic device 101 may perform model training on the initial student model 112 according to the second text sorting optimization result set 111 to generate a student model 113.
[0045] It should be noted that the electronic device 101 can be hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the electronic device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.
[0046] It should be understood that Figure 1 The number of electronic devices in the embodiment is only for illustration. Any number of electronic devices may be provided according to implementation requirements.
[0047] Continue to refer Figure 2 , shows a process 200 of some embodiments of the model training method according to the present disclosure. The model training method comprises the following steps:
[0048] Step 201: Obtain a target text set and a text query information set.
[0049] In some embodiments, the execution entity of the above model training method (for example Figure 1 The electronic device 101 shown in the figure can obtain the target text set and the text query information set through a wired connection method or a wireless connection method. Among them, the target text in the target text set is a text that supports an associated query. The associated query can be to query the text set that is most associated with the query content corresponding to the text query information from the target text set. The text query information can be information about texts that have an associated relationship between the query and the target question. For example, the text query information can be "query for texts related to Water Margin". The target text set and the text query information set are pre-set and have a text content associated relationship between them. That is, at least one text that has a text content associated relationship with the text query information can be screened out from the target text set.
[0050] In some optional implementations of some embodiments, after step 201, the steps further include:
[0051] The execution subject may filter out a target number of text query information from the text query information set to obtain the at least one text query information. The target number may be a preset number. For example, the target number may be 10% of the total number of text query information included in the text query information set.
[0052] Step 202: for each text query information in the at least one text query information, perform a first generation step:
[0053] Step 2021: Determine the initial text sorting result corresponding to the text query information according to the target text set.
[0054] In some embodiments, the execution subject may determine the initial text sorting result corresponding to the text query information based on the target text set. The initial text sorting result may be a result of sorting at least one target text with text content relevance selected for the text query information. The initial text sorting result may be a sorting result of sorting at least one target text according to the content relevance between the target text and the question corresponding to the text query information. In practice, the initial text sorting result may be a result of sorting each text from high to low according to the content relevance. For example, the text query information is "query text related to Water Margin". The corresponding initial text sorting result may be [first text, second text, third text]. The first text, the second text and the third text are all text contents related to Water Margin. The content relevance corresponding to the first text is higher than the content relevance corresponding to the second text. The content relevance corresponding to the second text is higher than the content relevance corresponding to the third text.
[0055] As an example, the execution subject may use a target recall algorithm to recall a preset number of at least one target text that is content-related to the text query information from the target text set, and sort the at least one target text according to the content relevance to generate an initial text sorting result. The target recall algorithm may be, but is not limited to, one of the following: a typical unsupervised sparse retrieval algorithm such as BM25, or a dense vector retrieval based on a publicly accessible document embedding model.
[0056] Step 2022: Use the target large language model to adjust the sorting result of the initial text sorting result to generate a first text sorting optimization result.
[0057] In some embodiments, the execution entity may use the target large language model to adjust the sorting result of the initial text sorting result to generate a first text sorting optimization result. The first text sorting optimization result may be the result of optimizing the position order of each text in the initial text sorting result according to the content relevance. For example, the initial text sorting result may be [first text, second text, third text]. The corresponding first text sorting optimization result may be [second text, first text, third text]. The target large language model may retrieve at least one relevant text for the text query information and sort the at least one text according to the content relevance. In practice, the target large language model may be a GPT-3.5-turbo model.
[0058] As an example, first, the execution subject may generate prompt information for optimizing the sorting order of the initial text sorting result according to the text query information, and then input the prompt information into the target large language model to generate the first text sorting optimization result.
[0059] Step 203: Perform model training on at least one initial teacher model based on at least one first text sorting optimization result obtained to generate at least one teacher model.
[0060] In some embodiments, the above-mentioned execution entity may perform model training on at least one initial teacher model according to the obtained at least one first text sorting optimization result to generate at least one teacher model. Among them, the initial teacher model may be a teacher model that has not yet been trained. The teacher model is a teacher model in a teacher-student model. In practice, the model structures corresponding to each teacher model in at least one teacher model are different. For example, at least one teacher model may be a plurality of different BERT-based teacher models. At least one teacher model may include: a BERT model, a RoBERTa model, and a TinyBERT model.
[0061] As an example, first, the execution subject may combine each text sorting optimization result in the at least one text sorting optimization result with the text query information to generate first combined training data, thereby obtaining at least one first combined training data. Then, based on the at least one first combined training data, each initial teacher model is trained by back propagation to generate at least one teacher model.
[0062] In some optional implementations of some embodiments, the execution subject may perform model training on at least one initial teacher model according to the obtained at least one first text sorting optimization result to generate at least one teacher model, including the following steps:
[0063] In the first step, for each first text sorting optimization result in the at least one first text sorting optimization result, a second generation step is performed:
[0064] Sub-step 1, determining the first positive and negative sample set according to the above-mentioned first text sorting optimization result. Among them, the text order difference between the positive text and the negative text included in the first positive and negative samples meets the preset conditions. The first positive and negative samples may include: positive samples and negative samples. The preset condition may be that the text sorting position corresponding to the positive sample and the text sorting position corresponding to the negative sample are separated by a target value. And the text sorting position corresponding to the positive sample is higher than the target text sorting position, and the text sorting position corresponding to the negative sample is lower than the target text sorting position. The target text sorting position may be a pre-set sorting position in the text order corresponding to the first text sorting optimization result. In practice, the target text sorting position may be the middle text sorting position corresponding to the first text sorting optimization result. The target value may be a pre-set value.
[0065] like Figure 3As shown, a schematic diagram of selecting the first positive and negative sample sets is shown.
[0066] like Figure 3 As shown, the sorting optimization result for the first text includes sorting results corresponding to 20 texts. The corresponding first positive and negative samples may include: positive samples in the top 5 (i.e., Positive) and negative samples in the bottom 15 (Negative ranges). It is required that the position interval between the positive sample and the negative sample should be no less than 5.
[0067] Sub-step 2: generating at least one first training data according to the text query information corresponding to the first positive and negative sample sets and the first text sorting optimization result.
[0068] As an example, the execution entity may combine each first positive and negative sample in the first positive and negative sample set with the text query information to generate first training data, thereby obtaining at least one first training data.
[0069] The second step is to perform model training on the at least one initial teacher model based on the obtained first training data set to generate at least one teacher model.
[0070] As an example, the execution entity may perform model training on the at least one initial teacher model by updating the model parameters through back propagation based on the obtained first training data set to generate at least one teacher model.
[0071] Step 204: According to the at least one teacher model, the initial text sorting result set corresponding to the text query information set is sorted and adjusted to generate a second text sorting optimization result set.
[0072] In some embodiments, the execution entity may adjust the sorting results of the initial text sorting result set corresponding to the text query information set according to the at least one teacher model to generate a second text sorting optimization result set. Among them, there is a one-to-one correspondence between the second text sorting optimization result in the second text sorting optimization result set and the text query information in the text query information set. There is a one-to-one correspondence between the text query information in the text query information set and the initial text sorting result in the initial text sorting result set. The second text sorting optimization result may be the result of optimizing the position order of each text in the initial text sorting result according to the content relevance.
[0073] As an example, first, the execution subject may randomly select a teacher model from at least one teacher model as a target teacher model. Then, each initial text sorting result and text query information in the initial text sorting result set is input into the target teacher model to generate a second text sorting optimization result, thereby obtaining a second text sorting optimization result set.
[0074] Step 205: Perform model training on the initial student model according to the second text sorting optimization result set to generate a student model.
[0075] In some embodiments, the execution subject may perform model training on the initial student model according to the second text sorting optimization result set to generate a student model. The initial student model may be a student model that has not yet been trained. The student model may be a student model in a teacher-student model. The student model is used for real-time online text retrieval and sorting. In practice, the student model may be a text sorting model. For example, the student model may be a BERT model.
[0076] As an example, the execution subject may combine each second text sorting optimization result in the second text sorting optimization result set with the text description information to generate second combined training data, and obtain at least one second combined training data. Then, based on the at least one second combined training data, the initial student model is trained by back propagation to generate a student model.
[0077] In some optional implementations of some embodiments, the execution subject may perform model training on the initial student model according to the second text sorting optimization result set to generate a student model, including the following steps:
[0078] In the first step, for each second text sorting optimization result in the second text sorting optimization result set, the third generation step is performed:
[0079] Sub-step 1: Determine a second set of positive and negative samples according to the above second text sorting optimization result. The text order difference between the positive text and the negative text included in the second positive and negative samples satisfies a preset condition. The specific implementation method will not be repeated here, please refer to the generation of the first positive and negative samples.
[0080] Sub-step 2: Generate at least one second training data according to the second positive and negative sample set and the text query information corresponding to the second text sorting optimization result. The specific implementation will not be described in detail, please refer to the generation of the first training data.
[0081] In the second step, the initial student model is trained based on the obtained second training data set to generate a student model.
[0082] As an example, the execution entity may perform model training on the initial student model by updating the model parameters through back propagation according to the obtained second training data set to generate a student model.
[0083] Optionally, the execution subject may generate at least one second training data according to the second positive and negative sample sets and the text query information corresponding to the second text sorting optimization result, comprising the following steps:
[0084] For each second positive and negative sample in the second positive and negative sample set, perform the fourth generation step:
[0085] Sub-step 1: determine the positive sample and negative sample corresponding to the second positive and negative samples as the target positive sample and target negative sample.
[0086] Sub-step 2, using the at least one teacher model mentioned above, generates a first score for the target positive sample and the text query information and a second score for the target negative sample and the text query information. The first score can characterize the sample quality degree corresponding to the target positive sample relative to the text query information. That is, the higher the first score, the higher the sample quality of the corresponding positive sample. The second score can characterize the sample quality degree corresponding to the target negative sample relative to the text query information. That is, the higher the first score, the higher the sample quality of the corresponding negative sample. That is, if the second positive and negative samples are high-quality positive and negative samples, the first score corresponding to the target positive sample should be much larger than the second score corresponding to the target negative sample.
[0087] Sub-step 3: determining whether to generate second training data for the target positive sample and the target negative sample based on the first score and the second score.
[0088] As an example, in response to determining that the score value obtained by subtracting the second score from the first score is greater than or equal to the target score value, it is determined to generate the second training data for the above-mentioned target positive sample and the target negative sample. In response to determining that the score value obtained by subtracting the second score from the first score is less than the target score value, it is determined not to generate the second training data for the above-mentioned target positive sample and the target negative sample.
[0089] Sub-step 4, in response to determining to generate, combining the target positive sample, the target negative sample and the text query information to generate second training data.
[0090] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the model training method of some embodiments of the present disclosure can solve the problem of insufficient number of labeled samples, effectively realize the model training of the teacher model and the student model, and generate a student model that can accurately realize text sorting. Specifically, the reason why the relevant student model is not accurate enough and the training efficiency is low is that the training of the sorting model requires a large amount of training data, and a large number of calls to the API of the large language model are required to generate data, and the total call cost is very high. Moreover, due to the large number of query requests, the input context of the sorting task is long, and the response time of calling the API interface of the large language model is long. Based on this, the model training method of some embodiments of the present disclosure first obtains the target text set and the text query information set to facilitate the subsequent generation of each text sorting result, and performs model training on the model training of the initial teacher model and the initial student model. Then, for each text query information in at least one text query information, the first generation step is performed: the first step is to accurately determine the initial text sorting result corresponding to the above text query information according to the above target text set. By generating the initial text sorting result, the calculation amount of the subsequent target large language model to generate a more accurate sorting result can be greatly reduced. In the second step, the target large language model can be used to accurately adjust the sorting results of the above initial text sorting results to generate the first text sorting optimization results. Here, through the target large language model, at least one first text sorting optimization result can be obtained in small batches based on at least one text query information in the text query information set, so as to greatly reduce the number of API calls of the large language model, avoid the occurrence of high total call costs, and avoid the problem of long response time. Then, according to the obtained at least one first text sorting optimization result, at least one initial teacher model can be accurately trained to generate at least one teacher model to obtain at least one teacher model after preliminary model training. Furthermore, according to the above at least one teacher model, the sorting result of the initial text sorting result set corresponding to the above text query information set is adjusted to generate a second text sorting optimization result set to obtain a second text sorting optimization result with a more accurate sorting result. Finally, according to the above second text sorting optimization result set, the initial student model is trained to generate a student model with more accurate text sorting.
[0091] Further references Figure 4 , shows a process 400 of other embodiments of the model training method according to the present disclosure. The model training method comprises the following steps:
[0092] Step 401, obtaining a target text set and a text query information set.
[0093] Step 402: for each text query information in the at least one text query information, perform a first generation step:
[0094] Step 4021: Determine the initial text sorting result corresponding to the text query information according to the target text set.
[0095] Step 4022: sort the text subset in the target text set according to the initial text sorting result to generate a text sequence.
[0096] In some embodiments, an execution entity (e.g. Figure 1 The electronic device 101) shown can sort the text subset in the target text set according to the initial text sorting result to generate a text sequence.
[0097] As an example, the execution entity may sort the text subsets in the target text set in descending order of matching degree to generate a text sequence.
[0098] Step 4023, combining the texts in the above text sequence in a window form according to a preset text combination window to obtain a text group set.
[0099] In some embodiments, the execution subject may combine the texts in the text sequence in a window form according to a preset text combination window to obtain a text group set. The text combination window may be a form of combining a target number of adjacent texts to form a text combination. In practice, the target number may be a preset number. For example, the target number may be 3.
[0100] For example, the text sequence is {text 1, text 2, text 3, text 4, text 5, text 6, text 7}. The text group set may include: {text 1, text 2, text 3}, {text 2, text 3, text 4}, {text 3, text 4, text 5}, {text 4, text 5, text 6}, {text 5, text 6, text 7}.
[0101] Step 4024: Generate prompt information indicating the text sorting of each text group in the text group set.
[0102] In some embodiments, the execution entity may generate prompt information indicating the text sorting of each text group in the text group set.
[0103] See also Figure 5 , which shows a schematic diagram of prompt information.
[0104] Step 4025: input the prompt information and the text query information into the target large language model to generate a text group ranking result corresponding to each text group in the text group set, and obtain a text group ranking result set.
[0105] In some embodiments, the execution entity may input the prompt information and the text query information into the target large language model to generate a text group ranking result corresponding to each text group in the text group set to obtain a text group ranking result set.
[0106] Step 4026: Generate a text sorting result corresponding to the text subset according to the text group sorting result set as the first text sorting optimization result.
[0107] In some embodiments, the execution entity may generate a text sorting result corresponding to the text subset according to the text group sorting result set as the first text sorting optimization result.
[0108] As an example, the execution entity may aggregate the results of the sorting of each text group in the text group sorting result set to determine the sorting conditions between the texts in the text subset to generate the first text sorting optimization result.
[0109] Step 403: Perform model training on at least one initial teacher model based on at least one first text sorting optimization result obtained to generate at least one teacher model.
[0110] Step 404: adjusting the sorting results of the initial text sorting result set corresponding to the text query information set according to the at least one teacher model to generate a second text sorting optimization result set.
[0111] Step 405: Perform model training on the initial student model according to the second text sorting optimization result set to generate a student model.
[0112] In some embodiments, the specific implementation of steps 401, 4021, 403-405 and the technical effects thereof can be referred to in Figure 2 Steps 201, 2021, 203-205 in the corresponding embodiments are not repeated here.
[0113] from Figure 4 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 4 The process 400 of the model training method in some corresponding embodiments effectively solves the problem that the document length usually exceeds the upper limit of the input length that the target large language model can accept through the pre-set text combination window, thereby greatly improving the efficiency of generating text sorting results.
[0114] Continue to refer Figure 6 , shows a process 600 of some embodiments of the text sorting result generating method according to the present disclosure. The text sorting result generating method comprises the following steps:
[0115] Step 601, obtaining target text query information and text set.
[0116] In some embodiments, the execution subject (eg, electronic device) of the above-mentioned text sorting result generation method can obtain the target text query information and the text set by wired or wireless means. The target text query information can be the information to be queried.
[0117] Step 602: Input the target text query information and the text set into the pre-trained student model to generate a text sorting result. The student model is generated based on the model training method.
[0118] In some embodiments, the execution subject may input the target text query information and the text set into a pre-trained student model to generate a text ranking result, wherein the student model is generated based on a model training method.
[0119] Optionally, after step 602, the steps further include:
[0120] The texts in the text sorting result that are in the first target number of the sorting order are sent to the target text query terminal, so as to be displayed on the target text query terminal.
[0121] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the text sorting result generation method of some embodiments of the present disclosure, it is possible to target text query information, not only accurately sort the query text, but also effectively recommend the text, thereby improving the recommendation efficiency, so that the target text query terminal can select the required text.
[0122] Further references Figure 7 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a model training device, and these device embodiments are Figure 2 Corresponding to the method embodiments shown, the model training device can be specifically applied to various electronic devices.
[0123] like Figure 7As shown, a model training device 700 includes: a first acquisition unit 701, an execution unit 702, a first training unit 703, an adjustment unit 704, and a second training unit 705. The first acquisition unit 701 is configured to acquire a target text set and a text query information set; the execution unit 702 is configured to perform a first generation step for each text query information in at least one text query information: according to the target text set, determine the initial text sorting result corresponding to the text query information; use the target large language model to adjust the sorting result of the initial text sorting result to generate a first text sorting optimization result; the first training unit 703 is configured to perform model training on at least one initial teacher model according to the obtained at least one first text sorting optimization result to generate at least one teacher model; the adjustment unit 704 is configured to perform sorting result adjustment on the initial text sorting result set corresponding to the text query information set according to the at least one teacher model to generate a second text sorting optimization result set; the second training unit 705 is configured to perform model training on the initial student model according to the second text sorting optimization result set to generate a student model.
[0124] In some optional implementations of some embodiments, the first training unit 703 can be further configured to: for each first text sorting optimization result of the above-mentioned at least one first text sorting optimization result, execute the second generation step: determine the first positive and negative sample set according to the above-mentioned first text sorting optimization result, wherein the text order difference between the positive text and the negative text included in the first positive and negative samples satisfies a preset condition; generate at least one first training data according to the above-mentioned first positive and negative sample set and the text query information corresponding to the above-mentioned first text sorting optimization result; and perform model training on the above-mentioned at least one initial teacher model according to the obtained first training data set to generate at least one teacher model.
[0125] In some optional implementations of some embodiments, the second training unit 705 can be further configured to: for each second text sorting optimization result in the above-mentioned second text sorting optimization result set, execute a third generation step: determine a second positive and negative sample set based on the above-mentioned second text sorting optimization result, wherein the text order difference between the positive text and the negative text included in the second positive and negative samples satisfies a preset condition; generate at least one second training data based on the above-mentioned second positive and negative sample sets and the text query information corresponding to the above-mentioned second text sorting optimization result; and perform model training on the above-mentioned initial student model based on the obtained second training data set to generate a student model.
[0126] In some optional implementations of some embodiments, the second training unit 705 can be further configured to: for each second positive and negative sample in the above-mentioned second positive and negative sample set, perform a fourth generation step: determine the positive samples and negative samples corresponding to the above-mentioned second positive and negative samples as target positive samples and target negative samples; use the above-mentioned at least one teacher model to generate a first score for the above-mentioned target positive sample and the above-mentioned text query information and a second score for the above-mentioned target negative sample and the above-mentioned text query information; determine whether to generate second training data for the above-mentioned target positive sample and the target negative sample based on the above-mentioned first score and the above-mentioned second score; in response to determining to generate, combine the above-mentioned target positive sample, the above-mentioned target negative sample and the above-mentioned text query information to generate second training data.
[0127] In some optional implementations of some embodiments, the execution unit 702 can be further configured to: sort the text subset in the above-mentioned target text set according to the above-mentioned initial text sorting result to generate a text sequence; combine the individual texts in the above-mentioned text sequence in window form according to a pre-set text combination window to obtain a text group set; generate prompt information representing the text sorting of each text group in the above-mentioned text group set; input the above-mentioned prompt information and the above-mentioned text query information into the above-mentioned target large language model to generate a text group sorting result corresponding to each text group in the above-mentioned text group set to obtain a text group sorting result set; based on the above-mentioned text group sorting result set, generate a text sorting result corresponding to the above-mentioned text subset as the above-mentioned first text sorting optimization result.
[0128] In some optional implementations of some embodiments, the apparatus 700 further includes a screening unit (not shown in the figure). The screening unit may be configured to screen a target number of text query information from the text query information set to obtain the at least one text query information.
[0129] It is understandable that the units recorded in the model training device 700 are similar to the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the model training device 700 and the units contained therein, and will not be repeated here.
[0130] Further references Figure 8 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a text sorting result generating device. These device embodiments are similar to Figure 6 Corresponding to the method embodiments shown, the text sorting result generating device can be specifically applied to various electronic devices.
[0131] like Figure 8As shown, a text sorting result generating device 800 includes: a second acquisition unit 801 and an input unit 802. The second acquisition unit 801 is configured to acquire target text query information and a text set; the input unit 802 is configured to input the target text query information and the text set into a pre-trained student model to generate a text sorting result, wherein the student model is generated based on a model training method.
[0132] It can be understood that the units recorded in the text sorting result generating device 800 and the reference Figure 6 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the text sorting result generating device 800 and the units included therein, and will not be described in detail here.
[0133] Reference below Fig. 9 , which shows an electronic device (eg, Figure 1 Schematic diagram of the structure of the electronic device 101)900. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0134] like Fig. 9 As shown, the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory 902 or a program loaded from a storage device 908 into a random access memory 903. Various programs and data required for the operation of the electronic device 900 are also stored in the random access memory 903. The processing device 901, the read-only memory 902, and the random access memory 903 are connected to each other via a bus 904. An input / output interface 905 is also connected to the bus 904.
[0135] Typically, the following devices may be connected to the input / output interface 905: an input device 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Fig. 9 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0136] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 909, or installed from the storage device 908, or installed from the read-only memory 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0137] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0138] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0139] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a target text set and a text query information set; for each text query information in at least one text query information, performs a first generation step: according to the target text set, determines the initial text sorting result corresponding to the text query information; uses the target large language model to adjust the sorting result of the initial text sorting result to generate a first text sorting optimization result; according to the obtained at least one first text sorting optimization result, performs model training on at least one initial teacher model to generate at least one teacher model; according to the at least one teacher model, performs sorting result adjustment on the initial text sorting result set corresponding to the text query information set to generate a second text sorting optimization result set; according to the second text sorting optimization result set, performs model training on the initial student model to generate a student model. Obtain target text query information and text set; input the target text query information and the text set into the pre-trained student model to generate a text sorting result, wherein the student model is generated based on the model training method.
[0140] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0141] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0142] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be arranged in a processor, for example, may be described as: a processor includes a first acquisition unit, an execution unit, a first training unit, an adjustment unit, and a second training unit. The names of these units do not constitute limitations on the units themselves in certain cases, for example, the first acquisition unit may also be described as a "unit for acquiring a target text set and a text query information set".
[0143] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0144] Some embodiments of the present disclosure also provide a computer program product, including a computer program, which implements any of the above-mentioned model training methods or text sorting result generation methods when executed by a processor.
[0145] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A model training method, comprising: Obtaining a target text set and a text query information set; For each text query information in the at least one text query information, a first generating step is performed: Determining, based on the target text set, an initial text sorting result corresponding to the text query information; Using the target large language model, adjusting the sorting result of the initial text sorting result to generate a first text sorting optimization result; According to the obtained at least one first text sorting optimization result, performing model training on at least one initial teacher model to generate at least one teacher model; According to the at least one teacher model, the sorting result of the initial text sorting result set corresponding to the text query information set is adjusted to generate a second text sorting optimization result set; according to the second text sorting optimization result set, the initial student model is trained to generate a student model.
2. The method according to claim 1, wherein: The step of performing model training on at least one initial teacher model according to the obtained at least one first text sorting optimization result to generate at least one teacher model comprises: For each first text sorting optimization result of the at least one first text sorting optimization result, a second generating step is performed: Determine a first positive and negative sample set according to the first text sorting optimization result, wherein the text sequence difference between the positive text and the negative text included in the first positive and negative samples meets a preset condition; generating at least one first training data according to the first positive and negative sample sets and the text query information corresponding to the first text sorting optimization result; Based on the obtained first training data set, model training is performed on the at least one initial teacher model to generate at least one teacher model.
3. The method according to claim 1, wherein: The step of training the initial student model according to the second text sorting optimization result set to generate a student model includes: For each second text sorting optimization result in the second text sorting optimization result set, execute the third generation step: Determine a second positive and negative sample set according to the second text sorting optimization result, wherein the text sequence difference between the positive text and the negative text included in the second positive and negative samples meets a preset condition; generating at least one second training data according to the second positive and negative sample sets and the text query information corresponding to the second text sorting optimization result; The initial student model is trained according to the obtained second training data set to generate a student model.
4. The method according to claim 3, wherein: The step of generating at least one second training data according to the second positive and negative sample sets and the text query information corresponding to the second text sorting optimization result includes: For each second positive and negative sample in the second positive and negative sample set, perform the fourth generation step: Determine a positive sample and a negative sample corresponding to the second positive and negative samples as a target positive sample and a target negative sample; Generate, using the at least one teacher model, a first score for the target positive sample and the text query information and a second score for the target negative sample and the text query information; Determining whether to generate second training data for the target positive sample and the target negative sample according to the first score and the second score; In response to determining to generate, the target positive sample, the target negative sample, and the text query information are combined to generate second training data.
5. The method according to claim 1, wherein: The step of adjusting the initial text sorting result by using the target large language model to generate a first text sorting optimization result includes: According to the initial text sorting result, sorting the text subset in the target text set to generate a text sequence; Combining the texts in the text sequence in a window form according to a preset text combination window to obtain a text group set; generating prompt information representing text sorting for each text group in the text group set; Inputting the prompt information and the text query information into the target large language model to generate a text group ranking result corresponding to each text group in the text group set, thereby obtaining a text group ranking result set; According to the text group sorting result set, a text sorting result corresponding to the text subset is generated as the first text sorting optimization result.
6. The method according to claim 1, wherein: After obtaining the target text set and the text query information set, the method further includes: A target number of text query information is screened out from the text query information set to obtain the at least one text query information.
7. A method for generating text sorting results, comprising: Obtain target text query information and text set; The target text query information and the text set are input into a pre-trained student model to generate a text ranking result, wherein the student model is generated based on the method described in any one of claims 1-6.
8. A model training device, comprising: A first acquisition unit is configured to acquire a target text set and a text query information set; The execution unit is configured to execute a first generation step for each text query information in at least one text query information: determining an initial text sorting result corresponding to the text query information according to the target text set; and adjusting the sorting result of the initial text sorting result by using a target large language model to generate a first text sorting optimization result; A first training unit is configured to perform model training on at least one initial teacher model according to the obtained at least one first text sorting optimization result to generate at least one teacher model; an adjustment unit, configured to adjust the sorting result of the initial text sorting result set corresponding to the text query information set according to the at least one teacher model, so as to generate a second text sorting optimization result set; The second training unit is configured to perform model training on the initial student model according to the second text sorting optimization result set to generate a student model.
9. A text sorting result generating device, comprising: A second acquisition unit is configured to acquire target text query information and a text set; An input unit is configured to input the target text query information and the text set into a pre-trained student model to generate a text sorting result, wherein the student model is generated based on the method described in one of claims 1-6.
10. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
11. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
12. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.