Commodity comparison method and device based on large model, electronic equipment and medium
By determining the target type and the dynamic sorting of the target type and the comparison attributes in the product comparison system, combined with the output of large models of the product, the problem of unreasonable attribute sorting in existing technologies has been solved, and the user experience is improved.
Patent Information
- Application Number
- CN202411441460.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-10-15
AI Technical Summary
In the existing product comparison plan, the attribute arrangement order is unreasonable, resulting in poor user experience of the product comparison function.
By responding to the product comparison information input by the user, the target category is determined, and multiple attributes to be compared that match the product comparison information and their sorting information are determined based on the target category. Input these attributes and product information into the product comparison model to generate product comparison results.
It achieves dynamic sorting of product comparison results, improves the user experience, and enables users to more conveniently search and compare product attributes.
Smart Images

Figure CN119338554A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of artificial intelligence, intelligent customer service, intelligent robots, deep learning, and large model technology, and more specifically, to a commodity comparison method, device, electronic device, and medium based on a large model. Background Art
[0002] With the rapid development of artificial intelligence, intelligent customer service, intelligent robots, and deep learning, users can use the product comparison function before shopping to compare the similarities and differences between the products they want to buy. However, most of the product comparisons on existing e-commerce platforms compare the information on all attributes of the products in a fixed order from basic attributes to additional attributes, especially the product comparisons implemented with the Large Language Model (LLM).
[0003] In the process of realizing the concept of the present disclosure, the inventors found that there are at least the following problems in the related technology: in the product comparison scenario, different types of attributes have different importance and will also change over time. Therefore, the arrangement order of attributes in the existing product comparison scheme is unreasonable, resulting in a poor user experience of the product comparison function. Summary of the invention
[0004] In view of this, the present disclosure provides a commodity comparison method, device, electronic device and medium based on a large model.
[0005] One aspect of the present disclosure provides a commodity comparison method based on a macro model, including: in response to receiving commodity comparison information input by a user, determining a target category to which a first commodity and a second commodity in the commodity comparison information belong; determining, according to the target category, a plurality of attributes to be compared that match the commodity comparison information, and sorting information between the plurality of attributes to be compared, wherein the attributes to be compared are used to describe the first commodity and the second commodity; inputting the plurality of attributes to be compared, first commodity information of the first commodity, and second commodity information of the second commodity into a commodity comparison macro model to generate a first commodity comparison sub-result; and generating a commodity comparison result according to the sorting information and the first commodity comparison sub-result.
[0006] According to an embodiment of the present disclosure, multiple attributes to be compared that match the product comparison information and ranking information between the multiple attributes to be compared are determined according to the target category, including: determining multiple original attributes of the target category and initial ranking information between the multiple original attributes according to the target category; screening out multiple attributes to be compared from the multiple original attributes according to the attention information of the original attributes; and determining the ranking information between the multiple attributes to be compared from the initial ranking information.
[0007] According to an embodiment of the present disclosure, multiple original attributes of the target type and initial sorting information between the multiple original attributes are determined according to the target type, including: according to the target type, multiple original attributes and initial sorting information are queried from a database; in response to not finding the initial sorting information, the attention information of each original attribute is updated; and the initial sorting information is determined according to the updated attention information.
[0008] According to an embodiment of the present disclosure, updating the attention information of each original attribute includes: for each original attribute, obtaining a first parameter and a second parameter of the original attribute, wherein the first parameter includes a user portrait parameter characterizing the elimination of user bias and a position parameter for eliminating attribute display bias; and inputting the first parameter and the second parameter into an attribute sorting model to obtain output attention information.
[0009] According to an embodiment of the present disclosure, a commodity comparison big model is used to perform a commodity comparison task, and a first commodity comparison sub-result includes commodity similarities and differences information and commodity recommendation information; a plurality of attributes to be compared, first commodity information of a first commodity, and second commodity information of a second commodity are input into the commodity comparison big model to generate a first commodity comparison sub-result, including: a plurality of attributes to be compared, first commodity information, and second commodity information are input into the commodity comparison big model, so that the commodity comparison big model performs the commodity comparison task and generates commodity similarities and differences information and commodity recommendation information.
[0010] According to an embodiment of the present disclosure, the commodity comparison large model is also used to perform attribute interpretation tasks, and the first commodity comparison sub-result also includes: attribute interpretation information; the method also includes: inputting multiple attributes to be compared into the commodity comparison large model, so that the commodity comparison large model performs the attribute interpretation task, interprets each attribute to be compared, and generates attribute interpretation information.
[0011] According to an embodiment of the present disclosure, a product comparison result is generated based on the sorting information and the first product comparison sub-result, including: generating a second product comparison sub-result arranged in order of a plurality of attributes to be compared based on the sorting information; and combining the first product comparison sub-result and the second product comparison sub-result into a product comparison result.
[0012] According to an embodiment of the present disclosure, a commodity comparison large model is trained in the following manner: obtaining negative sample question information and a first positive sample pair similar to the negative sample question information, wherein the first positive sample pair includes the first positive sample question information and the first positive sample answer information output by the first initial commodity comparison large model for the first positive sample question information; inputting the negative sample question information and the first positive sample answer information pair into a sample generation large model to generate a training sample pair; using the training sample pair and the first positive sample pair to train the first initial commodity comparison large model to obtain a second initial commodity comparison large model; using the second positive sample pair and the second negative sample pair to perform preference optimization on the second initial commodity comparison large model to obtain a trained commodity comparison large model, wherein the second positive sample pair and the second negative sample pair are determined based on the second initial commodity comparison large model.
[0013] Another aspect of the present disclosure provides a product comparison device based on a large model, including: a first determination module, used to determine the target category to which the first product and the second product in the product comparison information belong in response to receiving product comparison information input by a user; a second determination module, used to determine, according to the target category, a plurality of attributes to be compared that match the product comparison information, and sorting information between the plurality of attributes to be compared, wherein the attributes to be compared are used to describe the first product and the second product; a first generation module, used to input the plurality of attributes to be compared, first product information of the first product, and second product information of the second product into the product comparison large model, to generate a first product comparison sub-result; and a second generation module, used to generate a product comparison result according to the sorting information and the first product comparison sub-result.
[0014] Another aspect of the present disclosure provides an electronic device, including: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above method.
[0015] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.
[0016] Another aspect of the present disclosure provides a computer program product, which includes computer executable instructions, and the instructions are used to implement the above method when executed.
[0017] The embodiment of the present disclosure determines the target category to which the first and second commodities in the commodity comparison information belong in response to commodity comparison information input by the user; determines multiple attributes to be compared that match the commodity comparison information and the sorting information between the multiple attributes to be compared according to the target category; inputs the multiple attributes to be compared, the first commodity information, and the second commodity information into the commodity comparison macro model to generate a first commodity comparison sub-result; generates a commodity comparison result according to the sorting information and the first commodity comparison sub-result. Compared with the existing commodity comparison with fixed sorting, the embodiment of the present disclosure adds multiple attributes to be compared that match the commodity comparison information and their sorting information, and combines the sorting information with the output of the commodity comparison macro model. Therefore, the attributes to be compared in the final output commodity comparison result have a dynamic sorting, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0019] Figure 1 An exemplary system architecture to which the large model-based commodity comparison method and apparatus of the present disclosure can be applied is schematically shown.
[0020] Figure 2 The flowchart of the commodity comparison method based on the large model according to the embodiment of the present disclosure is schematically shown.
[0021] Figure 3 The flowchart of the method for determining the attributes to be compared and the sorting information of the attributes to be compared according to the embodiment of the present disclosure is schematically shown.
[0022] Figure 4 The following schematically shows an application scenario diagram of the product comparison function according to an embodiment of the present disclosure.
[0023] Figure 5 A schematic diagram schematically shows a scenario of generating product comparison results based on product comparison information input by a user according to an embodiment of the present disclosure.
[0024] Figure 6 A scene diagram schematically shows a training commodity comparison model and implementing a commodity comparison function based on the commodity comparison model according to an embodiment of the present disclosure;
[0025] Figure 7 The data flow diagram of the commodity comparison function according to the embodiment of the present disclosure is schematically shown;
[0026] Figure 8 A block diagram schematically shows a commodity comparison device based on a large model according to an embodiment of the present disclosure; and
[0027] Fig. 9 A block diagram of an electronic device suitable for implementing a commodity comparison method based on a large model according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0028] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0029] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0030] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0031] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0032] In the embodiments of the present disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information) are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security, and national security.
[0033] In the embodiments of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information. For example, the user's authorization or consent is obtained before obtaining the user's behavior data.
[0034] Most of the existing product comparison solutions are fixed and static sorting, which easily leads to the problem that attributes that are useless or uncritical to users are ranked at the front, while key attributes are ranked at the back. For example, in the field of mobile phones, user A mainly wants to buy a mobile phone with good battery life and mainly pays attention to the "battery capacity" attribute, but fixed and static sorting generally does not rank the "battery capacity" attribute at the front. As a result, the existing solutions require users to spend a high time cost to search for a certain attribute, which is inconvenient for users to search and has a bad experience.
[0035] In addition, the importance of attributes varies in different categories, and users' concern for product attributes varies, and will change with time and market changes. For example, for a newly launched mobile phone, the attribute A of the mobile phone has been greatly improved, so when users use the product comparison function, their concern for attribute A will increase, and the importance of attribute A will also increase. Therefore, the existing attribute sorting based on a fixed order is difficult to dynamically reflect the changes in attribute importance and user concern.
[0036] To this end, an embodiment of the present disclosure provides a product comparison method based on a large model, including: in response to receiving product comparison information input by a user, determining the target category to which the first product and the second product in the product comparison information belong; according to the target category, determining multiple attributes to be compared that match the product comparison information, and sorting information between the multiple attributes to be compared; inputting the multiple attributes to be compared, the first product information of the first product, and the second product information of the second product into the product comparison large model to generate a first product comparison sub-result; and generating a product comparison result according to the sorting information and the first product comparison sub-result.
[0037] Figure 1 An exemplary system architecture to which the large model-based commodity comparison method and apparatus of the present disclosure can be applied is schematically shown.
[0038] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0039] The user may use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, query applications, instant messaging tools, email clients, and / or social platform software, etc. (only for example).
[0040] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0041] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results to the terminal device.
[0042] It should be noted that the commodity comparison method based on the big model provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the commodity comparison device based on the big model provided in the embodiment of the present disclosure can generally be set in the server 105. The commodity comparison method based on the big model provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105; or, it can also be executed by the first terminal device 101, the second terminal device 102 or the third terminal device 103. Accordingly, the commodity comparison device based on the big model provided in the embodiment of the present disclosure can also be set in the above-mentioned server or server cluster; or, it can be set in the first terminal device 101, the second terminal device 102 or the third terminal device 103.
[0043] For example, the user can use an application of an e-commerce platform in the first terminal device 101, the second terminal device 102 or the third terminal device 103, input the product comparison information through the application, and the server 105, such as the backend server of the e-commerce platform, executes the above-mentioned product comparison method based on the large model and generates a product comparison result. Afterwards, the backend server of the e-commerce platform sends the product comparison result to the first terminal device 101, the second terminal device 102 or the third terminal device 103, and displays it in its application.
[0044] It should be understood that Figure 1The 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.
[0045] Figure 2 The flowchart of the commodity comparison method based on the large model according to the embodiment of the present disclosure is schematically shown.
[0046] like Figure 2 As shown, the method includes operations S210 to S240.
[0047] In operation S210 , in response to receiving product comparison information input by a user, a target category to which a first product and a second product in the product comparison information belong is determined.
[0048] According to an embodiment of the present disclosure, the product comparison information includes a first product and a second product to be compared. The first product and the second product in the product comparison information may be in the form of product titles, product links, etc. The product comparison information may be input by a user through a single input operation, or may be input through multiple sessions through a dialog window.
[0049] For example, a user can input product comparison information through a single input operation: "Please compare mobile phone A and mobile phone B", in which case the first product and the second product can be represented by the product titles "Product A" and "Product B". Alternatively, a user can input "Link 1", "Link 2", and "Please help me compare the products of the above two links" through multiple input operations, in which case the product comparison information is the content of the above three inputs, and the first product and the second product are represented by product links.
[0050] The target category is the same category to which the first commodity and the second commodity belong, such as electronic commodities, daily necessities, clothing, etc. In addition, commodity categories generally include multiple levels, for example, electronic commodities include computers, mobile phones, watches, etc., and computers include desktop computers, laptop computers, etc. In an exemplary embodiment, a level can be pre-set, and the same category to which the first commodity and the second commodity belong is used as the target category.
[0051] In operation S220 , a plurality of attributes to be compared that match the product comparison information and ranking information between the plurality of attributes to be compared are determined according to the target category.
[0052] According to the embodiments of the present disclosure, each category generally includes multiple attributes for describing the product, and the attributes under each category may be different. For example, for mobile phones, multiple attributes include memory, color, charging power, screen size, etc.; for clothing, multiple attributes include texture, size, color, etc.
[0053] In an exemplary embodiment, when comparing commodities, all attributes under the target category can be used as attributes to be compared. Similar to the original attributes, the attributes to be compared are used to describe the first commodity and the second commodity.
[0054] In another exemplary embodiment, multiple attributes to be compared may be selected from multiple attributes under the target category for subsequent product comparison. For the currently input product comparison information, multiple attributes to be compared that match the product comparison information may be selected from multiple attributes under the target category.
[0055] For example, the user behavior data of the target category within a preset time period can be used for screening. For example, the number of clicks on certain attributes by users within a preset time period, the attributes mentioned in the user comments after ordering the first product and / or the second product, etc. The user behavior data involved in the embodiments of the present disclosure includes the user's browsing, clicking, commenting and other operations on the web page.
[0056] According to an embodiment of the present disclosure, the sorting information can be understood as the display order of multiple attributes to be compared when displaying the product comparison results to the user. The sorting information can reflect the importance of multiple objects to be compared, such as, the higher the ranking, the more important the attribute to be compared. In an illustrative embodiment, the sorting information between multiple attributes to be compared can be determined based on the number of clicks on the attribute, the total number of times the attribute is mentioned in the user's comments after placing an order for the first product and / or the second product.
[0057] In operation S230, a plurality of attributes to be compared, first product information of the first product, and second product information of the second product are input into a product comparison macro model to generate a first product comparison sub-result.
[0058] According to an embodiment of the present disclosure, the first product information includes information of the first product, for example, it may include: product title, price, parameters under each attribute, etc. The second product information is similar to the first product information, and may also include product title, price, parameters under each attribute, etc. For example, for the material attribute, the parameters of clothing A and clothing B under this attribute may be cotton and polyester, respectively.
[0059] According to the embodiments of the present disclosure, a large commodity comparison model is constructed by utilizing the powerful analysis and summarization capabilities of the large model to implement the commodity comparison task. The large commodity comparison model can be one or more of a generative pre-trained encoding and decoding model (Generative Pre-Trained Transformer, GPT), a chat generative pre-trained encoding and decoding model (ChatGenerative Pre-Trained Transformer, ChatGPT), a general language model (General LanguageModel, GLM), etc., but is not limited thereto.
[0060] In operation S240, a product comparison result is generated according to the sorting information and the first product comparison sub-result.
[0061] According to an embodiment of the present disclosure, after obtaining the first product comparison sub-result output by the product comparison large model, the first product comparison sub-result is not used as the output displayed to the user, but the product comparison result combining the sorting information and the first product comparison result is used as the final output.
[0062] For example, the word order of the first product comparison sub-result may be adjusted using the sorting information. For example, the attribute with the highest sorting level may be adjusted to the highest position. Alternatively, a plurality of second product comparison sub-results in which the attributes to be compared are arranged in order may be generated according to the sorting information, and the product comparison result may be determined according to the first product comparison sub-result and the second product comparison sub-result.
[0063] The embodiment of the present disclosure determines the target category to which the first and second commodities in the commodity comparison information belong in response to commodity comparison information input by the user; determines multiple attributes to be compared that match the commodity comparison information and the sorting information between the multiple attributes to be compared according to the target category; inputs the multiple attributes to be compared, the first commodity information, and the second commodity information into the commodity comparison macro model to generate a first commodity comparison sub-result; generates a commodity comparison result according to the sorting information and the first commodity comparison sub-result. Compared with the existing commodity comparison with fixed sorting, the embodiment of the present disclosure adds multiple attributes to be compared that match the commodity comparison information and their sorting information, and combines the sorting information with the output of the commodity comparison macro model. Therefore, the attributes to be compared in the final output commodity comparison result have a dynamic sorting, thereby improving the user experience.
[0064] Figure 3 The flowchart of the method for determining the attributes to be compared and the sorting information of the attributes to be compared according to the embodiment of the present disclosure is schematically shown.
[0065] like Figure 3As shown, embodiment 300 includes operations S321 to S323, which can be used as a specific embodiment of operation S220.
[0066] S321, determining a plurality of original attributes of the target type and initial sorting information between the plurality of original attributes according to the target type.
[0067] S322, selecting a plurality of attributes to be compared from a plurality of original attributes according to the attention information of the original attributes.
[0068] S323: Determine the sorting information between the multiple attributes to be compared from the initial sorting information.
[0069] According to the embodiment of the present disclosure, the original attribute is the attribute under the category, and the multiple original data are all the attributes under the target category. Here, in order to distinguish the attributes before and after the screening, the original attribute and the attribute to be compared are distinguished.
[0070] In the field of e-commerce, categories and attributes under categories are usually relatively fixed and are stored in a database in advance. The initial sorting information between multiple original attributes can also be pre-calculated and stored in the database. Therefore, the embodiments of the present disclosure can obtain multiple original attributes and initial sorting information of the target category from a pre-stored address according to the identifier of the target category.
[0071] According to an embodiment of the present disclosure, the attention information of each original attribute can reflect the importance of the original attribute. The attention information can be represented by a numerical value, and the larger the numerical value, the higher the importance of the original attribute. Therefore, the importance of multiple attributes to be compared can also be reflected in the sorting information determined based on the attention information.
[0072] In an exemplary embodiment, the attention information may be calculated based on multiple dimensions of user behavior data to comprehensively evaluate the original attributes from multiple dimensions.
[0073] For example, multiple attributes to be compared whose attention information meets a predetermined condition can be screened out from multiple original attributes. The predetermined condition can be that the attention information is greater than a preset threshold, or k original attributes with higher attention information can be screened out from multiple original attributes by arranging the attention information from large to small, and the k original attributes with higher attention information are used as the attributes to be compared. Thus, after multiple attributes to be compared are screened out, sorting information between multiple attributes to be compared can be screened out from the initial sorting information between the multiple original attributes based on the attention information.
[0074] The embodiments of the present disclosure screen out multiple attributes to be compared from multiple original attributes based on the attention information of the original attributes, and screen out the sorting information between the multiple attributes to be compared from the initial sorting information. Multiple attributes to be compared and their sorting information that match the current product comparison information can be selectively screened out without fixedly displaying all the original attributes, so that users can see the attributes with higher attention when comparing the target categories, thereby improving the user experience.
[0075] According to an embodiment of the present disclosure, multiple original attributes of the target type and initial sorting information between the multiple original attributes are determined according to the target type, including: according to the target type, multiple original attributes and initial sorting information are queried from a database; in response to not finding the initial sorting information, the attention information of each original attribute is updated; and the initial sorting information is determined according to the updated attention information.
[0076] In this embodiment, the attention information of each original attribute under each category can be calculated in advance based on the user behavior data, and stored in a database, such as writing into a redis cache. Similarly, the initial sorting information of multiple original attributes under each category can also be calculated based on the attention information, and stored in a database. Thus, when using the product comparison service, the original sorting information and multiple original attributes of multiple original attributes under the target category can be queried online based on the target category.
[0077] If the initial ranking information is not found online, the attention information of each original attribute is updated, that is, the attention information is recalculated. For example, the attention information can be calculated based on the following information: attribute exposure (expo_pv), attribute click (click_pv), order (order), search and filter category attribute ranking (idx), etc., such as by weighted calculation, calculating the weighted average of the above numerical features as the attention information.
[0078] The initial sorting information is determined according to the updated attention information, that is, the multiple original attributes are sorted according to the updated attention information to obtain the initial sorting information. The initial sorting information may be a sequence of the multiple original attributes in a chain arrangement, for example.
[0079] The embodiments of the present disclosure write the attention information into a database in advance, so that when users use the product comparison function online, they can directly obtain the attention information instead of calculating the attention information, thereby reducing the amount of online resource calls and improving product comparison efficiency.
[0080] In an exemplary embodiment, the attention information of each original attribute may also be calculated by calling an offline deployed attribute ranking model, such as learning-to-rank.
[0081] Figure 4 The following schematically shows an application scenario diagram of the product comparison function according to an embodiment of the present disclosure.
[0082] like Figure 4 As shown, for the online service stage, the user can use the product comparison function on the e-commerce platform, such as inputting product comparison information 401, and the e-commerce platform generates a product comparison request based on the product comparison information 401, and reads the initial sorting information 402 from the redis cache based on the product comparison request. The part not shown in the figure also includes a query for multiple original attributes and attention information. Afterwards, the attribute query / filtering / stage is performed based on the attention information to obtain the sorting information. The attribute query can be understood as: querying the original attribute of a certain position in the initial sorting information based on the attention information; the attribute filtering / truncation can be understood as: filtering out a certain section from multiple initial sorting information or truncating the initial sorting information based on the attention information, and obtaining the sorting information of some original attributes, such as the sorting information between multiple attributes to be compared in this article. Finally, the product comparison result generated according to the sorting information and the first product sub-result is fed back to the user.
[0083] For the offline processing stage, the click behavior data of the page attributes can be searched and filtered based on operation S403, that is, the attributes of the product results are filtered through click operations when searching for a certain product in the user behavior data. Based on operation S404, the click behavior data is stored, such as offline caching to a Hive table. Based on operation S405, the daily level update, that is, the stored click behavior data is updated every day. For example, the stored click behavior data can be updated every day through a big data platform such as SparkSQL. Then, the attribute sorting model M1 is used to offline calculate the attention information of each original attribute under each category, and the multiple original attributes under each category are sorted based on the attention information to obtain the initial sorting information between the multiple original attributes under each category. Based on operation S406, the initial sorting information is stored.
[0084] It should be noted that in the embodiments of the present disclosure, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present disclosure, but it does not mean that the present disclosure has or will necessarily use the solution.
[0085] According to an embodiment of the present disclosure, updating the attention information of each original attribute includes: for each original attribute, obtaining a first parameter and a second parameter of the original attribute, wherein the first parameter includes a user portrait parameter characterizing the elimination of user bias and a position parameter for eliminating attribute display bias; and inputting the first parameter and the second parameter into an attribute sorting model to obtain output attention information.
[0086] When using the attribute ranking model to calculate the attention information, multiple types of features can be used as input to calculate the attention information in multiple dimensions, such as ID features, numerical features, and embedded features.
[0087] For example, the input of the attribute ranking model can be the following dimensions: product category (cid3), category name (cid3_name), product code (skuid), user profile (user_profile), search term (query), attribute ID (attr_id), attribute name (attr_name), attribute exposure (expo_pv), attribute click (click_pv), order (order), search and filter category attribute ranking (idx). Among them, cid3, skuid, attr_id are ID features; idx, expo_pv, click_pv, order are numerical features; cid3_name, user_profile, query are embedded features (embedding), which can be pre-generated by the text encoding and decoding model (sentence_transformer).
[0088] The ranking rank (idx) of the search and filter category attribute is the ranking rank of the attribute on the page when the user searches for a certain type of product; attribute exposure (expo_pv) is the number of times the attribute is displayed on the page when the user searches for a certain type of product; attribute click (click_pv) is the number of times the user clicks on the attribute to filter product results when searching for a certain type of product; and order (order) is the number of times the user clicks on the attribute when searching for a certain type of product and finally places an order.
[0089] The actual parameters of the above 11 dimensional features can be determined based on user behavior data, such as product browsing, clicking, and order history.
[0090] In actual application, there will be position deviation in the ranking of attributes (idx) in search and screening categories, such as attributes ranked in the front are more likely to be clicked by users; user profiles (user_profile) will be affected by user personalization. Therefore, during training, the actual data of the above dimensions are used to train the initial attribute ranking model, but during actual prediction, the predetermined user profile parameters are used to replace the actual user profile to eliminate user deviation; the predetermined position parameters are used to replace the actual idx to eliminate position deviation, and other changes remain unchanged.
[0091] The first parameter includes the preset user profile parameter user_profile = user_profile' and the position parameter idx = 0. The second parameter is the actual parameter values under the remaining dimensions except user_profile and idx, such as product category (cid3), category name (cid3_name), product code (skuid), search term (query), attribute ID (attr_id), attribute name (attr_name), attribute exposure (expo_pv), attribute click (click_pv), and actual parameters of order (order).
[0092] For example, during the training phase, the actual parameter value of the attribute click of each original attribute i under a certain category can be divided by the sum of the actual parameter values of all attribute clicks. For example, the following method is used to calculate the label attention_score of the original attribute i under a certain category: i :
[0093] (1)
[0094] Among them, i is a primitive attribute i under this category, click_pv i The actual parameter of the original attribute i attribute click feature.
[0095] When the training is completed, the actual parameter value is input into the attribute ranking model, and the output predicted attention information attention_score is:
[0096] (2)
[0097] in, Represents the model output, identifying the current original attribute through the attribute ID (attr_id) and attribute name (attr_name), is a feature set excluding idx and user_profile.
[0098] The user profile parameter for eliminating user bias in the first parameter is the average value of all user profiles, user_profile', and the position parameter for eliminating attribute display bias is 0, that is, idx=0, so as to reduce the impact of position bias on attention_score.
[0099] Therefore, for each original attribute under each category, the attention information obtained after inputting the first parameter and the second parameter into the attribute ranking model is:
[0100] (3)
[0101] Among them, cid3_name is used to identify the type, and other parameters are explained above.
[0102] In one embodiment, due to the need for interpretability, the attribute ranking model may adopt an extreme gradient boosting (eXtreme Gradient Boosting, XGBoost) structure, such as a five-layer XGBoost structure.
[0103] The embodiments of the present disclosure calculate the attention information of each original attribute by using the user portrait parameter for eliminating user bias, the position parameter for eliminating attribute display bias, and the second parameter, so as to eliminate the position bias caused by model training, so as to obtain more accurate attention information, which helps to improve the accuracy of subsequent determination of attributes to be compared and their sorting based on attention information.
[0104] According to an embodiment of the present disclosure, a commodity comparison big model is used to perform a commodity comparison task, and a first commodity comparison sub-result includes commodity similarities and differences information and commodity recommendation information; a plurality of attributes to be compared, first commodity information of a first commodity, and second commodity information of a second commodity are input into the commodity comparison big model to generate a first commodity comparison sub-result, including: a plurality of attributes to be compared, first commodity information, and second commodity information are input into the commodity comparison big model, so that the commodity comparison big model performs the commodity comparison task and generates commodity similarities and differences information and commodity recommendation information.
[0105] In this embodiment, after multiple attributes to be compared, first product information of the first product, and second product information of the second product are input into the product comparison model, the multiple attributes to be compared, the first product information of the first product, and the second product information of the second product can be combined into the input of the product comparison model according to a preset prompt template (prompt template) so that it can perform the product comparison task.
[0106] For example, the prompt word template includes "Please compare the similarities and differences between the following attributes of XX and XX: YY, recommend the applicable scenario of XX".
[0107] The input of the product comparison model can be [Please compare the similarities and differences between the following attributes of the first product and the second product: memory, charging power. Recommend the applicable scenario of the first product. The first product information is: X model mobile phone, with 128G memory and 6.1-inch large screen..., the second product information is: Y model mobile phone, with 128G memory and 5000mA super long battery life...].
[0108] The output of the product comparison model can be [both the X-model phone and the Y-model phone have 128G memory, but the X-model phone has a larger screen size…. The X-model phone with a larger screen is recommended for users between 20 and 30 years old]. Among them, "both the X-model phone and the Y-model phone have 128G memory, but the X-model phone has a larger screen size…" is the product similarities and differences information, and "the X-model phone with a larger screen is recommended for users between 20 and 30 years old" is the product recommendation information.
[0109] The embodiment of the present disclosure calls the commodity comparison big model to perform the commodity comparison task, so that the commodity comparison big model can compare and recommend commodities, provide auxiliary information for the selection and decision-making of e-commerce users, and help improve the user experience.
[0110] According to an embodiment of the present disclosure, the commodity comparison large model is also used to perform attribute interpretation tasks, and the first commodity comparison sub-result also includes: attribute interpretation information; the method also includes: inputting multiple attributes to be compared into the commodity comparison large model, so that the commodity comparison large model performs the attribute interpretation task, interprets each attribute to be compared, and generates attribute interpretation information.
[0111] Taking into account that many product attributes are professional terms and the user's understanding cost is high, the embodiment of the present disclosure can not only use the product comparison big model to perform the product comparison task, but also use the product comparison big model to perform the attribute interpretation task, interpret each attribute to be compared, and generate attribute interpretation information.
[0112] The input of the product comparison model is always multiple attributes to be compared, the first product information, and the second product information, but the inputs used by the product comparison task and the attribute interpretation task are different. Therefore, the output of the product comparison model for the product comparison task and the attribute interpretation task is different.
[0113] For a large product comparison model that can perform both product comparison tasks and attribute interpretation tasks, its prompt word template is different from the prompt word template that only performs the product comparison task.
[0114] For example, the prompt word template includes "Please compare the similarities and differences between the following attributes of XX and XX: YY, and interpret the attributes. Finally, recommend the applicable scenarios of XX."
[0115] The input of the product comparison model can be [Please compare the similarities and differences between the following attributes of the first product and the second product: memory, charging power, and interpret the attributes. Recommend the applicable scenarios of the first product. The first product information is: X model mobile phone, with 128G memory, 6.1-inch large screen, 90W charging power..., the second product information is: Y model mobile phone, with 128G memory and 5000mA super long battery life...].
[0116] The output of the product comparison model can be [both model X and model Y have 128G memory, but model X has a larger screen size, a higher 90W charging power, and a faster charging speed…For model X with a larger screen, it is recommended for users between 20 and 30 years old]. The product similarity and difference information is "both model X and model Y have 128G memory, but model X has a larger screen size and a higher 90W charging power", the product recommendation information is similar to the above, and the attribute interpretation information is "faster charging speed".
[0117] For users who do not understand charging power, they cannot clearly understand what charging power means, but through the attribute interpretation information "faster charging speed", they can understand that charging power is related to charging speed.
[0118] The embodiments of the present disclosure enable the commodity comparison model to perform attribute interpretation tasks and output attribute interpretation information, thereby helping users to better understand the meaning of each attribute in the attributes to be compared, and helping to improve the user experience.
[0119] According to an embodiment of the present disclosure, a product comparison result is generated based on the sorting information and the first product comparison sub-result, including: generating a second product comparison sub-result arranged in order of a plurality of attributes to be compared based on the sorting information; and combining the first product comparison sub-result and the second product comparison sub-result into a product comparison result.
[0120] The second product comparison sub-result includes the attribute parameters of the first product and the second product for each attribute to be compared. The attribute parameters of the first product or the second product can be obtained from the first product information and the second product information respectively. For example, when the attribute to be compared is charging power, the attribute parameter of the first product can be 20W, and the attribute parameter of the second product can be 90W.
[0121] Specifically, after determining the sorting information between multiple attributes to be compared, each attribute to be compared can be filled into the initial template based on the sorting information to obtain a layout in which multiple attributes to be compared are arranged in sequence. Thereafter, the attribute parameters of the first product and the second product for each attribute to be compared are filled into the initial template to obtain the second product comparison sub-result.
[0122] Figure 5 A schematic diagram schematically shows a scenario of generating product comparison results based on product comparison information input by a user according to an embodiment of the present disclosure.
[0123] like Figure 5As shown, the user can input product comparison information 501 through three operations, such as the first product link, the second product link and help me compare the two products. The product comparison result 502 obtained by the product comparison method based on the large model includes a first product comparison sub-result 5021 and a second product comparison sub-result 5022.
[0124] The first product comparison sub-result 5021 is the output of the product comparison model, such as "Both products support 5G and 4G networks and have the same device access license. However, the first product does not support memory cards, and the CPU model of the first product is XXX... The second product..."
[0125] The second product comparison sub-result 5022 includes: the picture and price of the first product / second product, or a link including the picture and price. The second product comparison sub-result 5022 also includes multiple attributes to be compared and their attribute parameters arranged according to the sorting information, such as memory, charging power, etc. For the second product comparison sub-results that cannot be fully displayed, all attributes to be compared and their attribute parameters can be viewed by operating the control "Expand All".
[0126] The embodiment of the present disclosure generates a final product comparison result according to the first product comparison sub-result and the second product comparison sub-result, and can realize the product comparison function from two aspects of intuitiveness and text summary, thereby improving the user experience.
[0127] According to an embodiment of the present disclosure, the commodity comparison big model is trained in the following manner: obtaining negative sample question information and a first positive sample pair similar to the negative sample question information, wherein the first positive sample pair includes the first positive sample question information and the first positive sample answer information output by the first initial commodity comparison big model for the first positive sample question information; inputting the negative sample question information and the first positive sample answer information into the sample generation big model to generate a training sample pair; using the training sample pair and the first positive sample pair, training the first initial commodity comparison big model to obtain a second initial commodity comparison big model; using the second positive sample pair and the second negative sample pair, performing preference optimization on the second initial commodity comparison big model to obtain a trained commodity comparison big model, wherein the second positive sample pair and the second negative sample pair are determined based on the second initial commodity comparison big model.
[0128] The present disclosure can perform alignment training on the first initial product comparison model by supervised fine-tuning, also known as supervised learning (Supervised Finetuning, SFT), such as a conversational pre-trained large language model (Pre-trained LLM), to obtain a product comparison model.
[0129] In the first stage of the training process, a conversational Pre-trained LLM of Retrieval Augmented Generation (RAG) can be used to generate corresponding answer information for the question information. The response information sysreturn of the open source Pre-trained LLM is:
[0130] Sysreturn = Pre-trained LLM ([prompt, user_input, sku_info]) (4)
[0131] Among them, user_input is user input, sku_info is product information, including product title, attributes, price, etc., and prompt is a simple prompt word, such as "Please answer based on user questions and product information:".
[0132] The question information and answer information of the pre-trained LLM are marked as positive sample pairs and negative sample pairs according to online user feedback. Specifically, replies that users dislike, replies with excessively long text, replies with looping text, and replies that are not fully output and are manually stopped by the user can be marked as negative samples, and replies that users like, have follow-up questions and answers, and have order records in the current round can be marked as positive sample answers (Spos).
[0133] For each of the above negative sample pairs, a similar positive sample pair is determined based on the question information in the negative sample pair, thereby obtaining the negative sample question information and the first positive sample pair mentioned above, that is, the question information in the negative sample pair is the negative sample question information above, and the positive sample pair is the first positive sample pair. For example, the user input in the negative sample prompt information and the user input in the first positive sample question information can be converted into an embedding form, and the cos similarity is calculated to determine whether the two are similar.
[0134] In the second stage of training, the negative sample question information and the first positive sample answer in the first positive sample pair are used as small samples, and more training sample pairs are generated by using the sample generation model through few-shot learning. The sample generation model can be GPT4. The training sample pair Sysreturn_sample output by the sample generation model can be:
[0135] Sysreturn_sample =GPT4([prompt neg , user_input neg , sku_info neg , Spos])(5)
[0136] Among them, prompt neg , user_input neg , sku_info neg It represents the prompt words, user input and product information in the negative sample question information, and Spos is the first positive sample answer information.
[0137] In one embodiment, the output of the sample generation model may also be manually modified to obtain training sample pairs.
[0138] In the third stage of training, the training sample pairs obtained in the second stage and the first positive sample answer information are mixed as a training data set, and supervised alignment training is performed on the Pre-trained LLM to obtain a second initial product comparison model, such as SFT LLM. Alternatively, the training sample pairs, the first positive sample pairs, and the training data in the public data set can be mixed in a ratio of 85:10:5 as a training data set to perform supervised alignment training on the Pre-trained LLM, and the public data set can be Super-Natural Instructions.
[0139] In the fourth stage of training, the method of the second stage is repeated, and the SFT LLM is marked as the second positive sample pair or the second negative sample pair according to the real online question information and the generated answer information. At this time, the second positive sample pair includes the second positive sample question information and the second positive sample answer information, and the second negative sample pair includes the second negative sample question information and the second negative sample answer information. For the second negative sample question information, the model parameters are adjusted so that the SFT LLM regenerates the third positive sample answer information. After that, the second negative sample question information and the third positive sample answer information are combined into a positive and negative sample pair, and the SFTLLM is trained for direct preference optimization (DPO). The resulting large product comparison model is called DPO LLM. Among them, adjusting the model parameters can be to increase the generation temperature (temperature), top-k, top-p and other parameters.
[0140] The embodiment of the present disclosure obtains training sample pairs that are more suitable for product comparison scenarios through screening and continuous optimization of positive and negative samples, and uses the training sample pairs for direct preference optimization training to obtain a product comparison model that can perform product comparison and attribute interpretation. Therefore, the first product comparison sub-result output based on the product comparison model can include specific product comparison and attribute interpretation, which helps users to more clearly understand the meaning of attributes and product comparison results, and improve user experience.
[0141] Figure 6A scenario diagram schematically shows a method of training a large commodity comparison model and implementing a commodity comparison function based on the large commodity comparison model according to an embodiment of the present disclosure.
[0142] like Figure 6 As shown, in the offline alignment training stage of the product comparison model, the user input 602 entered by the user in the application 601 is recorded offline, and then the background information 603 related to the question is retrieved through RAG. The background information (B) can be information related to the question, such as product information and simple prompts. Based on the generation path of the Pre-trained LLM, a QA pair including question information (Q) and answer information (A) is generated according to the user input 602 and the background information 603. After positive and negative sample annotation, the QA pair and the QB pair are sent to the sample generation model M61 for few-shot learning, and then the answer 604 generated by the sample generation model M61 and the user input 602 form a training sample pair 605, so as to perform alignment training for the first initial product comparison model M62, also known as supervised fine tuning (SFT), and obtain the second initial product comparison model M63. Then, the product comparison model M64 is obtained through direct preference optimization training.
[0143] In the online service stage of the product comparison model, the user can input product comparison information through the application 601, and the application 601 generates a product comparison request based on the product comparison information to determine multiple attributes to be compared and sorting information 606 that match the product comparison information. Subsequently, the trained product alignment model M64 is used to generate the first product comparison sub-result 607, such as attribute interpretation information, product similarities and differences information, and product recommendation information. The product comparison result generated by the first product comparison sub-result 607 and the sorting information 606 is fed back to the user through the application 601.
[0144] In order to facilitate understanding of the technical solution of the present application, a specific data flow diagram is described below to describe an embodiment of the present disclosure. Figure 7 The data flow diagram of the product comparison function according to an embodiment of the present disclosure is schematically shown.
[0145] like Figure 7As shown, when a user uses application 701, user behavior data 702 can be obtained. User behavior data 702 is stored in the form of user behavior log 703 and updated at the daily level, that is, updated every day. Then, for the multiple original attributes 704 under different categories of the user, the attribute sorting model M71 is used to calculate the initial sorting information between the multiple original attributes under each category. Afterwards, when the user uses the product comparison function, the product comparison large model M72 can be used to compare and interpret the multiple attributes to be compared under the target category, obtain the first product comparison sub-result, and determine the sorting information between the multiple attributes to be compared from the calculated initial sorting information. Finally, the product comparison result is generated based on the sorting information and the first product comparison sub-result, and fed back to the user through application 701. Among them, the product comparison large model M72 is obtained after alignment training of the first initial product comparison large model M73 using the user behavior data 703.
[0146] Figure 8 The block diagram of a commodity comparison device based on a large model according to an embodiment of the present disclosure is schematically shown.
[0147] like Figure 8 As shown, the commodity comparison device 800 includes a first determination module 810 , a second determination module 820 , a first generation module 830 and a second generation module 840 .
[0148] The first determination module 810 is configured to determine, in response to receiving the product comparison information input by the user, the target categories to which the first product and the second product in the product comparison information belong.
[0149] The second determination module 820 is used to determine, according to the target category, a plurality of attributes to be compared that match the product comparison information, and ranking information between the plurality of attributes to be compared, wherein the attributes to be compared are used to describe the first product and the second product.
[0150] The first generating module 830 is used to input a plurality of attributes to be compared, first product information of the first product, and second product information of the second product into the product comparison macro model to generate a first product comparison sub-result.
[0151] The second generating module 840 is used to generate a product comparison result according to the sorting information and the first product comparison sub-result.
[0152] According to an embodiment of the present disclosure, the second determination module 820 includes: a first determination submodule, a second determination submodule and a third determination submodule.
[0153] The first determination submodule is used to determine a plurality of original attributes of the target category and initial sorting information between the plurality of original attributes according to the target category.
[0154] The second determination submodule is used to select a plurality of attributes to be compared from a plurality of original attributes according to the attention information of the original attributes.
[0155] The third determining submodule is used to determine the sorting information between the multiple attributes to be compared from the initial sorting information.
[0156] According to an embodiment of the present disclosure, the first determining submodule includes: a query unit, an updating unit and a determining unit.
[0157] The query unit is used to query multiple original attributes and initial sorting information from the database according to the target type.
[0158] The updating unit is used to update the attention information of each original attribute in response to failure to find the initial ranking information.
[0159] The determination unit is used to determine initial sorting information according to the updated attention information.
[0160] According to an embodiment of the present disclosure, the updating unit includes: an acquisition subunit and a calculation subunit. For each original attribute, the acquisition subunit is used to acquire a first parameter and a second parameter of the original attribute, wherein the first parameter includes a user portrait parameter that characterizes the elimination of user bias and a position parameter that eliminates attribute display bias. The calculation subunit is used to input the first parameter and the second parameter into the attribute ranking model to obtain output attention information.
[0161] According to an embodiment of the present disclosure, the commodity comparison large model is used to perform a commodity comparison task, and the first commodity comparison sub-result includes commodity similarities and differences information and commodity recommendation information.
[0162] The first generation module 830 includes a first generation submodule, which is used to input multiple attributes to be compared, first product information and second product information into the product comparison model, so that the product comparison model performs the product comparison task and generates product similarities and differences information and product recommendation information.
[0163] According to an embodiment of the present disclosure, the commodity comparison large model is also used to perform an attribute interpretation task, and the first commodity comparison sub-result also includes attribute interpretation information.
[0164] The first generation module 830 also includes a second generation submodule, which is used to input multiple attributes to be compared into the commodity comparison model, so that the commodity comparison model performs the attribute interpretation task, interprets each attribute to be compared, and generates attribute interpretation information.
[0165] According to an embodiment of the present disclosure, the second generating module 840 includes a third generating submodule and a combining submodule.
[0166] The third generating submodule is used to generate a plurality of second product comparison sub-results arranged in order of attributes to be compared according to the sorting information.
[0167] The combining submodule is used to combine the first product comparison subresult and the second product comparison subresult into a product comparison result.
[0168] According to an embodiment of the present disclosure, a commodity comparison large model is trained in the following manner: obtaining negative sample question information and a first positive sample pair similar to the negative sample question information, wherein the first positive sample pair includes the first positive sample question information and the first positive sample answer information output by the first initial commodity comparison large model for the first positive sample question information; inputting the negative sample question information and the first positive sample answer information pair into a sample generation large model to generate a training sample pair; using the training sample pair and the first positive sample pair to train the first initial commodity comparison large model to obtain a second initial commodity comparison large model; using the second positive sample pair and the second negative sample pair to perform preference optimization on the second initial commodity comparison large model to obtain a trained commodity comparison large model, wherein the second positive sample pair and the second negative sample pair are determined based on the second initial commodity comparison large model.
[0169] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging circuits, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.
[0170] It should be noted that the device in the embodiments of the present disclosure corresponds to the method part in the embodiments of the present disclosure. The description of the device part specifically refers to the method part, which will not be repeated here.
[0171] Fig. 9 A block diagram of an electronic device suitable for implementing a commodity comparison method based on a large model according to an embodiment of the present disclosure is schematically shown.
[0172] Fig. 9The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0173] like Fig. 9 As shown, the electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include an onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0174] In RAM 903, various programs and data required for the operation of electronic device 900 are stored. Processor 901, ROM 902 and RAM 903 are connected to each other via bus 904. Processor 901 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 902 and / or RAM 903. It should be noted that the program can also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0175] According to an embodiment of the present disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the input / output (I / O) interface 905: an input portion 906 including a keyboard, a mouse, etc.; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 908 including a hard disk, etc.; and a communication portion 909 including a network interface card such as a LAN card, a modem, etc. The communication portion 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage portion 908 as needed.
[0176] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0177] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0178] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.
[0179] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 902 and / or the RAM 903 described above and / or one or more memories other than the ROM 902 and the RAM 903 .
[0180] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains a program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the large model-based product comparison method provided by the embodiment of the present disclosure.
[0181] When the computer program is executed by the processor 901, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0182] In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through the communication part 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0183] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0184] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0185] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A commodity comparison method based on a large model, characterized in that: The method comprises: In response to receiving product comparison information input by a user, determining a target category to which a first product and a second product in the product comparison information belong; Determine, according to the target category, a plurality of attributes to be compared that match the product comparison information, and sorting information between the plurality of attributes to be compared, wherein the attributes to be compared are used to describe the first product and the second product; Inputting the plurality of attributes to be compared, the first commodity information of the first commodity, and the second commodity information of the second commodity into a commodity comparison macromodel to generate a first commodity comparison sub-result; and A product comparison result is generated according to the sorting information and the first product comparison sub-result.
2. The method according to claim 1, characterized in that The step of determining, according to the target category, a plurality of attributes to be compared that match the product comparison information, and ranking information between the plurality of attributes to be compared includes: According to the target category, determining a plurality of original attributes of the target category and initial sorting information between the plurality of original attributes; Filtering a plurality of attributes to be compared from a plurality of the original attributes according to the attention information of the original attributes; and The sorting information between the plurality of attributes to be compared is determined from the initial sorting information.
3. The method according to claim 2, characterized in that The step of determining, according to the target type, a plurality of original attributes of the target type and initial sorting information between the plurality of original attributes comprises: According to the target type, querying a plurality of the original attributes and the initial sorting information from a database; In response to not finding the initial ranking information, updating the attention information of each of the original attributes; and The initial ranking information is determined according to the updated attention information.
4. The method according to claim 3, characterized in that The updating of the attention information of each original attribute comprises: for each original attribute, Acquire a first parameter and a second parameter of the original attribute, wherein the first parameter includes a user portrait parameter characterizing elimination of user deviation and a position parameter for eliminating attribute display deviation; and The first parameter and the second parameter are input into an attribute ranking model to obtain the output attention information.
5. The method according to claim 1, characterized in that The commodity comparison macromodel is used to perform a commodity comparison task, and the first commodity comparison sub-result includes commodity similarities and differences information and commodity recommendation information; the inputting of the plurality of attributes to be compared, the first commodity information of the first commodity, and the second commodity information of the second commodity into the commodity comparison macromodel to generate the first commodity comparison sub-result includes: The plurality of attributes to be compared, the first product information and the second product information are input into the product comparison model, so that the product comparison model performs the product comparison task and generates the product similarities and differences information and the product recommendation information.
6. The method according to claim 5, characterized in that The commodity comparison model is also used to perform attribute interpretation tasks, and the first commodity comparison sub-result also includes: attribute interpretation information; the method also includes: Input the plurality of attributes to be compared into the commodity comparison model, so that the commodity comparison model performs the attribute interpretation task, interprets each attribute to be compared, and generates the attribute interpretation information.
7. The method according to claim 5 or 6, characterized in that: The generating a product comparison result according to the sorting information and the first product comparison sub-result includes: Generate, according to the sorting information, a plurality of second product comparison sub-results arranged in the order of the attributes to be compared; and The first product comparison sub-result and the second product comparison sub-result are combined into the product comparison result.
8. The method according to claim 1, characterized in that The product comparison model is trained in the following way: Obtain negative sample question information and a first positive sample pair similar to the negative sample question information, wherein the first positive sample pair includes the first positive sample question information and first positive sample answer information output by the first initial product comparison model for the first positive sample question information; The negative sample question information and the first positive sample answer information are input into a sample to generate a large model to generate a training sample pair; Using the training sample pair and the first positive sample pair, training the first initial product comparison large model to obtain a second initial product comparison large model; The second initial product comparison model is optimized by using the second positive sample pair and the second negative sample pair to obtain the trained product comparison model, wherein the second positive sample pair and the second negative sample pair are determined based on the second initial product comparison model.
9. A commodity comparison device based on a large model, characterized in that: The device comprises: A first determination module, configured to determine, in response to receiving product comparison information input by a user, a target category to which a first product and a second product in the product comparison information belong; A second determination module is used to determine, according to the target category, a plurality of attributes to be compared that match the product comparison information, and sorting information between the plurality of attributes to be compared, wherein the attributes to be compared are used to describe the first product and the second product; A first generating module is used to input the plurality of attributes to be compared, the first commodity information of the first commodity, and the second commodity information of the second commodity into a commodity comparison macromodel to generate a first commodity comparison sub-result; and The second generating module is used to generate a product comparison result according to the sorting information and the first product comparison sub-result.
10. An electronic device comprising: one or more processors; a memory for storing one or more programs, It is characterized in that when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: Executable instructions are stored thereon, and when the instructions are executed by a processor, the processor implements the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that The computer program implements the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Patent Citations
Commodity information display method and device, electronic device and storage medium
CN110619553A
Shopping method and system based on electronic online shopping mall
CN113724029A
Search information processing method and device, equipment and storage medium
CN116934425A
Method for providing commodity comparison information and electronic equipment
CN117350799A
Cited By
Large language model-based item comparison method and apparatus, electronic device, and medium
WO2026081519A1