Item comparison method and device based on large model, electronic equipment and medium
By using a large-model-based product comparison method and dynamically adjusting attribute sorting, the poor user experience problem caused by fixed attribute sorting in existing technologies is solved, and a more efficient product comparison result display is achieved.
Patent Information
- Application Number
- CN202411441460.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-10-15
AI Technical Summary
In existing product comparison solutions, attribute ranking is fixed and static, resulting in different types of attributes having different importances and changing over time, leading to a poor user experience.
The product comparison method based on the big model determines the target category, screens out multiple attributes to be compared and their sorting information, uses the product comparison big model to generate product comparison results, and adjusts the attribute display order based on the sorting information.
It improves the user's product comparison experience, dynamically reflects changes in attribute importance and user concern, and reduces the time cost of searching for unnecessary attributes.
Smart Images

Figure CN119338554B_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-scale model technology, and more specifically, to a commodity comparison method, device, electronic device, and medium based on a large-scale model. Background Art
[0002] With the rapid development of artificial intelligence, intelligent customer service, intelligent robots, and deep learning, users can use product comparison functions to compare the similarities and differences between products they want to buy before shopping. However, product comparisons on existing e-commerce platforms mostly compare all product attributes in a fixed order from basic attributes to additional attributes, especially those implemented using large language models (LLMs).
[0003] In the process of realizing the concept of the present disclosure, the inventors discovered that there are at least the following problems in the related art: in the product comparison scenario, the importance of different types of attributes varies and also changes 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 product comparison method, device, electronic device, and medium based on a large model.
[0005] One aspect of the present disclosure provides a product comparison method based on a macro model, including: 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; determining, based on 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; inputting the plurality of attributes to be compared, first product information of the first product, and second product information of the second product into a product comparison macro model to generate a first product comparison sub-result; and generating a product comparison result based on the ranking information and the first product 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 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 among the multiple original attributes are determined according to the target type, including: querying multiple original attributes and initial sorting information from a database according to the target type; in response to not querying the initial sorting information, updating the attention information of each original attribute; and determining the initial sorting information based on 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 product comparison macromodel is used to perform a product comparison task, and a first product comparison sub-result includes product similarities and differences information and product recommendation information; multiple attributes to be compared, first product information of a first product, and second product information of a second product are input into the product comparison macromodel to generate a first product comparison sub-result, including: inputting multiple attributes to be compared, first product information, and second product information into the product comparison macromodel, so that the product comparison macromodel performs the product comparison task and generates product similarities and differences information and product 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 plurality of second product comparison sub-results arranged in order 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, the product 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 product 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 the 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 product comparison large model to obtain a second initial product comparison large model; using the second positive sample pair and the second negative sample pair to perform preference optimization on the second initial product comparison large model to obtain a trained product comparison large model, wherein the second positive sample pair and the second negative sample pair are determined based on the second initial product 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, 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, configured to determine, based on 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, configured 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 a product comparison large model to generate a first product comparison sub-result; and a second generation module, configured to generate a product comparison result based on 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. When the instructions are executed, they are used to implement the above method.
[0017] The embodiment of the present disclosure determines the target category to which the first and second products in the product comparison information belong in response to receiving product comparison information input by the user; determines, based on the target category, multiple attributes to be compared that match the product comparison information, and ranking information between the multiple attributes to be compared; inputs the multiple attributes to be compared, the first product information, and the second product information into the product comparison macro model to generate a first product comparison sub-result; and generates a product comparison result based on the ranking information and the first product comparison sub-result. Compared to existing fixed-rank product comparisons, the embodiment of the present disclosure adds multiple attributes to be compared that match the product comparison information and their ranking information, and combines the ranking information with the output of the product comparison macro model. Therefore, the attributes to be compared in the final output product comparison result have a dynamic ranking, 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 product 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 attributes to be compared and ranking information of the attributes to be compared according to an embodiment of the present disclosure is schematically shown.
[0022] Figure 4 The following schematically illustrates an application scenario of the product comparison function according to an embodiment of the present disclosure.
[0023] Figure 5 The following schematically illustrates a scenario in which product comparison results are generated based on product comparison information input by a user according to an embodiment of the present disclosure.
[0024] Figure 6 A diagram schematically illustrates a scenario of training a large product comparison model and implementing a product comparison function based on the large product comparison model according to an embodiment of the present disclosure;
[0025] Figure 7 Schematically shows a data flow diagram of a product comparison function according to an embodiment of the present disclosure;
[0026] Figure 8 A block diagram schematically illustrates a large-scale model-based commodity comparison device according to an embodiment of the present disclosure; and
[0027] Figure 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 merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, 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 well-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 presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0030] All terms used herein (including technical and scientific terms) 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 expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning 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 this disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of all data involved (including, but not limited to, user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and to safeguard 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] Existing product comparison solutions mostly use fixed, static sorting, which can easily lead to useless or uncritical attributes being ranked higher, while key attributes are placed lower down. For example, in the mobile phone market, user A primarily wants a phone with good battery life and is primarily concerned with the "battery capacity" attribute. However, fixed, static sorting generally doesn't prioritize "battery capacity." Consequently, existing solutions require users to spend a considerable amount of time searching for a specific attribute, making it inconvenient and a poor user experience.
[0035] Furthermore, attribute importance varies across categories, and users' interest in product attributes varies, and this interest can change over time and with market fluctuations. For example, if attribute A of a newly released mobile phone has been significantly improved, users will be more interested in and prioritize attribute A when using product comparison features. Therefore, existing fixed-order attribute ranking methods struggle to dynamically reflect changes in attribute importance and user interest.
[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; determining, based on the target category, multiple attributes to be compared that match the product comparison information, and ranking information between the multiple attributes to be compared; inputting the multiple 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 generating a product comparison result based on the ranking information and the first product comparison sub-result.
[0037] Figure 1 An exemplary system architecture to which the large model-based product 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 as a medium for providing 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 via 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 (for example only).
[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 (for example only) that supports 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 received data such as user requests, and feed back the processing results to the terminal devices.
[0042] It should be noted that the commodity comparison method based on the large 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 large model provided in the embodiment of the present disclosure can generally be set in the server 105. The commodity comparison method based on the large 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 large 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, a user can use an e-commerce platform application on the first terminal device 101, the second terminal device 102, or the third terminal device 103 to input product comparison information through the application. The server 105, such as the backend server of the e-commerce platform, executes the above-mentioned large model-based product comparison method and generates product comparison results. The backend server of the e-commerce platform then sends the product comparison results to the first terminal device 101, the second terminal device 102, or the third terminal device 103, and displays them within the application.
[0044] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[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, product comparison information includes a first product and a second product to be compared. The first and second products in the product comparison information can be in the form of product titles, product links, etc. The product comparison information can be entered by the user through a single input operation or through multiple conversations in a dialog window.
[0049] For example, a user can enter product comparison information in a single input operation: "Please compare mobile phone A and mobile phone B." In this case, the product comparison information can use the product titles "Product A" and "Product B" to represent the first and second products. Alternatively, the user can enter "Link 1," "Link 2," and "Please help me compare the products in the above two links" in multiple input operations. In this case, the product comparison information contains the content of the three input operations, and the first and second products are represented in the form of product links.
[0050] The target category is the same category to which the first and second products belong, such as electronics, daily necessities, clothing, etc. Furthermore, product categories typically include multiple levels. For example, electronics include computers, mobile phones, and watches, while computers include desktop computers and laptops. In one exemplary embodiment, a level can be pre-defined, and the same category to which the first and second products 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 typically includes multiple attributes to describe the product, and the attributes within each category may vary. For example, for mobile phones, the attributes include memory, color, charging power, screen size, etc.; for clothing, the attributes include texture, size, color, etc.
[0053] In an exemplary embodiment, when comparing products, 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 product and the second product.
[0054] In another exemplary embodiment, multiple attributes to be compared can 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 can be screened from the multiple attributes under the target category.
[0055] For example, filtering can be performed based on user behavior data for target categories within a preset time period. For example, the number of clicks on certain attributes by users within a preset time period, attributes mentioned in user comments after ordering the first and / or second products, etc. The user behavior data involved in the embodiments of this disclosure includes user operations such as browsing, clicking, and commenting on web pages.
[0056] According to embodiments of the present disclosure, ranking information can be understood as the order in which multiple attributes to be compared are displayed when the product comparison results are presented to the user. Ranking information can reflect the importance of the multiple objects to be compared, for example, the higher the ranking, the more important the attribute to be compared. In one exemplary embodiment, the ranking information between the multiple attributes to be compared can be determined based on the number of clicks on the attribute and the total number of times the attribute was mentioned in user reviews after ordering the first and / or second products.
[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 about the first product, such as the product title, price, and parameters for each attribute. The second product information, similar to the first product information, may also include the product title, price, and parameters for each attribute. For example, for the material attribute, the parameters for garment A and garment B may be cotton and polyester, respectively.
[0059] According to the embodiments of the present disclosure, a large product comparison model is constructed by leveraging the powerful analysis and summarization capabilities of large models to implement product comparison tasks. The large product comparison model can be one or more of, but is not limited to, a Generative Pre-Trained Transformer (GPT), a ChatGenerative Pre-Trained Transformer (ChatGPT), or a General Language Model (GLM).
[0060] In operation S240 , a product comparison result is generated according to the ranking 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 model, the first product comparison sub-result is not used as the output displayed to the user, but the product comparison result combining the ranking information and the first product comparison result is used as the final output.
[0062] For example, the order of the first product comparison sub-result can be adjusted using the sorting information. For example, the attribute with the highest order can be moved to the top. Alternatively, multiple second product comparison sub-results can be generated based on the sorting information, with the attributes to be compared arranged in order. The product comparison result can then be determined based on the first and second product comparison sub-results.
[0063] The embodiment of the present disclosure determines the target category to which the first and second products in the product comparison information belong in response to receiving product comparison information input by the user; determines, based on the target category, multiple attributes to be compared that match the product comparison information, and ranking information between the multiple attributes to be compared; inputs the multiple attributes to be compared, the first product information, and the second product information into the product comparison macro model to generate a first product comparison sub-result; and generates a product comparison result based on the ranking information and the first product comparison sub-result. Compared to existing fixed-rank product comparisons, the embodiment of the present disclosure adds multiple attributes to be compared that match the product comparison information and their ranking information, and combines the ranking information with the output of the product comparison macro model. Therefore, the attributes to be compared in the final output product comparison result have a dynamic ranking, thereby improving the user experience.
[0064] Figure 3 The flowchart of the method for determining attributes to be compared and ranking information of the attributes to be compared according to an 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 : Determine, according to the target type, a plurality of original attributes of the target type and initial sorting information among the plurality of original attributes.
[0067] S322: Filter out 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. 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 e-commerce field, categories and their attributes are typically relatively fixed and pre-stored in a database. Initial ranking information between multiple original attributes can also be pre-calculated and stored in the database. Therefore, embodiments of the present disclosure can retrieve multiple original attributes and initial ranking information for a target category from a pre-stored address based on the identifier of the target category.
[0071] According to embodiments of the present disclosure, the attention information for each original attribute can reflect the importance of the original attribute. The attention information can be represented by a numerical value, with a larger numerical value indicating a higher importance of the original attribute. Thus, the importance of multiple attributes to be compared can also be reflected in the ranking 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 can be selected from multiple original attributes whose attention information meets a predetermined condition. 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 selected from the multiple original attributes by sorting them from highest to lowest attention information, and the k original attributes with higher attention information are used as the attributes to be compared. Thus, after the multiple attributes to be compared are obtained by screening, the ranking information between the multiple attributes to be compared can be selected from the initial ranking 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 sorting information between the multiple attributes to be compared from the initial sorting information. It can selectively screen out multiple attributes to be compared and their sorting information that match the current product comparison information, without the need to display all the original attributes in a fixed manner, so that users can see attributes with higher attention when comparing target categories, thereby improving user experience.
[0075] According to an embodiment of the present disclosure, multiple original attributes of the target type and initial sorting information among the multiple original attributes are determined according to the target type, including: querying multiple original attributes and initial sorting information from a database according to the target type; in response to not querying the initial sorting information, updating the attention information of each original attribute; and determining the initial sorting information based on the updated attention information.
[0076] In this embodiment, the attention level information for each original attribute under each category can be calculated in advance based on user behavior data and stored in a database, such as a Redis cache. Similarly, initial ranking information for multiple original attributes under each category can be calculated based on the attention level information and stored in the database. Thus, when using the product comparison service, the original ranking 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 using a weighted calculation method to calculate the weighted average of the above numerical features to serve as the attention information.
[0078] The initial sorting information is determined based on the updated attention information, that is, the multiple original attributes are sorted based on the updated attention information to obtain the initial sorting information. The initial sorting information can be, for example, a sequence of the multiple original attributes in a chain arrangement.
[0079] The embodiments of the present disclosure write the attention information into the database in advance, so that users can directly obtain the attention information instead of calculating the attention information when using the product comparison function online, 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 illustrates an application scenario of the product comparison function according to an embodiment of the present disclosure.
[0082] like Figure 4 As shown, for the online service stage, users 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 queries for multiple original attributes and attention information. Afterwards, attribute query / filtering / stage is performed based on the attention information to obtain sorting information. Attribute query can be understood as: querying the original attribute of a certain position in the initial sorting information based on the attention information; 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 to obtain sorting information of part of the original attributes, such as the sorting information between multiple attributes to be compared in this article. Finally, the product comparison result generated based on 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 calculate the attention information of each original attribute under each category offline, 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. They should be regarded as exemplary and 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 must 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 attention information, multiple types of features can be used as input to calculate attention information from multiple dimensions, such as ID features, numerical features, and embedded features.
[0087] For example, the input to 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), and the search and filtering category attribute ranking (idx). Among them, cid3, skuid, and attr_id are ID features; idx, expo_pv, click_pv, and order are numerical features; cid3_name, user_profile, and query are embedding 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 filtering category attribute is the ranking rank of the attribute on the page when the user searches for a certain type of product; the 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; the attribute click (click_pv) is the number of times the user clicks on the attribute to filter the product results when searching for a certain type of product; the 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 applications, the ranking of attributes (idx) in search and filtering categories can exhibit positional bias. For example, attributes ranked higher are more likely to be clicked by users. User profiles (user_profile) are also influenced by user personalization. Therefore, during training, the initial attribute ranking model is trained using actual data from the aforementioned dimensions. However, during actual prediction, the actual user profile is replaced with a predetermined user profile parameter to eliminate user bias. The actual idx is replaced with a predetermined position parameter to eliminate positional bias, while other parameters 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 values are 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 used in the first parameter to eliminate user bias is the average value of all user profiles, user_profile'. The position parameter used to eliminate attribute display bias is 0, that is, idx=0, 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 embodiment of the present disclosure calculates the attention information of each original attribute by using the user portrait parameter that eliminates user bias, the position parameter that eliminates attribute display bias, and the second parameter, thereby eliminating the position bias caused by model training to obtain more accurate attention information, which helps to improve the accuracy of subsequent determination of attributes to be compared and their ranking based on attention information.
[0104] According to an embodiment of the present disclosure, a product comparison macromodel is used to perform a product comparison task, and a first product comparison sub-result includes product similarities and differences information and product recommendation information; multiple attributes to be compared, first product information of a first product, and second product information of a second product are input into the product comparison macromodel to generate a first product comparison sub-result, including: inputting multiple attributes to be compared, first product information, and second product information into the product comparison macromodel, so that the product comparison macromodel performs the product comparison task and generates product similarities and differences information and product 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 macro 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 macro model according to a pre-set 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 XX and XX in the following attributes: YY, recommend the applicable scenario of XX."
[0107] The input to the product comparison model might be [Please compare the following attributes of product 1 and product 2: memory, charging power. Recommend suitable scenarios for product 1. Product 1: Model X mobile phone with 128GB memory and a large 6.1-inch screen... Product 2: Model Y mobile phone with 128GB memory and a super long battery life of 5000mA...].
[0108] The output of the large product comparison model might be [Model X and Model Y both have 128GB of memory, but Model X has a larger screen size…. Model X with a larger screen is recommended for users aged 20-30]. Here, "Model X and Model Y both have 128GB of memory, but Model X has a larger screen size…" represents the product similarities and differences, while "Model X with a larger screen is recommended for users aged 20-30" represents the product recommendation.
[0109] The embodiment of the present disclosure calls the product comparison big model to perform the product comparison task, so that the product comparison big model can compare and recommend products, provide auxiliary information for e-commerce users' choices and decisions, and help improve users' usage 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] Considering 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 model to perform the product comparison task, but also use the product comparison 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. However, the inputs used in 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 are different.
[0113] For a large product comparison model that can simultaneously perform 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 to the product comparison model might be [Please compare the similarities and differences between the following attributes of the first and second products: memory and charging power, and interpret these attributes. Recommend suitable scenarios for the first product. The first product information is: Model X mobile phone with 128GB of memory, a large 6.1-inch screen, and 90W charging power... The second product information is: Model Y mobile phone with 128GB of memory and a super long battery life of 5000mA...].
[0116] The output of the large product comparison model might be [Model X and Model Y both have 128GB of memory, but Model X has a larger screen, a higher 90W charging power rating, and faster charging speeds… Model X, with its larger screen, is recommended for users between 20 and 30 years old]. The product similarity and difference information might be "Model X and Model Y both have 128GB of memory, but Model X has a larger screen and a higher 90W charging power rating." 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 by interpreting the attribute 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 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 plurality of second product comparison sub-results arranged in order 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 attribute parameters for each attribute to be compared for the first and second products. The attribute parameters for the first or second product can be obtained from the first and second product information, respectively. For example, if the attribute to be compared is charging power, the attribute parameter for the first product can be 20W, and the attribute parameter for 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. Afterwards, 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 The following schematically illustrates a scenario in which product comparison results are generated 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 enter product comparison information 501 through three operations, such as the first product link, the second product link, and help me compare these 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 network access license. However, the first product does not support memory cards, and the first product's CPU model is XXX... The second product..."
[0125] Second product comparison sub-result 5022 includes: an image and price of the first / second product, or a link containing both the image and price. Second product comparison sub-result 5022 also includes multiple attributes to be compared and their attribute parameters, such as memory and charging power, arranged according to the sorting information. For any second product comparison sub-results that cannot be fully displayed, you can view all attributes to be compared and their attribute parameters by clicking the "Expand All" control.
[0126] The embodiment of the present disclosure generates a final product comparison result based on the first product comparison sub-result and the second product comparison sub-result, and can implement the product comparison function from two aspects: intuitiveness and textual summary, thereby improving the user experience.
[0127] According to an embodiment of the present disclosure, the product 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 product comparison large 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 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; using the second positive sample pair and the second negative sample pair, performing preference optimization on the second initial product comparison large model to obtain a trained product comparison large model, wherein the second positive sample pair and the second negative sample pair are determined based on the second initial product comparison large model.
[0128] The present disclosure can perform alignment training on the first initial product comparison model through 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 using Retrieval Augmented Generation (RAG) can be used to generate corresponding answers to the questions. 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 the user question and product information:".
[0132] Based on online user feedback, pre-trained LLM question and answer information is labeled as positive and negative pairs. Specifically, responses that are downvoted by users, responses that are too long, responses that are looping, and responses that are manually stopped before completion are labeled as negative. Responses that are liked by users, have follow-up questions and answers, or have orders placed in the current round are labeled as positive answers (Spos).
[0133] For each negative pair, a similar positive pair is determined based on the question information in the negative pair. This yields the negative question information and the first positive pair mentioned above. That is, the question information in the negative pair is the negative question information, and the positive pair is the first positive pair. For example, the user input in the negative prompt information and the user input in the first positive question information can be converted into embedding form and the COS similarity 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. Through few-shot learning, the sample generation model is used to generate more training sample pairs. 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 be manually modified to obtain training sample pairs.
[0138] In the third training phase, the training sample pairs obtained in the second phase and the first positive sample responses are combined to form a training dataset. Supervised alignment training is performed on the pre-trained LLM to obtain a second initial product comparison model, such as the SFT LLM. Alternatively, supervised alignment training can be performed on the pre-trained LLM by combining the training sample pairs, the first positive sample pairs, and training data from a public dataset in a ratio of 85:10:5. The public dataset can be Super-Natural Instructions.
[0139] In the fourth training phase, the second phase is repeated, and the SFT LLM is annotated as a second positive pair or a second negative pair based on real online questions and generated answers. In this case, the second positive pair includes the second positive question and the second positive answer, while the second negative pair includes the second negative question and the second negative answer. For the second negative question, model parameters are adjusted so that the SFT LLM regenerates the third positive answer. Then, the second negative question and the third positive answer form a positive-negative pair, and the SFT LLM is trained using Direct Preference Optimization (DPO). The resulting large product comparison model is called the DPO LLM. Model parameter adjustments can include increasing parameters such as the generation temperature, top-k, and top-p.
[0140] The disclosed embodiments screen and continuously optimize positive and negative samples to obtain training sample pairs that are more suitable for product comparison scenarios. These training sample pairs are then used for direct preference optimization training, resulting in a large product comparison model capable of both product comparison and attribute interpretation. Consequently, the first product comparison sub-result output by the large product comparison model can include detailed product comparisons and attribute interpretations, helping users more clearly understand the meaning of attributes and the product comparison results, thereby enhancing the user experience.
[0141] Figure 6A scenario diagram schematically illustrates training a large product comparison model and implementing a product comparison function based on the large product comparison model according to an embodiment of the present disclosure.
[0142] like Figure 6 As shown, during the offline alignment training phase of the product comparison model, user input 602 entered within the application 601 is recorded offline. Question-related context 603 is then retrieved using RAG. This context (B) can be relevant to the question, such as product information or a simple prompt. Based on the pre-trained LLM generation path, a question-answering (QA) pair consisting of a question (Q) and an answer (A) is generated from the user input 602 and context 603. After labeling with positive and negative samples, the QA and QB pairs are sent to the sample generation model M61 for few-shot learning. The answers 604 generated by the sample generation model M61 and the user input 602 are then combined into training sample pairs 605 for alignment training of the first initial product comparison model M62, also known as supervised finetuning (SFT). This yields a second initial product comparison model M63. Direct preference optimization training is then used to obtain the product comparison model M64.
[0143] During the online service phase of the product comparison macromodel, users can input product comparison information through application 601. Application 601 generates a product comparison request based on the product comparison information, identifying multiple attributes to be compared and ranking information 606 that match the product comparison information. Subsequently, the trained product alignment macromodel M64 is used to generate a first product comparison sub-result 607, including attribute interpretation information, product similarities and differences information, and product recommendations. The product comparison result generated by the first product comparison sub-result 607 and ranking information 606 is fed back to the user via 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 the user uses the application 701, the user behavior data 702 can be obtained. The user behavior data 702 is stored in the form of a user behavior log 703 and is 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 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 the application 701. Among them, the product comparison model M72 is obtained after alignment training of the first initial product comparison model M73 using the user behavior data 703.
[0146] Figure 8 The block diagram of a large model-based commodity comparison device according to an embodiment of the present disclosure is schematically shown.
[0147] like Figure 8 As shown, the product 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 determining module 810 is configured to determine, in response to receiving product comparison information input by a user, target categories to which the first product and the second product in the product comparison information belong.
[0149] The second determining module 820 is configured 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 configured 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 configured to generate a product comparison result according to the ranking information and the first product comparison sub-result.
[0152] According to an embodiment of the present disclosure, the second determining module 820 includes: a first determining submodule, a second determining submodule, and a third determining submodule.
[0153] The first determination submodule is configured to determine, according to the target category, a plurality of original attributes of the target category and initial sorting information among the plurality of original attributes.
[0154] The second determining submodule is configured 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 configured 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 configured to update the attention information of each original attribute in response to failure to find the initial ranking information.
[0159] The determining unit is used to determine initial ranking information according to the updated attention information.
[0160] According to an embodiment of the present disclosure, the update unit includes an acquisition subunit and a calculation subunit. For each original attribute, the acquisition subunit is configured to acquire a first parameter and a second parameter of the original attribute, wherein the first parameter includes a user profile parameter that eliminates user bias and a position parameter that eliminates attribute display bias. The calculation subunit is configured to input the first and second parameters into an attribute ranking model to obtain output attention information.
[0161] According to an embodiment of the present disclosure, the product comparison model is used to perform a product comparison task, and the first product comparison sub-result includes product similarities and differences information and product 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 product comparison model is also used to perform an attribute interpretation task, and the first product comparison sub-result further includes attribute interpretation information.
[0164] The first generation module 830 further includes a second generation submodule for inputting a plurality of attributes to be compared into the commodity comparison model, so that the commodity comparison model performs an 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 configured to generate, according to the sorting information, a plurality of second product comparison sub-results arranged in order of attributes to be compared.
[0167] The combining submodule is used to combine the first product comparison sub-result and the second product comparison sub-result into a product comparison result.
[0168] According to an embodiment of the present disclosure, the product 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 product 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 the 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 product comparison large model to obtain a second initial product comparison large model; using the second positive sample pair and the second negative sample pair to perform preference optimization on the second initial product comparison large model to obtain a trained product comparison large model, wherein the second positive sample pair and the second negative sample pair are determined based on the second initial product comparison large model.
[0169] According to the embodiments of the present invention, any number of modules, sub-modules, units, and sub-units, or at least part of the functions of any number of them, can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, sub-modules, units, and sub-units can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, sub-modules, units, and sub-units can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, 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, sub-modules, units, and sub-units can be at least partially implemented as a computer program module, which can perform the corresponding functions when the computer program module is executed.
[0170] It should be noted that the apparatus in the embodiments of the present disclosure corresponds to the method in the embodiments of the present disclosure. The description of the apparatus refers to the method, which will not be repeated here.
[0171] Figure 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] Figure 9The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0173] like Figure 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 portion 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 special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include 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] Various programs and data required for the operation of the electronic device 900 are stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 executes the various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also execute the various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.
[0175] According to an embodiment of the present disclosure, electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to bus 904. Electronic device 900 may also include one or more of the following components connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or modem. Communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 910 as needed, so that computer programs read from the removable media can be installed into storage section 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 includes 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 and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.
[0178] According to embodiments of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples include, but are not limited to, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), 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 can be used by or in conjunction 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 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 performed. 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 stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 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, or any suitable combination thereof.
[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 computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving 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 via the Internet).
[0184] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, 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 can represent a module, program segment, or part of the code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two boxes shown 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, as well as the combination of boxes in the block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified functions or operations, or can be implemented using a combination of dedicated hardware and computer instructions. It will be understood by those skilled in the art that the features described in the various embodiments of the present disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or coupled in various ways, and all of these combinations and / or couplings fall within the scope of the present disclosure.
[0185] The above describes the embodiments of the present disclosure. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present disclosure, those skilled in the art may make various 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 target categories to which the first product and the second product in the product comparison information belong; Determining, based on 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; the ranking information is determined based on initial ranking information between a plurality of original attributes, the initial ranking information is determined based on attention information of each of the original attributes, the attention information of each of the original attributes is determined using an attribute ranking model based on a first input parameter and a second parameter of the original attribute, the first parameter including a user portrait parameter that characterizes elimination of user bias and a position parameter that eliminates attribute display bias; Inputting the plurality of attributes to be compared, the first product information of the first product, and the second product information of the second product into a product comparison macro model to generate a first product 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, based on 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: Determining, according to the target category, a plurality of original attributes of the target category and initial sorting information among the plurality of original attributes; According to the attention information of the original attribute, a plurality of attributes to be compared are screened out from the plurality of original attributes.
3. The method according to claim 2, characterized in that The determining, according to the target category, a plurality of original attributes of the target category and initial sorting information between the plurality of original attributes includes: 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 includes: for each original attribute, Obtaining a first parameter and a second parameter of the original attribute; 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, wherein The product comparison macromodel is used to perform a product comparison task, wherein the first product comparison sub-result includes product similarities and differences information and product recommendation information. Inputting the plurality of 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 macromodel to generate the first product 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 product comparison model is further used to perform attribute interpretation tasks, and the first product comparison sub-result further includes attribute interpretation information; the method further includes: The plurality of attributes to be compared are input into the commodity comparison macromodel, so that the commodity comparison macromodel 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 Generating a product comparison result according to the ranking information and the first product comparison sub-result includes: Generating a plurality of second product comparison sub-results arranged in the order of the attributes to be compared according to the sorting information; and The first product comparison sub-result and the second product comparison sub-result are combined to form the product comparison result.
8. The method according to claim 1, characterized in that The product comparison model is trained in the following way: 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 a first positive sample answer information output by the first initial product comparison model in response to 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 model to obtain a second initial product comparison model; The second initial product comparison model is optimized for preference 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 determining module configured to, in response to receiving product comparison information input by a user, determine a target category to which the first product and the second product in the product comparison information belong; a second determination module for determining, based on 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; the ranking information is determined based on initial ranking information between a plurality of original attributes, the initial ranking information is determined based on attention information of each original attribute, the attention information of each original attribute is determined using an attribute ranking model based on a first input parameter and a second parameter of the original attribute, the first parameter including a user portrait parameter for characterizing elimination of user bias and a position parameter for eliminating attribute display bias; a first generating module, configured to input the plurality of attributes to be compared, the first product information of the first product, and the second product information of the second product into a product comparison macro model to generate a first product comparison sub-result; and The second generating module is configured 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 are enabled to 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, which, when executed by a processor, enable the processor to implement 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
Search information processing method and device, equipment and storage medium
CN116934425A
Method for providing commodity comparison information and electronic equipment
CN117350799A