A data query processing method and device, a server, and a medium

By constructing a hypergraph and assigning weights, the problems of high computational complexity and singular pricing in existing data query pricing models are solved, enabling more comprehensive data pricing without arbitrage or discounts, thus improving the comprehensiveness and profitability of pricing.

CN115576994BActive Publication Date: 2026-05-08CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNITED NETWORK COMM GRP CO LTD
Filing Date
2022-11-09
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing data query pricing models are computationally complex and their pricing is relatively simplistic and one-sided, failing to effectively meet the conditions of no arbitrage and no discounts.

Method used

By constructing a hypergraph, the correspondence between conflict sets and datasets in the data query set is obtained. A pre-configured weight allocation scheme is used to assign weights to vertices and edges in the hypergraph, and a pre-configured price formula is used to determine the query price.

Benefits of technology

It reduces the complexity of data pricing calculations, enabling more comprehensive data pricing without arbitrage or discounts, thus guaranteeing revenue and profit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115576994B_ABST
    Figure CN115576994B_ABST
Patent Text Reader

Abstract

The application provides a data query processing method and device, a server and a medium, comprising: obtaining a data query set; obtaining a corresponding conflict set for each request in the data query set, establishing a corresponding relationship between the conflict set and the data set; constructing each data set in the support set into a corresponding vertex in a hypergraph, and constructing each edge in the hypergraph according to the corresponding relationship between the conflict set and the data set; assigning a first weight to each vertex using a preconfigured weight distribution scheme, and assigning a second weight to each edge according to the first weight and the maximum benefit; for each request, determining the second weight of the edge or the first weight of the vertex associated with the request, and determining the corresponding query price of the request using a preconfigured price formula. While meeting the no-arbitrage and no-discount principles, the computational complexity of the pricing model is reduced, and the maximum benefit of the data owner is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data query technology, and in particular to a data query processing method, apparatus, server and medium. Background Technology

[0002] In the digital economy era, data is the foundation of people's lives and work. When data is shared, exchanged, and reused, its value needs to be reasonably assessed, thus making data pricing a primary issue.

[0003] Generally, data is stored in databases in either structured or unstructured form. When data is queried, a query pricing model can be used to price the queried data, allowing users to determine whether to purchase the queried data based on the price and their own needs.

[0004] Because this query pricing model requires meeting two conditions during modeling—no arbitrage (i.e., the overall price must be less than the sum of the unit prices of all parts) and no discount (i.e., when the price of a single part is determined, the price of the whole part must decrease)—the computational complexity is relatively high. Furthermore, since it only considers the two aspects of no arbitrage and no discount, the pricing of the data is relatively simplistic and one-sided. Summary of the Invention

[0005] This application provides a data query processing method, apparatus, server, and medium to solve the technical problems of high computational complexity and relatively singular and one-sided data pricing in the prior art.

[0006] On the one hand, this application provides a data query processing method, including:

[0007] Retrieve the data query set.

[0008] For each request in the data query set, traverse each dataset in the support set of the database to be queried, obtain the conflict set corresponding to the request, and establish the correspondence between the conflict set and the dataset.

[0009] Each dataset in the support set is constructed as a corresponding vertex in the hypergraph, and each edge in the hypergraph is constructed according to the correspondence between the conflict set and the dataset.

[0010] A pre-configured weight allocation scheme is adopted to assign a corresponding first weight to each vertex in the hypergraph, and a corresponding second weight is assigned to each edge in the hypergraph based on the first weight of each vertex and the maximum benefit.

[0011] For each request, determine the second weight of the edge associated with the request or the first weight of the vertex, and use a pre-configured price formula to determine the query price for the request.

[0012] In one specific implementation, the step of employing a pre-configured weight allocation scheme to assign a corresponding first weight to each vertex in the hypergraph includes:

[0013] A random function strategy is used to assign a corresponding first weight to each vertex in the hypergraph.

[0014] The strategy of the random function includes...

[0015] Each vertex in the hypergraph is assigned the same random weight, and the weight is greater than 0.

[0016] Alternatively, each vertex in the hypergraph may be assigned a distinct random weight, with the weight being greater than 0.

[0017] Alternatively, a random weight can be randomly assigned to each vertex in the hypergraph from a certain range of values.

[0018] In one specific implementation, the step of employing a pre-configured weight allocation scheme to assign a corresponding first weight to each vertex in the hypergraph includes:

[0019] Based on the number of times the dataset is accessed, or the access frequency, a corresponding first weight is assigned to each vertex in the hypergraph.

[0020] In one specific implementation, the step of assigning a corresponding second weight to each edge of the hypergraph based on the first weight corresponding to each vertex and using the pre-configured weight allocation scheme includes:

[0021] Set a first set and a second set; wherein the first set includes each edge in the hypergraph, and each edge is associated with one or more vertices; the second set is initially an empty set.

[0022] Determine the nth edge in the first set, where the nth edge is the edge with the fewest associated vertices; and when it is determined that the sum of the weights of the associated vertices of the nth edge is greater than the nth maximized benefit, configure the nth edge in the second set, delete the nth edge from the first set, and set the (n+1)th maximized benefit to the sum of the weights of the associated vertices of the nth edge; when it is determined that the first set is not an empty set, increment n by 1, and repeat this step until the first set is an empty set.

[0023] When it is determined that the first set is an empty set and there are no duplicate edges in the second set, for each edge in the second set, the vertex with the largest weight among the vertices associated with the edge is obtained, and the first weight corresponding to the vertex is assigned to the second weight corresponding to the edge.

[0024] Wherein, n is a positive integer and is greater than or equal to 1; the first maximized profit is the initial maximum profit and is 0.

[0025] In one specific implementation, the pre-configured price formula is as follows:

[0026] f(x) = kx

[0027] or,

[0028] f(x) = log a (x+1)

[0029] or,

[0030] f(x) = x b

[0031] Where x is the second weight of the edge associated with the request or the first weight of the vertex, and k, a, and b are pre-configured constants.

[0032] Secondly, this application provides a data query processing apparatus, comprising:

[0033] The retrieval module is used to retrieve the data query set.

[0034] The acquisition module is further configured to, for each request in the data query set, traverse each dataset in the support set of the database to be queried, obtain the conflict set corresponding to the request, and establish the correspondence between the conflict set and the dataset.

[0035] The processing module is used to construct each dataset in the support set into a corresponding vertex in the hypergraph, and to construct each edge in the hypergraph according to the correspondence between the conflict set and the dataset.

[0036] The processing module is further configured to assign a first weight to each vertex in the hypergraph using a pre-configured weight allocation scheme, and to assign a second weight to each edge in the hypergraph based on the first weight of each vertex and the maximum benefit.

[0037] The processing module is further configured to, for each request, determine the second weight of the edge associated with the request or the first weight of the vertex associated with the request, and determine the query price corresponding to the request using a pre-configured price formula.

[0038] In one specific implementation, the processing module is specifically used for:

[0039] A random function strategy is used to assign a corresponding first weight to each vertex in the hypergraph.

[0040] The strategy of the random function includes:

[0041] Each vertex in the hypergraph is assigned the same random weight, and the weight is greater than 0.

[0042] Alternatively, each vertex in the hypergraph may be assigned a distinct random weight, with the weight being greater than 0.

[0043] Alternatively, a random weight can be randomly assigned to each vertex in the hypergraph from a certain range of values.

[0044] In one specific implementation, the processing module is specifically used for:

[0045] Based on the number of times the dataset is accessed, or the access frequency, a corresponding first weight is assigned to each vertex in the hypergraph.

[0046] In one specific implementation, the processing module is specifically used for:

[0047] Set a first set and a second set; wherein the first set includes each edge in the hypergraph, and each edge is associated with one or more vertices; the second set is initially an empty set.

[0048] Determine the nth edge in the first set, where the nth edge is the edge with the fewest associated vertices; and when it is determined that the sum of the weights of the associated vertices of the nth edge is greater than the nth maximized benefit, configure the nth edge in the second set, delete the nth edge from the first set, and set the (n+1)th maximized benefit to the sum of the weights of the associated vertices of the nth edge; when it is determined that the first set is not an empty set, increment n by 1, and repeat this step until the first set is an empty set.

[0049] When it is determined that the first set is an empty set and there are no duplicate edges in the second set, for each edge in the second set, the vertex with the largest weight among the vertices associated with the edge is obtained, and the first weight corresponding to the vertex is assigned to the second weight corresponding to the edge.

[0050] Wherein, n is a positive integer and is greater than or equal to 1; the first maximized profit is the initial maximum profit and is 0.

[0051] In one specific implementation, the pre-configured price formula is as follows:

[0052] f(x) = kx

[0053] or,

[0054] f(x) = log a (x+1)

[0055] or,

[0056] f(x) = x b

[0057] Where x is the second weight of the edge associated with the request or the first weight of the vertex, and k, a, and b are pre-configured constants.

[0058] Thirdly, this application provides a server, comprising:

[0059] Processor, memory, communication interface.

[0060] The memory is used to store executable instructions that the processor can execute.

[0061] The processor is configured to perform the data query processing method as described in the first aspect by executing the executable instructions.

[0062] Fourthly, this application provides a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the data query processing method described in the first aspect.

[0063] This application provides a data query processing method, apparatus, server, and medium, which obtains a data query set; for each request in the data query set, it iterates through each dataset in the support set of the database to be queried, obtains the conflict set corresponding to the request, and establishes a correspondence between the conflict set and the dataset; constructs each dataset in the support set as a corresponding vertex in a hypergraph, and constructs each edge in the hypergraph according to the correspondence between the conflict set and the dataset; uses a pre-configured weight allocation scheme to assign a corresponding first weight to each vertex in the hypergraph, and assigns a corresponding second weight to each edge in the hypergraph according to the first weight corresponding to each vertex and maximizing the benefit; for each request, determines the second weight corresponding to the edge associated with the request or the first weight corresponding to the vertex, and uses a pre-configured price formula to determine the query price corresponding to the request. Compared to existing technologies where data pricing calculations are relatively complex and pricing is relatively singular and one-sided, this application constructs a hypergraph based on each request in the data query set and each dataset in the support set of the database, and determines the corresponding query price for each request under the hypergraph. This reduces the computational complexity while achieving no arbitrage and no discounts. Furthermore, because the pricing process takes into account maximizing revenue, the data pricing is more comprehensive, ensuring both revenue and profit. Attached Figure Description

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

[0065] Figure 1 A flowchart illustrating an embodiment of a data query processing method provided in this application;

[0066] Figure 2 A flowchart illustrating a second embodiment of a data query processing method provided in this application;

[0067] Figure 3 This is a schematic diagram of the hypergraph shown in Embodiment 2 of this application;

[0068] Figure 4 A flowchart illustrating a data query processing method according to Embodiment 3 provided in this application;

[0069] Figure 5 A schematic diagram of the structure of an embodiment of a data query processing device provided in this application;

[0070] Figure 6 This is a schematic diagram of the structure of a server provided in this application.

[0071] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0072] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments made by those skilled in the art under the guidance of these embodiments are within the scope of protection of this application.

[0073] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or servers.

[0074] First, let me explain the terms used in this application:

[0075] Hypergraph: A hypergraph is a subset system of a finite set. A hypergraph H is an ordered binary tuple H = (X, E), where X is a non-empty set of nodes or vertices, called the vertex set; E is a non-empty subset of X, whose elements are called edges or hyperedges.

[0076] In existing technologies, the hypergraph query pricing model allows setting the weights of hypergraph edges based on the purchase frequency of the queried data for existing query records. However, for queries without records, the completeness of the queried data must be subjectively assessed to set the weights of the hypergraph edges. Furthermore, existing technologies involve subjective weighting for queries without records and require traversing historical purchase query records to calculate the importance of the queried data and set weights based on purchase patterns, resulting in high complexity.

[0077] To address the aforementioned issues, the technical concept of this application lies in how to reduce the computational complexity of the pricing model while minimizing subjective human judgment when setting weights, while simultaneously satisfying the principles of no arbitrage and no discounts, and ensuring the maximization of the rights and interests of the data owner.

[0078] The technical solution of this application will now be described in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0079] Figure 1 A flowchart illustrating an embodiment of a data query processing method provided in this application is shown below. Figure 1 As shown, the data query processing method specifically includes the following steps:

[0080] Step S101: Obtain the data query set.

[0081] Step S102: For each request in the data query set, traverse each dataset in the support set of the database to be queried, obtain the conflict set corresponding to the request, and establish the correspondence between the conflict set and the dataset.

[0082] In this embodiment, the database contains multiple support sets. The query results are obtained by querying a certain dataset according to the buyer's query request. The data set composed of these query results is the support set. In this embodiment, the database is composed of conflict sets. A conflict set refers to a set in which, for a certain query request, the first query result in the first support set is different from the second query result in the second support set, and the second query result is the conflict set of the first query result.

[0083] In this embodiment, a conflict set is introduced to improve the completeness and accuracy of the query results.

[0084] Step S103: Construct each dataset in the support set into a corresponding vertex in the hypergraph, and construct each edge in the hypergraph according to the correspondence between the conflict set and the dataset.

[0085] In this embodiment, it is supported that each dataset is a single vertex in the hypergraph.

[0086] In this embodiment, for example, the data query set can be represented as in, This represents a request to query the data set. For each request, iterate through the support set. For datasets that support centralized processing Use the following formula

[0087]

[0088] Determine the conflict set for each request

[0089] Additionally, it will support centralizing each dataset. Construct the corresponding vertices in the hypergraph. Based on the computationally obtained conflict set and the relationship between the conflict set and the dataset, construct each edge in the hypergraph. Where e i Let v be the edge of the hypergraph, and v be the vertex of the hypergraph. i express.

[0090] Step S104: Using a pre-configured weight allocation scheme, assign a corresponding first weight to each vertex in the hypergraph, and assign a corresponding second weight to each edge in the hypergraph based on the first weight of each vertex and the maximization of the benefit.

[0091] Step S105: For each request, determine the second weight of the edge associated with the request or the first weight of the vertex associated with the request, and use the pre-configured price formula to determine the query price corresponding to the request.

[0092] In this embodiment, a data query set is obtained; for each request in the data query set, each dataset in the support set of the database to be queried is traversed to obtain the conflict set corresponding to the request, and a correspondence between the conflict set and the dataset is established; each dataset in the support set is constructed as a corresponding vertex in a hypergraph, and each edge in the hypergraph is constructed according to the correspondence between the conflict set and the dataset; a pre-configured weight allocation scheme is adopted to assign a corresponding first weight to each vertex in the hypergraph, and a corresponding second weight is assigned to each edge in the hypergraph according to the first weight of each vertex and the maximization of revenue; for each request, the second weight of the edge associated with the request or the first weight of the vertex associated with the request is determined, and the query price corresponding to the request is determined using a pre-configured price formula. Compared with the prior art, this application constructs a hypergraph based on each request in the data query set and each dataset in the support set of the database, and determines the corresponding query price of each request under the hypergraph, thereby reducing the computational complexity without arbitrage or discounts, and because the maximization of revenue is considered in the pricing process, the data pricing is more comprehensive, ensuring revenue and profit.

[0093] Figure 2 This is a flowchart illustrating a second embodiment of a data query processing method provided in this application. Figure 1 Based on the illustrated embodiments, as Figure 2 As shown, one specific implementation of step 104, "using a pre-configured weight allocation scheme to assign a corresponding first weight to each vertex in the hypergraph," is as follows:

[0094] Step S201: Using a random function strategy, assign a corresponding first weight to each vertex in the hypergraph.

[0095] In this embodiment, the strategy of the random function includes the following:

[0096] Each vertex in the hypergraph is assigned the same random weight, and the weight is greater than 0.

[0097] or,

[0098] Each vertex in the hypergraph is assigned a distinct random weight, and the weight is greater than 0.

[0099] or,

[0100] For each vertex in the hypergraph, a random weight is randomly assigned from a certain range of values.

[0101] Additionally, it should be noted that, replacing step S201, the method of assigning the corresponding first weight to each vertex can also be:

[0102] Assign a first weight to each vertex in the hypergraph based on the number of times the dataset is accessed, or the access frequency.

[0103] For example, for each vertex, its first weight can be set as the percentage of the total number of visits to that vertex.

[0104] More specifically, one concrete implementation of step 104, "assigning a corresponding second weight to each edge in the hypergraph based on the first weight corresponding to each vertex and maximizing the benefit," is as follows:

[0105] Step S202: Set the first set and the second set.

[0106] In this embodiment, the first set includes each edge in the hypergraph, and each edge is associated with one or more vertices. The second set is initially empty.

[0107] Step S203: Determine the nth edge in the first set, which is the edge with the fewest associated vertices; and when the sum of the weights of the associated vertices of the nth edge is greater than the nth maximized benefit, configure the nth edge in the second set, delete the nth edge from the first set, and set the (n+1)th maximized benefit to the sum of the weights of the associated vertices of the nth edge; when the first set is not empty, increment n by 1, and repeat this step until the first set is empty.

[0108] In this embodiment, if the sum of the weights of the vertices associated with the nth edge is less than or equal to the nth maximized benefit, the nth edge is deleted from the first set ε.

[0109] Step S204: When it is determined that the first set is empty and there are no duplicate edges in the second set, for each edge in the second set, obtain the vertex with the largest weight among the vertices associated with the edge, and assign the first weight of the vertex to the second weight of the edge.

[0110] Where n is a positive integer, and is greater than or equal to 1; the first maximized profit is the initial maximum profit, and is 0.

[0111] In this embodiment, based on the weight of each vertex in the hypergraph, each edge is weighted with the objective of maximizing the return Rev. Specifically, during initialization, the maximum return (i.e., the first maximum return) is 0, the second set U is empty, and the weight ω of each edge in the first set ε is... eAll are assigned 0. Then, the first edge is obtained from the first set ε, which is the edge with the fewest associated vertices. When it is determined that the sum of the weights of the vertices associated with the first edge is greater than the first maximized benefit, the first edge is configured in the second set U, and the first edge is deleted from the first set ε. The second maximized benefit is set to the sum of the weights of the vertices associated with the first edge.

[0112] If the first set ε is not empty, then continue to obtain the second edge from the first set ε. This second edge is the edge with the fewest associated vertices. When it is determined that the sum of the weights of the associated vertices of the second edge is greater than the second maximized benefit, the second edge is configured in the second set U, and the second edge is deleted from the first set ε. The third maximized benefit is set to the sum of the weights of the associated vertices of the second edge.

[0113] If the first set ε is not empty, continue repeating the above steps until the first set ε is empty. Then determine whether there are duplicate edges in the second set. If there are no duplicates, for each edge in the second set, obtain the vertex with the largest weight among the vertices associated with the edge, and assign the first weight of the vertex to the second weight of the edge.

[0114] In addition, in this embodiment, it should be noted that if the edge has not been assigned a second weight value, the vertex with the largest weight among the vertices associated with the edge is obtained, and the first weight corresponding to the vertex is assigned to the second weight corresponding to the edge; if the edge has been assigned a weight value, the first weight among the vertices associated with the edge and the second weight value already configured for the edge are obtained, and the largest weight value among the first weight value of the vertices associated with the edge and the second weight value already configured for the edge is assigned to the second weight corresponding to the edge. If there are duplicate edges in the second set, no operation is performed.

[0115] For example, suppose the data owner has a support set in the database. As shown in Table 1 below:

[0116] Table 1

[0117]

[0118] in, This is a dataset.

[0119] The retrieved data query set is in, These represent each request in the data query set. For example: =SELECT count(*)FROM User Where gender="f", =SELECT gender count(*)FROM User GROUP by gender, =SELECT AVG(age)FROM UserWHERE gender="f".

[0120] Based on this, for each request in the data query set, iterate through each dataset in the support set of the database to be queried, and for each dataset... Obtain the conflict set corresponding to the request, and establish the correspondence between the conflict set and the dataset, as shown in Table 2:

[0121] Table 2

[0122]

[0123] Specifically, Let f be the number of sexes. To count the number of each gender, Let f be the average age for gender. According to Table 1, for the data... Query The result is 2, 2, 3, 2, therefore the conflict set is Query The results are 2 f, 2 m, 2 f, 2 m, 3 f, 1 m, 2 f, 2 m, therefore the conflict set is Query The result is 21, 26, 20, 21, therefore the conflict set is...

[0124] Based on this, each dataset in the support set is constructed as a corresponding vertex in the hypergraph, and each edge in the hypergraph is constructed according to the correspondence between the conflict set and the dataset, thus the hypergraph is as follows: Figure 3 As shown, Figure 3 This is a schematic diagram of the supergraph shown in Embodiment 2 of this application.

[0125] set up The vertex corresponding to the set is v1. The vertex corresponding to the set is v2. The first set ε = {e1, e2}. Vertices v1 and v2 are connected by edges, and vertex v2 itself is connected by edges, where e1 = v1v2 and e2 = v2v2. Random weights are randomly assigned to the vertices in the hypergraph from a certain range of values, i.e., random numbers between (0, 1) are randomly assigned. Vertex v1 has a weight of 0.2, and vertex v2 has a weight of 0.4.

[0126] Initially, maximize the profit Rev = 0, second set arbitrary edge weight ω eAll are set to 0. Initially, the first set ε = {e1, e2}. The edge with the fewest vertices is selected, which is ε′ = {e2}. The sum of the weights of the vertices associated with the edge e2 is 0.4, which is greater than the maximum profit Rev at this time. Therefore, the first set ε = ε / ε′ = {e1}, the second set U = {e2}, and the maximum profit Rev = 0.4.

[0127] Since the first set ε is not empty, we continue to select the edge with the fewest vertices involved. At this point, ε′={e1}, and the sum of the weights of the vertices associated with edge e1 is 0.6, which is greater than the maximum profit Rev=0.4 at this point. Therefore, The second set U = {e1, e2} maximizes the profit Rev = 0.6.

[0128] At this point, it is determined that the first set is empty, and that edges e1 and e2 in the second set U = {e1, e2} are not repeated and have not been assigned a second weight. Therefore, the weight of edge e1 is... Edge e2 weight

[0129] In this embodiment, the present application constructs a hypergraph based on each request in the data query set and each dataset in the support set of the database, and determines the corresponding query price for each request under the hypergraph. This reduces the computational complexity while achieving no arbitrage and no discounts. Furthermore, since the pricing process takes into account maximizing revenue, the data pricing is more comprehensive, ensuring revenue and profit.

[0130] Figure 4 The flowchart of a data query processing method according to Embodiment 3 provided in this application is shown above. Figure 2 Based on the illustrated embodiments, as Figure 4 As shown, one specific implementation of step 105 is as follows:

[0131] Step S301: Using a random function strategy, assign a corresponding first weight to each vertex in the hypergraph.

[0132] Step S302: Set the first set and the second set.

[0133] Step S303: Determine the nth edge in the first set, which is the edge with the fewest associated vertices; and when the sum of the weights of the associated vertices of the nth edge is greater than the nth maximized benefit, configure the nth edge in the second set, delete the nth edge from the first set, and set the (n+1)th maximized benefit to the sum of the weights of the associated vertices of the nth edge; when the first set is not empty, increment n by 1, and repeat this step until the first set is empty.

[0134] Step S304: When it is determined that the first set is empty and there are no duplicate edges in the second set, for each edge in the second set, obtain the vertex with the largest weight among the vertices associated with the edge, and assign the first weight of the vertex to the second weight of the edge.

[0135] Where n is a positive integer, and is greater than or equal to 1; the first maximized profit is the initial maximum profit, and is 0.

[0136] Step S305: For each request, determine the second weight of the edge associated with the request or the first weight of the vertex associated with the request, and use the pre-configured price formula to determine the query price corresponding to the request.

[0137] In this embodiment, the pre-configured price formula is as follows:

[0138] f(x) = kx

[0139] or,

[0140] f(x) = log a (x+1)

[0141] or,

[0142] f(x) = x b

[0143] Where x is the second weight of the edge to be associated or the first weight of the vertex, and k, a, and b are pre-configured constants.

[0144] In this embodiment, for query If the query is connected to another query by an edge in the hypergraph, the price is obtained based on the second weight. If the query is not connected to another query by an edge in the hypergraph, the price is obtained based on the first weight. The pre-configured price formulas include, but are not limited to, the following:

[0145] For scenarios requiring high data quality, the following pricing formula can be used:

[0146] f(x) = kx

[0147] The empirical value of k is 0.8. This price formula is a monotonic function with a relatively fast growth rate, resulting in a higher calculated price. Therefore, it is suitable for scenarios with high data quality.

[0148] For scenarios with low data quality and small differences in data quality, the following pricing formula can be used:

[0149] f(x) = log a (x+1)

[0150] The empirical value of 'a' is 2. This price formula is a monotonically increasing function with a slow growth rate, and the calculated price is relatively moderate. Therefore, it is suitable for scenarios with low data quality and small differences in data quality.

[0151] For scenarios with moderate data quality but significant differences in data quality, the following pricing formula can be used:

[0152] f(x) = x b

[0153] The empirical value of b is 0.7. This price formula is a monotonically increasing function with a fast growth rate, so it is suitable for scenarios with moderate data quality and large differences in data quality.

[0154] For example, suppose the data owner has a support set in the database. As shown in Table 1 below, in the example of Query Set Contract Implementation Example 2, the correspondence between the conflict set and the dataset is shown in Table 2, and the hypergraph is as follows. Figure 3 As shown, vertex v1 has a weight of 0.2 and vertex v2 has a weight of 0.4, that is... edge e1 weight Edge e2 weight

[0155] In this embodiment, the following price formula is selected:

[0156] f(x) = kx

[0157] The empirical value of k is 0.8, for queries

[0158]

[0159] For query

[0160]

[0161] For query

[0162]

[0163] Query-based pricing models need to satisfy the no-arbitrage and no-discount principles. The no-arbitrage principle means the overall price must be less than the sum of the unit prices of all components; the no-discount principle means that when the price of an individual component is fixed, the overall price must decrease. Specifically, regarding the no-arbitrage principle, if... The query results contain information The query results then satisfy the following:

[0164]

[0165] For the no-discount principle, the following conditions are met:

[0166]

[0167] Where Y is any dataset, This refers to merging queries.

[0168] In this embodiment, if a query exists Let f be the sum of ages of genders. Query The result is 42, 52, 60, 42, therefore the conflict set is Right now

[0169]

[0170] According to the formula, the price is 0.32, which satisfies the condition.

[0171]

[0172]

[0173] That is, it satisfies the no-arbitrage principle and the no-discount principle.

[0174] In this embodiment, the present application constructs a hypergraph based on each request in the data query set and each dataset in the support set of the database, and determines the corresponding query price for each request under the hypergraph. This reduces the computational complexity while achieving no arbitrage and no discounts. Furthermore, since the pricing process takes into account maximizing revenue, the data pricing is more comprehensive, ensuring revenue and profit.

[0175] Figure 5 A schematic diagram of the structure of an embodiment of a data query processing device provided in this application is shown below. Figure 5As shown, the data query processing device 40 includes an acquisition module 41 and a processing module 42; wherein the acquisition module 41 is used to acquire a data query set. The acquisition module 41 is also used to, for each request in the data query set, traverse each dataset in the support set of the database to be queried, acquire the conflict set corresponding to the request, and establish a correspondence between the conflict set and the dataset. The processing module 42 is used to construct each dataset in the support set into a corresponding vertex in a hypergraph, and construct each edge in the hypergraph according to the correspondence between the conflict set and the dataset. The processing module 42 is also used to, using a pre-configured weight allocation scheme, assign a corresponding first weight to each vertex in the hypergraph, and assign a corresponding second weight to each edge in the hypergraph according to the first weight of each vertex and maximizing the benefit. The processing module 42 is also used to, for each request, determine the corresponding second weight of the edge associated with the request or the corresponding first weight of the vertex, and determine the query price corresponding to the request using a pre-configured price formula.

[0176] In one possible implementation, processing module 42 is specifically used for:

[0177] A strategy using random functions is employed to assign a corresponding first weight to each vertex in the hypergraph.

[0178] The strategies for random functions include:

[0179] Each vertex in the hypergraph is assigned the same random weight, and the weight is greater than 0.

[0180] Alternatively, assign distinct random weights to each vertex in the hypergraph, with each weight being greater than 0.

[0181] Alternatively, a random weight can be randomly assigned to each vertex in the hypergraph from a certain range of values.

[0182] In one possible implementation, processing module 42 is specifically used for:

[0183] Assign a first weight to each vertex in the hypergraph based on the number of times the dataset is accessed, or the access frequency.

[0184] In one possible implementation, processing module 42 is specifically used for:

[0185] Set a first set and a second set; wherein the first set includes each edge in the hypergraph, and each edge is associated with one or more vertices; the second set is initially an empty set.

[0186] Determine the nth edge in the first set, which is the edge with the fewest associated vertices; and when the sum of the weights of the associated vertices of the nth edge is greater than the nth maximized benefit, add the nth edge to the second set, delete the nth edge from the first set, and set the (n+1)th maximized benefit to the sum of the weights of the associated vertices of the nth edge; when the first set is not empty, increment n by 1, and repeat this step until the first set is empty.

[0187] If the first set is determined to be empty and the edges in the second set are not repeated, for each edge in the second set, the vertex with the largest weight among the vertices associated with the edge is obtained, and the first weight of the vertex is assigned to the second weight of the edge.

[0188] Where n is a positive integer, and is greater than or equal to 1; the first maximized profit is the initial maximum profit, and is 0.

[0189] In one possible implementation, the pre-configured pricing formula is as follows:

[0190] f(x) = kx

[0191] or,

[0192] f(x) = log a (x+1)

[0193] or,

[0194] f(x) = x b

[0195] Where x is the second weight of the edge to be associated or the first weight of the vertex, and k, a, and b are pre-configured constants.

[0196] The data query processing device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0197] Figure 6 This is a schematic diagram of the structure of a server provided in this application. Figure 6 As shown, the server 50 includes a processor 51, a memory 52, and a communication interface 53; wherein the memory 52 is used to store executable instructions that can be executed by the processor 51; the processor 51 is configured to execute the technical solutions in any of the foregoing method embodiments by executing the executable instructions.

[0198] Optionally, the memory 52 can be either standalone or integrated with the processor 51.

[0199] Optionally, when the memory 52 is a device independent of the processor 51, the server 50 may also include a bus for connecting the aforementioned devices.

[0200] The server is used to execute the technical solutions in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0201] This application also provides a readable storage medium storing a computer program thereon, which, when executed by a processor, implements the technical solutions provided in any of the foregoing embodiments.

[0202] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A data query processing method, characterized in that, include: Retrieve data query set; For each request in the data query set, traverse each dataset in the support set of the database to be queried, obtain the conflict set corresponding to the request, and establish the correspondence between the conflict set and the dataset; wherein, the support set is a data set composed of query results obtained from the database according to the buyer's query request, and the conflict set is the conflict set of the first query result if the first query result in the first support set is different from the second query result in the second support set for the request; Each dataset in the support set is constructed as a corresponding vertex in the hypergraph, and the conflict set corresponding to each request is taken as an edge of the hypergraph according to the correspondence between the conflict set and the dataset. A pre-configured weight allocation scheme is adopted to assign a corresponding first weight to each vertex in the hypergraph, and a corresponding second weight is assigned to each edge in the hypergraph based on the first weight of each vertex and the maximum benefit. For each request, determine the second weight of the edge associated with the request or the first weight of the vertex, and use a pre-configured price formula to determine the query price for the request.

2. The method according to claim 1, characterized in that, The method of employing a pre-configured weight allocation scheme to assign a corresponding first weight to each vertex in the hypergraph includes: A random function strategy is used to assign a corresponding first weight to each vertex in the hypergraph; The strategy of the random function includes: Each vertex in the hypergraph is assigned the same random weight, and the weight is greater than 0; or, Each vertex in the hypergraph is assigned a distinct random weight, and the weight is greater than 0. or, For each vertex in the hypergraph, a random weight is randomly assigned from a certain range of values.

3. The method according to claim 1, characterized in that, The method of employing a pre-configured weight allocation scheme to assign a corresponding first weight to each vertex in the hypergraph includes: Based on the number of times the dataset is accessed, or the access frequency, a corresponding first weight is assigned to each vertex in the hypergraph.

4. The method according to claim 2 or 3, characterized in that, The step of assigning a corresponding second weight to each edge in the hypergraph based on the first weight corresponding to each vertex and maximizing the benefit includes: Set a first set and a second set; wherein the first set includes each edge in the hypergraph, and each edge is associated with one or more vertices; the second set is initially an empty set; Determine the nth edge in the first set, where the nth edge is the edge with the fewest associated vertices; and when the sum of the weights of the associated vertices of the nth edge is greater than the nth maximized benefit, configure the nth edge in the second set, delete the nth edge from the first set, and set the (n+1)th maximized benefit to the sum of the weights of the associated vertices of the nth edge; when the first set is not empty, increment n by 1, and repeat this step until the first set is empty. When it is determined that the first set is an empty set and there are no duplicate edges in the second set, for each edge in the second set, the vertex with the largest weight among the vertices associated with the edge is obtained, and the first weight corresponding to the vertex is assigned to the second weight corresponding to the edge. Wherein, n is a positive integer and is greater than or equal to 1; the first maximized profit is the initial maximum profit and is 0.

5. The method according to claim 4, characterized in that, The pre-configured pricing formula is as follows: or, or, in, The second weight corresponding to the edge associated with the request or the first weight corresponding to the vertex. , , These are pre-configured constants.

6. A data query processing apparatus, characterized in that, include: The acquisition module is used to retrieve the data query set; The acquisition module is further configured to, for each request in the data query set, traverse each dataset in the support set of the database to be queried, obtain the conflict set corresponding to the request, and establish a correspondence between the conflict set and the dataset; wherein, the support set is a data set consisting of query results obtained from the database according to the buyer's query request, and the conflict set is the conflict set of the first query result if the first query result in the first support set is different from the second query result in the second support set for the request; The processing module is used to construct each dataset in the support set into a corresponding vertex in the hypergraph, and to treat the conflict set corresponding to each request as an edge of the hypergraph according to the correspondence between the conflict set and the dataset; The processing module is further configured to assign a first weight to each vertex in the hypergraph using a pre-configured weight allocation scheme, and to assign a second weight to each edge in the hypergraph based on the first weight of each vertex and the maximum benefit. The processing module is further configured to, for each request, determine the second weight of the edge associated with the request or the first weight of the vertex associated with the request, and determine the query price corresponding to the request using a pre-configured price formula.

7. The apparatus according to claim 6, characterized in that, The processing module is specifically used for: A random function strategy is used to assign a corresponding first weight to each vertex in the hypergraph; The strategy of the random function includes: Each vertex in the hypergraph is assigned the same random weight, and the weight is greater than 0; or, Each vertex in the hypergraph is assigned a distinct random weight, and the weight is greater than 0. or, For each vertex in the hypergraph, a random weight is randomly assigned from a certain range of values.

8. The apparatus according to claim 6, characterized in that, The processing module is specifically used for: Based on the number of times the dataset is accessed, or the access frequency, a corresponding first weight is assigned to each vertex in the hypergraph.

9. The apparatus according to claim 7 or 8, characterized in that, The processing module is specifically used for: Set a first set and a second set; wherein the first set includes each edge in the hypergraph, and each edge is associated with one or more vertices; the second set is initially an empty set; Determine the nth edge in the first set, where the nth edge is the edge with the fewest associated vertices; and when the sum of the weights of the associated vertices of the nth edge is greater than the nth maximized benefit, configure the nth edge in the second set, delete the nth edge from the first set, and set the (n+1)th maximized benefit to the sum of the weights of the associated vertices of the nth edge; when the first set is not empty, increment n by 1, and repeat this step until the first set is empty. When it is determined that the first set is an empty set and there are no duplicate edges in the second set, for each edge in the second set, the vertex with the largest weight among the vertices associated with the edge is obtained, and the first weight corresponding to the vertex is assigned to the second weight corresponding to the edge. Wherein, n is a positive integer and is greater than or equal to 1; the first maximized profit is the initial maximum profit and is 0.

10. The apparatus according to claim 9, characterized in that, The pre-configured pricing formula is as follows: or, or, in, The second weight corresponding to the edge associated with the request or the first weight corresponding to the vertex. , , These are pre-configured constants.

11. A server, characterized in that, include: Processor, memory, communication interface; The memory is used to store executable instructions that can be executed by the processor; The processor is configured to perform the data query processing method according to any one of claims 1 to 5 by executing the executable instructions.

12. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the data query processing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data pricing method and system based on contribution degree, electronic equipment and storage medium

    CN112418953A

  • Data distribution method applied to deduplication storage system and related equipment

    CN114741029A