Correlation sample construction method and device
By segmenting target item information and replacing words to generate correlation samples, combined with historical search record screening, the problem of low quality correlation samples in the existing technology is solved, and the accuracy of the correlation degree of the search results and the efficiency of sample construction are improved.
Patent Information
- Application Number
- CN202410729755.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-10-01
AI Technical Summary
The existing technology is difficult to effectively generate high-quality correlation samples, which affects the search engine's correlation model training effect, resulting in inaccurate correlation between search results and user search keywords.
By performing word segmentation processing on the target item information, the first sample set and the second sample set are constructed, using word segmentation replacement to generate samples with higher and lower relevance levels, and filtering samples based on the BM25 value and click rate in historical search records. , reducing the workload of manual review and labeling.
It improves the quality and construction efficiency of relevant samples, reduces the workload of manual review and annotation, and improves the accuracy of the relevance of search results.
Smart Images

Figure CN118734845A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for constructing correlation samples. Background Art
[0002] Search engines are widely used in our daily life and work. For example, when shopping online, we use the search engine of the e-commerce platform. In the process of using the search engine, the correlation between the search results and the user's search keywords is a key factor affecting the user experience. The higher the correlation between the search results and the user's search keywords, the better the user experience.
[0003] The relevance model is used to measure the relevance between search results and search keywords. The better the relevance model is trained, the more accurate the measurement of the relevance between search results and search keywords will be, which is conducive to the continuous optimization of search engines. As a supervised multi-classification model, the relevance model requires a large number of relevance samples to provide to the model for learning.
[0004] Therefore, how to generate a large number of effective correlation samples is the key to training the correlation model. Summary of the invention
[0005] The present application provides a correlation sample construction method to improve the quality of constructed correlation samples.
[0006] In a first aspect, the present application provides a correlation sample construction method, the method comprising:
[0007] Get target item information;
[0008] Perform word segmentation processing on the target item information to obtain N first word segmentations, where N is a positive integer;
[0009] Determine a first sample set and a second sample set according to the N first participles and the target item information;
[0010] The i-th sample in the first sample set includes a first search term and the target item information, the first search term is determined according to the first set, the first set includes the N first participles; the i-th sample is any sample in the first sample set, and i is a positive integer;
[0011] The j-th sample in the second sample set includes a second search term and the target item information, the second search term is determined according to the second set, the second set includes M second participles, and the M second participles are obtained by replacing M first participles among the N first participles; M is a positive integer and M is less than or equal to N; the j-th sample is any sample in the second sample set, and j is a positive integer.
[0012] The correlation sample construction method provided in the present application can construct a first sample set and a second sample set according to target item information. First, the target item information is segmented to obtain a first set including N first segmentations. When constructing the first sample set: the first search term and the target item information determined according to the first set are added to the first sample set as a correlation sample; when constructing the second sample set: some or all of the N first segmentations are replaced to obtain a second set including M second segmentations, and the second search term and the target item information determined according to the second set are added to the second sample set as a correlation sample. Since the N first participles included in the first set are obtained by segmenting the target item information, each of the N first participles has a high level of relevance to the target item information, that is, the first search terms determined according to the first set have a high level of relevance to the target item information, and the sample consisting of the first search terms and the target item information can be used as a sample set with a high level of relevance to the target item information; the M second participles included in the second set are obtained by replacing the N first participles, then the second search terms determined according to the second participles have a low level of relevance to the target item information, that is, the sample consisting of the second search terms and the target item information can be used as a sample set with a low level of relevance to the target item information; the correlation sample construction method provided in the present application can obtain both samples with a high level of relevance and samples with a low level of relevance, thereby effectively improving sample quality and sample construction efficiency.
[0013] In a possible design, the first set also includes an item category corresponding to the target item information.
[0014] The present application can also construct correlation samples based on the item category of the target item information and the target item information to increase the number of samples.
[0015] In a possible design, the N first participles include a stem word; the kth second participle is obtained by replacing the stem word in the N first participles, and the item category corresponding to the kth second participle is different from the item category corresponding to the stem word in the N first participles; the kth second participle is one of the M second participles, k is a positive integer and k is less than or equal to M.
[0016] Since the item category corresponding to the kth second participle is different from the item category corresponding to the main words in the N first participles, the relevance level between the kth second participle and the target item information is low. The sample consisting of the second search term determined according to the kth second participle and the target item information can be added to the sample set with a lower relevance level, further increasing the quality and quantity of the samples.
[0017] In one possible design, it also includes:
[0018] Determining first type of item information from a plurality of historical search records;
[0019] Each of the plurality of historical search records includes a historical search term and a historical search result, the historical search result includes a plurality of item information, the plurality of item information includes the target item information, and the historical search result further includes a 25th iteration BM25 value of the best matching algorithm and an initial relevance level corresponding to each of the plurality of item information;
[0020] The first type of item information satisfies that the BM25 value is greater than a first preset value and the initial relevance level is lower than a first preset level;
[0021] Review the first type of item information, determine the first type of item information that satisfies the first condition, and use the first type of item information that satisfies the first condition and the search terms corresponding to the first type of item information that satisfies the first condition as samples in a third sample set; wherein the first type of item information that satisfies the first condition refers to the first type of item information whose initial relevance level needs to be modified and whose modified relevance level is higher than the second preset level.
[0022] In one possible design, it also includes:
[0023] determining a second type of item information from the plurality of historical search records;
[0024] The second type of item information satisfies that the BM25 value is less than a second preset value and the initial relevance level is higher than a second preset level;
[0025] Review the second type of item information, determine the second type of item information that satisfies the second condition, and use the second type of item information that satisfies the second condition and the search terms corresponding to the second type of item information that satisfies the second condition as samples in a fourth sample set; wherein the second type of item information that satisfies the second condition refers to the second type of item information whose initial relevance level needs to be modified and whose modified relevance level is lower than the first preset level.
[0026] Generally speaking, the higher the BM25 value of the item information in the historical search results, the higher the initial relevance level of the item information and the historical search terms. However, there may be item information with a high BM25 value but a low initial relevance level, or a low BM25 value but a high relevance level. Such item information is screened out for manual review, and the relevance level of the item information is modified correctly. Through the above screening process, the workload of manual review and annotation of relevance levels is reduced, and the efficiency of constructing relevance samples is improved.
[0027] In one possible design, it also includes:
[0028] determining a third type of item information from the plurality of historical search records;
[0029] The historical search results also include a click rate corresponding to each of the multiple pieces of item information;
[0030] The third type of item information satisfies that the click rate corresponding to the third type of item information is less than a preset click rate;
[0031] Review the third type of item information, determine the third type of item information that satisfies the third condition, and use the third type of item information that satisfies the third condition and the search terms corresponding to the third type of item information that satisfies the third condition as samples in a fourth sample set; wherein the third type of item information that satisfies the third condition refers to the third type of item information whose initial relevance level needs to be modified and whose modified relevance level is higher than the second preset level.
[0032] In a possible design, the N first participles include one or more of the brand of the item, the origin of the item, the specifications of the item, and the attributes of the item.
[0033] In one possible design, it also includes:
[0034] Deduplication is performed on samples in the first sample set, the second sample set, the third sample set, the fourth sample set, and the fifth sample set; or, deduplication is performed on samples in a sixth sample set, where the sixth sample set consists of multiple sets of the first sample set, the second sample set, the third sample set, the fourth sample set, and the fifth sample set.
[0035] In a second aspect, the present application further provides a correlation sample construction device, the device comprising: a transceiver unit and a processing unit;
[0036] The transceiver unit obtains target item information;
[0037] The processing unit is used to perform word segmentation processing on the target item information to obtain N first word segmentations, where N is a positive integer;
[0038] The processing unit is further used to determine a first sample set and a second sample set according to the N first participles and the target item information; the i-th sample in the first sample set includes a first search term and the target item information, the first search term is determined according to a first set, and the first set includes the N first participles; the i-th sample is any one of the samples in the first sample set, and i is a positive integer; the j-th sample in the second sample set includes a second search term and the target item information, the second search term is determined according to a second set, and the second set includes M second participles, and the M second participles are obtained by replacing M first participles in the N first participles; M is a positive integer and M is less than or equal to N; the j-th sample is any one of the samples in the second sample set, and j is a positive integer.
[0039] In a possible design, the first set also includes an item category corresponding to the target item information.
[0040] In a possible design, the N first participles include a stem word; the kth second participle is obtained by replacing the stem word in the N first participles, and the item category corresponding to the kth second participle is different from the item category corresponding to the stem word in the N first participles; the kth second participle is one of the M second participles, k is a positive integer and k is less than or equal to M.
[0041] In one possible design, the processing unit is further used to determine a first type of item information from multiple historical search records; wherein each of the multiple historical search records includes a historical search term and a historical search result, the historical search result includes multiple item information, the multiple item information includes the target item information, and the historical search result also includes the 25th iteration BM25 value and the initial relevance level of the best matching algorithm corresponding to each item information in the multiple item information; the first type of item information satisfies that the BM25 value is greater than a first preset value and the initial relevance level is lower than the first preset level; the first type of item information is reviewed to determine the first type of item information that satisfies the first condition, and the first type of item information that satisfies the first condition and the search term corresponding to the first type of item information that satisfies the first condition are used as samples in a third sample set; wherein the first type of item information that satisfies the first condition refers to the first type of item information that needs to modify the initial relevance level and the modified relevance level is higher than the second preset level.
[0042] In one possible design, the processing unit is further used to determine a second type of item information from the multiple historical search records; the second type of item information satisfies that the BM25 value is less than a second preset value and the initial relevance level is higher than the second preset level; the second type of item information is reviewed to determine the second type of item information that satisfies the second condition, and the second type of item information that satisfies the second condition and the search terms corresponding to the second type of item information that satisfies the second condition are used as samples in a fourth sample set; wherein the second type of item information that satisfies the second condition refers to the second type of item information whose initial relevance level needs to be modified and whose modified relevance level is lower than the first preset level.
[0043] In one possible design, the processing unit is also used to determine a third type of item information from the multiple historical search records; the historical retrieval results also include a click-through rate corresponding to each item information in the multiple items; the third type of item information satisfies the condition that the click-through rate corresponding to the third type of item information is less than a preset click-through rate; the third type of item information is reviewed to determine the third type of item information that satisfies a third condition, and the third type of item information that satisfies the third condition and the search terms corresponding to the third type of item information that satisfies the third condition are used as samples in a fourth sample set; wherein the third type of item information that satisfies the third condition refers to the third type of item information whose initial relevance level needs to be modified and whose modified relevance level is higher than the second preset level.
[0044] In a possible design, the N first participles include one or more of the brand of the item, the origin of the item, the specifications of the item, and the attributes of the item.
[0045] In a possible design, the processing unit is further used to deduplicate samples in the first sample set, the second sample set, the third sample set, the fourth sample set, and the fifth sample set; or, to deduplicate samples in a sixth sample set, where the sixth sample set consists of multiple sets of the first sample set, the second sample set, the third sample set, the fourth sample set, and the fifth sample set.
[0046] In a third aspect, the present application also provides a correlation sample construction device, comprising: one or more processors and one or more memories, wherein the one or more memories store one or more programs, and when the programs are executed by the one or more processors, the device executes a method as described in any one of the above-mentioned first aspects.
[0047] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a program, and when the program is executed on a device, the device executes the method as described in any one of the above-mentioned first aspects.
[0048] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the method described in any one of the above-mentioned first aspects is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 A schematic diagram of a correlation sample construction method provided in an embodiment of the present application;
[0051] Figure 2 Schematic diagram of the structure of the correlation sample construction device provided in the embodiment of the present application Figure 1 ;
[0052] Figure 3 Schematic diagram of the structure of the correlation sample construction device provided in the embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0054] The application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems. In the description of the present application, unless otherwise specified, the meaning of "multiple" is two or more.
[0055] The relevance model used by search engines is usually based on text matching and user click behavior to measure the relevance between the user's search keyword and the search results. Keywords can also be called keywords or queries. The search results consist of multiple target documents, which can be called documents.
[0056] The document matching method mainly uses the Term Frequency-Inverse Document Frequency (TF-IDF) algorithm and the best match algorithm 25th iteration algorithm (hereinafter referred to as BM25). Among them, TF-IDF measures the matching degree between the two by calculating the frequency (TF) and inverse document frequency (IDF) of the keyword in the target document. The inverse document frequency is defined based on the frequency of a word in a document collection. If a word appears very few times in a document collection, then the inverse document frequency value of this word is large, otherwise the inverse document frequency value is small. The product of TF and IDF is calculated to represent the correlation between the search keyword and the returned target documents. The product of TF and IDF is proportional to the correlation between the keyword and the target document.
[0057] The TF-IDF algorithm is simple and fast, but due to its insufficient semantic understanding ability, it leads to insufficient relevance calculation. The BM25 algorithm is an improvement on the TF-IDF algorithm. It not only considers the frequency of words in the document, but also the importance of the words themselves and the length of the document. However, compared with the TF-IDF algorithm, the main improvement of the BM25 algorithm is that the BM25 algorithm finds that the relationship between word frequency and relevance is nonlinear, and the BM25 algorithm is still insufficient in semantic understanding ability.
[0058] The method based on user click behavior measures the relevance between keywords and target documents through the search engine log. If the log records that a target document is clicked by a user, the relevance between the keyword and the target document is high; if the log records that a target document is not clicked by a user, the relevance between the keyword and the target document is low. There is a large error in this process of measuring the relevance through user click behavior, because a user's click on a target document may be a mistaken click caused by the document being ranked higher, and it does not mean that the document is highly relevant to the keyword.
[0059] The above methods can also be used to construct correlation samples. For example, target documents with larger TF-IDF values and corresponding keywords can be used as positive correlation samples, and target documents with smaller TF-IDF values and corresponding keywords can be used as negative correlation samples. Similarly, target documents with larger BM25 values and corresponding keywords can be used as positive correlation samples, and target documents with smaller BM25 values and corresponding keywords can be used as negative correlation samples. Target documents clicked by users and corresponding keywords can also be used as positive correlation samples, and target documents not clicked by users and corresponding keywords can be used as negative correlation samples. Due to the disadvantages of insufficient semantic understanding ability of TF-IDF algorithm and BM25 algorithm, and the large error of methods based on user click behavior, the quality of correlation samples constructed by the above methods is not ideal.
[0060] In order to improve the quality of the constructed correlation samples, this application proposes a correlation sample construction method, such as Figure 1 As shown, the execution subject of the method can be a server running on the search engine, or a chip in the server, and this application does not limit this. The following is an example of the execution subject being a server running on the search engine, and the method includes:
[0061] Step 100: The server obtains target item information.
[0062] Exemplarily, a large amount of item information is stored in the database or memory of the e-commerce platform or e-commerce system. Each item on sale has corresponding item information. The item information can be understood as a description of the brand, origin, and other information of the item. The target item information can be any one of the above-mentioned large amount of item information. The server can obtain the target item information from the database or memory.
[0063] For example, suppose the server obtains the following item information: Brand A 750g small package of Northeastern nuts for gift giving, where "Brand A" is a description of the brand of the item, "750g" and "small package" are descriptions of the specifications of the item, "gift giving" is a description of the usage scenario of the item, "Northeastern" is a description of the origin of the item, and "nuts" is the most central and most important word in the item information.
[0064] Step 101: The server performs word segmentation processing on the target item information to obtain N first word segments.
[0065] Exemplarily, after the server obtains the target item information through step 100, it can use a word segmentation method based on string matching, an analysis method based on understanding, a word segmentation method based on statistics, and other natural language processing (Natural Language Processing, NLP) technologies to segment the target item information, which is not limited in this application.
[0066] Exemplarily, the target item is segmented, and each word obtained after the segmentation is recorded as a first participle, then N first participles can be obtained, and the N first participles include one or more of the brand of the item, the origin of the item, the specifications of the item, and the attributes of the item, where N is a positive integer.
[0067] For example, suppose that the target item information in step 100 is segmented, that is, "Brand A 750g small package gift Northeastern nuts" is segmented, and suppose that the first participles obtained after the word segmentation processing are first participle ①: Brand A; first participle ②: 750g; first participle ③: small package; first participle ④: gift; first participle ⑤: Northeast; first participle ⑥: nuts, that is, a total of 6 first participles are obtained after the word segmentation processing, and N is 6.
[0068] Step 102: The server determines a first sample set and a second sample set according to the N first segmented words and the target item information.
[0069] Exemplarily, the i-th sample in the first sample set includes a first search term and target item information, the first search term is determined according to the first set, the first set includes N first participles, specifically, the first search term determined according to the first set may be a first participle among the N first participles; or, it may be a splicing of several first participles among the N first participles; or, it may be an item category corresponding to the target item information, the item categories include daily necessities, electronic products, snacks, meat, etc., the item categories may be customized, and the present application does not limit this, for example, the target item information in step 100, i.e., the item category corresponding to "Brand A 750g small package gift Northeastern nuts" may be snacks; the i-th sample is any sample in the first sample set, i is a positive integer, and any sample in the first sample set is composed of the first search term and the target item information.
[0070] For example, assuming that the six first participles in step 101 are taken as an example, the first search terms determined according to the first set are shown in Table 1. It should be noted that Table 1 only shows some of the first search terms, not all of them:
[0071] Serial number First search term 1 Brand A 2 Gift Giving 3 nut 4 Brand A Nuts 5 Northeastern nuts 6 A Brand Northeast Nuts 7 snack
[0072] Table 1
[0073] The first search terms with serial numbers 1 to 3 in Table 1 are one of the six first participles, specifically, the first search term with serial number 1 is first participle ①, the first search term 2 is first participle ④, and the first search term 3 is first participle ⑥; the first search terms with serial numbers 4 to 5 in Table 1 are formed by combining two of the six first participles, specifically, the first search term with serial number 4 is formed by combining first participle ① and first participle ⑥, and the first search term with serial number 5 is formed by combining first participle ⑤ and first participle ⑥; the first search term with serial number 6 in Table 1 is formed by combining three of the six first participles, specifically, the first search term with serial number 6 is formed by combining first participle ①, first participle ⑤, and first participle ⑥; the first search term with serial number 7 in Table 1 is the item category corresponding to the target item information.
[0074] Further illustratively, the first sample consisting of the first search term shown in Table 1 and "Brand A 750g small package gift Northeast nuts" is shown in Table 2:
[0075]
[0076]
[0077] Table 2
[0078] As described above, the samples in the first sample set are composed of the first search term and the target item information. The first sample with serial number 1 in Table 2 is composed of the first search term with serial number 1 in Table 1 and the target item information (i.e., Brand A 750g small package gift Northeastern nuts); the first sample with serial number 2 in Table 2 is composed of the first search term with serial number 2 in Table 1 and the target item information; the first sample with serial number 3 in Table 2 is composed of the first search term with serial number 3 in Table 1 and the target item information... The first sample with serial number 7 in Table 2 is composed of the first search term with serial number 7 in Table 1 and the target item information.
[0079] The first search terms contained in the first samples in the first sample set are all obtained by segmenting the target item information, or are information categories corresponding to the target item information. Therefore, the first search terms have a high level of correlation with the target item information. The samples composed of the first search terms and the target item information can be used as a sample set with a high level of correlation with the target item information. The samples composed of the first search terms and the target item information can also be called positive samples. The positive samples contained in the first sample set are of high quality, and in the process of obtaining the first sample set, there is no need to manually label the correlation level of the samples, which has high efficiency.
[0080] Exemplarily, the j-th sample in the second sample set includes a second search term and target item information, the second search term is determined based on the second set, the second set includes M second participles, and the M second participles are obtained by replacing M first participles among N first participles; M is a positive integer and M is less than or equal to N; the j-th sample is any sample in the second sample set, j is a positive integer, and the samples in the second sample set consist of the second search term and target item information.
[0081] For example, taking the above-mentioned first participles ① to ⑥ as an example, one or more of the six first participles can be replaced. For example, if the first participle ① is replaced, the first participle ① "Brand A" can be replaced with "Brand B", and the second participle ① obtained after the replacement is "Brand B"; the first participle ⑤ can also be replaced with "Yunnan", and the second participle ② obtained after the replacement is "Yunnan"; the first participle ⑥ "nuts" can be replaced with "dried fruits", and the second participle ③ obtained after the replacement is "dried fruits".
[0082] After the above replacement process, a total of second participles ① to ③ are obtained, that is, the second set includes 3 second participles. The second search terms determined according to the second set are shown in Table 3:
[0083] Serial number Second search term 1 Brand B 2 Yunnan 3 dried fruit 4 Yunnan Dried Fruits 5 Brand B Dried Fruit
[0084] Table 3
[0085] The second search term in Table 3 is determined based on the second participles ① to ③ in the second set. Specifically, the second search term with sequence number 1 in Table 3 is the second participle ①, the second search term with sequence number 2 in Table 3 is the second participle ②, the second search term with sequence number 3 in Table 3 is determined based on the second participle ③, the second search term with sequence number 4 in Table 3 is obtained by concatenating the second participles ② and ③, and the second search term with sequence number 5 in Table 3 is obtained by concatenating the second participles ① and ③.
[0086] Further exemplarily, the above-mentioned N first participles include stem words, which can also be called core words, and are words with the most important meaning or information in the target item information. For example, "nuts" in "A brand 750g small package gift Northeast nuts" is the stem word; if the kth second participle is obtained by replacing the stem words in the N first participles, and the item category corresponding to the kth second participle is different from the item category corresponding to the stem words in the N first participles, then the sample composed of the second search term and the target item information determined by the kth second participle can be used as a negative sample; the kth second participle is one of the M second participles, k is a positive integer and k is less than or equal to M.
[0087] Since the item category corresponding to the kth second participle is different from the item category corresponding to the main word, the relevance level between the kth second participle and the target item information is low, and the sample consisting of the second search term and the target item information determined by the kth second participle can be used as a negative sample. For example, according to step 100, if the first participle ⑥ is replaced, and the second participle obtained after the replacement is different from the category of the first participle ⑥, then the sample consisting of the second search term and the target item information determined by the second participle is a negative sample.
[0088] For example, replace the first participle ⑥ "nuts" with "fruits", and the second participle ④ obtained after the replacement is "fruits". The item category corresponding to "fruits" is fruits, and the item category corresponding to "nuts" is snacks. The two correspond to different item categories. The second search term determined according to the second participle ④ can be "Yunnan fruits", or "B brand fruits", or "B brand Yunnan fruits". Therefore, the above Table 3 can be updated to Table 4 as shown below:
[0089] Serial number Second search term 1 Brand B 2 Yunnan 3 dried fruit 4 Yunnan Dried Fruits 5 Brand B Dried Fruit 6 Yunnan Fruits 7 B brand fruit 8 B Brand Yunnan Fruit
[0090] Table 4
[0091] The second sample determined according to the second search term and target item information in Table 4 is shown in Table 5:
[0092]
[0093]
[0094] Table 5
[0095] The second search terms included in the second samples numbered 5 to 7 in Table 5 correspond to the second search terms numbered 6 to 8 in Table 4, respectively. The second search terms numbered 6 to 8 in Table 4 are determined based on the second participle ④ (i.e., "fruit"). Since the second participle ④ and the main word are of different categories, the second search terms numbered 6 to 8 in Table 4 have a lower level of relevance to the target item information. In other words, the samples consisting of the second search terms numbered 6 to 8 in Table 4 and the target item information are negative samples, i.e., the second samples numbered 5 to 7 in Table 5 are negative samples.
[0096] The negative samples included in the second sample set have higher quality. In addition, similar to the process of obtaining the first sample set, the process of obtaining the second sample set does not require manual annotation of the relevance level of the samples, and also has higher efficiency.
[0097] In addition to the two correlation sample construction methods of obtaining the first sample set and the second sample set mentioned above, correlation samples can also be constructed in combination with the historical search records of the e-commerce search platform or system. Specifically, a first type of item information is determined from multiple historical search records; wherein each of the multiple historical search records includes a historical search term and a historical search result, the historical search result includes multiple item information, the multiple item information includes target item information, and the historical search result also includes the best matching algorithm corresponding to each item information in the multiple item information. The 25th iteration BM25 value and the initial correlation level; the initial correlation level is determined by the search platform; the first type of item information satisfies the BM25 value being greater than the first preset value and the initial correlation level being lower than the first preset level.
[0098] For example, assuming that the historical search term is "large capacity of nuts", the historical search results corresponding to the historical search term are shown in Table 6. The historical search results include 6 item information, among which the item information with serial number 4 is the above-mentioned target item information; assuming that the first preset value is 5 and the first preset level is 3.
[0099]
[0100]
[0101] Table 6
[0102] As shown in the item information with serial number 5 in Table 6, the BM25 value of the item information with serial number 5 is 5.5, which is greater than the first preset value 5, and the initial correlation level of the item information with serial number 5 is 2, which is lower than the first preset level 3. Therefore, it is determined that the item information with serial number 5 is the first type of item information.
[0103] After determining the first type of item information, manually review the first type of item information to determine the first type of item information that meets the first condition, and use the first type of item information that meets the first condition and the search terms corresponding to the first type of item information that meets the first condition as samples in the third sample set; wherein, the first type of item information that meets the first condition refers to the first type of item information whose initial relevance level needs to be modified and whose modified relevance level is higher than a second preset level; assuming that the second preset level is 5.
[0104] For example, manually reviewing the item information with serial number 5, it is determined that the initial relevance level of the item information needs to be modified and the relevance level of the item information should be modified to 6, that is, the modified relevance level of the item information with serial number 5 is higher than the second preset level, that is, the item information with serial number 5 meets the first condition, and the item information with serial number 5 and its corresponding search term ("large capacity of nuts") can be used as samples in the third sample set.
[0105] Exemplarily, the second type of item information can also be determined from multiple historical search records; the second type of item information satisfies that the BM25 value is less than the second preset value and the initial relevance level is higher than the second preset level; after determining the second type of item information, the second type of item information is reviewed to determine the second type of item information that satisfies the second condition, and the second type of item information that satisfies the second condition and the search terms corresponding to the second type of item information that satisfies the second condition are used as samples in the fourth sample set; wherein, the second type of item information that satisfies the second condition refers to the second type of item information that needs to modify the initial relevance level and the modified relevance level is lower than the first preset level.
[0106] For example, assuming that the second preset value is 3, the BM25 value of the item information with serial number 2 in Table 6 is 1, which is less than the second preset value 3, and the initial relevance level of the item information with serial number 2 is 5.5, which is greater than the second preset level 5. Therefore, the item information with serial number 2 is determined to be the second type of item information; after determining that the item information with serial number 2 is the second type of item information, the item information is manually reviewed, and after the review, the initial relevance level of the item information with serial number 2 needs to be modified, and the modified relevance level is 2.5, that is, the modified relevance level of the item information with serial number 2 is lower than the first preset level 3, that is, the item information with serial number 2 meets the second condition, and the item information with serial number 2 and its corresponding search term ("large capacity of nuts") can be used as samples in the fourth sample set.
[0107] In addition, for item information whose BM25 value is greater than the first preset value and whose initial relevance level is higher than the second preset level, the item information and its corresponding search terms can be added to the first sample set as positive samples, for example, the item information with sequence number 6 in Table 6 and its corresponding search terms are added to the first sample set as positive samples; for item information whose BM25 value is less than the second preset value and whose initial relevance level is lower than the first preset level, the item information and its corresponding search terms can be added to the second sample set as negative samples, for example, the item information with sequence number 1 in Table 6 and its corresponding search terms are added to the second sample set as negative samples.
[0108] The values of the above-mentioned first preset value, second preset value, first preset level and second preset level can be customized according to actual business needs, and this application does not limit them.
[0109] Generally speaking, the larger the BM25 value, the higher the correlation level between the item information and the search terms, and the smaller the BM25 value, the lower the correlation level between the item information and the search terms. The present application screens out the first type and the second type of item information in the historical search results for manual review, and after determining that the correlation level of the first type and the second type of item information is correct, the item information and the corresponding search terms are added as samples to the corresponding collection, thereby improving the sample quality and significantly reducing the workload of manual review and modification of the correlation level.
[0110] Further illustratively, a third type of item information can also be determined from multiple historical search records; the historical search results also include a click-through rate corresponding to each item information in the multiple items, and the click-through rate corresponding to each item information is determined by the e-commerce search platform and the system; the third type of item information satisfies that the click-through rate corresponding to the third type of item information is less than a preset click-through rate; after determining the third type of item information, review the third type of item information to determine the third type of item information that satisfies the third condition, and use the third type of item information that satisfies the third condition and the search terms corresponding to the third type of item information that satisfies the third condition as samples in the fifth sample set; wherein, the third type of item information that satisfies the third condition refers to the third type of item information whose initial relevance level needs to be modified and whose modified relevance level is higher than the second preset level.
[0111] For example, assuming that the click rate corresponding to the item information with serial number 1 in Table 6 is 50%, the click rate corresponding to the item information with serial number 2 is 35%, the click rate of the item information with serial number 3 is 20%, the click rate of the item information with serial number 4 is 60%, the click rate of the item information with serial number 5 is 55%, and the click rate of the item information with serial number 6 is 52%, assuming that the preset click rate is 50%, according to the click rate corresponding to each item information and the preset click rate, the item information with serial number 2 and the item information with serial number 3 are determined to be the third type of item information; after determining the third type of item information, the item information with serial number 2 and the item information with serial number 3 are reviewed. According to the above content, it can be known that the relevance level of the item information with serial number 2 should be modified to 2.5; in addition, after review, the relevance level of the item information with serial number 3 should be modified to 5.5, that is, the modified relevance level of the item information with serial number 3 is higher than the second preset level 5. Therefore, the item information with serial number 3 meets the third condition, and the item information with serial number 3 and its corresponding search term ("large capacity of nuts") can be used as samples in the fifth sample set.
[0112] In addition, item information with a click rate greater than a preset click rate and its corresponding search terms can be added as positive samples to the first sample set. For example, item information numbered 4 to 6 and its corresponding search terms can be added as positive samples to the first sample set.
[0113] The present application selects the third type of item information from the historical search results for manual review, and after determining that the relevance level of the third type of item information is correct, adds the item information and the corresponding search terms as samples to the corresponding collection, thereby improving the sample quality while also reducing the workload of manual review and modification of the relevance level.
[0114] In addition, the present application also deduplicates samples in the first sample set, the second sample set, the third sample set, the fourth sample set, and the fifth sample set; or, deduplicates samples in the sixth sample set, where the sixth sample set is composed of multiple sets in the first sample set, the second sample set, the third sample set, the fourth sample set, and the fifth sample set; by ensuring that there are no duplicate samples through deduplication processing, the sample quality can be further improved.
[0115] Figure 2 and Figure 3 A schematic diagram of a possible correlation sample construction device provided in an embodiment of the present application. These correlation sample construction devices can be used to implement the functions of the server in the above method embodiment, and thus can also achieve the beneficial effects possessed by the above method embodiment.
[0116] like Figure 2 As shown, the correlation sample construction device 200 includes a transceiver unit 210 and a processing unit 220. When the correlation sample construction device 200 is used to implement Figure 1 The functions of the server in the method embodiment shown are:
[0117] The transceiver unit 210 obtains target object information;
[0118] The processing unit 220 is used to perform word segmentation processing on the target item information to obtain N first word segmentations, where N is a positive integer;
[0119] The processing unit 220 is further used to determine a first sample set and a second sample set according to the N first participles and the target item information; the i-th sample in the first sample set includes a first search term and the target item information, the first search term is determined according to a first set, and the first set includes the N first participles; the i-th sample is any one of the samples in the first sample set, and i is a positive integer; the j-th sample in the second sample set includes a second search term and the target item information, the second search term is determined according to a second set, and the second set includes M second participles, and the M second participles are obtained by replacing M first participles in the N first participles; M is a positive integer and M is less than or equal to N; the j-th sample is any one of the samples in the second sample set, and j is a positive integer.
[0120] In a possible design, the first set also includes an item category corresponding to the target item information.
[0121] In a possible design, the N first participles include a stem word; the kth second participle is obtained by replacing the stem word in the N first participles, and the item category corresponding to the kth second participle is different from the item category corresponding to the stem word in the N first participles; the kth second participle is one of the M second participles, k is a positive integer and k is less than or equal to M.
[0122] In one possible design, the processing unit 220 is further used to determine a first type of item information from multiple historical search records; wherein each of the multiple historical search records includes a historical search term and a historical search result, the historical search result includes multiple item information, the multiple item information includes the target item information, and the historical search result also includes the 25th iteration BM25 value of the best matching algorithm and the initial relevance level corresponding to each of the multiple item information; the first type of item information satisfies that the BM25 value is greater than a first preset value and the initial relevance level is lower than the first preset level; the first type of item information is reviewed to determine the first type of item information that satisfies the first condition, and the first type of item information that satisfies the first condition and the search term corresponding to the first type of item information that satisfies the first condition are used as samples in the third sample set; wherein the first type of item information that satisfies the first condition refers to the first type of item information that needs to modify the initial relevance level and the modified relevance level is higher than the second preset level.
[0123] In one possible design, the processing unit 220 is further used to determine a second type of item information from the multiple historical search records; the second type of item information satisfies that the BM25 value is less than a second preset value and the initial relevance level is higher than the second preset level; the second type of item information is reviewed to determine the second type of item information that satisfies the second condition, and the second type of item information that satisfies the second condition and the search terms corresponding to the second type of item information that satisfies the second condition are used as samples in a fourth sample set; wherein the second type of item information that satisfies the second condition refers to the second type of item information whose initial relevance level needs to be modified and whose modified relevance level is lower than the first preset level.
[0124] In one possible design, the processing unit 220 is also used to determine a third type of item information from the multiple historical search records; the historical retrieval results also include a click-through rate corresponding to each item information in the multiple item information; the third type of item information satisfies that the click-through rate corresponding to the third type of item information is less than a preset click-through rate; the third type of item information is reviewed to determine the third type of item information that satisfies a third condition, and the third type of item information that satisfies the third condition and the search terms corresponding to the third type of item information that satisfies the third condition are used as samples in a fourth sample set; wherein the third type of item information that satisfies the third condition refers to the third type of item information whose initial relevance level needs to be modified and whose modified relevance level is higher than the second preset level.
[0125] In a possible design, the N first participles include one or more of the brand of the item, the origin of the item, the specifications of the item, and the attributes of the item.
[0126] In a possible design, the processing unit 220 is further used to deduplicate samples in the first sample set, the second sample set, the third sample set, the fourth sample set, and the fifth sample set; or, to deduplicate samples in a sixth sample set, where the sixth sample set is composed of multiple sets of the first sample set, the second sample set, the third sample set, the fourth sample set, and the fifth sample set.
[0127] For more detailed description of the transceiver unit 210 and the processing unit 220, please refer to Figure 1 The relevant description in the method embodiment shown is directly obtained and will not be repeated here.
[0128] like Figure 3 As shown, the correlation sample construction device 300 includes a processor 310 and an interface circuit 320. The processor 310 and the interface circuit 320 are coupled to each other. It can be understood that the interface circuit 320 can be a transceiver or an input-output interface. Optionally, the correlation sample construction device 300 can also include a memory 330 for storing instructions executed by the processor 310 or storing input data required by the processor 310 to execute instructions or storing data generated after the processor 310 executes instructions.
[0129] When the correlation sample construction device 300 is used to implement Figure 1 When the method is shown, the processor 310 is used to implement the functions of the processing unit 220, and the interface circuit 320 is used to implement the functions of the transceiver unit 210.
[0130] The division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0131] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0132] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A correlation sample construction method, characterized in that: The method includes: Get target item information; Perform word segmentation processing on the target item information to obtain N first word segmentations, where N is a positive integer; Determine a first sample set and a second sample set according to the N first participles and the target item information; The i-th sample in the first sample set includes a first search term and the target item information, the first search term is determined according to the first set, the first set includes the N first participles; the i-th sample is any sample in the first sample set, and i is a positive integer; The j-th sample in the second sample set includes a second search term and the target item information, the second search term is determined according to the second set, the second set includes M second participles, and the M second participles are obtained by replacing M first participles among the N first participles; M is a positive integer and M is less than or equal to N; the j-th sample is any sample in the second sample set, and j is a positive integer.
2. The method according to claim 1, characterized in that The first set also includes item categories corresponding to the target item information.
3. The method according to claim 1, characterized in that The N first participles include a stem word; the kth second participle is obtained by replacing the stem word in the N first participles, and the item category corresponding to the kth second participle is different from the item category corresponding to the stem word in the N first participles; the kth second participle is one of the M second participles, k is a positive integer and k is less than or equal to M.
4. The method according to claim 1, characterized in that Also includes: Determining first type of item information from a plurality of historical search records; Each of the plurality of historical search records includes a historical search term and a historical search result, the historical search result includes a plurality of item information, the plurality of item information includes the target item information, and the historical search result further includes a 25th iteration BM25 value of the best matching algorithm and an initial relevance level corresponding to each of the plurality of item information; The first type of item information satisfies that the BM25 value is greater than a first preset value and the initial relevance level is lower than a first preset level; Review the first type of item information, determine the first type of item information that satisfies the first condition, and use the first type of item information that satisfies the first condition and the search terms corresponding to the first type of item information that satisfies the first condition as samples in a third sample set; wherein the first type of item information that satisfies the first condition refers to the first type of item information whose initial relevance level needs to be modified and whose modified relevance level is higher than the second preset level.
5. The method according to claim 4, characterized in that Also includes: determining a second type of item information from the plurality of historical search records; The second type of item information satisfies that the BM25 value is less than a second preset value and the initial relevance level is higher than a second preset level; Review the second type of item information, determine the second type of item information that satisfies the second condition, and use the second type of item information that satisfies the second condition and the search terms corresponding to the second type of item information that satisfies the second condition as samples in a fourth sample set; wherein the second type of item information that satisfies the second condition refers to the second type of item information whose initial relevance level needs to be modified and whose modified relevance level is lower than the first preset level.
6. The method according to claim 4, characterized in that Also includes: determining a third type of item information from the plurality of historical search records; The historical search results also include a click rate corresponding to each of the multiple pieces of item information; The third type of item information satisfies that the click rate corresponding to the third type of item information is less than a preset click rate; Review the third type of item information, determine the third type of item information that satisfies the third condition, and use the third type of item information that satisfies the third condition and the search terms corresponding to the third type of item information that satisfies the third condition as samples in a fifth sample set; wherein the third type of item information that satisfies the third condition refers to the third type of item information whose initial relevance level needs to be modified and whose modified relevance level is higher than the second preset level.
7. The method according to claim 1, characterized in that The N first participles include one or more of the brand of the item, the origin of the item, the specification of the item, and the attribute of the item.
8. The method according to any one of claims 1 to 6, characterized in that Also includes: Deduplicating samples in the first sample set, the second sample set, the third sample set, the fourth sample set, and the fifth sample set; Alternatively, samples in a sixth sample set are deduplicated, where the sixth sample set is composed of a plurality of sets among the first sample set, the second sample set, the third sample set, the fourth sample set, and the fifth sample set.
9. A correlation sample construction device, characterized in that: The device comprises a transceiver unit and a processing unit; The transceiver unit obtains target item information; The processing unit is used to perform word segmentation processing on the target item information to obtain N first word segmentations, where N is a positive integer; The processing unit is further configured to determine a first sample set and a second sample set according to the N first participles and the target item information; the i-th sample in the first sample set includes a first search term and the target item information, the first search term is determined according to a first set, and the first set includes the N first participles; the i-th sample is any one of the samples in the first sample set, and i is a positive integer; the j-th sample in the second sample set includes a second search term and the target item information, the second search term is determined according to a second set, and the second set includes M second participles, and the M second participles are obtained by replacing M first participles in the N first participles; M is a positive integer and is less than or equal to N; the j-th sample is any sample in the second sample set, and j is a positive integer.
10. A correlation sample construction device, characterized in that: include: One or more processors and one or more memories; wherein the one or more memories store one or more programs, and when the programs are executed by the one or more processors, the device executes the method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.
12. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 8 when being executed by a processor.
