Incremental query method based on linear programming

By using an incremental query method based on linear programming, the problems of explicit user preferences and quality assurance in traditional query methods are solved. This enables efficient and accurate return of products of interest to users in the database, thereby improving query efficiency.

CN115563155BActive Publication Date: 2026-01-13SHENZHEN INST OF COMPUTING SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211234303.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-10
Publication Date
2026-01-13
Estimated Expiration
2042-10-10

AI Technical Summary

Technical Problem

Existing database query methods struggle to accurately identify products that users are interested in. Traditional top-k queries require explicit user preferences, while skyline queries cannot provide quality assurance for incremental queries.

Method used

An incremental query method based on linear programming is adopted. By obtaining the product attribute information, the target attribute is determined, a set of returned products is generated, and the optimal solution is calculated using linear programming. This provides incremental queries to meet user satisfaction requirements.

Benefits of technology

It enables the return of high-quality products even when users are dissatisfied, saving search time, improving search efficiency, and providing theoretically guaranteed search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115563155B_ABST
    Figure CN115563155B_ABST
Patent Text Reader

Abstract

The application provides a linear programming-based incremental query method for querying a target product in a database, the method comprising: acquiring attribute information of all products in the database and types corresponding to the attribute information; determining target attributes corresponding to the target product from the attribute information of all products through the types; determining all returned product sets in the database and generating a first target returned product set from the all returned product sets; when a satisfaction degree corresponding to the first target returned product set is less than an expected satisfaction degree, determining a second target returned product set according to the target attributes and the preset number; and when a satisfaction degree corresponding to the second target returned product set is greater than or equal to the expected satisfaction degree, setting the second target returned product set as the target product. The method supports an incremental query scene, saves user query time and improves query efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data querying, and in particular to an incremental query method based on linear programming. Background Technology

[0002] In recent years, databases have grown increasingly massive. A single database often stores tens of thousands of products. However, when users actually access a database, they are not interested in all the products. They only aim to retrieve a small number of products that meet their needs. Due to the sheer volume of products in a database, it's impractical to require users to traverse the entire database to locate the products they are interested in. Therefore, modern databases need to provide convenient query methods that allow users to find products of interest as accurately as possible without expending excessive effort traversing the entire dataset.

[0003] This problem presents three main challenges. First, user needs are complex and diverse, and most users cannot accurately describe their needs. The trade-offs users make between different attributes often exist abstractly in their minds. Database systems cannot obtain precise descriptions of user preferences, making it difficult to accurately find products that users are interested in. Second, when using search engines, it is difficult to accurately return the products users want without fully understanding their intent. Finally, most existing query methods are heuristic queries, which cannot guarantee the quality of the returned products. To accurately find products that users are interested in within a database, scholars have proposed various database query methods. Traditional queries include top-k queries and skyline queries.

[0004] In top-k queries, users need to explicitly state their preferences. In contrast, skyline queries do not require users to express any preferences; they utilize a concept called "dominance" to retrieve products from the database and return them to the user. While skyline queries have the advantage of not requiring precise descriptions of user preferences, they cannot directly perform incremental queries. Even when returning incremental results through randomization, skyline queries cannot provide effective quality assurance for the returned results.

[0005] Traditional top-k queries and skyline queries are very common, but they each have their drawbacks. For top-k queries, the drawback is that they require users to explicitly state their preferences, i.e., the weight each attribute carries in their priorities. This requirement is very stringent, and few users can clearly articulate their preferences in practice; some cannot even accurately describe their preferences themselves. For skyline queries, the drawback is the inability to perform incremental queries with guaranteed quality. Although skyline queries utilize the concept of "dominance" to exclude products dominated by other products in the database, they lack a mechanism for further filtering or sorting the remaining products, failing to return products to the user in a quality order. Therefore, in the worst-case scenario where the concept of "dominance" cannot exclude products at all, skyline queries may not only return the entire database to the user but also fail to provide quality assurance for the returned products, thus failing to help users accurately find products of interest. Summary of the Invention

[0006] In view of the aforementioned problems, this application is proposed to provide an incremental query method based on linear programming that overcomes or at least partially solves the aforementioned problems, comprising:

[0007] An incremental query method based on linear programming is used to query target products in a database. The method includes:

[0008] Obtain the attribute information of all products in the database and the type corresponding to the attribute information, and determine the target attribute corresponding to the target product from the attribute information of all products based on the type;

[0009] Determine all sets of returned products in the database, and select a preset number of first target returned products from all sets of returned products to generate a first target returned product set;

[0010] When the satisfaction level of the first target returned product set is less than the expected satisfaction level, a second target returned product set is determined from all returned product sets based on the target attribute and the preset quantity.

[0011] When the satisfaction level corresponding to the second target returned product set is greater than or equal to the expected satisfaction level, the second target returned product corresponding to the second target returned product set is set as the target product.

[0012] Further, the step of obtaining the attribute information of all products in the database and the types corresponding to the attribute information, and determining the target attribute corresponding to the target product from the attribute information of all products through the type, includes:

[0013] Retrieve all attribute information corresponding to all products in the database;

[0014] Based on all the attribute information, a type corresponding to all the attribute information is generated, wherein the type includes product value information and product non-value information;

[0015] The target attribute corresponding to the product value information is determined by filtering from all the attribute information.

[0016] Further, the step of determining all return product sets in the database and selecting a preset number of first target return products from all return product sets to generate a first target return product set includes:

[0017] Identify all returned products within the database;

[0018] Generate the set of all returned products based on all returned products;

[0019] Based on the preset quantity, determine the first target returned product corresponding to the preset quantity from the set of all returned products;

[0020] Generate a set of products returned by the first target based on all products returned by the first target.

[0021] Further, the step of determining the second target return product set from all return product sets based on the target attribute and the preset quantity includes:

[0022] Determine the target preference attribute based on the target attribute;

[0023] Based on the target preference attribute, linear programming is performed on all returned products in the set of all returned products to generate the optimal solution corresponding to each of the returned products;

[0024] Sort all returned products according to the optimal solution and the preset quantity, and return all target returned products with sorting order number from the first sorting order number to the preset quantity;

[0025] Based on all the target return products, a second target return product set is generated.

[0026] Further, the step of generating an optimal solution corresponding to each of the returned products in the set of all returned products based on the target preference attribute using linear programming includes:

[0027] Determine the user preference vector based on the target preference attributes;

[0028] Based on the data points corresponding to all returned products in Euclidean space, determine the one-to-one correspondence between all returned products;

[0029] Based on the user preference vector and the data points, linear programming is used to generate the optimal solution corresponding to each of the returned products.

[0030] Further, the step of sorting all returned products according to the optimal solution and the preset quantity, and returning all target returned products with sorting numbers from the first to the preset quantity, includes:

[0031] The return order of all returned products is determined based on the optimal solution.

[0032] In the return order, the cutoff sorting number for the deadline of return is determined by the preset quantity;

[0033] The return order determines all target return products between the first return product and the last return product.

[0034] Further, the step of determining the return order of all returned products based on the optimal solution includes:

[0035] Obtain the optimal solution corresponding to each of the returned products;

[0036] Based on the optimal solution, sort all the returned products in descending order to generate a list of returned products with a one-to-one corresponding sequence number for each returned product;

[0037] The return order is determined based on the returned product list.

[0038] This application also discloses an incremental query device based on linear programming for querying target products in a database, the device comprising:

[0039] The acquisition module is used to acquire attribute information of all products in the database and the type corresponding to the attribute information, and determine the target attribute corresponding to the target product from the attribute information of all products based on the type;

[0040] The first determining module is used to determine all sets of returned products in the database, and select a preset number of first target returned products from all sets of returned products to generate a first target returned product set;

[0041] The second determining module is used to determine a second target return product set from all return product sets based on the target attribute and the preset quantity when the satisfaction corresponding to the first target return product set is less than the expected satisfaction.

[0042] The determination module is configured to set the second target returned product corresponding to the second target returned product set as the target product when the second satisfaction level of the second target returned product set is greater than or equal to the expected satisfaction level.

[0043] This application also discloses an apparatus including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of an incremental query method based on linear programming as described above.

[0044] This application also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of an incremental query method based on linear programming as described above.

[0045] This application has the following advantages:

[0046] In the embodiments of this application, by obtaining the attribute information of all products in the database and the type corresponding to the attribute information, the target attribute corresponding to the target product is determined from the attribute information of all products based on the type; all return product sets in the database are determined, and a preset number of first target return products are selected from all return product sets to generate a first target return product set; when the satisfaction level corresponding to the first target return product set is less than the expected satisfaction level, a second target return product set is determined from all return product sets based on the target attribute and the preset number; when the satisfaction level corresponding to the second target return product set is greater than or equal to the expected satisfaction level, the second target return product corresponding to the second target return product set is set as the target product. This supports a novel incremental query scenario and can effectively provide theoretical guarantees for query results. When a user is not satisfied with the currently returned preset number of products, the next preset number of products can be continuously returned to the user until the user is satisfied. When returning results again, it is not necessary to start from scratch; the linear programming result from the previous query can be used for secondary calculations, greatly saving the user's time in actual queries and thus improving query efficiency. Attached Figure Description

[0047] To more clearly illustrate the technical solution of this application, the drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a flowchart illustrating the steps of an incremental query method based on linear programming provided in an embodiment of this application.

[0049] Figure 2 This is a structural block diagram of an incremental query device based on linear programming provided in an embodiment of this application;

[0050] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0051] To make the objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0052] Reference Figure 1 The diagram illustrates a flowchart of the incremental query method based on linear programming provided in an embodiment of this application.

[0053] An incremental query method based on linear programming is used to query target products in a database. The method includes:

[0054] S110. Obtain the attribute information of all products in the database and the type corresponding to the attribute information, and determine the target attribute corresponding to the target product from the attribute information of all products by the type.

[0055] S120. Determine all return product sets in the database, and select a preset number of first target return products from all return product sets to generate a first target return product set;

[0056] S130. When the satisfaction level corresponding to the first target returned product set is less than the expected satisfaction level, a second target returned product set is determined from all returned product sets based on the target attribute and the preset quantity.

[0057] S140. When the satisfaction level corresponding to the second target returned product set is greater than or equal to the expected satisfaction level, the second target returned product corresponding to the second target returned product set is set as the target product.

[0058] In the embodiments of this application, by obtaining the attribute information of all products in the database and the type corresponding to the attribute information, the target attribute corresponding to the target product is determined from the attribute information of all products based on the type; all return product sets in the database are determined, and a first target return product set is generated by selecting a first preset number of first target return products from all return product sets; when the satisfaction level corresponding to the first target return product set is less than the expected satisfaction level, a second target return product set is determined from all return product sets based on the target attribute and the preset number; when the satisfaction level corresponding to the second target return product set is greater than or equal to the expected satisfaction level, the second target return product corresponding to the second target return product set is set as the target product. This supports a novel incremental query scenario and can effectively provide theoretical guarantees for query results. When a user is not satisfied with the currently returned preset number of products, the next preset number of products can be continuously returned to the user until the user is satisfied. When returning results again, it is not necessary to start from scratch; the linear programming result from the previous query can be used for secondary calculation, greatly saving the user's time in actual queries and thus improving query efficiency.

[0059] The incremental query method based on linear programming in this exemplary embodiment will be further described below.

[0060] As described in step S110, the attribute information of all products in the database and the type corresponding to the attribute information are obtained, and the target attribute corresponding to the target product is determined from the attribute information of all products by the type.

[0061] In one embodiment of the present invention, the specific process of step S110, "obtaining the attribute information of all products in the database and the type corresponding to the attribute information, and determining the target attribute corresponding to the target product from the attribute information of all products through the type", can be further described in conjunction with the following description.

[0062] As described in the following steps

[0063] S210. Obtain all attribute information corresponding to all products in the database;

[0064] S220. Based on all the attribute information, classify and generate types corresponding to all the attribute information, wherein the types include product value information and product non-value information;

[0065] S230. Select and determine the target attribute whose type corresponds to the product value information from all the attribute information.

[0066] It should be noted that when retrieving all attribute information for all products in the database, not all attributes are equally important to the user. Therefore, after retrieving all attribute information, it is necessary to classify it into product value information and product non-value information. Attribute information corresponding to the product value information type is selected and marked as the target attribute.

[0067] As an example, product value information refers to information that indicates the value of a product, such as the functional parameters that it can achieve; product non-value information refers to information that indicates the non-value of a product, such as its name or model.

[0068] As an example, the input to a k-regret query is a collection of products in a database, where each product is described by multiple numeric attributes. Specifically, if each product is described by D numeric attributes, each product can be viewed as a data point in a D-dimensional Euclidean space, described by D coordinates. The first coordinate axis corresponds to the value under the first attribute, the second coordinate axis corresponds to the value under the second attribute, and so on.

[0069] In a specific implementation, for example, if the database is a used car database, price and age are two attributes that users care about. Conversely, the horsepower of a used car may not play a role in the decision-making process. Therefore, price and age are much more important than horsepower. To improve efficiency, when querying database products, only the price and age attributes need to be considered, ignoring the horsepower attribute. Thus, the first step is to filter the attributes of each product in the database, retaining those that play a decisive role in the user's decision. Secondly, different users have different preferences for each attribute. For example, regarding horsepower, some users prefer higher horsepower, while others, for fuel efficiency, do not want excessively high horsepower. Therefore, for each selected attribute, the user needs to set a preference for that attribute; that is, the user needs to label the attribute as either a higher value (e.g., year of manufacture, a higher year indicates a newer used car) or a lower value (e.g., price, a lower price indicates a cheaper used car).

[0070] As described in step S120, all sets of returned products in the database are determined, and a preset number of first target returned products are selected from all sets of returned products to generate a first target returned product set.

[0071] In one embodiment of the present invention, the specific process of step S120, "determining all return product sets in the database and selecting a preset number of first target return products from all return product sets to generate a first target return product set", can be further explained in conjunction with the following description.

[0072] As described in the following steps

[0073] S310. Determine all returned products in the database;

[0074] S320. Generate the set of all returned products based on all returned products;

[0075] S330. Determine the first target return product corresponding to the preset quantity from the set of all return products;

[0076] S340. Generate the first target return product set based on all the first target return products.

[0077] It should be noted that, firstly, all returned products in the database are determined, then a set of all returned products is generated based on all returned products, and the first target returned product corresponding to the preset quantity is determined from all returned product sets by a preset quantity; finally, all the first target returned products are combined into a first target returned product set.

[0078] As an example, a preset number of products are returned from all returned product sets. The preset number of returned products constitutes the first target returned product set. The preset number represents the maximum output size that the user wants each time (i.e., the number of returned products does not exceed the preset number of products each time). The preset number is a constant value. If the user is not satisfied with the returned products, i.e., the first target returned product set, the system will continue to select products from the never returned products, i.e., the second target returned product set, which does not exceed the preset number of products, and return them to the user.

[0079] In one specific implementation, the user can set a constant value k, i.e., a preset quantity, to represent the maximum output size the user expects each time (i.e., seeing no more than k products each time). The incremental k-regret query will return no more than k products to the user each time. If the user is not satisfied, it will continue to select no more than k products from the products that have not been returned and return them to the user.

[0080] For incremental k-regret queries, the user checks the satisfaction level of the k products returned each time. If the user is satisfied with the returned products (i.e., the satisfaction level is greater than or equal to the expected satisfaction level), the query stops. If the user is not satisfied with the returned products (i.e., the satisfaction level is less than the expected satisfaction level), the query continues to return k products in the database until the user is satisfied with the returned k products. Based on the set of all returned products, the x* value of all remaining returned products, i.e., the optimal solution, is recalculated, and k products are returned.

[0081] As described in step S130, when the satisfaction level corresponding to the first target returned product set is less than the expected satisfaction level, a second target returned product set is determined from all returned product sets based on the target attribute and the preset quantity.

[0082] In one embodiment of the present invention, the specific process of "determining the second target return product set from all return product sets based on the target attribute and the preset quantity" in step S130 can be further described in conjunction with the following description.

[0083] As described in the following steps

[0084] S410. Determine the target preference attribute based on the target attribute;

[0085] S420. Based on the target preference attribute, perform linear programming calculations on all returned products in the set of all returned products to generate the optimal solution corresponding to each of the returned products;

[0086] S430. Sort all returned products according to the optimal solution and the preset quantity, and return all target returned products with sorting order number from the first sorting order number to the preset quantity.

[0087] S440. Generate a second target return product set based on all the target return products.

[0088] It should be noted that the target preference attribute is determined by the target attribute; linear programming calculation is performed on all return products in all return product sets using the target preference attribute to generate the optimal solution corresponding to each return product; all return products are sorted according to the optimal solution and the preset quantity, and all target return products with the sorting number from the first to the preset quantity are returned; a second target return product set is generated based on all target return products.

[0089] As an example, the target preference attribute is the user's preset preference under this attribute. That is, the user needs to mark this attribute, whether it is an attribute where the larger the value, the better (such as the year of manufacture, the larger the year, the newer the used car) or an attribute where the smaller the value, the better (such as the price, the lower the price, the cheaper the used car).

[0090] In a specific implementation, the set of all products that have been returned is S, which is the set of all returned products. Through linear programming, the next product to be returned is obtained, which is the second target set of returned products. The optimal solution is obtained through linear programming, and the priority of the returned products is determined according to the optimal solution. Then, a specified number of target returned products are returned according to a preset quantity, thereby forming the second target set of returned products.

[0091] Specifically, the larger the x* value of the product corresponding to a data point p, the greater the user's regret because they did not see the product corresponding to data point p in the currently returned product set S (i.e., all returned products). Therefore, the product corresponding to data point p needs to be returned in subsequent outputs. For example, if the calculated x* value for data point p1 is 0.7 and the calculated x* value for data point p2 is 0.9, since 0.9 is greater than 0.7, by comparing the numerical values ​​of x*, because the x* value of data point p2 (0.9) is greater than the x* value of data point p1 (0.7), the product corresponding to data point p2 will be returned before the product corresponding to data point p1.

[0092] Therefore, for the set of all returned products, S, we calculate the x* value of all remaining returned products using linear programming, and sort the x* values ​​from high to low; the products corresponding to the top k data points, which is a preset number, will be returned.

[0093] This allows us to calculate the theoretical guarantee of the regret index for the set of all currently returned products (S), which is the maximum value of x* for the remaining unreturned products, denoted as mrr. mrr means that the user only receives the regret index for the set of all currently returned products (S), not the worst-case regret index for all products in the database.

[0094] As described in step S420, linear programming is performed on all returned products in the set of all returned products based on the target preference attribute to generate the optimal solution corresponding to each of the returned products.

[0095] In one embodiment of the present invention, the specific process of step S420, "generating the optimal solution corresponding to each of the return products in the set of all return products by performing linear programming calculation based on the target preference attribute", can be further explained in conjunction with the following description.

[0096] As described in the following steps

[0097] S510. Determine the user preference vector based on the target preference attribute;

[0098] S520. Determine the data points corresponding to each of the returned products in Euclidean space;

[0099] S530. Based on the user preference vector and the data points, perform linear programming to generate the optimal solution corresponding to each of the returned products.

[0100] It should be noted that the user preference vector is determined by the target preference attribute; then, the data points corresponding to all returned products are determined in Euclidean space; linear programming is performed based on the user preference vector and the data points to generate the optimal solution corresponding to all returned products; and the order of returning products corresponding to the data points is determined by the optimal solution.

[0101] As an example, in a D-dimensional Euclidean data space, a user's preference is represented by an unknown D-dimensional vector u; in a used car database, if price accounts for 40% of a user's preference and age accounts for 60%, i.e., this is a two-dimensional database, then the user's preference vector u is a two-dimensional vector (0.4, 0.6). Generally speaking, in a D-dimensional database (i.e., each product is described by D attributes), the preference vector u is a D-dimensional vector (u[1], u[2], ..., u[D]). If the data point corresponding to the product in the D-dimensional Euclidean space is p, then the user's score for this data point is (where "·" represents the dot product). Based on linear programming, the evaluation index model for each data point is as follows:

[0102] Maximize x to make

[0103] (a) (b)

[0104] Thus, the optimal solution for the linear programming problem is obtained as the value of x*.

[0105] As described in step S430, all returned products are sorted according to the optimal solution and the preset quantity, and all target returned products with sorting numbers from the first to the preset quantity are returned.

[0106] In one embodiment of the present invention, the specific process of step S430, which involves "sorting all returned products according to the optimal solution and the preset quantity, and returning all target returned products with sorting numbers from the first to the preset quantity", can be further described in conjunction with the following description.

[0107] As described in the following steps

[0108] S610. Determine the return order of all returned products based on the optimal solution;

[0109] S620. In the return order, determine the cutoff sorting number for the return cutoff by using the preset quantity;

[0110] S630. All target return products between the first return product and the last return product determined by the return order.

[0111] It should be noted that the return order of all returned products is determined by the optimal solution; the cutoff sorting number for the return is determined by a preset quantity in the return order; and the return order determines all target returned products between the first returned product and the cutoff sorting number.

[0112] As an example, if the sorting index is N, then products with sorting index 1 (ranked first) to sorting index N (ranked Nth) are returned and marked as target return products. All target return products are then combined to form a second target return product set.

[0113] In a specific implementation, ...

[0114] As described in step S610, the return order of all returned products is determined based on the optimal solution.

[0115] In one embodiment of the present invention, the specific process of "determining the return order of all returned products based on the optimal solution" in step S610 can be further explained in conjunction with the following description.

[0116] As described in the following steps

[0117] S710. Obtain the optimal solution corresponding to each of the returned products;

[0118] S720. Sort all returned products in descending order according to the optimal solution to generate a list of returned products with a one-to-one corresponding serial number for all returned products;

[0119] S730. Determine the return order based on the returned product list.

[0120] It should be noted that the optimal solution is obtained for each of the returned products; all optimal solutions are sorted in descending order of value to generate a list of returned products with a corresponding serial number for each returned product; the returned product list is used to determine the return order, and a preset quantity is used to determine the cutoff serial number for the return.

[0121] As an example, consider the following return products: product A (ranked by sorting number 1), product B (ranked by sorting number 2), product C (ranked by sorting number 3), product D (ranked by sorting number 4), and so on up to product N1 (ranked by sorting number N). In one embodiment, if the preset quantity is 3, then the three return products—product A (ranked by sorting number 1), product B (ranked by sorting number 2), and product C (ranked by sorting number 3)—are returned to form a second target return product set. In another embodiment, if the preset quantity is N, then all return products from product A (ranked by sorting number 1), product B (ranked by sorting number 2), product C (ranked by sorting number 3), up to product N1 (ranked by sorting number N) are returned to form a second target return product set.

[0122] Example 1

[0123] It's important to note that various database query methods exist to accurately locate products of interest to users. Traditional queries include top-k queries and skyline queries.

[0124] In top-k queries, users need to explicitly state their preferences. This requirement is very stringent, and few users can clearly articulate their preferences in practice; some cannot even accurately describe their preferences themselves. For example, in a used car database, price and age are two attributes that users care about. Users need to explicitly state that price accounts for 40% of their preference and age accounts for 60%. Based on this specific preference, i.e., the target preference attribute, the database can calculate the specific score for all used cars. By sorting the scores, the top k used cars with the highest scores are returned to the user as output. However, if the user is not satisfied, they need to re-enter their preferences. In reality, users often lack sufficient understanding of their preferences, resulting in the returned products not meeting their actual needs.

[0125] In contrast, skyline queries do not require users to express any preferences. They utilize a concept called "dominance" to retrieve products from the database and return them to the user. Specifically, if car A is better than car B in all attributes, then car A is said to dominate car B. For example, if car A is both cheaper and newer than car B, then car A dominates car B. For a user who only cares about used car prices and age, they will obviously prefer car A over car B. In a skyline query, products that are not dominated by any other product are returned as results. While skyline queries have the advantage of not requiring precise descriptions of user preferences, they cannot perform incremental queries directly. Even when returning incremental results through randomization, skyline queries cannot provide effective quality assurance for the returned results.

[0126] Based on the above premises, in this embodiment of the invention, user Z wants to select a relatively new but inexpensive used car from the database.

[0127] 1. If using a top-k query, user Z needs to provide their exact preferences, such as u = (0.4, 0.6). The scores are sorted, and the top k highest-scoring used cars are returned to user Z as output each time.

[0128] 2. While using a skyline query, although user Z doesn't need to provide preference information, it doesn't support theoretically guaranteed incremental queries. Although it utilizes the concept of "dominance" to exclude products dominated by other products in the database, in the worst case, a skyline query will still return a large number of useless products to user Z.

[0129] 3. If the incremental k-regret query proposed in this invention is used—a linear programming-based incremental query method—user Z only needs to set the desired output size k for each query, for example, k=10. The database will display no more than k used cars each time, ensuring that user Z's regret index is minimized. If user Z is not satisfied with the returned cars, an incremental k-regret query can be performed. The database system will then return more high-quality used cars, further reducing user Z's regret index. It is worth noting that when returning results again, it is not necessary to start from scratch; the linear programming result from the previous query can be used for secondary calculations, greatly saving user time in actual queries and thus improving query efficiency.

[0130] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0131] like Figure 2 The diagram shows a structural block diagram of an incremental query device based on linear programming according to an embodiment of this application.

[0132] An incremental query device based on linear programming is used for incrementally querying products within a database. The device includes:

[0133] The acquisition module 810 is used to acquire attribute information of all products in the database and the type corresponding to the attribute information, and determine the target attribute corresponding to the target product from the attribute information of all products through the type.

[0134] The first determining module 820 is used to determine all sets of returned products in the database, and select a preset number of first target returned products from all sets of returned products to generate a first target returned product set;

[0135] The second determining module 830 is used to determine a second target return product set from all return product sets based on the target attribute and the preset quantity when the satisfaction corresponding to the first target return product set is less than the expected satisfaction.

[0136] The determination module 840 is used to set the second target returned product corresponding to the second target returned product set as the target product when the second satisfaction level of the second target returned product set is greater than or equal to the expected satisfaction level.

[0137] In one embodiment of the present invention, the acquisition module 810 includes:

[0138] The first acquisition submodule is used to acquire all attribute information corresponding to all products in the database;

[0139] The first generation submodule is used to classify and generate types corresponding to all the attribute information based on all the attribute information, wherein the types include product value information and product non-value information;

[0140] The filtering submodule is used to filter and determine the target attribute whose type corresponds to the product value information from all the attribute information.

[0141] In one embodiment of the present invention, the first determining module 820 includes:

[0142] The first determining submodule is used to determine all returned products in the database;

[0143] The second generation submodule is used to generate the set of all returned products based on all returned products;

[0144] The second determining submodule is used to determine the first target returned product corresponding to the preset quantity in the set of all returned products based on the preset quantity;

[0145] The third generation submodule is used to generate a set of products returned by the first target based on all the products returned by the first target.

[0146] In one embodiment of the present invention, the second determining module 830 includes:

[0147] The third determining submodule is used to determine the target preference attribute based on the target attribute;

[0148] The fourth generation submodule is used to perform linear programming calculations on all returned products in the set of all returned products based on the target preference attribute to generate the optimal solution corresponding to each of the returned products;

[0149] The first return submodule is used to sort all the returned products according to the optimal solution and the preset quantity, and return all target returned products with sorting order number from the first sorting order number to the preset quantity.

[0150] The fifth generation submodule is used to generate a second target return product set based on all the target return products.

[0151] In one embodiment of the present invention, the fourth generation submodule includes:

[0152] The first determining unit is used to determine a user preference vector based on the target preference attribute;

[0153] The second determining unit is used to determine the data points corresponding to all returned products in Euclidean space based on all returned products;

[0154] The first generation unit is used to generate the optimal solution corresponding to all returned products by performing linear programming based on the user preference vector and the data points.

[0155] In one embodiment of the present invention, the first return submodule includes:

[0156] The third determining unit is used to determine the return order of all returned products based on the optimal solution;

[0157] The fourth determining unit is used to determine the cutoff sorting number for the return in the return order by the preset quantity;

[0158] The fifth determining unit is used to determine all target returned products between the returned product corresponding to the first sorting number and the returned product corresponding to the cutoff sorting number in the return order.

[0159] In one embodiment of the present invention, the third determining unit includes:

[0160] The first acquisition subunit is used to acquire the optimal solution corresponding to each of the returned products;

[0161] The first sorting subunit is used to sort all the returned products in descending order according to the optimal solution to generate a list of returned products with a one-to-one corresponding sequence number of all the returned products.

[0162] The first determining subunit is used to determine the return order based on the returned product list.

[0163] Reference Figure 3 The computer device illustrating an incremental query method based on linear programming according to the present invention may specifically include the following:

[0164] The computer device 12 described above is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0165] Bus 18 refers to one or more of several types of bus 18 architectures, including memory bus 18 or memory controller, peripheral bus 18, graphics acceleration port, processor, or local bus 18 using any of the various bus 18 architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus 18, Micro Channel Architecture (MAC) bus 18, Enhanced ISA bus 18, Audio / Video Electronics Standards Association (VESA) local bus 18, and Peripheral Component Interconnect (PCI) bus 18.

[0166] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0167] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as a "hard disk drive"). Figure 3Not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42 configured to perform the functions of the embodiments of the present invention.

[0168] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory. Such program modules 42 include—but are not limited to—an operating system, one or more application programs, other program modules 42, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0169] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, camera, etc.), and with one or more devices that enable an operator to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN)), wide area network (WAN), and / or public networks (e.g., the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although... Figure 3 Not shown, it can be combined with computer device 12 to use other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing unit 16, external disk drive array, RAID system, tape drive and data backup storage system 34, etc.

[0170] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing an incremental query method based on linear programming provided in the embodiments of the present invention.

[0171] That is, when the processing unit 16 executes the above program, it performs the following: obtaining the attribute information of all products in the database and the type corresponding to the attribute information; determining the target attribute corresponding to the target product from the attribute information of all products through the type; determining all return product sets in the database, and selecting a first preset number of first target return products from all return product sets to generate a first target return product set; when the satisfaction corresponding to the first target return product set is less than the expected satisfaction, determining a second target return product set from all return product sets based on the target attribute and the preset number; when the satisfaction corresponding to the second target return product set is greater than or equal to the expected satisfaction, setting the second target return product corresponding to the second target return product set as the target product.

[0172] In this embodiment of the invention, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an incremental query method based on linear programming as provided in all embodiments of this application:

[0173] That is, when the program is executed by the processor, it implements the following: obtaining the attribute information of all products in the database and the type corresponding to the attribute information; determining the target attribute corresponding to the target product from the attribute information of all products based on the type; determining all return product sets in the database, and selecting a first preset number of first target return products from all return product sets to generate a first target return product set; when the satisfaction level corresponding to the first target return product set is less than the expected satisfaction level, determining a second target return product set from all return product sets based on the target attribute and the preset number; when the satisfaction level corresponding to the second target return product set is greater than or equal to the expected satisfaction level, setting the second target return product corresponding to the second target return product set as the target product.

[0174] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0175] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0176] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the operator's computer, partially on the operator's computer, as a standalone software package, partially on the operator's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the operator's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider). The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments; similar or identical parts between embodiments can be referred to interchangeably.

[0177] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0178] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0179] The above provides a detailed description of the incremental query method based on linear programming provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A linear programming based incremental query method for querying a target product in a database, comprising the steps of: The method comprises the following steps: acquiring attribute information of all products in the database and types corresponding to the attribute information, and determining target attributes corresponding to the target product from the attribute information of all products through the types; determining all returned product sets in the database, and selecting a preset number of first target returned products from all returned product sets to generate a first target returned product set; when the satisfaction degree corresponding to the first target returned product set is less than an expected satisfaction degree, then determining a second target returned product set from all returned product sets according to the target attributes and the preset number by linear programming calculation; the step of determining the second target returned product set from all returned product sets according to the target attributes and the preset number comprises the following steps: determining target preferred attributes according to the target attributes; performing linear programming calculation on all returned products in all returned product sets according to the target preferred attributes to generate optimal solutions corresponding to all returned products one by one; sorting all returned products according to the optimal solutions and the preset number, and returning all target returned products with sorting serial numbers from the first to the preset number; and generating a second target returned product set according to all target returned products; the step of performing linear programming calculation on all returned products in all returned product sets according to the target preferred attributes to generate optimal solutions corresponding to all returned products one by one comprises the following steps: determining a user preference vector according to the target preferred attributes; determining data points corresponding to all returned products one by one in a Euclidean space according to all returned products; and performing linear programming on the user preference vector and the data points to generate optimal solutions corresponding to all returned products one by one; when the satisfaction degree corresponding to the second target returned product set is greater than or equal to the expected satisfaction degree, then setting the second target returned product corresponding to the second target returned product set as the target product.

2. The method of claim 1, wherein, The step of acquiring attribute information of all products in the database and types corresponding to the attribute information, and determining target attributes corresponding to the target product from the attribute information of all products through the types comprises the following steps: acquiring all attribute information corresponding to all products in the database; generating types corresponding to all attribute information according to all attribute information, wherein the types comprise product value information and product non-value information; determining target attributes corresponding to the product value information from all attribute information according to the types.

3. The method of claim 1, wherein, The step of determining all returned product sets in the database, and selecting a preset number of first target returned products from all returned product sets to generate a first target returned product set comprises the following steps: determining all returned products in the database; generating all returned product sets according to all returned products; determining the first target returned products corresponding to the preset number in all returned product sets according to the preset number. According to all the first target return products, the first target return product set is generated.

4. The method of claim 1, wherein, The step of sorting all the return products according to the optimal solution and the preset number and returning all the target return products with the sorting sequence number from the first to the sorting sequence number between the preset number comprises: According to the optimal solution, the return order of all the return products is determined. In the return order, the cut-off sorting sequence number of the cut-off return is determined by the preset number. In the return order, all the target return products between the return product corresponding to the first sorting sequence number and the return product corresponding to the cut-off sorting sequence number are determined.

5. The method of claim 4, wherein, The step of determining the return order of all the return products according to the optimal solution comprises: Obtain the optimal solution corresponding to all the return products one by one. According to the return product list, the return order is determined. Comprise:

6. An incremental query device based on linear programming, used to query target products in a database, characterized in that, The acquisition module is used for acquiring the attribute information of all products in the database and the type corresponding to the attribute information, and determining the target attribute corresponding to the target product from the attribute information of all products through the type; The first determination module is used for determining all the return product sets in the database, and selecting a preset number of first target return products from all the return product sets to generate a first target return product set; The second determination module is used for determining a second target return product set from all the return product sets by linear programming calculation according to the target attribute and the preset number when the satisfaction degree corresponding to the first target return product set is less than the expected satisfaction degree, comprising: determining a target preference attribute according to the target attribute; generating an optimal solution corresponding to all the return products by linear programming calculation of all the return products in the return product set according to the target preference attribute; sorting all the return products according to the optimal solution and the preset number, and returning all the target return products with the sorting sequence number from the first to the sorting sequence number between the preset number; generating a second target return product set according to all the target return products; The step of generating an optimal solution corresponding to all the return products by linear programming calculation of all the return products in the return product set according to the target preference attribute comprises: determining a user preference vector according to the target preference attribute; determining a data point corresponding to all the return products in the Euclidean space according to all the return products; generating an optimal solution corresponding to all the return products by linear programming according to the user preference vector and the data point; The determination module is used for setting the second target return product corresponding to the second target return product set as the target product when the second satisfaction degree of the second target return product set is greater than or equal to the expected satisfaction degree. ​ 7. A computer device, comprising: A computer program product comprising a computer readable storage medium having stored thereon computer program means, the computer program means comprising computer program instructions executable by a processor to cause the processor to carry out the method according to any of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, A computer readable storage medium having stored thereon a computer program, the computer program comprising computer program instructions executable by a processor to cause the processor to carry out the method according to any of claims 1 to 5.

Citation Information

Patent Citations

  • Machine learning method and device

    CN106294456A

  • Data query method and device, equipment and medium

    CN111026931A