CN-115576994-B - Data query processing method, device, server and medium
Abstract
The application provides a data query processing method, a data query processing device, a server and a medium, which comprise the steps of obtaining a data query set, obtaining a corresponding conflict set for each request in the data query set, establishing a corresponding relation between the conflict set and the data set, constructing each data set in a support set into corresponding vertexes in a hypergraph, constructing each edge in the hypergraph according to the corresponding relation between the conflict set and the data set, distributing a first weight for each vertex by adopting a pre-configured weight distribution scheme, distributing a second weight for edges according to the first weight and the maximized benefit, and determining the second weight of the edges associated with the request or the first weight of the vertexes for each request by adopting a pre-configured price formula. The method reduces the computational complexity of the pricing model and ensures the maximization of the rights and interests of the data owners while meeting the principles of no arbitrage and no discount.
Inventors
- TONG JUNJIE
- HAN ZHENDONG
- HE GANG
Assignees
- 中国联合网络通信集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20221109
Claims (12)
- 1. A method for processing a data query, comprising: Acquiring a data query set; Traversing each data set in a support set in a database to be queried for each request in the data query set, acquiring a conflict set corresponding to the request, and establishing a corresponding relation between the conflict set and the data set, wherein the support set is a data set formed by query results obtained by querying from the database according to a query request of a buyer, the conflict set is a conflict set of a first query result in a first support set and a second query result in a second support set for the request, and the second query result is the conflict set of the first query result if the first query result is different from the second query result in the first support set; Constructing each data set in the support set into a corresponding vertex in the hypergraph, and taking the conflict set corresponding to each request as one edge of the hypergraph according to the corresponding relation between the conflict set and the data set; Adopting a pre-configured weight distribution scheme, distributing a corresponding first weight to each vertex in the hypergraph, and distributing a corresponding second weight to each edge in the hypergraph according to the first weight corresponding to each vertex and the maximized benefit; for each request, determining a corresponding second weight of an edge or a corresponding first weight of a vertex associated with the request, and determining a query price corresponding to the request by adopting a pre-configured price formula.
- 2. The method of claim 1, wherein assigning a corresponding first weight to each vertex in the hypergraph using a pre-configured weight assignment scheme comprises: adopting a strategy of a random function, and distributing a corresponding first weight to each vertex in the hypergraph; Wherein the strategy of the random function comprises: distributing the same random weight to each vertex in the hypergraph, wherein the weight is greater than 0; Or alternatively Assigning different random weights to each vertex in the hypergraph, wherein the weights are greater than 0; Or alternatively And randomly assigning random weights to each vertex in the hypergraph from a range of values.
- 3. The method of claim 1, wherein assigning a corresponding first weight to each vertex in the hypergraph using a pre-configured weight assignment scheme comprises: and distributing corresponding first weights to each vertex in the hypergraph according to the access times or the access frequency of the data set.
- 4. A method according to claim 2 or 3, wherein said assigning a corresponding second weight to each edge in the hypergraph according to the first weight corresponding to each vertex and the maximized benefit comprises: setting a first set and a second set, wherein the first set comprises each edge in the hypergraph, and each edge is associated with one or more vertexes; Determining an nth edge in the first set, wherein the nth edge is the edge with the least number of associated vertexes; and when the sum of the weights of the associated vertices of the nth side is determined to be greater than the n maximized benefit, configuring the nth side in the second set, deleting the nth side in the first set, and setting the n+1 maximized benefit as the sum of the weights of the associated vertices of the nth side; when the first set is determined to be an empty set and edges in the second set are not repeated, for each edge in the second set, acquiring a vertex with the largest weight in the vertices associated with the edge, and giving a first weight corresponding to the vertex to a second weight corresponding to the edge; wherein n is a positive integer and is greater than or equal to 1, and the 1 st maximum benefit is an initialization maximum benefit and is 0.
- 5. The method of claim 4, wherein the employing a preconfigured price formula is: Or alternatively Or alternatively Wherein, the For a corresponding second weight of the edge or a corresponding first weight of the vertex associated with the request, 、 、 Is a pre-configured constant.
- 6. A data query processing apparatus, comprising: the acquisition module is used for acquiring a data query set; The acquisition module is further configured to traverse each data set in a support set in a database to be queried for each request in the data query set, acquire a conflict set corresponding to the request, and establish a corresponding relationship between the conflict set and the data set, where the support set is a data set formed by query results acquired by querying from the database according to a query request of a buyer, and the conflict set is a conflict set of a first query result in a first support set and a second query result in a second support set for the request, if the first query result in the first support set is different from the second query result in the second support set, the second query result is the conflict set of the first query result; The processing module is used for constructing each data set in the support set into a corresponding vertex in the hypergraph, and taking the conflict set corresponding to each request as one edge of the hypergraph according to the corresponding relation between the conflict set and the data set; the processing module is further configured to allocate a corresponding first weight to each vertex in the hypergraph by adopting a pre-configured weight allocation scheme, and allocate a corresponding second weight to each edge in the hypergraph according to the first weight corresponding to each vertex and the maximized benefit; the processing module is further configured to determine, for each request, a corresponding second weight of an edge associated with the request or a corresponding first weight of a vertex, and determine a query price corresponding to the request by using a preconfigured price formula.
- 7. The apparatus of claim 6, wherein the processing module is specifically configured to: adopting a strategy of a random function, and distributing a corresponding first weight to each vertex in the hypergraph; Wherein the strategy of the random function comprises: distributing the same random weight to each vertex in the hypergraph, wherein the weight is greater than 0; Or alternatively Assigning different random weights to each vertex in the hypergraph, wherein the weights are greater than 0; Or alternatively And randomly assigning random weights to each vertex in the hypergraph from a range of values.
- 8. The apparatus of claim 6, wherein the processing module is specifically configured to: and distributing corresponding first weights to each vertex in the hypergraph according to the access times or the access frequency of the data set.
- 9. The apparatus according to claim 7 or 8, wherein the processing module is specifically configured to: setting a first set and a second set, wherein the first set comprises each edge in the hypergraph, and each edge is associated with one or more vertexes; Determining an nth edge in the first set, wherein the nth edge is the edge with the least number of associated vertexes; and when the sum of the weights of the associated vertices of the nth side is determined to be greater than the n maximized benefit, configuring the nth side in the second set, deleting the nth side in the first set, and setting the n+1 maximized benefit as the sum of the weights of the associated vertices of the nth side; when the first set is determined to be an empty set and edges in the second set are not repeated, for each edge in the second set, acquiring a vertex with the largest weight in the vertices associated with the edge, and giving a first weight corresponding to the vertex to a second weight corresponding to the edge; wherein n is a positive integer and is greater than or equal to 1, and the 1 st maximum benefit is an initialization maximum benefit and is 0.
- 10. The apparatus of claim 9, wherein the price formula pre-configured is: Or alternatively Or alternatively Wherein, the For a corresponding second weight of the edge or a corresponding first weight of the vertex associated with the request, 、 、 Is a pre-configured constant.
- 11. A server for a server, which comprises a server and a server, characterized by comprising the following steps: a processor, a memory, a communication interface; the memory is used for storing executable instructions executable by the processor; Wherein the processor is configured to perform the method of processing a data query of any of claims 1 to 5 via execution of the executable instructions.
- 12. A readable storage medium having stored thereon a computer program, which when executed by a processor implements the method of processing a data query according to any of claims 1 to 5.
Description
Data query processing method, device, server and medium Technical Field The present application relates to the field of data query technologies, and in particular, to a data query processing method, device, server, and medium. Background In the digital economic age, data is the basis for people's lives and works. When data is shared, exchanged, and reused, reasonable assessment of the value of the data is required, and therefore pricing of the data becomes a major issue. In general, data is often stored in a database in structured or unstructured form, and when the data is queried, a query pricing model may be employed to price the queried data so that a user determines whether to purchase the queried data based on the pricing and its own needs. Since the query pricing model needs to satisfy both the no-arbitrage (i.e., the price of the whole is less than the monovalent composite of all parts) and no-discount (i.e., the price of the whole part is reduced when the price of a single part is determined to be), the computational complexity is relatively high, and since only the no-arbitrage and no-discount aspects are considered, the pricing of the data is relatively single and one-sided. Disclosure of Invention The application provides a data query processing method, a data query processing device, a server and a medium, which are used for solving the technical problems of high calculation complexity, relatively single and one-sided data pricing in the prior art. In one aspect, the present application provides a method for processing a data query, including: A set of data queries is obtained. And traversing each data set in a support set in a database to be queried for each request in the data query set, acquiring a conflict set corresponding to the request, and establishing a corresponding relation between the conflict set and the data set. And constructing each data set in the support set into a corresponding vertex in the hypergraph, and constructing each edge in the hypergraph according to the corresponding relation between the conflict set and the data set. And adopting a pre-configured weight distribution scheme, distributing a corresponding first weight to each vertex in the hypergraph, and distributing a corresponding second weight to each edge in the hypergraph according to the first weight corresponding to each vertex and the maximized benefit. For each request, determining a corresponding second weight of an edge or a corresponding first weight of a vertex associated with the request, and determining a query price corresponding to the request by adopting a pre-configured price formula. In a specific embodiment, the allocating a corresponding first weight to each vertex in the hypergraph by using a pre-configured weight allocation scheme includes: and adopting a strategy of a random function, and distributing corresponding first weights to each vertex in the hypergraph. Wherein the strategy of the random function comprises the following steps. And distributing the same random weight to each vertex in the hypergraph, wherein the weight is greater than 0. Or each vertex in the hypergraph is assigned with different random weights, and the weight is greater than 0. Or randomly assigning a random weight from a range of values to each vertex in the hypergraph. In a specific embodiment, the allocating a corresponding first weight to each vertex in the hypergraph by using a pre-configured weight allocation scheme includes: and distributing corresponding first weights to each vertex in the hypergraph according to the access times or the access frequency of the data set. In a specific embodiment, the allocating, according to the first weight corresponding to each vertex, a corresponding second weight to each edge in the hypergraph by adopting the pre-configured weight allocation scheme includes: setting a first set and a second set, wherein the first set comprises each edge in the hypergraph, each edge is associated with one or more vertexes, and the second set is an empty set initially. The method comprises the steps of determining an nth edge in a first set, wherein the nth edge is the edge with the smallest number of associated vertexes, configuring the nth edge in a second set when the sum of weights of the associated vertexes of the nth edge is larger than the nth maximum benefit, deleting the nth edge in the first set, setting the (n+1) th maximum benefit as the sum of weights of the associated vertexes of the nth edge, adding 1 when the first set is not determined to be an empty set, and repeatedly executing the steps until the first set is the empty set. And when the first set is determined to be an empty set and the edges in the second set are not repeated, for each edge in the second set, acquiring a vertex with the largest weight in the vertices associated with the edge, and giving a first weight corresponding to the vertex to a second weight corresponding to the edge. Wherein n is a positive intege