Product searching method and device, computer device and medium
By randomly selecting initial products from the product database, obtaining user preferences, comparing attributes, and iteratively filtering, the problem of complexity in product search with few prior conditions is solved, achieving efficient and accurate product search.
Patent Information
- Application Number
- CN202310803812.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2043-06-30
AI Technical Summary
With limited prior information, the product search process in existing technologies is highly complex, making it difficult to efficiently and accurately obtain user preferences.
Randomly select N initial products from the product database, obtain the target user's preference level, select the product with the highest preference as the first product, and compare its attributes with other products to eliminate products that do not meet the conditions. Through the iterative process, the product set is narrowed down until the preset conditions are met.
It significantly reduces the user's filtering load, improves product search efficiency and accuracy, is suitable for high-dimensional attributes and diverse user preferences, and requires no prior assumptions.
Smart Images

Figure CN117171216B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a product searching method and device, computer equipment and medium. BACKGROUND
[0002] At present, a basic task in the data processing scenario is to help users with unknown preferences to determine their corresponding search products in a large product database, for example, to help scholars find target papers in scientific literature or recommend movies that users like, however, the product searching process is highly personalized, and most of the time users cannot accurately describe their own needs, therefore, it is particularly important to efficiently and accurately obtain user preferences, so as to improve the efficiency of the personalized product searching process.
[0003] However, when determining user preferences by interacting with the user, the query complexity is high, that is, the number of user request times is large, and if the query complexity is to be reduced, it is necessary to make assumptions about prior conditions, such as limiting the number of product attribute types, limiting the product to a virtual product, etc., but such methods are often difficult to generalize in actual use. Therefore, how to effectively reduce the query complexity of product searching under the condition of the least prior condition has become a problem to be solved. SUMMARY
[0004] Therefore, the embodiments of the present application provide a product searching method and device, computer equipment and medium to solve the problem of high query complexity of product searching under the condition of less prior condition.
[0005] In a first aspect, the embodiments of the present application provide a product searching method, which comprises:
[0006] randomly selecting N initial products from a product database, each product in the product database corresponding to product attribute information, N being an integer greater than or equal to 2;
[0007] sending the N initial products to a target user, obtaining the product preference degree of the target user for the N initial products, and selecting the initial product with the highest product preference degree as a first product;
[0008] comparing the product attribute information of the first product with the product attribute information of any second product in the product database except the N initial products, to obtain a first attribute comparison result corresponding to each second product;
[0009] determining a second product whose first attribute comparison result is less than or equal to a target attribute comparison result as a third product, excluding N first products and all third products from the product database to obtain a remaining product set;
[0010] performing the step of randomly selecting N initial products from the product database until the number of products in the remaining product set meets a preset condition, and obtaining the products in the remaining product set as product search results.
[0011] In a second aspect, an embodiment of the present application provides a product search device, which comprises:
[0012] a product selection module configured to randomly select N initial products from a product database, each product in the product database corresponding to product attribute information, and N being an integer greater than or equal to 2;
[0013] a user interaction module configured to send the N initial products to a target user, obtain product preference degrees of the target user for the N initial products, and select an initial product with the highest product preference degree as a first product;
[0014] an attribute comparison module configured to compare product attribute information of any second product in the product database other than the N initial products with product attribute information of the first product to obtain a first attribute comparison result corresponding to each second product;
[0015] a product exclusion module configured to determine a second product whose first attribute comparison result is less than or equal to a target attribute comparison result as a third product, exclude N first products and all third products from the product database to obtain a remaining product set;
[0016] a product search module configured to perform the step of randomly selecting N initial products from the product database until the number of products in the remaining product set meets a preset condition, and obtain the products in the remaining product set as product search results.
[0017] In a third aspect, an embodiment of the present application provides a computer device, which comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and the processor implements the product search method according to the first aspect when executing the computer program.
[0018] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the product searching method according to the first aspect.
[0019] Compared with the prior art, the embodiment of the present application has the following beneficial effects:
[0020] Randomly selecting N initial products from the product database, sending the N initial products to the target user, obtaining the product preference degree of the target user on the N initial products, selecting the initial product with the highest product preference degree as a first product, comparing the product attribute information of any second product in the product database other than the N initial products with the product attribute information of the first product to obtain a first attribute comparison result corresponding to each second product, determining the second product with the first attribute comparison result less than or equal to the target attribute comparison result as a third product, excluding the N first products and all third products from the product database to obtain a remaining product set, taking the remaining product set as the product database, returning to execute the step of randomly selecting N initial products from the product database until the number of products in the remaining product set meets a preset condition, and obtaining the products in the remaining product set as the product searching result. The product is screened through the product preference degree of a small number of products and in combination with the attribute comparison result, so that the user preference intention is determined with a small query complexity, the screening load of the user is significantly reduced, and the product searching efficiency and accuracy are improved. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0022] Figure 1 is an application environment schematic diagram of a product searching method provided by an embodiment of the present application;
[0023] Figure 2 is a flowchart of a product searching method provided by an embodiment of the present application;
[0024] Figure 3 is a geometric schematic diagram of a screening range in a product searching method provided by an embodiment of the present application;
[0025] Figure 4 is a structural schematic diagram of a product searching device provided by an embodiment of the present application;
[0026] Figure 5 Figure 1 is a structural schematic diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0027] In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular sequences of steps, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known methods, devices, and circuits are omitted so as not to obscure the description of the present application with unnecessary detail.
[0028] It is to be understood that the terminology "includes", "has", "holds", "contains" or variants thereof, when utilized within the present specification and claims, denotes the presence of the stated feature but not the exclusion after the presence of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0029] It is also to be understood that the terminology "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items, and that the term "at least one of' denotes one, or a plurality of, or any combination of the listed items.
[0030] As used in the description of the application and the appended claims, the term "if' can be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [the described condition or event]" or "in response to detecting [the described condition or event]" depending on the context.
[0031] In addition, the terms "first", "second", "third", etc. as used in the description of the application and the appended claims are not used to denote or imply relative importance but are merely to distinguish one element from another.
[0032] Reference within the specification of this patent to, "one embodiment," "an embodiment," or "some embodiments," means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearances of the phrase "in one embodiment" or "in some embodiments" in various places within specified
[0033] It should be understood that the magnitude of the serial number of each step in the following embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the application.
[0034] In order to illustrate the technical solutions of the application, the following will be described through specific embodiments.
[0035] The product searching method provided by the embodiment one of the application can be applied in the application environment as shown in Figure 1 , wherein the client and the server communicate. The client includes but is not limited to a palm computer, a desktop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cloud terminal device, a personal digital assistant (PDA), and the like. The server can be a stand-alone server, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and basic cloud computing services such as big data and artificial intelligence platforms.
[0036] Referring to Figure 2 , it is a flowchart of the product searching method provided by the embodiment one of the application, and the product searching method can be applied to the server in Figure 1 , the computer device corresponding to the server is deployed with a product database, the product database contains a plurality of products and corresponding product attribute information, and the computer device corresponding to the server communicates with the client to send a product to be evaluated by a target user to the client and display it to the target user, and the target user returns the product preference degree of the product through the client. As shown in Figure 2 , the product searching method can include the following steps:
[0037] Step S201, randomly selecting N initial products from a product database, N being an integer greater than or equal to 2.
[0038] Wherein, the product database can contain M products and their corresponding product attribute information, N is an integer greater than or equal to two and less than M, the product can refer to the object to be searched, the searched object includes literature, film and television works, household supplies, wearing ornaments, etc. It should be noted that the product and the product database have a corresponding relationship, for example, when the product is literature, the product database corresponds to the literature database, when the product is film and television works, the product database corresponds to the film and television works database, etc. The initial product can refer to the selected product that needs to be sent to the target user for product preference degree evaluation, to provide reference for subsequent product screening.
[0039] The product attribute information can refer to the information used to describe the characteristics of the product. The product attribute information usually includes at least one dimension. In this embodiment, the product attribute information can include multiple dimensions, such as hundreds of dimensions. For example, when the product is a film and television work, the product attribute information can include type, release time, duration, country of production, etc. It should be noted that the product attribute information can be defined by the implementer. In a single product search process, the dimension of the product attribute information is fixed, while in different product search processes, the dimension of the product attribute information can be different to better adapt to personalized search tasks.
[0040] Specifically, the product database is stored in the corresponding computer device of the server. The database can be updated by the implementer as needed to add or delete products, modify product attribute information of the products, etc. The random selection process can be realized by random sampling, for example, each product in the product database is assigned the same sampling probability 1 / M, and N products are sampled by non-replacement sampling as randomly selected products. It should be noted that since this embodiment is implemented under the condition of minimum priori, random sampling is more consistent with no priori. Of course, the implementer can also assign different sampling probabilities to different products according to actual needs.
[0041] The above step of randomly selecting N initial products from the product database extracts a small number of products from the product database as initial products, so that the subsequent interaction with the target user to obtain the product preference degree can minimize the number of questions to the target user, thereby effectively improving the efficiency of user interaction, and further improving the efficiency of product search.
[0042] Step S202, sending the N initial products to the target user, obtaining the product preference degree of the target user for the N initial products, and selecting the initial product with the highest product preference degree as the first product.
[0043] The target user can refer to a user who needs to find a product, and the product preference of the target user is usually unknown. The product preference degree can be used to describe the selection intention of the target user for each initial product. The first product can refer to a product that is most suitable for the target user's preference among all the selected initial products.
[0044] Specifically, the implementer can send each initial product and each other initial product to the user to form a product pair. Assuming that the number of initial products is N, each initial product needs to form N-1 product pairs. It should be noted that, due to the existence of product pairs that are essentially the same, there are actually only (N+1) * N / 2 product pairs in the initial product set that need to be compared by the target user. After obtaining the product preference degree of the target user for N initial products, all the initial products can be sorted. In actual use, the implementer can use a sorting algorithm to improve the calculation efficiency of the sorting process. The sorting algorithm can use, for example, quicksort, hill sort, selection sort, bubble sort, merge sort, etc. In this embodiment, quicksort can be selected.
[0045] It should be noted that, in this embodiment, it is assumed that the target user can accurately select an initial product that is more suitable for his / her preference, that is, it is assumed that there is no conflict between the selection results of the target user for each group of product pairs. For example, if the target user's preference degree for product A is greater than that for product B, and the target user's preference degree for product B is greater than that for product C, it is assumed that the target user will necessarily select product A when selecting between product A and product C.
[0046] In one embodiment, the implementer can also send N initial products to the target user in the form of pairwise combination. For example, two sets are preset, namely a sent set and an unsent set. Initially, the unsent set contains N initial products, and the sent set is empty. Two initial products are randomly selected from all the initial products in the unsent set to form a product pair, and the selected initial products are removed from the unsent set and added to the sent set. The product pair is sent to the target user, and the target user selects an initial product that he / she prefers. Then, the selected initial product is combined with a new initial product randomly selected from the unsent set to form a product pair. The steps of removing the selected initial product from the unsent set, adding it to the sent set, and sending the product pair to the target user are repeated until the target user selects an initial product that he / she prefers. Finally, the first product is directly obtained.
[0047] Optionally, N initial products are sent to the target user, the product preference degree of the target user for the N initial products is obtained, and the initial product with the highest product preference degree is selected as the first product. The method comprises the following steps:
[0048] For any initial product, send N-1 product combinations formed by the initial product and every other initial product to the target user, and obtain combination preference information of the target user for each product combination;
[0049] According to the combination preference information of the N-1 product combinations, determine the product preference degree of the target user for the initial product;
[0050] According to the product preference degrees corresponding to the N initial products from large to small, obtain a sorting result, and select the initial product at the top of the sorting result as the first product.
[0051] Wherein, each initial product can form N-1 product combinations with other initial products, the product preference degree can represent a quantitative representation of the preference of the target user for the initial product, and the sorting result S can be represented as: S={s1,…,s N}, wherein s1 can represent the initial product at the top of the sorting result, that is, the first product.
[0052] Optionally, according to the combination preference information of the N-1 product combinations, the product preference degree of the target user for the initial product comprises:
[0053] According to the combination preference information of each product combination, determine the preferred product and the non-preferred product in the product combination;
[0054] Statistically, the number of preferred products corresponding to the initial product is the preferred product;
[0055] According to the number of preferred products and the number of all product combinations, determine the product preference degree of the target user for the initial product.
[0056] Wherein, the preferred product can be the initial product that the target user prefers in the product combination composed of two initial products currently displayed to the target user, that is, the initial product that better meets the preference of the target user, and correspondingly, the non-preferred product can be the initial product that the target user prefers less in the two initial products currently displayed to the target user. The number of preferred products can be the number of initial products selected as preferred products in the N-1 product combinations to which the initial product belongs.
[0057] Specifically, different users have different preferences for products, but most of the time, users cannot accurately describe their own needs, that is, users cannot easily and accurately use numerical values to describe such preferences, and users are better at relative comparison than absolute evaluation. For example, users usually easily choose one of two video works, but it is difficult to score the exact preference degree of a video work, therefore, the embodiment adopts a pairwise comparison method to determine the preferred product, and then determines the product preference degree according to the result of the pairwise comparison.
[0058] In this embodiment, the preference of the target user for the initial products is determined more accurately by comparing the product combinations formed by the two initial products with the target user, and the interaction with the target user is realized in a lower interaction difficulty through pairwise comparison.
[0059] Optionally, after sending the N initial products to the target user, obtaining the product preference degrees of the target user for the N initial products, and selecting the initial product with the highest product preference degree as the first product, the method further comprises:
[0060] randomly selecting test products corresponding to the first quantity from the product database, the first quantity being an integer greater than or equal to 2;
[0061] comparing the product attribute information of each test product with the product attribute information of the first product to determine a second attribute comparison result corresponding to each test product;
[0062] counting a second quantity of test products whose second attribute comparison result is greater than the target attribute comparison result, and determining a test ratio according to the second quantity and the first quantity;
[0063] if the test ratio is greater than a preset ratio, increasing N by 1, and returning to execute the step of randomly selecting N initial products from the product database.
[0064] The first quantity can refer to the number of test products selected, and the first quantity can be represented as P, P being an integer greater than or equal to 2 and less than M, in particular, the value of P should be less than O(logM), O(logM) is used to describe the complexity, and the second attribute comparison result can be used to describe the difference information between the product attribute information of a test product and the product attribute information of the first product.
[0065] The target attribute comparison result can be used to measure whether the test product meets the preset condition, for example, the preset condition can refer to the product attribute information being similar to each initial product or the preference degree being lower than each initial product, and being similar to each initial product can refer to being similar to the product attribute information of each initial product.
[0066] The second quantity can refer to the number of test products meeting the preset condition, the test ratio can represent the proportion of the number of test products meeting the preset condition in all test products, and the preset ratio can be used to measure the screening ability of the first product for test products based on the current each initial product.
[0067] Specifically, the product attribute information can be represented in the form of a vector in this embodiment, so as to facilitate quantitative comparison between product attribute information, that is, each dimension in the product attribute information corresponds to an element in the vector, and the element value of the element corresponds to the attribute value of the dimension. For example, for a film and television work product, the type dimension corresponds to the first element in the vector, when the type is action type, the element value of the first element is 0, when the type is comedy type, the element value of the first element is 1, and so on.
[0068] The comparison process can adopt distance measurement methods such as Euclidean distance and cosine distance. In this embodiment, Euclidean distance is used for comparison and measurement of product attribute information, and the target attribute comparison result can be set manually, for example, set to a vector with all elements being 10.
[0069] In this embodiment, the preset ratio can be set to 3 / 8. When the test ratio is greater than the preset ratio, it indicates that the number of test products considered to meet the preset condition in all test products is small, that is, it can be considered that the number of test products filtered out is small, so the selection number of initial products can be adjusted. The adjustment method in this embodiment is to increase N by 1 and reselect N initial products. When the test ratio is less than or equal to the preset ratio, it indicates that the number of test products considered to meet the preset condition in all test products is large, that is, it can be considered that the number of test products filtered out is large, so the selection number of initial products does not need to be adjusted.
[0070] In this embodiment, the selection of multiple test products effectively determines the screening ability of each initial product selected for random products, and the selection number of initial products can be adaptively adjusted based on this to effectively ensure the accuracy of product screening based on all initial products, thereby improving the efficiency and accuracy of product searching.
[0071] Optionally, the N initial products are sorted in descending order according to the product preference degree corresponding to the N initial products, and after obtaining the sorting result, the method further includes:
[0072] Comparing the product attribute information corresponding to any adjacent two initial products in the sorting result to determine N-1 groups of third attribute comparison results corresponding to adjacent two initial products;
[0073] Weighting the N-1 groups of third attribute comparison results to obtain a fourth attribute comparison result;
[0074] Adding the fourth attribute comparison result and a preset acceptable threshold to determine the target attribute comparison result.
[0075] The third attribute comparison result can be used to represent difference information between product attribute information of the initial product in front of the sequence and product attribute information of the initial product behind the sequence.
[0076] The fourth attribute comparison result can be used to determine a product representation range close to each initial product or less than a preference degree of each initial product. The preset acceptable threshold can be set by the target user, representing a product whose utility difference is not less than the acceptable threshold. The utility difference can be used to represent a difference in preference degree of a product compared with an optimal product.
[0077] Specifically, assuming that the sorting result S contains three products, denoted as S={s1, s2, s3}, the third attribute comparison result can be represented as ||s2-s1||2 and ||s3-s2||2. The corresponding fourth attribute comparison result can be represented as ||s2-s1||2+||s3-s2||2.
[0078] Correspondingly, when the sorting result S contains N products, the fourth attribute comparison result can be represented as The preset value can be represented as
[0079] The preset condition satisfied by the first attribute comparison result of the second product s can be represented as:
[0080]
[0081] Optionally, the N-1 sets of third attribute comparison results are weighted to obtain the fourth attribute comparison result, including:
[0082] The adjustable weight corresponding to the N-1 sets of third attribute comparison results is obtained, and the N-1 sets of third attribute comparison results and the adjustable weight are weighted to obtain a weighted result;
[0083] The adjustable weight corresponding to the N-1 sets of third attribute comparison results is dynamically adjusted, the maximum value of the weighted result is determined, and the maximum value of the weighted result is determined as the fourth attribute comparison result.
[0084] Each third attribute comparison result corresponds to an adjustable weight, the constraint of the adjustable weight is a value greater than or equal to zero, and the adjustable weight can be used to adjust the representation range of the product satisfying the preset condition. The maximum value of the weighted result can be used to represent the maximum representation range of the product satisfying the preset condition.
[0085] Specifically, the preset condition satisfied by the first attribute comparison result of the second product s at this time can be represented as:
[0086]
[0087] Wherein, a j may refer to the adjustable weight corresponding to the jth third attribute comparison result.
[0088] The above formula can be converted to:
[0089]
[0090] The left side of the formula can be solved using a quadratic programming solver.
[0091] Referring to Figure 3 is a geometric diagram of a screening range in a product searching method provided by Embodiment One of the present application, wherein each point represents product attribute information of a product, in the present embodiment, the product attribute information is set to two dimensions for ease of representation, W in the diagram can refer to a preference vector of a target user, the point on W is the optimal point, and the relatively optimal point range can be determined according to the tangent line at the optimal point and the straight line R at a distance of ε from the optimal point, it can be seen that the relatively optimal point is two in the present embodiment, a in the diagram can represent the preset acceptable threshold ε.
[0092] Following the above example, the products contained in the sorting result S correspond to s1, s2 and s3 in the diagram respectively, through the operation between vectors, the range covered by the fourth attribute comparison result can be represented as the range within the sector formed by the ray L1 and the ray L2, here, the difference between s2 and s1 can be regarded as the vector from s1 to s2, similarly, the difference between s3 and s2 can be regarded as the vector from s2 to s3, in addition, since each third attribute comparison result has a corresponding adjustable weight, the vector from s1 to s2 can be the vector from s1 to any point on the ray L2 after adjustment, the vector from s2 to s3 can be the vector from s1 to any point on the ray L1 after adjustment, according to the principle of vector addition, any point within the sector formed by the ray L1 and the ray L2 can be represented by the fourth attribute comparison result, at this time, if the second product s is within the sector formed by the ray L1 and the ray L2, it is obvious that is 0, which satisfies the preset condition; similarly, any point within the sector formed by the ray L3 and the ray L4 can be represented by the preset value, at this time, if the second product s is within the sector formed by the ray L1 and the ray L2, it is obvious that is a value less than or equal to ε, which also satisfies the preset condition.
[0093] In the embodiment, the target user is allowed to sort a small amount of products, and then a quadratic programming is used to solve the designed discrimination condition to exclude suboptimal products, so that the product screening process is quickly and accurately realized, and the efficiency and accuracy of product searching are improved.
[0094] The step of sending N initial products to the target user, obtaining the product preference degree of the target user for the N initial products, and selecting the initial product with the highest product preference degree as the first product provides a comparison object, i.e., the first product, for the subsequent product attribute information comparison process, so that the comparison result based on the first product is more accurate.
[0095] In step S203, for any second product in the product database except the N initial products, the product attribute information of the second product and the product attribute information of the third product are compared to obtain a first attribute comparison result corresponding to each second product.
[0096] The second product can refer to a product in the product database that is not selected as an initial product, i.e., a product that needs to be subjected to a product screening operation, and the first attribute comparison result can be used to represent the difference information between the product attribute information of the second product and the product attribute information of the first product.
[0097] Optionally, comparing the product attribute information of the second product and the product attribute information of the first product to obtain a first attribute comparison result corresponding to each second product includes:
[0098] The product attribute information of the second product and the product attribute information of the first product are subtracted in attribute to obtain a subtraction result, and the subtraction result is determined as the first attribute comparison result corresponding to the second product.
[0099] The subtraction result can represent the distance measurement result between the product attribute information of the second product and the product attribute information of the first product.
[0100] Specifically, the product attribute information of the second product can be represented as s, and the product attribute information of the temporary product can be represented as s1 in the above example, and the attribute comparison result can be represented as ||s-s1||2.
[0101] In the embodiment, the comparison of the product attribute information is performed in the form of a vector, so that the comparison process is convenient to calculate and the efficiency of the comparison process is improved.
[0102] The step of comparing the product attribute information of the second product and the product attribute information of the third product for any second product in the product database except the N initial products to obtain a first attribute comparison result corresponding to each second product provides a basis for the subsequent product screening process, so that the accuracy and efficiency of the product screening process are improved.
[0103] Step S204, the second product with the first attribute comparison result less than or equal to the target attribute comparison result is determined as a third product, N first products and all third products are excluded from the product database, and a remaining product set is obtained.
[0104] The third product can refer to the second product meeting a preset condition, the preset condition can refer to the product attribute information being similar to each initial product or the preference degree being lower than each initial product, the similar to each initial product can refer to the product attribute information being similar to each initial product, and the remaining product set can refer to the remaining result of all second products after product screening.
[0105] The above step of determining the second product with the first attribute comparison result less than or equal to the target attribute comparison result as the third product, excluding N first products and all third products from the product database, and obtaining the remaining product set, enables the subsequent iteration process to only need to be performed on the products that are not screened in the previous iteration, thereby improving the efficiency of product screening. In general, the embodiment only needs to perform at most O(log M) screening processes to process all M products in the product database.
[0106] Step S205, the remaining product set is taken as the product database, and the step of randomly selecting N initial products from the product database is returned to be executed until the number of products in the remaining product set meets a preset condition, and the products in the remaining product set are obtained as product search results.
[0107] The number of products can refer to the statistical number of remaining products, and the preset condition can be used to measure whether the product screening process can be terminated.
[0108] Specifically, when the number of products meets the preset condition, it is considered that the product screening process can be terminated, and the products in the remaining product set are obtained as the product search results.
[0109] When the number of products does not meet the preset condition, it is considered that the product screening process cannot be terminated, and the step of randomly selecting N products from the product database is returned to be executed. At this time, the product database has been updated, which is equivalent to screening the products that have not been screened again.
[0110] It should be noted that in the embodiment, the preset condition can be set as the number of products being less than a preset number, and the preset number can be set as 3. At this time, it is indicated that all products have been screened out by the optimal product, or most products have been screened out by the better product. The optimal product or the better product exists in the last screening process, and the first product corresponding to the last screening process can be sent to the target user as the product search result.
[0111] The step of returning to execute the step of randomly selecting N products from the preset product database to form an initial product set until the number of products in the remaining product set meets the preset condition, and obtaining the products in the remaining product set as the product search result, in the worst case, only needs The number of user requests is N-1 in the worst case compared with the conventional method, which greatly improves the efficiency of product search, and can be applied to hundreds of higher dimensions without assuming prior conditions, thereby achieving better product search effect and higher scalability.
[0112] In this embodiment, the products are screened by the product preference degree of a small number of products combined with the attribute comparison result, so as to determine the user's preference intention with small query complexity, significantly reducing the user's screening load, and being suitable for high-dimensional attribute products and more diversified user preferences, thereby improving the product search efficiency and accuracy.
[0113] Corresponding to the product search method of the above embodiment, Figure 4 The structure block diagram of the product search device provided by the second embodiment of the present application is shown, and the product search device applies a service end. The computer device corresponding to the service end is deployed with a product database. The product database contains a plurality of products and corresponding product attribute information. The computer device corresponding to the service end communicates with the client to send the product pair to be evaluated by the target user to the client and show it to the target user. The target user returns the product preference degree of the product through the client. For the convenience of description, only the part related to the embodiment of the present application is shown.
[0114] Referring to Figure 4 The product search device comprises:
[0115] The product selection module 41 is configured to randomly select N initial products from the product database. Each product in the product database corresponds to a product attribute information. N is an integer greater than or equal to 2.
[0116] The user interaction module 42 is configured to send the N initial products to the target user, obtain the product preference degree of the target user for the N initial products, and select the initial product with the highest product preference degree as the first product.
[0117] The attribute comparison module 43 is configured to compare the product attribute information of the second product with the product attribute information of the first product for any second product in the product database except the N initial products, and obtain the first attribute comparison result corresponding to each second product.
[0118] The product exclusion module 44 is configured to determine the second product whose first attribute comparison result is less than or equal to the target attribute comparison result as a third product, exclude N first products and all third products from the product database, and obtain a remaining product set;
[0119] The product searching module 45 is configured to take the remaining product set as the product database, return to execute the step of randomly selecting N initial products from the product database until the number of products in the remaining product set meets a preset condition, and obtain the products in the remaining product set as product searching results.
[0120] Optionally, the user interaction module 42 includes:
[0121] The product combination unit is configured to, for any initial product, send N-1 product combinations formed by the initial product and other initial products to the target user, and obtain combination preference information of the target user for each product combination;
[0122] The preference determination unit is configured to determine the product preference degree of the target user for the initial product according to the combination preference information of the N-1 product combinations.
[0123] The product sorting unit is configured to sort the N initial products according to the product preference degrees from large to small to obtain a sorting result, and select the initial product at the top of the sorting result as the first product.
[0124] Optionally, the preference determination unit includes:
[0125] The type determination sub-unit is configured to determine a preferred product and a non-preferred product in the product combination according to the combination preference information of each product combination.
[0126] The quantity statistics sub-unit is configured to count the number of preferred products corresponding to the initial product as the preferred product.
[0127] The degree calculation sub-unit is configured to determine the product preference degree of the target user for the initial product according to the number of preferred products and the number of all product combinations.
[0128] Optionally, the attribute comparison module 43 includes:
[0129] The attribute subtraction unit is configured to subtract the product attribute information of the second product from the product attribute information of the first product to obtain a subtraction result, and determine the subtraction result as the first attribute comparison result corresponding to the second product.
[0130] Optionally, the product searching device further includes:
[0131] The test screening module is configured to randomly select a first quantity of test products from the product database, the first quantity being an integer greater than or equal to 2;
[0132] The test comparison module is configured to compare the product attribute information of each test product with the product attribute information of the first product, and determine a second attribute comparison result corresponding to each test product.
[0133] The test statistics module is configured to count a second quantity of test products whose second attribute comparison result is greater than the target attribute comparison result, and determine a test ratio based on the second quantity and the first quantity.
[0134] The parameter adjustment module is configured to increase N by 1 and return to execute the step of randomly selecting N initial products from the product database if the test ratio is greater than a preset ratio.
[0135] Optionally, the product searching device further includes:
[0136] The attribute comparison module is configured to compare the product attribute information of any two adjacent initial products in the sorting result, and determine a third attribute comparison result corresponding to the N-1 groups of adjacent initial products.
[0137] The weighting processing module is configured to perform weighting processing on the N-1 groups of third attribute comparison results to obtain a fourth attribute comparison result.
[0138] The threshold adding module is configured to add the fourth attribute comparison result and a preset acceptable threshold to determine the target attribute comparison result.
[0139] Optionally, the weighting processing module includes:
[0140] The weight acquisition unit is configured to acquire adjustable weights corresponding to the N-1 groups of third attribute comparison results, and perform weighting processing based on the N-1 groups of third attribute comparison results and the adjustable weights to obtain a weighting result.
[0141] The dynamic adjustment unit is configured to dynamically adjust the adjustable weights corresponding to the N-1 groups of third attribute comparison results respectively, determine a maximum value of the weighting result, and determine the maximum value of the weighting result as the fourth attribute comparison result.
[0142] It should be noted that the information interaction, execution process, and the like between the above modules, units, and sub-units are based on the same concept as the method embodiments, and specific functions and technical effects brought by the same can be referred to the method embodiments part, which will not be described here.
[0143] Figure 5 A structural schematic diagram of a computer device for the third embodiment of the present application is shown in FIG. 3. Figure 5As shown, the computer device of this embodiment includes: at least one processor ( Figure 5 Only one is shown), a memory, and a computer program stored in the memory and executable on at least one processor, wherein when the processor executes the computer program, the steps of any of the above-mentioned product search method embodiments are implemented.
[0144] The computer device may include, but is not limited to, a processor and a memory. It will be understood by those skilled in the art that Figure 5 The above is merely an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include a network interface, a display screen, and an input device.
[0145] The processor may be a CPU, or other general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. A general-purpose processor may be a microprocessor, or any conventional processor.
[0146] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory can be the memory of a computer device, and the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The readable storage medium can be the hard disk of the computer device, and in other embodiments, it can also be an external storage device of the computer device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Furthermore, the memory can also include both the internal storage unit of the computer device and the external storage device. The memory is used to store the operating system, application programs, boot loaders (BootLoader), data, and other programs, such as the program code of the computer program. The memory can also be used to temporarily store data that has been output or is about to be output.
[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the above-described functions. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the unit and module in the above device can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here. If the integrated unit is realized in the form of software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the present application realizes all or part of the processes in the above-mentioned embodiment methods, which can be completed by a computer program to instruct related hardware. The computer program can be stored in a computer readable storage medium, and when the processor executes the computer program, the steps of the above-mentioned method embodiment can be realized. The computer program includes computer program code, which can be in the form of source code, object code, executable file or some intermediate form, etc. The computer readable medium can at least include any entity or device capable of carrying computer program code, recording medium, computer memory, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, according to legislation and patent practice, the computer readable medium cannot be an electrical carrier signal and a telecommunication signal.
[0148] The present application realizes all or part of the processes in the above-mentioned embodiment methods, which can also be completed by a computer program product. When the computer program product runs on the computer device, it makes the computer device execute the steps in the above-mentioned method embodiment.
[0149] In the above-mentioned embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0150] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0151] In the embodiments provided by the present application, it should be understood that the disclosed apparatus / computer device and method can be implemented in other manners. For example, the described apparatus / computer device embodiments are merely schematic. For example, the division of the modules or units can be different, and each can include a plurality of sub-units. Some or all of the modules or units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0152] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e. may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0153] The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A product search method characterized by comprising: The method comprises the following steps: randomly selecting N initial products from a product database, each product in the product database corresponding to product attribute information, N being an integer greater than or equal to 2; sending the N initial products to a target user, obtaining product preference degrees of the target user for the N initial products, and selecting an initial product with the highest product preference degree as a first product; comparing product attribute information of any second product in the product database other than the N initial products with product attribute information of the first product to obtain a first attribute comparison result corresponding to each second product; determining a second product with a first attribute comparison result less than or equal to a target attribute comparison result as a third product, excluding the N first products and all third products from the product database to obtain a remaining product set; taking the remaining product set as the product database, returning to the step of randomly selecting N initial products from the product database until the number of products in the remaining product set meets a preset condition, and obtaining the products in the remaining product set as product search results.
2. The product search method according to claim 1, characterized by, The step of sending the N initial products to the target user, obtaining product preference degrees of the target user for the N initial products, and selecting an initial product with the highest product preference degree as a first product comprises the following steps: for any initial product, sending N-1 product combinations formed by the initial product and other N-1 initial products to the target user, and obtaining a combination product preference degree of each product combination; determining a product preference degree of the target user for the initial product according to combination product preference degrees of N-1 product combinations; sorting the N initial products according to product preference degrees from high to low to obtain a sorting result, and selecting an initial product at the top of the sorting result as the first product.
3. The product search method according to claim 2, characterized by, The step of determining a product preference degree of the target user for the initial product according to combination product preference degrees of N-1 product combinations comprises the following steps: determining a preferred product and a non-preferred product in the product combination according to combination preference information of each product combination; counting a number of preferred products corresponding to the preferred product; determining a product preference degree of the target user for the initial product according to the number of preferred products and the number of all product combinations.
4. The product search method according to claim 1, characterized by, The step of comparing product attribute information of the second product with product attribute information of the first product to obtain a first attribute comparison result corresponding to each second product comprises the following steps: performing attribute subtraction on the product attribute information of the second product and the product attribute information of the first product to obtain a subtraction result, and determining the subtraction result as the first attribute comparison result corresponding to the second product.
5. The product search method according to claim 1, wherein After the step of sending the N initial products to the target user, obtaining product preference degrees of the target user for the N initial products, and selecting an initial product with the highest product preference degree as a first product, the method further comprises the following steps: randomly selecting a first quantity of test products from the product database, the first quantity being an integer greater than or equal to 2; comparing product attribute information of each of the test products with the product attribute information of the first product to determine a second attribute comparison result corresponding to each of the test products; counting a second quantity of test products whose second attribute comparison result is greater than the target attribute comparison result, and determining a test ratio according to the second quantity and the first quantity; if the test ratio is greater than a preset ratio, increasing N by 1, and returning to the step of randomly selecting N initial products from the product database.
6. The product search method according to claim 2, wherein After the N initial products are sorted in descending order according to the product preference degrees corresponding to the N initial products to obtain a sorting result, the method further includes: comparing product attribute information corresponding to any two adjacent initial products in the sorting result to determine a third attribute comparison result corresponding to N-1 groups of adjacent initial products; performing weighted processing on the N-1 groups of third attribute comparison results to obtain a fourth attribute comparison result; adding the fourth attribute comparison result and a preset acceptable threshold to determine the target attribute comparison result.
7. The product search method according to claim 6, wherein The performing weighted processing on the N-1 groups of third attribute comparison results to obtain a fourth attribute comparison result includes: obtaining adjustable weights corresponding to the N-1 groups of third attribute comparison results, and performing weighted processing based on the N-1 groups of third attribute comparison results and the adjustable weights to obtain a weighted result; dynamically adjusting the adjustable weights corresponding to the N-1 groups of third attribute comparison results respectively to determine a maximum value of the weighted result, and determining the maximum value of the weighted result as the fourth attribute comparison result.
8. A product search device, characterized by comprising: The product searching apparatus includes: a product selection module configured to randomly select N initial products from a product database, each product in the product database corresponding to product attribute information, and N being an integer greater than or equal to 2; a user interaction module configured to send the N initial products to a target user, obtain product preference degrees of the N initial products by the target user, and select an initial product with the highest product preference degree as a first product; an attribute comparison module configured to compare product attribute information of any second product in the product database other than the N initial products with product attribute information of the first product to obtain a first attribute comparison result corresponding to each second product; a product exclusion module configured to determine a second product whose first attribute comparison result is less than or equal to a target attribute comparison result as a third product, exclude N first products and all third products from the product database to obtain a remaining product set; a product searching module configured to take the remaining product set as the product database, return to the step of randomly selecting N initial products from the product database, and obtain products in the remaining product set as a product searching result until a product quantity in the remaining product set meets a preset condition.
9. A computer device, comprising: The computer device comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and the processor implements the product searching method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the product searching method according to any one of claims 1 to 7.
Citation Information
Patent Citations
User preference-based message pushing method and platform
CN105975483A
A cost reduction method in crowdsourced TOP-k queries
CN109254983A