A model training method, device, apparatus and medium
By generating a second order set using a trained recall model and the first instruction, the problems of low efficiency and low accuracy in obtaining label data for ranking models are solved, achieving efficient and low-cost ranking label generation and improving the performance of application functions.
Patent Information
- Application Number
- CN202310248558.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-15
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-03-15
AI Technical Summary
In existing technologies, the acquisition of label data by ranking models is inefficient, costly, and inaccurate, and manual labeling is prone to introducing errors.
By using a trained recall model and a first instruction to generate a second order set, the training of the ranking model is supervised, irrelevant labels are reduced, and computational efficiency and accuracy are improved.
It achieves efficient and low-cost generation of sorting labels, ensuring that the labels output by the sorting model meet actual needs and improving the performance of application functions.
Smart Images

Figure CN116610944B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a model training method, apparatus, device, and medium. Background Technology
[0002] In applications such as search engines and text retrieval, ranking models are needed to implement the application's functions. The more accurate the ranking model, the better the performance of the application's functions.
[0003] In practical implementation, a large amount of labeled data is needed to train the ranking model. This labeled data has multiple labels, and the order of these labels is determined. Therefore, selecting high-quality labeled data is crucial for the training effect of the ranking model. In existing technologies, data is mainly labeled manually. Since the ranking model needs to be trained with a large amount of labeled data, manual labeling is labor-intensive, inefficient, and costly. Furthermore, human error is easily introduced during the labeling process, resulting in labels that do not meet the actual needs, i.e., the accuracy of the sorted labels is low. Summary of the Invention
[0004] This application provides a model training method, apparatus, device, and medium to solve the technical problems of low efficiency, high cost, and low accuracy of sorted labels in the prior art.
[0005] In a first aspect, embodiments of this application provide a model training method, which can be executed by a computer device. The method includes: inputting a first dataset into a trained recall model, and obtaining a first order set based on the trained recall model; wherein the first dataset includes multiple unlabeled data items, the trained recall model is used to output a ranking of N preset labels for each input unlabeled data item, and the first order set includes a ranking of N preset labels corresponding to each of the multiple unlabeled data items, where N is a positive integer; receiving a first instruction, and determining a second order set according to the first instruction and the first order set; inputting the first dataset into the ranking model, and supervising the training of the ranking model based on the second order set to obtain a trained ranking model, wherein the trained ranking model is used to input unlabeled data to be identified and output a ranking of M preset labels corresponding to the unlabeled data to be identified, the ranking of the M preset labels is used to implement the function of the application, and M is a positive integer less than or equal to N.
[0006] In this scheme, the trained recall model can reduce the number of irrelevant preset labels and improve computational efficiency. The order in the first order set is calculated by computer equipment and may differ from the actual order. Therefore, the second order set determined according to the first instruction overcomes the shortcomings of the first order set and is more consistent with the actual order. Thus, the labels ordered according to the first instruction (i.e., the second order set) have high accuracy. In summary, since the ordered labels of the training ranking model are obtained based on the trained recall model and the first instruction, obtaining ranked labels is efficient, low-cost, and accurate. The trained ranking model can better realize the functions of the application.
[0007] Optionally, before inputting the first dataset into the trained recall model, the method further includes: obtaining a second dataset, which includes at least one label; training the recall model based on the second dataset to obtain the trained recall model.
[0008] This method allows computer equipment to train a recall model in a supervised or semi-supervised manner based on a second dataset, resulting in good training performance of the recall model and ensuring the rationality of the solution.
[0009] Optionally, receiving the first instruction and determining the second order set according to the first instruction and the first order set includes: changing the order of N preset tags corresponding to at least one unlabeled data in the first order set according to the first instruction.
[0010] In this method, the computer device receives a first instruction and determines a second order set that meets the actual needs based on the first instruction and the first order set. Since the order of the N preset labels corresponding to a single unlabeled data point in the first order set may not be the actual required order, a second order set is determined to better meet the actual needs and thus be better used for training the ranking model.
[0011] Optionally, the first instruction includes indication information for a first tag corresponding to the first unlabeled data in at least one unlabeled data; receiving the first instruction and determining the second order set according to the first instruction and the first order set includes: placing the first tag at the beginning of the sorting of the N preset tags corresponding to the first unlabeled data.
[0012] In this method, the computer device places the first label at the head of the sorting of the N preset labels corresponding to the first unlabeled data, which can obtain high-quality sorted labels for the sorting model to train, ensuring the reliability of the scheme. Moreover, it only moves the position of one label, which is simple and easy to implement. As a result, when the user applies the sorting model, the first result output by the sorting model can be the result that the user needs.
[0013] Optionally, the application includes a search engine; the functionality includes sorting the search results.
[0014] Understandably, the above is merely an example and not a limitation.
[0015] Secondly, this application provides a model training apparatus, which includes modules / units / technical means for performing the methods described in the first aspect or any optional embodiment of the first aspect.
[0016] For example, the device may include:
[0017] The processing module is used to input the first dataset into the trained recall model and obtain a first order set based on the trained recall model; wherein, the first dataset includes multiple unlabeled data, the trained recall model is used to output a sort of N preset labels for each input unlabeled data, and the first order set includes the sort of N preset labels corresponding to each unlabeled data in the multiple unlabeled data, where N is a positive integer;
[0018] The receiving module is used to receive the first instruction;
[0019] The processing module is further configured to: determine a second order set according to the first instruction and the first order set; input the first dataset into the sorting model, and supervise the training of the sorting model based on the second order set to obtain a trained sorting model. The trained sorting model is used to input unlabeled data to be identified and output the sorting of M preset labels corresponding to the unlabeled data to be identified. The sorting of the M preset labels is used to implement the function of the application, where M is a positive integer less than or equal to N.
[0020] Optionally, before inputting the first dataset into the trained recall model, the processing module is further configured to: obtain a second dataset, the second dataset including at least one label data; train the recall model based on the second dataset to obtain the trained recall model.
[0021] Optionally, when the processing module receives the first instruction and determines the second order set according to the first instruction and the first order set, it is specifically used to: change the order of N preset labels corresponding to at least one unlabeled data in the first order set according to the first instruction.
[0022] Optionally, the first instruction includes indication information for a first label corresponding to the first unlabeled data in at least one unlabeled data set; when the processing module receives the first instruction and determines the second order set according to the first instruction and the first order set, it is specifically used to: place the first label at the beginning of the sorting of the N preset labels corresponding to the first unlabeled data.
[0023] Optionally, the application includes a search engine; the functionality includes sorting the search results.
[0024] Thirdly, this application provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor, by executing the instructions stored in the memory, causes the electronic device to perform the method described in the first aspect or any optional embodiment of the first aspect.
[0025] Fourthly, this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in the first aspect or any optional embodiment of the first aspect. Attached Figure Description
[0026] Figure 1 A flowchart of a model training method provided in this application embodiment;
[0027] Figure 2 A schematic diagram of a semi-supervised training method provided in an embodiment of this application;
[0028] Figure 3 A structural diagram of a model training device provided in an embodiment of this application;
[0029] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0031] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more, and the embodiments of this application do not impose limitations.
[0032] The term "and / or" in the embodiments of this application is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0033] To facilitate understanding of the solutions in the embodiments of this application, the possible application scenarios of the embodiments of this application will be introduced below.
[0034] Due to the diversity and ambiguity of natural language, metadata is diverse and non-standardized, making it extremely difficult for computers to match corresponding standard data metadata. Among these:
[0035] A table is an object in a database used to store data.
[0036] Meta information is a type of information that describes a table, containing an explanation of the table, including field names and field comments.
[0037] Standard data metadata: Information used to describe metadata; different industries have different definitions of standard data metadata. Standard data metadata is unique and indivisible.
[0038] For example, when the metadata is a nickname, alias, or alias, the standard data metadata corresponding to these metadata is the name.
[0039] Unlabeled data contains metadata, while labeled data contains standard data metadata. In scenarios such as semantic retrieval, ranking models are needed to rank unlabeled data to obtain the standard data metadata. Training a ranking model requires the labels to be ranked, but in practical applications, manual labeling is labor-intensive, inefficient, and costly; furthermore, human error is easily introduced during the labeling process, leading to low accuracy in the ranked labels.
[0040] In view of this, the present application provides a technical solution to solve the technical problems of low efficiency, high cost and low accuracy of sorted labels in the prior art.
[0041] Reference Figure 1 The flowchart below provides a model training method according to an embodiment of this application.
[0042] This method can be executed by computer devices, such as laptops, desktop computers, and servers, and can also be applied to various devices with computing capabilities, as well as various chips with computing capabilities. The above devices are merely illustrative examples, and this application does not impose any limitations.
[0043] The following example illustrates how this method is executed by a computer device. The method includes:
[0044] S101: Input the first dataset into the trained recall model, and obtain the first order set based on the trained recall model.
[0045] The first dataset includes multiple unlabeled data points. The trained recall model outputs a ranking of N preset labels for each input unlabeled data point. The first order set includes the ranking of the N preset labels corresponding to each unlabeled data point, where N is a positive integer. The N preset labels corresponding to each unlabeled data point can be the same or different, and the preset labels are standard data metadata.
[0046] In a specific example, there are preset labels 1 to 10, N=3, and unlabeled data 1 to 2 belong to the first order set. The trained recall model outputs the order of the three preset labels for the input unlabeled data 1: preset label 2, preset label 5, preset label 1; the trained recall model outputs the order of the three preset labels for the input unlabeled data 2: preset label 6, preset label 4, preset label 1.
[0047] It is understandable that the number of preset labels, the value of N, and the number of unlabeled data can be specified according to actual needs, and this application does not impose any restrictions.
[0048] In this way, the computer device determines the first order set corresponding to the first dataset based on the trained recall model. The trained recall model can output the ranking of N preset labels corresponding to the unlabeled data, which reduces the number of irrelevant preset labels (for example, in the example above, there are 10 preset labels, and the trained recall model only outputs the ranking of the 3 most relevant preset labels corresponding to the unlabeled data), thus improving the computing efficiency of the computer device.
[0049] Optionally, before inputting the first dataset into the trained recall model, the computer device acquires a second dataset, which includes at least one label data, and trains the recall model based on the second dataset to obtain the trained recall model.
[0050] In one possible implementation, each data point in the second dataset is a labeled data point, and the computer device uses the second dataset to supervise the training of the recall model.
[0051] In another possible implementation, the second dataset contains both labeled and unlabeled data; see [link to relevant documentation]. Figure 2 At this point, the computer device trains a semi-supervised recall model using the second dataset. The computer device uses the recall model to predict unlabeled data, obtaining new labeled data. Based on the new labeled data and the original labels, the recall model is trained again, and this process is repeated continuously, with new labeled data being added gradually during the iteration. Through this iterative process, the trained recall model exhibits good generalization and accuracy.
[0052] This method allows computer equipment to train a recall model in a supervised or semi-supervised manner based on a second dataset, resulting in good training performance of the recall model and ensuring the rationality of the solution.
[0053] Optionally, the computer device may pre-acquire a third dataset, which includes multiple unlabeled data points. This third dataset may be the same as or different from the first dataset. The computer device determines at least one unlabeled data point from the third dataset according to preset rules (e.g., a sampling algorithm) and sends this data to a technician's device. The technician then modifies the metadata of this unlabeled data point to standard data metadata, thus converting it into labeled data. The computer device receives the newly acquired labeled data, which, together with the other unlabeled data points in the third dataset (excluding the at least one unlabeled data point), forms the second dataset.
[0054] In a specific example, after receiving an unlabeled data entry "Xiao Wang - Nickname", the technician changes this unlabeled data into a note data entry "Xiao Wang - Name", where "Nickname" is metadata and "Name" is standard data metadata.
[0055] Understandably, the above example only illustrates how a technician modifies the metadata of an unlabeled data entry to standard data metadata; the actual implementation is not limited to this.
[0056] S102: Receive the first instruction and determine the second order set based on the first instruction and the first order set.
[0057] The first instruction can be generated by the computer device after receiving control from a technician. For example, the technician checks the first sequence set and finds that the sorting of a certain unlabeled data in the first sequence set does not meet the needs of most users. The technician then inputs a modification operation into the computer device, which generates the first instruction and obtains a second sequence set that meets the user's needs.
[0058] The computer device changes the order of N preset labels corresponding to at least one unlabeled data in the first ordered set according to the first instruction, and obtains the second ordered set.
[0059] In one possible approach, the first instruction includes indication information for a first tag corresponding to a first unlabeled data item in at least one unlabeled data item. The computer device places the first tag at the beginning of a sorting order of N preset tags corresponding to the first unlabeled data item, thus obtaining a second ordered set. The first unlabeled data item can be any one of the at least one unlabeled data items.
[0060] Continuing with the example above where there are preset labels 1 to 10, N=3, and unlabeled data 1 to 2 belong to the first order set, the first instruction includes instruction information for preset label 5 corresponding to unlabeled data 1, and also includes instruction information for preset label 1 corresponding to unlabeled data 2. According to the first instruction, the computer device places preset label 5 at the first position in the order of the three preset labels corresponding to unlabeled data 1, and places preset label 1 at the first position in the order of the three preset labels corresponding to unlabeled data 2, thus obtaining the second order set. The second order set includes the order of the three preset labels corresponding to unlabeled data 1: preset label 5, preset label 2, preset label 1, and the order of the three preset labels corresponding to unlabeled data 2: preset label 1, preset label 6, preset label 4.
[0061] In this method, the computer device places the first label at the head of the sorting of the N preset labels corresponding to the first unlabeled data, which can obtain high-quality sorted labels for the sorting model to train, ensuring the reliability of the scheme. Moreover, it only moves the position of one label, which is simple and easy to implement. As a result, when the user applies the sorting model, the first result output by the sorting model can be the result that the user needs.
[0062] In another possible approach, the first instruction also includes indication information for multiple tags corresponding to the first unlabeled data. The computer device readjusts the order of the N preset tags corresponding to the first unlabeled data according to the first instruction to obtain a second order set.
[0063] Continuing with the example above where there are preset labels 1 to 10, N=3, and unlabeled data 1 to 2 belong to the first order set, the first instruction includes instructions for preset labels 2, 5, and 1 corresponding to unlabeled data 1, indicating that preset label 5 is placed first, preset label 1 is placed second, and preset label 2 is placed third; the first instruction also includes instructions for preset labels 6, 4, and 1 corresponding to unlabeled data 2, indicating that preset label 1 is placed first, and preset label 4 and preset label 6 are placed together in the second position, thus obtaining the second order set. The second order set includes the order of the three preset labels corresponding to unlabeled data 1: preset label 5, preset label 1, and preset label 2, and the order of the three preset labels corresponding to unlabeled data 2: preset label 1, preset label 6, and preset label 4, where preset label 6 and preset label 4 are both in the second position.
[0064] In this method, the first instruction also includes indication information for multiple labels corresponding to the first unlabeled data. The second ordered set obtained based on the first instruction can be better used for training the ranking model, ensuring the reliability of the scheme. If multiple labels are reordered, the second ordered set better meets the actual needs. If only one label is placed first and the rest are placed second, obtaining the second ordered set is more efficient and less costly.
[0065] S103: Input the first dataset into the sorting model and train the sorting model based on the second order set to obtain the trained sorting model.
[0066] The trained sorting model is used to input the unlabeled data to be identified and output the sorting of M preset labels corresponding to the unlabeled data to be identified. The sorting of the M preset labels is used to implement the function of the application, where M is a positive integer less than or equal to N.
[0067] Understandably, the value of M can be specified according to actual needs, and this application does not impose any restrictions.
[0068] Optional applications include search engines; features include sorting search results.
[0069] In a specific example, a user inputs the unlabeled data "1234567-number" into a search engine. Based on a trained ranking model, the search engine outputs the ranking of the three preset tags corresponding to the unlabeled data: phone number, tracking number, and musical note. When the search engine displays a single webpage, the first search result is related to the phone number, the second to the tracking number, and the third to the musical note. When the search engine displays multiple webpages, the search results from page a to page a are related to the phone number, from page a to page b to page b to page c to page c, with a < b < c.
[0070] Understandably, the above is merely an example and not a limitation.
[0071] In this way, the computer device is trained based on the supervised sorting model of the second order set, so that the second order set can better meet the actual needs. Therefore, the sorting model trained can output more accurate sorting results and better meet the user's needs.
[0072] In this scheme, the trained recall model can reduce the number of irrelevant preset labels and improve computational efficiency. The ranking in the first order set is calculated by computer equipment and may differ from the actual ranking. Therefore, the second order set determined according to the first instruction overcomes the shortcomings of the first order set and is more consistent with the actual ranking. Thus, the labels ranked according to the first instruction (i.e., the second order set) have high accuracy. In fact, the second order set cannot be directly obtained from computer equipment and requires the assistance of the first instruction for generation. Therefore, the second order set can also be regarded as a kind of pseudo-label. In summary, since the ranked labels of the training ranking model are obtained based on the trained recall model and the first instruction, the efficiency and cost of obtaining ranked labels are high, the accuracy of ranked labels is high, and the trained ranking model can better realize the functions of the application.
[0073] The methods provided in the embodiments of this application have been described above. The apparatus provided in the embodiments of this application will be described below.
[0074] See Figure 3 This is a structural diagram of a model training device provided in an embodiment of this application. The device includes modules / units / technical means for executing the methods performed by computer devices in the above-described method embodiments.
[0075] For example, the device 300 includes:
[0076] Processing module 301 is used to input the first dataset into a trained recall model and obtain a first order set based on the trained recall model; wherein, the first dataset includes multiple unlabeled data, the trained recall model is used to output a sort of N preset labels for each input unlabeled data, and the first order set includes the sort of N preset labels corresponding to each unlabeled data in the multiple unlabeled data, where N is a positive integer;
[0077] Receiver module 302 is used to receive the first instruction;
[0078] The processing module 301 is further configured to: determine a second order set according to the first instruction and the first order set; input the first dataset into the sorting model, and supervise the training of the sorting model based on the second order set to obtain a trained sorting model. The trained sorting model is used to input unlabeled data to be identified and output the sorting of M preset labels corresponding to the unlabeled data to be identified. The sorting of the M preset labels is used to implement the function of the application, where M is a positive integer less than or equal to N.
[0079] As one possible product form of the aforementioned device, see [link to product description]. Figure 4 This application also provides an electronic device 400, comprising:
[0080] At least one processor 401; the at least one processor 401 causes the electronic device 400 to perform the method steps performed by any device in the above method embodiments by executing instructions stored in memory 402.
[0081] Optionally, the memory 402 is located outside the electronic device 400.
[0082] Optionally, the electronic device 400 includes the memory 402, which is connected to the at least one processor 401, and stores instructions executable by the at least one processor 401. (Appendix) Figure 4 The dashed line indicates that memory 402 is optional for electronic device 400.
[0083] The processor 401 and the memory 402 can be coupled through an interface circuit or integrated together; no restriction is imposed here.
[0084] This application embodiment does not limit the specific connection medium between the processor 401 and the memory 402. This application embodiment... Figure 4 The processor 401 and memory 402 are connected via a bus 403. Figure 4The connections between other components are shown in bold and are for illustrative purposes only, not as limiting information. The bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0085] It should be understood that the processor mentioned in the embodiments of this application can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0086] For example, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0087] It should be understood that the memory mentioned in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct RAM (DR RAM).
[0088] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) can be integrated into the processor.
[0089] It should be noted that the memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
[0090] As another possible product form, this application embodiment also provides a computer-readable storage medium for storing instructions that, when executed, cause a computer to perform the method steps performed by the first device in the above method example.
[0091] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0092] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0093] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0094] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0095] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for ranking search results in a search engine, characterized in that, include: The first dataset is input into the trained recall model, and a first order set is obtained based on the trained recall model. The first dataset includes multiple unlabeled data entries. The trained recall model outputs a ranking of N preset labels for each input unlabeled data entry. The first order set includes the ranking of the N preset labels corresponding to each of the multiple unlabeled data entries, where N is a positive integer. The unlabeled data entries contain metadata, including table field names and field comments. The preset labels are used to indicate standard data metadata. The standard data metadata describes the metadata, and the same standard data metadata corresponds to multiple pieces of metadata. Receive a first instruction, and determine a second order set based on the first instruction and the first order set; The first dataset is input into the ranking model, and the ranking model is trained based on the second order set to obtain a trained ranking model. The trained ranking model is used in a semantic retrieval scenario to input unlabeled data to be identified and output the ranking of M preset labels corresponding to the unlabeled data to be identified. The ranking of the M preset labels is used to implement the function of the application, where M is a positive integer less than or equal to N. The application includes a search engine. The function includes ranking the search results. The first instruction is an instruction generated in response to an input modification operation, including indication information for indicating at least one label corresponding to at least one unlabeled data; Receiving the first instruction and determining the second order set according to the first instruction and the first order set includes: changing the order of N preset tags corresponding to at least one unlabeled data in the first order set according to the first instruction; The method further includes: inputting unlabeled data to be identified into the search engine, the search engine outputting a sort of M preset tags corresponding to the unlabeled data to be identified according to the trained sorting model; displaying M search results on the webpage of the search engine, the sorting of the M search results being consistent with the sorting of the M preset tags.
2. The method as described in claim 1, characterized in that, Before inputting the first dataset into the trained recall model, the following steps are also included: Obtain a second dataset, which includes at least one label. The recall model is trained based on the second dataset to obtain the trained recall model.
3. The method as described in claim 1, characterized in that, The first instruction contains indication information for the first tag corresponding to the first unlabeled data in at least one unlabeled data set; The step of receiving the first instruction and determining the second order set based on the first instruction and the first order set includes: The first label is placed at the top of the sorting of the N preset labels corresponding to the first unlabeled data.
4. A search result ranking device for a search engine, characterized in that, include: A processing module is used to input a first dataset into a trained recall model and obtain a first order set based on the trained recall model. The first dataset includes multiple unlabeled data entries. The trained recall model outputs a ranking of N preset labels for each input unlabeled data entry. The first order set includes the ranking of the N preset labels corresponding to each of the multiple unlabeled data entries, where N is a positive integer. The unlabeled data entries contain metadata, including table field names and field comments. The preset labels indicate standard data metadata. The standard data metadata describes the metadata, and the same standard data metadata corresponds to multiple pieces of metadata. The receiving module is used to receive the first instruction; The processing module is further configured to: determine a second order set according to the first instruction and the first order set; input the first dataset into a ranking model, and supervise the training of the ranking model based on the second order set to obtain a trained ranking model. The trained ranking model is used to input unlabeled data to be identified and output the ranking of M preset labels corresponding to the unlabeled data to be identified. The ranking of the M preset labels is used to implement the function of the application, where M is a positive integer less than or equal to N. The application includes a search engine; the function includes ranking the search results. The first instruction is an instruction generated in response to an input modification operation, including indication information for indicating at least one label corresponding to at least one unlabeled data; When the processing module receives a first instruction and determines a second order set based on the first instruction and the first order set, it is specifically used for: The first instruction is used to change the order of N preset labels corresponding to at least one unlabeled data in the first sequence set. The processing module is further configured to: input unlabeled data to be identified into the search engine; the search engine outputs a sort of M preset tags corresponding to the unlabeled data to be identified according to the trained sorting model; and display M search results on the webpage of the search engine, wherein the sorting of the M search results is consistent with the sorting of the M preset tags.
5. The apparatus as described in claim 4, characterized in that, Before inputting the first dataset into the trained recall model, the processing module is also used for: Obtain a second dataset, which includes at least one label. The recall model is trained based on the second dataset to obtain the trained recall model.
6. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, by executing the instructions stored in the memory, causes the electronic device to perform the method as described in any one of claims 1-3.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1-3.
Citation Information
Patent Citations
Search result sorting method and device, equipment and storage medium
CN110096655A
Voice recognition method, device and equipment and computer readable storage medium
CN111554276A
Commodity recall method and device, management system, electronic equipment and storage medium
CN114897546A
Human-post matching recommendation method and system, electronic equipment and storage medium
CN115659044A
Search method, electronic device and storage medium based on neural network model
US20220414474A1
