Product recommendation test set generation method and device, computer equipment and medium

By dividing feature categories for product description, extracting and generalizing feature keywords, and generating product feature relationship matrix, the problem of insufficient coverage of the test set is solved, the recommendation quality of the product recommendation model and the diversity of the test set are improved, and the Labor costs.

CN119127693AActive Publication Date: 2024-12-13PING AN TECH (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411197760.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-13
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

In the existing algorithm model testing methods, the test set coverage is insufficient, resulting in inaccurate product recommendation results after launch, especially when there are many products and many feature values, manual coverage is difficult and costly.

Method used

By dividing feature categories for product descriptions, extracting feature keywords and generalizing them, generating product feature relationship matrix, and automatically generating test sets with preset rules to expand the coverage of test sets and reduce labor costs.

Benefits of technology

It improves the diversity of test cases and the recommendation quality of product recommendation models, reduces labor costs, enhances the coverage of the test set, and improves the recommendation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127693A_ABST
    Figure CN119127693A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of artificial intelligence and big data, and relates to a product recommendation test set generation method, which comprises the following steps: obtaining product description of a product; dividing feature categories to which the product descriptions belong, and generating a product category corresponding relationship between the related product descriptions and the feature categories; extracting feature keywords from the product description based on the feature categories, and generating category feature corresponding relations between the related feature categories and the feature keywords; generalizing the at least part of the feature keywords to obtain generalized feature keywords; updating a category feature corresponding relation based on the generalized feature keyword; generating a product feature relationship matrix of related products and feature keywords based on the product category corresponding relationship and the updated category feature corresponding relationship; and in combination with a preset rule, generating a test set based on the product feature relation matrix. The invention further provides a related device, computer equipment and a storage medium. The test set can be automatically generated so as to expand the coverage range of the test set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence and big data technology, and in particular to a method, device, computer equipment and medium for generating a test set for product recommendation. Background Art

[0002] With the development of science and technology, obtaining data and using data modeling to solve corresponding problems has become a very common technical means. For example, each e-commerce platform will collect data such as users' product browsing history, and build a product recommendation model based on the collected data to recommend products to users. For a system such as intelligent recommendation and intelligent search, the quality of product recommendations directly affects user use and experience, and users ask different questions. How to improve the quality of algorithm model testing and ensure the effectiveness of algorithm recommendations before going online has become a technical difficulty.

[0003] Existing algorithm model testing methods often use test sets divided from data sets as test cases to verify the effectiveness of algorithm models. In the entire data set, test sets often account for a small proportion. At the same time, if the division is uneven and the test data itself is limited, there may be a situation where the test set test coverage is not comprehensive, and after going online, it is impossible to recommend accurate products based on user questions.

[0004] Each product generally has its own characteristics, and product recommendation models often recommend products based on these characteristics. If the number of products is large and the number of characteristic values ​​is large, it is difficult and time-consuming to fully cover them manually. Summary of the invention

[0005] The purpose of the embodiments of the present application is to propose a test set generation for product recommendation, a product recommendation testing method and a device, the main purpose of which is to automatically generate a test set to expand the coverage of the test set.

[0006] In order to solve the above technical problems, the embodiment of the present application provides a method for generating a test set for product recommendation, which adopts the following technical solutions:

[0007] A method for generating a test set for product recommendation comprises the following steps:

[0008] Get the product description of the product;

[0009] Classify the feature categories to which the product description belongs, and generate a product category correspondence relationship between the product description and the feature category;

[0010] Based on the feature category, extract feature keywords from the product description, and generate a category feature correspondence relationship between the feature category and the feature keyword;

[0011] Generalizing at least part of the feature keywords to obtain generalized feature keywords, and updating the category-feature correspondence based on the generalized feature keywords;

[0012] Based on the product category correspondence and the updated category feature correspondence, generating a product feature relationship matrix related to the product and the feature keyword;

[0013] In combination with preset rules, a test set is generated based on the product feature relationship matrix.

[0014] Furthermore, the generalization process of the characteristic keywords includes the following steps:

[0015] Get the preset generalization threshold parameters;

[0016] The feature keywords are generalized based on the generalization threshold parameter.

[0017] Furthermore, generating a product feature relationship matrix based on the product category correspondence and the updated category feature correspondence includes the following steps:

[0018] Generate a single-feature product feature relationship matrix based on the product category correspondence and the updated category feature correspondence;

[0019] Get the quantity parameters of the preset feature combination;

[0020] Combining feature keywords based on the quantity parameters to obtain multiple feature keywords;

[0021] Based on the multi-feature keywords, converting a single-feature product feature relationship matrix into a multi-feature product feature relationship matrix;

[0022] The product feature relationship matrix is ​​obtained by combining the single-feature product feature relationship matrix and the multi-feature product feature relationship matrix.

[0023] Furthermore, generating a product feature relationship matrix based on the product category correspondence and the updated category feature correspondence includes the following steps:

[0024] Based on the product category correspondence, extract at least one feature category corresponding to each of the products;

[0025] Based on the updated feature category correspondence, extracting at least one generalized feature keyword corresponding to each feature category;

[0026] Based on the feature categories, construct a product feature relationship matrix between each of the generalized feature keywords and the single feature corresponding to at least one of the products;

[0027] The product feature relationship matrix of the single feature is used as the product feature relationship matrix.

[0028] Further, when the feature category is a descriptive feature, extracting feature keywords from the product description based on the feature category includes the following steps:

[0029] identifying the feature category;

[0030] When the feature category is identified as a descriptive feature, segmentation extraction is performed on the product description to obtain a segmentation list; segmentations irrelevant to the product in the segmentation list are removed to obtain feature keywords;

[0031] When the feature category is identified as an enumeration feature, extracting an enumeration value from the product description as the feature keyword;

[0032] When it is identified that the feature category is a range feature, all feature regions corresponding to the product description are summarized to obtain the feature keyword.

[0033] In order to solve the above technical problems, the embodiment of the present application also provides a method for testing a product recommendation model based on a test set generated by the product recommendation test set generation method described above, which adopts the following technical solutions:

[0034] Furthermore, after the step of generating a test set based on the product feature relationship matrix in combination with preset rules, the method includes:

[0035] Obtaining a current test sample in the test set;

[0036] Taking the current test sample as the input of the product recommendation model, outputting the current recommended product;

[0037] Traversing the product feature relationship matrix to determine whether the currently recommended product satisfies the product feature relationship matrix;

[0038] If not satisfied, mark the current test.

[0039] Furthermore, after marking the current test, the method further includes the following steps:

[0040] Based on the marked current test, updating the rule of generalization processing;

[0041] Repeat the generalization processing of at least part of the feature keywords with the updated generalization processing rules to obtain generalized feature keywords; update the category-feature correspondence based on the generalized feature keywords; regenerate a new product feature relationship matrix based on the product-category correspondence and the updated category-feature correspondence; and generate a test set based on the product feature relationship matrix in combination with preset rules to obtain an updated test set.

[0042] In order to solve the above technical problems, the embodiment of the present application also provides a test set generation device for product recommendation, which adopts the following technical solution:

[0043] A test set generating device for product recommendation, comprising:

[0044] Description acquisition module, used to obtain product description of the product;

[0045] A category classification module, used to classify the feature categories to which the product description belongs, and generate a product category correspondence relationship between the relevant product description and the feature category;

[0046] A feature extraction module, used to extract feature keywords from the product description based on the feature category, and generate a category feature correspondence relationship between the feature category and the feature keyword;

[0047] A generalization processing module, used to perform generalization processing on at least part of the feature keywords to obtain generalized feature keywords, and update the category feature correspondence based on the generalized feature keywords;

[0048] A matrix generating module, used for generating a product feature relationship matrix related to the product and the updated feature keywords based on the product category correspondence relationship and the updated category feature correspondence relationship;

[0049] The sample generation module is used to generate a test set based on the product feature relationship matrix in combination with preset rules.

[0050] In order to solve the above technical problems, the embodiment of the present application further provides a device for testing a product recommendation model based on a test set generated by the product recommendation test set generation method described in any one of the above items. The device adopts the following technical solution:

[0051] A device for testing a product recommendation model using a test set generated by the product recommendation test set generation method described in any one of the above, the device comprising:

[0052] A sample acquisition module, used to acquire the current test sample in the test set;

[0053] A product recommendation module, configured to use the current test sample as the input of the product recommendation model and output the current recommended product;

[0054] A relationship judgment module, used to traverse the product feature relationship matrix and judge whether the currently recommended product satisfies the product feature relationship matrix;

[0055] The test marking module is used to mark the current test if it is not satisfied.

[0056] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0057] A computer device includes a memory and a processor. The memory stores computer-readable instructions. When the processor executes the computer-readable instructions, the steps of the product recommendation test set generation method described above are implemented.

[0058] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0059] A computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of any of the above product recommendation test set generation methods.

[0060] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0061] The embodiment of the present application divides the product description into feature categories, extracts feature keywords from the product description based on the feature categories, and then generalizes the feature keywords to obtain a product feature relationship matrix between the relevant products and the generalized feature keywords. Based on the relationship matrix, a test set is automatically generated in combination with preset rules to reduce labor costs. In addition, generating a test set based on the product feature relationship matrix of the generalized feature keywords can expand the coverage of the test set and improve the diversity of test cases, which is conducive to enhancing the recommendation quality of the product recommendation model obtained based on this test set test and improving the recommendation effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0063] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0064] Figure 2 A flowchart of an embodiment of a method for generating a test set for product recommendation according to the present application;

[0065] Figure 3 yes Figure 2 A flowchart of a specific implementation of step S205;

[0066] Figure 4 It is a structural schematic diagram of an embodiment of a test set generation device for product recommendation according to the present application;

[0067] Figure 5 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0068] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0069] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0070] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0071] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0072] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0073] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.

[0074] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0075] It should be noted that the method for generating a test set for product recommendation provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the device for generating a test set for product recommendation is generally arranged in a server / terminal device.

[0076] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0077] Continue to refer Figure 2 , shows a flow chart of an embodiment of a method for generating a test set for product recommendation according to the present application. The method for generating a test set for product recommendation in the embodiment of the present application comprises the following steps:

[0078] Step S201, obtaining a product description of a product.

[0079] In this embodiment, the product recommendation test set generation method is executed on the electronic device (eg Figure 1 shown Server / Terminal Equipment) can obtain product descriptions related to a plurality of preset products through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, Wi-Fi connection, Bluetooth connection, Wi MAX connection, Zigbee connection, UWB (Ultra Wi-Fi Band) connection, and other wireless connection methods currently known or to be developed in the future.

[0080] In one embodiment, a preset product content description document about the characteristics, performance, price and / or applicable population of each financial product (such as insurance or fund) can be obtained from a memory or a server according to a preset address. For example: Product: Student Insurance; Product description document content: Affordable price, suitable for students, cost 200 yuan / year.

[0081] Step S202, classify the feature categories to which the product description belongs, and generate a product category correspondence relationship between the product description and the feature category.

[0082] Specifically, feature segmentation can be performed based on content related to the product description based on a preset classification algorithm or various methods that exist now or will be developed in the future, such as artificial intelligence.

[0083] Each product description may correspond to one feature category or may correspond to multiple feature categories, all of which fall within the scope of protection of this application.

[0084] Feature categories can be pre-set as needed. For example, feature categories that can be pre-set include: descriptive features, enumeration features, range features, etc.

[0085] In the embodiment of the present application, a product category relationship list may be constructed based on each product and the feature category to which the product belongs.

[0086] According to the above description, suppose there are three products product 1, product 2, and product 3, and the three features feature 1, feature 2, and feature 3 are respectively description features, enumeration features, and range features (in this example, feature 3 is empty, indicating that it is not restricted by the range). The corresponding relationship between the above category features can be shown in Table 1:

[0087]

[0088] Table 1

[0089] Step S203: extracting feature keywords from the product description based on the feature categories, and generating a category-feature correspondence relationship between the feature categories and the feature keywords.

[0090] In the embodiments of the present application, corresponding methods can be used to extract keywords based on different feature categories. The keyword extraction process is described below using description class features, enumeration class features, and range class features as examples.

[0091] In some optional implementations, when the feature category is a descriptive feature, step 203 of extracting feature keywords from the product description based on the feature category may include the following steps:

[0092] Identify feature categories;

[0093] When the feature category is identified as a descriptive feature, the product description is segmented and extracted to obtain a segmentation list;

[0094] Remove the words that are not related to the product in the word list to obtain the characteristic keywords.

[0095] In the embodiment of the present application, the word segmentation technology can be used to segment the product description, extract the word segmentation list: [key1, key2, key3, ..], and perform data cleaning at the same time to remove the word segmentation that is irrelevant to the product. For example, a feature description of a product is "200 yuan / year, affordable price for students", and the word segmentation technology is used to obtain a feature keyword list: ['00 yuan / year', 'student'], in which the product has one or more feature keywords.

[0096] When the feature category is identified as an enumeration feature, the enumeration value is extracted from the product description as a feature keyword.

[0097] In the embodiment of the present application, enumeration values ​​can be extracted as feature keywords to obtain a keyword list: [keyA, keyB, keyC, ...]. For example, if the product classification is divided into: financial management and fund, then the feature list is ['financial management', 'fund'].

[0098] It should be noted that each product has at most one feature value. When the feature value is empty, it means that the feature is not present.

[0099] When the feature category is identified as a range feature, all feature areas corresponding to the product description are summarized to obtain feature keywords.

[0100] In the embodiment of the present application, a product feature description may be a certain range. For range-type features, all range intervals are summarized to obtain key values. For example, a product pr oduct 1 is applicable to an age range of 20-60 years old, and a product product 2 is applicable to an age range of 1-18 years old. The product feature table obtained is [<1, [1, 18], (18, 20), [20, 60], > 60]. For this type of feature, there are two situations when the feature value is empty. One is that all ranges are satisfied, that is, it is not limited by the range and has all feature values; the other value is empty, which means that all ranges are not satisfied. In the process of feature keyword extraction, it is necessary to combine the actual product recommendation scenario.

[0101] In an optional embodiment, the category-feature correspondence between the feature category and the feature keyword may be a category-feature list.

[0102] Continuing with the previous example, the feature keywords corresponding to each feature category in Table 1 are summarized to obtain a category feature list, as shown in Table 2:

[0103]

[0104] Table 2

[0105] The embodiment of the present application identifies feature categories and extracts feature keywords from product descriptions based on features of different categories. This can effectively split a long description language for a product into multiple feature keywords. Subsequent generalization processing based on the feature keywords can restore a description of the relevant product with a wider range.

[0106] Step S204 , generalizing at least part of the feature keywords to obtain generalized feature keywords, and updating the category-feature correspondence based on the generalized feature keywords.

[0107] Among them, generalization processing mainly refers to the generalization of the meaning of each feature keyword (for range features, since they represent a certain area, they are usually not generalized), and similar feature keywords with similar meanings to the feature keywords are included, so as to be applicable to more users' questions. For example, after generalization processing, "affordable price" can get results such as "affordable price", "low price" and "cheap price".

[0108] In one embodiment, step S204 of generalizing the characteristic keywords may include the following method steps:

[0109] Get the preset generalization threshold parameters.

[0110] Generalization processing is performed on at least part of the feature keywords based on the generalization threshold parameter.

[0111] A range value threshold is set to control the number of generalized words generated. Assuming the generalization threshold is set to 3, each feature keyword generates 3 generalized words, as shown in Table 3 below:

[0112]

[0113]

[0114] Table 3

[0115] The embodiment of the present application generalizes the meaning of at least some feature keywords based on a generalization threshold parameter to generalize the keywords, which can enhance the verification effect and simulate the diversity of user questions, which is beneficial to enhancing the recommendation quality of the product recommendation model obtained based on this test set test and improving the recommendation effect.

[0116] Step S205: Based on the product category correspondence and the updated category feature correspondence, a product feature relationship matrix of related products and feature keywords is generated.

[0117] In an optional embodiment, step S205 may include the following method steps to generate a product feature relationship matrix based on the product category correspondence relationship and the category feature correspondence relationship:

[0118] Based on the product category correspondence, at least one feature category corresponding to each product is extracted.

[0119] Exemplarily, as shown in Table 1, “product 1” corresponds to three feature categories, namely “feature 1”, “feature 2” and “feature 3”.

[0120] Based on the updated feature category correspondence, at least one generalized feature keyword corresponding to each feature category is extracted.

[0121] There are five generalized feature keywords: key1", "key2", "key3", "key4" and "key5".

[0122] Based on the feature categories, a product feature relationship matrix is ​​constructed between each generalized feature keyword and a single feature corresponding to at least one product.

[0123] For example, as shown in Table 4, "key1" corresponds to "product 1" and "key2" corresponds to "product 2" and "product 3".

[0124] The product feature relationship matrix of a single feature is used as the product feature relationship matrix.

[0125]

[0126] Table 4

[0127] In Table 4, "0" means that the characteristic keyword of each row does not correspond to one or more products listed in each column, and "1" means that the characteristic keyword of each row corresponds to one or more products listed in each column. For example, the characteristic keyword "key1" corresponds to "product1".

[0128] In the embodiment of the present application, based on the feature category, a corresponding relationship between each generalized feature keyword and at least one product is established, thereby forming a single-feature product feature relationship matrix. In the above single-feature product feature relationship matrix, each generalized feature keyword may correspond to one product or may correspond to different products.

[0129] The embodiment of the present application constructs a single-feature product feature relationship matrix, and then restores the user's real question based on the single-feature product feature relationship matrix, which is beneficial to enhancing the recommendation quality of the product recommendation model obtained based on this test set test and improving the recommendation effect.

[0130] like Figure 3 As shown, Figure 3 For 3 Figure 2 A flowchart of a specific implementation of step S205 in FIG.

[0131] In an optional embodiment, step S205 may include the following method steps: generating a product feature relationship matrix of related products and feature keywords based on the product category correspondence and the category feature correspondence:

[0132] Step S2052: Generate a single-feature product feature relationship matrix based on the product category correspondence and the category feature correspondence.

[0133] Step S2054, obtain the quantity parameters of the preset feature combination.

[0134] Step S2056, combining feature keywords based on quantity parameters to obtain multiple feature keywords.

[0135] For example, the Cartesian product algorithm can be used to automatically combine features to obtain multi-feature keywords, and then a test set can be generated based on the multi-feature keywords to strengthen the verification of the product recommendation model.

[0136] Specifically, a parameter r can be specified as the number of feature combinations, and the parameter r can be randomly set according to actual conditions. For example, in feature classification, a descriptive feature can have multiple feature keywords at the same time, and different feature keywords under this feature category can also be combined.

[0137] Step S2058, based on the multi-feature keywords, convert the single-feature product feature relationship matrix into a multi-feature product feature relationship matrix.

[0138] For example, r=2 is set, and the feature keywords are combined in pairs to generate a product multi-feature relationship matrix (for example, only the combination of key1 and keyA and other feature keywords is displayed), as shown in Table 5:

[0139]

[0140]

[0141] Table 5

[0142] Step 2060, combining the single-feature product feature relationship matrix and the multi-feature product feature relationship matrix to obtain a product feature relationship matrix.

[0143] The embodiment of the present application generates a multi-feature product feature relationship matrix based on a multi-feature combination and combines it with a single-feature product feature relationship matrix, so as to further expand the coverage of the test set, improve the diversity of test cases, and better restore the user's real questions, which is conducive to further enhancing the recommendation quality of the product recommendation model obtained based on this test set test and improving the recommendation effect.

[0144] Step 206 generates a test set based on the product feature relationship matrix in combination with preset rules.

[0145] In the embodiment of the present application, a test set generation template can be formulated in combination with preset rules (for example, adding subject, predicate, object, etc.), sentences can be generated based on feature keywords and their generalized feature keywords, real user questions can be simulated, and single-feature test sets can be automatically produced.

[0146] The embodiment of the present application divides the product description into feature categories, extracts feature keywords from the product description based on the feature categories, and then generalizes the feature keywords to obtain a product feature relationship matrix between the relevant products and the generalized feature keywords. Based on the relationship matrix, a test set is automatically generated in combination with preset rules to reduce labor costs. In addition, generating a test set based on the product feature relationship matrix of the generalized feature keywords can expand the coverage of the test set and improve the diversity of test cases, which is conducive to enhancing the recommendation quality of the product recommendation model obtained based on this test set test and improving the recommendation effect.

[0147] In an optional embodiment, after generating a test set based on the product feature relationship matrix in step 206 in combination with preset rules, the method for generating a product recommendation test set in the embodiment of the present application may further include the following steps:

[0148] Get the current test sample in the test set.

[0149] The current test sample is used as the input of the product recommendation model to output the current recommended product.

[0150] The product feature relationship matrix is ​​traversed to determine whether the currently recommended product satisfies the product feature relationship matrix.

[0151] If not satisfied, mark the current test.

[0152] In the embodiment of the present application, the product feature relationship matrix is ​​traversed to check whether the currently recommended product satisfies the product feature correspondence relationship in Table 4 and / or Table 5. If it does not match, it is marked. After the test is completed, the test results can be manually analyzed and improved. For example: if the analysis shows that there may be problems with the product recommendation model, the training samples can be further enriched to optimize the product recommendation model parameters; or if there are problems with the test set itself, the test set can be improved.

[0153] The embodiment of the present application divides the product description into feature categories, extracts feature keywords from the product description based on the feature categories, and then generalizes the feature keywords to obtain a product feature relationship matrix between the relevant products and the generalized feature keywords. Based on the relationship matrix, a test set is automatically generated in combination with preset rules to reduce labor costs. In addition, generating a test set based on the product feature relationship matrix of the generalized feature keywords can expand the coverage of the test set and improve the diversity of test cases. Using this test set to test the product recommendation model is beneficial to enhancing the recommendation quality of the product recommendation model obtained based on this test set and improving the recommendation effect.

[0154] In an optional embodiment, in step 304, if the condition is not satisfied, after marking the current test, the method for generating a product recommendation test set in the embodiment of the present application may further include the following steps:

[0155] Based on the marked current test, the rules of the generalization process are updated.

[0156] In the embodiment of the present application, the rules of generalization processing can be improved based on the analysis results. For example, if the threshold parameters preset for generalization are too few, more keywords with similar meanings can be included in the feature keywords by increasing the threshold parameters.

[0157] Repeat the generalization processing of at least part of the feature keywords with the updated generalization processing rules to obtain generalized feature keywords; update the category-feature correspondence based on the generalized feature keywords; regenerate a new product feature relationship matrix based on the product-category correspondence and the updated category-feature correspondence; and generate a test set based on the product feature relationship matrix in combination with preset rules to obtain an updated test set.

[0158] The embodiment of the present application updates the generalization processing rules and re-generalizes at least part of the feature keywords with the updated generalization processing rules, so that the test set is more suitable for testing the product recommendation model, thereby better improving the final recommendation effect.

[0159] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0160] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0161] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0162] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0163] Further references Figure 4 , as a response to the above Figure 2The present application provides an embodiment of a test set generation device for product recommendation, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0164] like Figure 4 As shown, the product recommendation test set generation device 400 of the embodiment of the present application includes: a description acquisition module 401, a category classification module 402, a feature extraction module 403, a generalization processing module 404, a matrix generation module 405 and a sample generation module 406. Among them:

[0165] Description acquisition module 401, used to acquire product description of the product;

[0166] A category classification module 402 is used to classify the feature categories to which the product description belongs, and generate a product category correspondence relationship between the product description and the feature category;

[0167] A feature extraction module 403 is used to extract feature keywords from the product description based on feature categories and generate a category-feature correspondence relationship between feature categories and feature keywords;

[0168] A generalization processing module 404 is used to perform generalization processing on at least part of the feature keywords to obtain generalized feature keywords, and update the category feature correspondence based on the generalized feature keywords;

[0169] A matrix generation module 405, for generating a product feature relationship matrix of related products and feature keywords based on the product category correspondence relationship and the updated category feature correspondence relationship;

[0170] The sample generation module 406 is used to generate a test set based on the product feature relationship matrix in combination with preset rules.

[0171] The embodiment of the present application divides the product description into feature categories, extracts feature keywords from the product description based on the feature categories, and then generalizes the feature keywords to obtain a product feature relationship matrix between the relevant products and the generalized feature keywords. Based on the relationship matrix, a test set is automatically generated in combination with preset rules to reduce labor costs. In addition, generating a test set based on the product feature relationship matrix of the generalized feature keywords can expand the coverage of the test set and improve the diversity of test cases, which is conducive to enhancing the recommendation quality of the product recommendation model obtained based on this test set test and improving the recommendation effect.

[0172] In some optional implementations of this embodiment, the generalization processing module 404 includes:

[0173] A parameter acquisition submodule is used to obtain preset generalization threshold parameters;

[0174] The generalization processing submodule is used to generalize the feature keywords based on the generalization threshold parameter.

[0175] The embodiment of the present application generalizes keywords through generalization processing, which can enhance the verification effect and simulate the diversity of user questions, which is beneficial to enhancing the recommendation quality of the product recommendation model obtained based on this test set test and improving the recommendation effect.

[0176] In some optional implementations of this embodiment, the matrix generation module 405 includes:

[0177] A first generating submodule, used to generate a single-feature product feature relationship matrix based on the product category correspondence relationship and the updated category feature correspondence relationship;

[0178] The parameter acquisition submodule is used to obtain the quantity parameters of the preset feature combination;

[0179] The feature combination submodule is used to combine feature keywords based on quantity parameters to obtain multi-feature keywords;

[0180] A matrix conversion submodule, used to convert a single-feature product feature relationship matrix into a multi-feature product feature relationship matrix based on multi-feature keywords;

[0181] The matrix generation submodule is used to combine the single-feature product feature relationship matrix and the multi-feature product feature relationship matrix to obtain the product feature relationship matrix.

[0182] The embodiment of the present application generates a multi-feature product feature relationship matrix based on a multi-feature combination and combines it with a single-feature product feature relationship matrix, so as to further expand the coverage of the test set, improve the diversity of test cases, and better restore the user's real questions, which is conducive to further enhancing the recommendation quality of the product recommendation model obtained based on this test set test and improving the recommendation effect.

[0183] In some optional implementations of this embodiment, the matrix generation module 405 includes:

[0184] A category extraction submodule, used for extracting at least one feature category corresponding to each of the products based on the product category correspondence;

[0185] A feature extraction submodule, configured to extract at least one generalized feature keyword corresponding to each feature category based on the updated feature category correspondence relationship;

[0186] A matrix construction submodule, for constructing a product feature relationship matrix between each of the generalized feature keywords and the single feature corresponding to at least one of the products based on the feature categories;

[0187] The matrix determination submodule is used to use the single-feature product feature relationship matrix as the product feature relationship matrix.

[0188] The embodiment of the present application generates a single-feature product feature relationship matrix based on single feature combinations, combines it with the single-feature product feature relationship matrix, and then restores the user's real question based on the single-feature product feature relationship matrix, which is beneficial to enhancing the recommendation quality of the product recommendation model obtained based on this test set test and improving the recommendation effect.

[0189] In some optional implementations of this embodiment, the feature extraction module 403 includes:

[0190] Category identification submodule, used to identify feature categories;

[0191] The word segmentation extraction submodule is used to extract the word segmentation of the product description when the feature category is identified as a descriptive feature, and obtain a word segmentation list; remove the word segmentation in the word segmentation list that is not related to the product to obtain the feature keywords;

[0192] The feature enumeration submodule is used to extract the enumeration value from the product description as the feature keyword when the feature category is identified as an enumeration feature;

[0193] The region extraction submodule is used to summarize all feature regions corresponding to the product description to obtain feature keywords when the feature category is identified as a range feature.

[0194] The embodiment of the present application identifies feature categories and extracts feature keywords from product descriptions based on features of different categories. This can effectively split a long description language for a product into multiple feature keywords. Subsequent generalization processing based on the feature keywords can restore a description of the relevant product with a wider range.

[0195] In some optional implementations of this embodiment, the product recommendation test set generating device 400 may further include:

[0196] A sample acquisition module is used to obtain the current test sample in the test set;

[0197] The product recommendation module is used to use the current test sample as the input of the product recommendation model and output the current recommended product;

[0198] The relationship judgment module is used to traverse the product feature relationship matrix and judge whether the current recommended product satisfies the product feature relationship matrix;

[0199] The test marking module is used to mark the current test if it is not satisfied.

[0200] The embodiment of the present application divides the product description into feature categories, extracts feature keywords from the product description based on the feature categories, and then generalizes the feature keywords to obtain a product feature relationship matrix between the relevant products and the generalized feature keywords. Based on the relationship matrix, a test set is automatically generated in combination with preset rules to reduce labor costs. In addition, generating a test set based on the product feature relationship matrix of the generalized feature keywords can expand the coverage of the test set and improve the diversity of test cases. Using this test set to test the product recommendation model is beneficial to enhancing the recommendation quality of the product recommendation model obtained based on this test set and improving the recommendation effect.

[0201] In some optional implementations of this embodiment, the product recommendation test set generating device 400 may further include:

[0202] A generalization update module, used for updating the rules of generalization processing based on the marked current test;

[0203] The step repetition module is used to repeatedly perform the generalization processing of at least part of the feature keywords with the updated generalization processing rules to obtain generalized feature keywords; update the category-feature correspondence based on the generalized feature keywords; regenerate a new product-feature relationship matrix based on the product-category correspondence and the updated category-feature correspondence; and generate a test set based on the product-feature relationship matrix in combination with preset rules to obtain an updated test set.

[0204] The embodiment of the present application updates the generalization processing rules and re-generalizes at least part of the feature keywords with the updated generalization processing rules, so that the test set is more suitable for testing the product recommendation model, thereby better improving the final recommendation effect.

[0205] To solve the above technical problems, the present application also provides a computer device. Figure 5 , Figure 5 This is a basic structural block diagram of the computer device in this embodiment.

[0206] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 6 having components 61-63, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, etc.

[0207] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.

[0208] The memory 61 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 61 can be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 61 can also be an external storage device of the computer device 6, such as a plug-in hard disk equipped on the computer device 6, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 61 can also include both the internal storage unit of the computer device 6 and its external storage device. In this embodiment, the memory 61 is generally used to store the operating system and various application software installed on the computer device 6, such as computer-readable instructions of the test set generation method for product recommendation, etc. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or are to be output.

[0209] In some embodiments, the processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run computer-readable instructions stored in the memory 61 or process data, such as computer-readable instructions for running a test set generation method for product recommendation.

[0210] The network interface 63 may include a wireless network interface or a wired network interface, and the network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.

[0211] The embodiment of the present application divides the product description into feature categories, extracts feature keywords from the product description based on the feature categories, and then generalizes the feature keywords to obtain a product feature relationship matrix between the relevant products and the generalized feature keywords. Based on the relationship matrix, a test set is automatically generated in combination with preset rules to reduce labor costs. In addition, generating a test set based on the product feature relationship matrix of the generalized feature keywords can expand the coverage of the test set and improve the diversity of test cases, which is conducive to enhancing the recommendation quality of the product recommendation model obtained based on this test set test and improving the recommendation effect.

[0212] The present application also provides another implementation, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the product recommendation test set generation method as described above.

[0213] The embodiment of the present application divides the product description into feature categories, extracts feature keywords from the product description based on the feature categories, and then generalizes the feature keywords to obtain a product feature relationship matrix between the relevant products and the generalized feature keywords. Based on the relationship matrix, a test set is automatically generated in combination with preset rules to reduce labor costs. In addition, generating a test set based on the product feature relationship matrix of the generalized feature keywords can expand the coverage of the test set and improve the diversity of test cases, which is conducive to enhancing the recommendation quality of the product recommendation model obtained based on this test set test and improving the recommendation effect.

[0214] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of each embodiment of the present application.

[0215] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A method for generating a test set for product recommendation, characterized in that: The steps include: Get the product description of the product; Classify the feature categories to which the product description belongs, and generate a product category correspondence relationship between the product description and the feature category; Based on the feature category, extract feature keywords from the product description, and generate a category feature correspondence relationship between the feature category and the feature keyword; Generalizing at least part of the feature keywords to obtain generalized feature keywords, and updating the category-feature correspondence based on the generalized feature keywords; Generate a product feature relationship matrix based on the product category correspondence and the updated category feature correspondence; In combination with preset rules, a test set is generated based on the product feature relationship matrix.

2. The method for generating a test set for product recommendation according to claim 1, characterized in that: The generalization process of the characteristic keywords comprises the following steps: Get the preset generalization threshold parameters; The feature keywords are generalized based on the generalization threshold parameter.

3. The method for generating a product recommendation test set according to claim 1 or 2, characterized in that: The generating of the product feature relationship matrix based on the product category correspondence and the updated category feature correspondence comprises the following steps: Generate a single-feature product feature relationship matrix based on the product category correspondence and the updated category feature correspondence; Get the quantity parameters of the preset feature combination; Combining feature keywords based on the quantity parameters to obtain multiple feature keywords; Based on the multi-feature keywords, converting a single-feature product feature relationship matrix into a multi-feature product feature relationship matrix; The product feature relationship matrix is ​​obtained by combining the single-feature product feature relationship matrix and the multi-feature product feature relationship matrix.

4. The method for generating a test set for product recommendation according to claim 1 or 2, characterized in that: The generating of the product feature relationship matrix based on the product category correspondence and the updated category feature correspondence comprises the following steps: Based on the product category correspondence, extract at least one feature category corresponding to each of the products; Based on the updated feature category correspondence, extracting at least one generalized feature keyword corresponding to each feature category; Based on the feature categories, construct a product feature relationship matrix between each of the generalized feature keywords and the single feature corresponding to at least one of the products; The product feature relationship matrix of the single feature is used as the product feature relationship matrix.

5. The method for generating a test set for product recommendation according to claim 1 or 2, characterized in that: The step of extracting feature keywords from the product description based on the feature category comprises the following steps: identifying the feature category; When the feature category is identified as a descriptive feature, segmentation extraction is performed on the product description to obtain a segmentation list; segmentations irrelevant to the product in the segmentation list are removed to obtain feature keywords; When the feature category is identified as an enumeration feature, extracting an enumeration value from the product description as the feature keyword; When it is identified that the feature category is a range feature, all feature regions corresponding to the product description are summarized to obtain the feature keyword.

6. The method for generating a test set for product recommendation according to claim 1, characterized in that: After the step of generating a test set based on the product feature relationship matrix in combination with preset rules, the method further includes: Obtaining a current test sample in the test set; Taking the current test sample as the input of the product recommendation model, outputting the current recommended product; Traversing the product feature relationship matrix to determine whether the currently recommended product satisfies the product feature relationship matrix; If not satisfied, mark the current test.

7. The method for generating a test set for product recommendation according to claim 1, characterized in that: After marking the current test, the method further comprises the following steps: Based on the marked current test, updating the rule of generalization processing; Repeat the generalization processing of at least part of the feature keywords with the updated generalization processing rules to obtain generalized feature keywords; update the category feature correspondence based on the generalized feature keywords, and regenerate a new product feature relationship matrix to obtain an updated test set.

8. A test set generation device for product recommendation, characterized in that: include: Description acquisition module, used to obtain product description of the product; Category classification module, used to classify the feature categories to which the product description belongs; generating a product category correspondence between the product description and the feature category; A feature extraction module, used to extract feature keywords from the product description based on the feature category; generate a category feature correspondence relationship between the feature category and the feature keyword; A generalization processing module, used to perform generalization processing on at least part of the feature keywords to obtain generalized feature keywords, and update the category feature correspondence based on the generalized feature keywords; A matrix generation module, used for generating a product feature relationship matrix about the product and the updated feature keywords based on the product category correspondence relationship and the category feature correspondence relationship; The sample generation module is used to generate a test set based on the product feature relationship matrix in combination with preset rules.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the method for generating a test set for product recommendation according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the method for generating a test set for product recommendation according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Product recommendation method and device, equipment and computer readable storage medium

    CN113888265A

  • Test case recommendation method based on pre-training model, electronic equipment and storage medium

    CN117093501A

  • Product recommendation method and device based on artificial intelligence, equipment and storage medium

    CN117853247A

  • Product recommendation strategy generation method and system based on big data and medium

    CN117951388A

  • System and methods for machine learning training data selection

    US20210201208A1