Data query method, data query device, equipment and readable medium

By finding matching public subcubes from public data cubes in the privacy computing scenarios of multiple data participants, and generating target query results, the problems of data leakage and inefficiency in traditional data query methods are solved, and safe and efficient Data query.

CN119166664APending Publication Date: 2024-12-20CHINA UNICOM SMART CONNECTION TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411376101.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In the privacy computing scenarios of multiple data participants, traditional data query methods are prone to lead to original data leakage, and the query efficiency is low, affecting data security and application.

Method used

By obtaining the target query dimensions in the data query request of the data participant, we look up the matching target common subcube from the common data cube, and generate the target query results based on the matching target common subcube, avoiding direct interaction of the original data and improving query efficiency.

Benefits of technology

It effectively avoids the leakage of original data, improves the efficiency of data query, and reduces the need for original data summary query for each data participant.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166664A_ABST
    Figure CN119166664A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and particularly discloses a data query method, a data query device, equipment and a readable medium. The data query method comprises the steps of obtaining a target query dimension contained in a data query request of a data participant; searching a target public sub-cube matched with the target query dimension from a plurality of public sub-cubes contained in the public data cube; wherein the plurality of common sub-cubes correspond to a plurality of preset query dimensions, and each common sub-cube is determined according to a plurality of original sub-cubes generated by a plurality of data participants according to the corresponding preset query dimensions; and obtaining a target query result corresponding to the data query request according to the matched target public sub-cube, and sending the target query result to a data participant of the data query request. According to the data query method, during data query, the leakage problem of original data can be avoided, and the data query efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a data query method, a data query device, a device and a readable medium. Background Art

[0002] Privacy computing is to achieve data analysis and calculation under the premise of protecting the data itself from external leakage. In the privacy computing scenario for multiple data participants, it is necessary to perform data query based on the original data of multiple data participants.

[0003] However, in the traditional data query method, the original data between each data participant needs to be aggregated and processed for unified data query. The above data query method is not only prone to the leakage of the original data of each data participant, affecting the data security of each data participant, but also has low query efficiency, affecting practical applications. Summary of the invention

[0004] To this end, the present disclosure provides a data query method to solve the problems of original data leakage and low query efficiency when performing data query across multiple data participants in the prior art.

[0005] In order to achieve the above object, the present disclosure provides a data query method in a first aspect, the data query method comprising:

[0006] Obtain the target query dimension contained in the data query request of the data participant;

[0007] Searching for a target public sub-cube matching the target query dimension from a plurality of public sub-cubes contained in a public data cube; wherein the plurality of public sub-cubes correspond to a plurality of preset query dimensions, and each public sub-cube is determined according to a plurality of original sub-cubes generated by a plurality of data participants according to the corresponding preset query dimensions;

[0008] According to the matched target public sub-cube, a target query result corresponding to the data query request is obtained, and the target query result is sent to a data participant of the data query request.

[0009] In an optional implementation, the plurality of preset query dimensions are determined according to a dimension combination between a plurality of preset single dimensions;

[0010] The step of searching for a target public sub-cube matching the target query dimension from a plurality of public sub-cubes included in the public data cube includes:

[0011] Searching for multiple candidate public sub-cubes matching the target query dimension from multiple public sub-cubes included in the public data cube; wherein the candidate public sub-cubes matching the target query dimension include: candidate public sub-cubes including the target query dimension in the corresponding dimension combination;

[0012] The candidate common sub-cube with the least number of single dimensions contained in the corresponding dimension combination is taken as the target common sub-cube.

[0013] In an optional implementation, the method is executed by a data query platform, and before searching for a target public sub-cube matching the target query dimension from a plurality of public sub-cubes included in the public data cube, the method further includes:

[0014] Respectively obtain M original sub-cubes generated by each of the N data participants according to the M preset query dimensions, and store the obtained N*M original sub-cubes in the data query platform;

[0015] For any preset query dimension, N original sub-cubes corresponding to the preset query dimension are extracted from the data query platform, and a common sub-cube corresponding to the preset query dimension is determined based on the extracted N original sub-cubes; wherein N and M are natural numbers.

[0016] In an optional implementation, any original sub-cube among the M original sub-cubes generated by each of the N data participants according to the M preset query dimensions is generated in the following manner:

[0017] The data participant extracts original data from the corresponding private database;

[0018] Performing a preset operation on the original data according to the preset query dimension corresponding to any original sub-cube to obtain operation result data;

[0019] According to the operation result data, any original sub-cube of the data participant corresponding to the preset query dimension is generated.

[0020] In an optional implementation, the obtaining of M original sub-cubes generated by each of the N data participants according to the M preset query dimensions includes:

[0021] The M original sub-cubes encrypted and transmitted by each data participant in the N data participants according to a preset encryption method are respectively obtained, and the M original sub-cubes are decrypted.

[0022] In an optional implementation method, obtaining a target query result corresponding to the data query request according to the matched target common sub-cube includes:

[0023] Determine the user identification of the data participant and the data access authority corresponding to the user identification;

[0024] Determine an original sub-cube that matches the data access permission among a plurality of original sub-cubes used to determine the target common sub-cube as a candidate original sub-cube;

[0025] For the candidate original sub-cube, determining an original query result corresponding to the candidate original sub-cube;

[0026] According to the original query result, a target query result corresponding to the data query request is obtained.

[0027] In an optional implementation method, when there are multiple candidate original sub-cubes, obtaining the target query result corresponding to the data query request according to the original query result includes:

[0028] The original query results corresponding to each candidate original sub-cube are merged, and the target query result corresponding to the data query request is obtained according to the merged processing result.

[0029] A second aspect of the present disclosure provides a data query device, the device comprising:

[0030] An acquisition module, used to acquire a target query dimension contained in a data query request of a data participant;

[0031] A search module, used to search for a target public sub-cube matching the target query dimension from a plurality of public sub-cubes contained in a public data cube; wherein the plurality of public sub-cubes correspond to a plurality of preset query dimensions, and each public sub-cube is determined according to a plurality of original sub-cubes generated by a plurality of data participants according to the corresponding preset query dimensions;

[0032] A sending module is used to obtain a target query result corresponding to the data query request according to the matched target public sub-cube, and send the target query result to a data participant of the data query request.

[0033] A third aspect of the present disclosure provides an electronic device, including:

[0034] one or more processors;

[0035] A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned data query method;

[0036] One or more I / O interfaces are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.

[0037] A fourth aspect of the present disclosure provides a computer-readable medium having a computer program stored thereon, wherein the program implements the above-mentioned data query method when executed by a processor.

[0038] The present disclosure has the following advantages:

[0039] In the data query method provided by the embodiment of the present disclosure, first, a target query dimension contained in a data query request of a data participant is obtained; then, a target public sub-cube matching the target query dimension is searched from a plurality of public sub-cubes contained in a public data cube, wherein the plurality of public sub-cubes correspond to a plurality of preset query dimensions, and each public sub-cube is determined according to a plurality of original sub-cubes generated by a plurality of data participants according to the corresponding preset query dimensions; finally, a target query result corresponding to the data query request is obtained according to the matched target public sub-cube, and the target query result is sent to the data participant of the data query request.

[0040] From the above, it can be concluded that the data query method provided by the embodiment of the present disclosure requires each data participant to generate an original sub-cube according to the preset query dimension, so that the common sub-cubes contained in the public data cube can be determined based on the original sub-cubes generated by each data participant. It can be seen that the common sub-cubes contained in the public data cube correspond to the data processing results of each data participant under the preset query dimension. Therefore, when performing data query, the embodiment of the present disclosure does not need to interact with the original data, but only needs to match the target query dimension with the preset query dimension corresponding to each public sub-cube, and the corresponding target query result can be obtained according to the matched target public sub-cube, which not only avoids the leakage of original data, but also avoids unified summary query of a large amount of original data of each data participant, effectively improving the query efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings are used to provide further understanding of the present disclosure and constitute a part of the specification. They are used to explain the present disclosure together with the following detailed description, but do not constitute a limitation of the present disclosure.

[0042] Figure 1 A flowchart of a data query method provided by an embodiment of the present disclosure;

[0043] Figure 2 A schematic diagram of a data query method provided by an embodiment of the present disclosure;

[0044] Figure 3 A flowchart of a data query method provided by an embodiment of the present disclosure;

[0045] Figure 4 A schematic diagram of an original sub-cube of a data query method provided by an embodiment of the present disclosure;

[0046] Figure 5 A schematic diagram of a data query device provided in an embodiment of the present disclosure;

[0047] Figure 6 A schematic diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0048] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0049] As used in this disclosure, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0050] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure.As used in the present disclosure, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0051] When the terms “comprising” and / or “made of…” are used in the present disclosure, it specifies the existence of the stated features, integers, steps, operations, elements and / or components, but does not exclude the existence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0052] The embodiments described in the present disclosure may be described with reference to plan views and / or cross-sectional views by way of ideal schematic diagrams of the present disclosure. Therefore, the exemplary illustrations may be modified according to manufacturing techniques and / or tolerances.

[0053] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as those commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined in this disclosure.

[0054] In a privacy computing scenario for multiple data participants, data queries need to be performed based on the original data of multiple data participants.

[0055] However, in the traditional data query method, the original data between various data participants need to be aggregated and processed for unified data query. The above data query method is not only prone to the leakage of the original data of various data participants, affecting the data security of each data participant, but also has low query efficiency and poor applicability.

[0056] In view of this, the embodiments of the present disclosure provide a data query method, a data query device, an equipment and a readable medium. In the data query method provided by the embodiments of the present disclosure, each data participant needs to generate an original sub-cube according to a preset query dimension, so that the public sub-cubes contained in the public data cube can be determined according to the original sub-cubes generated by each data participant. It can be seen that the public sub-cubes contained in the public data cube correspond to the data processing results of each data participant under the preset query dimension. Therefore, when performing data query, the embodiments of the present disclosure do not need to interact with the original data, but only need to match the target query dimension with the preset query dimension corresponding to each public sub-cube, and then the corresponding target query result can be obtained according to the matched target public sub-cube, which not only avoids the leakage of the original data, but also avoids the unified summary query of a large amount of original data of each data participant, effectively improving the query efficiency.

[0057] In a first aspect, an embodiment of the present disclosure provides a data query method. Figure 1 A flowchart of a data query method provided in an embodiment of the present disclosure, referring to Figure 1 , the data query method includes:

[0058] Step S110: Acquire the target query dimension contained in the data query request of the data participant.

[0059] Among them, data participants refer to data partners in actual business scenarios, who have corresponding business data in the business scenarios. When performing privacy computing for the business scenarios, data computing and analysis can be performed based on the business data of the data participants in the business scenarios.

[0060] For example, in a telephone communication service scenario, data participant A may have communication service data for region A, and data participant B may have communication service data for region B. For another example, in a product sales scenario, data participant A and data participant B may have their product sales data for the product.

[0061] Among them, the data query request refers to a query request initiated by a data participant for querying business data in the business scenario.

[0062] Specifically, the data query request can be used to query business data related to the target query dimension.

[0063] The target query dimension refers to the dimension to be queried determined from the attribute dimension of the business data. The number of dimensions included in the target query dimension can be one or more. The attribute dimension of the business data is used to describe the relevant characteristics or related uses between the business data and the business scenario, which can correspond to the attribute column in the data table.

[0064] For example, in a call analysis business scenario of a certain operator, mobile phone number, call time, call location, etc. are all attribute dimensions of its business data. Correspondingly, mobile phone number data, call time data, and call location data are the corresponding business data under this attribute dimension.

[0065] Therefore, business data related to the target query dimension in the corresponding business scenario can be queried through the data query request.

[0066] Exemplarily, the data query request may be used to query the business data of the target query dimension itself, for example, querying mobile phone number data, call time data, and call location data.

[0067] The data query request can also be used to query the metric data obtained by aggregating and calculating the business data according to the target query dimension. The metric is a statistical indicator that measures the status of business activities. For example, when the target query dimension is mobile phone number, call time, call location, and the metric is the number of calls, the data query request can be used to query the number of calls made by each mobile phone number in each region every day.

[0068] Furthermore, the data query request can also be used to query business data according to the target query dimension and / or the result data obtained by performing secondary data operations on metric indicator data obtained by aggregating and calculating the business data according to the target query dimension, for example, querying the number of calls made by each mobile phone number in each region within a certain time period. The embodiments of the present disclosure are not limited to this.

[0069] Correspondingly, in the data query request, in addition to including the target query dimension, the corresponding query content can also be adaptively set according to the data query requirements of the data participants, and the embodiments of the present disclosure do not limit this.

[0070] In an optional implementation, the data query request of the data participant may include a target query dimension, a target metric, and a target aggregation method.

[0071] Among them, the target measurement indicator refers to a statistical indicator for measuring the status of business activities. It is determined from the attribute dimension of the business data and can include one or more measurement indicators. For example, when it is necessary to count the total sales price and total sales quantity of the goods, the sales price and sales number are the target measurement indicators.

[0072] The target aggregation method refers to the operation method of performing aggregation operation on the target metric. The target aggregation method may include multiple aggregation methods, such as statistical aggregation method: used to count the number of data of the target metric; average aggregation method: used to count the average value of the data of the target metric; summary aggregation method: used to count the sum of the data of the target metric, etc., which are not limited in the embodiments of the present disclosure.

[0073] Correspondingly, the data query request can query the business data after grouping and processing according to the target query dimension, and obtain the aggregation operation results of the target metric indicators in the grouped business data according to the target aggregation method.

[0074] For example, when the target query dimensions are telephone, region, and time, the target metric is call number and SMS number, and the target aggregation method is statistical aggregation, the data query request is used to query the aggregation results obtained by performing statistical aggregation processing on the call numbers and SMS numbers in the grouped business data after grouping the business data by telephone, region, and time, that is, the number of calls and SMS sent by each mobile phone number in each region every day.

[0075] It should also be noted that for different target query dimensions, the corresponding target metric indicators and target aggregation methods can be the same. For example, in a fixed business data analysis scenario, it is only used to analyze the summary value of a certain target metric indicator. At this time, the target metric indicator and target aggregation method can be set to the default value, so that only the target query dimension included in the data query request is obtained, and the data query request can be processed.

[0076] In the case where the target query dimension corresponds to a variety of target metrics and target aggregation methods, in order to achieve accurate query of data, it is necessary to include the target query dimension, target metric and target aggregation method in the data query request. At this time, for the data query request of the data participant, in addition to obtaining the target query dimension contained therein, it is also necessary to obtain the target metric and target aggregation method contained therein, in order to achieve accurate processing of the data query request, and the embodiments of the present disclosure do not limit this.

[0077] Step S120: searching for a target public sub-cube that matches the target query dimension from a plurality of public sub-cubes included in the public data cube; wherein the plurality of public sub-cubes correspond to a plurality of preset query dimensions, and each public sub-cube is determined based on a plurality of original sub-cubes generated by a plurality of data participants according to the corresponding preset query dimensions.

[0078] The public data cube is a multi-dimensional data structure, and a public data cube contains public sub-cubes corresponding to multiple preset query dimensions.

[0079] The preset query dimension is determined according to a dimension combination between multiple preset single dimensions. The multiple preset single dimensions are screened from the attribute dimensions of the business data according to actual business needs.

[0080] It should be noted that the dimension combination is generated by randomly combining multiple single dimensions. Accordingly, the number of single dimensions included in the preset query dimension determined according to the dimension combination can be one or more, and the embodiments of the present disclosure do not limit this.

[0081] Exemplarily, when the preset multiple single dimensions are dimension A, dimension B, and dimension C, the preset query dimension can be a dimension combination between multiple single dimensions: (dimension A, dimension B), (dimension A, dimension C), (dimension B, dimension C), (dimension A), (dimension B), (dimension C), (dimension A, dimension B, dimension C), each of the above dimension combinations can be used to determine a preset query dimension, that is, the number of preset query dimensions is 7.

[0082] Correspondingly, for each public sub-cube contained in the public data cube, it corresponds to a preset query dimension, so that when the multiple single dimensions are dimension A, dimension B, and dimension C, the public data cube may contain 7 public sub-cubes corresponding to the above 7 preset query dimensions.

[0083] Each public sub-cube is determined according to a plurality of original sub-cubes generated by a plurality of data participants according to corresponding preset query dimensions.

[0084] Specifically, each original sub-cube is the operation result data obtained by the data participant performing a preset operation on the business data under the corresponding preset query dimension. The preset operation is used to calculate the metric value corresponding to the business data.

[0085] It should be noted that for different original sub-cubes generated by the same data participant according to different preset query dimensions, their corresponding data structures are the same. The main difference lies in the different data values ​​obtained by performing preset operations through different preset query dimensions.

[0086] For example, when multiple single dimensions are telephone, time, and region, and the preset operation is to count the number of calls for each phone, the original sub-cube A1 generated by data participant A according to the preset query dimensions of telephone and time contains four types of data: telephone, time, region, and number of calls, which can represent the number of calls for each phone number every day and in all regions.

[0087] The original sub-cube A2 generated by data participant A according to the preset query dimensions of phone, time, and region also contains four types of data: phone, time, region, and number of calls, which can represent the number of calls for each phone number every day and in each region.

[0088] It should also be noted that for different original sub-cubes generated by different data participants according to the same preset query dimension, their corresponding data structures are also the same. The main difference is that the data values ​​are obtained based on the business data of each data participant.

[0089] For example, the business data of data participant A is the business data of City A. The original sub-cube A1 generated according to the preset query dimensions of phone and time contains four types of data: phone, time, region, and number of calls. It can represent the number of calls made by each phone number every day and in all areas of City A.

[0090] The business data of data participant B is the business data of city B. The original sub-cube B1 generated according to the preset query dimensions of phone and time contains four types of data: phone, time, region, and number of calls. It can represent the number of calls made by each phone number every day and in all areas of city B.

[0091] In an optional implementation, in order to improve the query efficiency of the data query request of the data participant, the data participant can perform a preset operation on the original data according to the preset query dimension, and generate an original sub-cube based on the obtained operation result data, so that the data query request of the data participant can be directly processed according to the operation result data obtained by the preset calculation to obtain the corresponding query result. Correspondingly, for any original sub-cube among the multiple original sub-cubes generated by each of the multiple data participants according to the multiple preset query dimensions, it can be generated in the following manner: the data participant extracts the original data from the corresponding private database; performs a preset operation on the original data according to the preset query dimension corresponding to any original sub-cube to obtain the operation result data; and generates any original sub-cube of the data participant corresponding to the preset query dimension according to the operation result data.

[0092] The number of original sub-cubes generated by each data participant may be the same or different, and the embodiments of the present disclosure do not limit this. For example, for N data participants, in the case of M preset query dimensions, each data participant may generate M original sub-cubes according to the M preset query dimensions, or may select a part of the preset query dimensions to generate less than M original sub-cubes.

[0093] The private database refers to the database used to store the business data of the data participants. The original data refers to the business data used to generate the original sub-cube, that is, the private data of the data participants.

[0094] It should be noted that, under the multiple preset query dimensions determined by the dimensional combination between the preset multiple single dimensions, the data structures of the original data extracted from the corresponding private databases by different data participants are the same.

[0095] Specifically, the original data must include business data corresponding to multiple single dimensions used to determine each preset query dimension, and business data corresponding to the preset measurement indicators.

[0096] The preset metric refers to a statistical indicator for measuring the status of business activities, which is determined from the attribute dimension of business data. The preset metric may include one or more metric indicators.

[0097] For example, for the preset dimensions (dimension A, dimension B), it is determined by a combination of multiple preset single dimensions: dimension A, dimension B, and dimension C. Therefore, the original data needs to include business data corresponding to dimension A, dimension B, and dimension C. When the business analysis requirement is to count the total price of goods sold, the original data also needs to include business data whose preset measurement indicator is the price of goods.

[0098] Among them, performing a preset operation on the original data according to the preset query dimension corresponding to any original sub-cube refers to grouping the original data according to the preset query dimension and performing the preset operation on the grouped original data.

[0099] Specifically, the preset operation is a preset aggregation method, which is used to perform preset aggregation processing on the original data corresponding to the grouped preset metric indicators.

[0100] The preset aggregation method may include multiple aggregation methods, such as statistical aggregation method: used to count the number of data of preset measurement indicators, that is, to perform statistical aggregation processing on the data of preset measurement indicators; average aggregation method: used to count the average value of data of preset measurement indicators, that is, to perform average aggregation processing on the data of preset measurement indicators; summary aggregation method: used to count the sum of data of preset measurement indicators, that is, to perform summary aggregation processing on the data of preset measurement indicators. The embodiments of the present disclosure do not limit this.

[0101] Correspondingly, the operation result data is the data aggregation result obtained by grouping the original data according to the preset query dimension and performing preset aggregation processing on the grouped original data.

[0102] Therefore, after obtaining the calculation result data, the original sub-cube corresponding to the preset query dimension of the data participant can be generated.

[0103] For example, for the preset single dimension of mobile phone number, date, and location, the preset metric indicators are call number call_id and SMS number message_id, and the preset aggregation method is quantity statistics count, the SQL (Structured Query Language) statement for generating the original sub-cube Cube (telephone, location) according to the preset query dimensions (telephone, location) for data participant A is as follows:

[0104] select telephone,date,location,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from dataA group by telephone,location.

[0105] Among them, dataA is the original data extracted by data participant A from its private database. Therefore, data participant A can obtain the calculation result data by running the above SQL statement and generate the original sub-cube Cube (telephone, location) corresponding to the preset query dimension (telephone, location).

[0106] Similarly, the SQL statement for generating the original sub-cube Cube(telephone) according to the preset query dimension (telephone) is as follows:

[0107] select telephone,date,location,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from dataA group by telephone.

[0108] Therefore, data participant A can obtain the calculation result data by running the above SQL statement, and generate the original sub-cube Cube(telephone) corresponding to the preset query dimension (telephone), and the original sub-cube Cube(telephone) and the original sub-cube Cube(telephone, location) are both included in the same original cube.

[0109] It can be seen that for the multiple original sub-cubes generated by each data participant and contained in the same original cube, the corresponding preset query dimensions are different, but the corresponding preset measurement indicators and preset aggregation methods are the same.

[0110] It should be noted that the data query method of the embodiment of the present disclosure can be executed by a data query platform. Accordingly, the data query platform can be used to receive data query requests sent by each data participant from its corresponding client and manage the original sub-cubes generated by each data participant.

[0111] It should also be noted that the above-mentioned data query platform can be any platform that can manage data cubes and process data query requests based on data cubes, for example, a data query platform based on Kylin (a distributed analysis engine), and the embodiments of the present disclosure are not limited to this.

[0112] Furthermore, in order to achieve unified processing of the original sub-cubes of each data participant, after multiple data participants generate multiple original sub-cubes according to the corresponding preset query dimensions, the data query platform can determine multiple common sub-cubes based on the multiple original sub-cubes generated by the multiple data participants.

[0113] Specifically, for any preset query dimension, multiple original sub-cubes generated by multiple data participants according to the preset query dimension can be obtained, so as to determine the common sub-cube corresponding to the preset query dimension based on the multiple original sub-cubes.

[0114] It should be noted that for any preset query dimension, the number of original sub-cubes can be less than the number of data participants. In actual applications, considering data security, some data participants may not generate corresponding original sub-cubes according to a preset query dimension. Therefore, for any preset query dimension, the number of original sub-cubes is not necessarily the same as the number of data participants.

[0115] Exemplarily, when the number of data participants is N, the preset query dimensions are M, and the number of original sub-cubes corresponding to each preset query dimension is M, before the data query platform searches for the target public sub-cube matching the target query dimension from the multiple public sub-cubes contained in the public data cube, it also includes: respectively obtaining the M original sub-cubes generated by each of the N data participants according to the M preset query dimensions, and storing the obtained N*M original sub-cubes to the data query platform; for any preset query dimension, extracting the N original sub-cubes corresponding to the preset query dimension from the data query platform, and determining the public sub-cube corresponding to the preset query dimension based on the extracted N original sub-cubes; wherein N and M are natural numbers.

[0116] Each original sub-cube is identified with a corresponding data participant and a corresponding preset query dimension.

[0117] Thus, the data query platform can determine the data participants and preset query dimensions corresponding to each original sub-cube according to the identifier, and determine the common sub-cube according to the original sub-cubes of the same preset query dimension.

[0118] It should be noted that in order to reduce the resource cost required to establish a common sub-cube, the common sub-cube in the embodiment of the present disclosure can be a virtual cube instance, that is, it does not occupy actual storage space. The data query platform can determine the original sub-cube corresponding to the common sub-cube by establishing a mapping relationship between the common sub-cube and the original sub-cube.

[0119] For ease of understanding, Figure 2 A schematic diagram of a data query method provided by an embodiment of the present disclosure is shown. Figure 2 :

[0120] For data participant A, it extracts original data from the private database and generates multiple original sub-cubes corresponding to preset query dimensions, namely, the original sub-cubes Cube1(A), Cube1(B), Cube1(C), etc. contained in the original cube Cube1 in the figure.

[0121] For data participant B, it extracts original data from the private database and generates multiple original sub-cubes corresponding to preset query dimensions, namely, the original sub-cubes Cube2(A), Cube2(B), Cube2(C), etc. contained in the original cube Cube2 in the figure.

[0122] Thus, the data query platform can determine the common sub-cubes according to the multiple original sub-cubes corresponding to the same preset query dimension. For example, according to the original sub-cube Cube1(A) and the original sub-cube Cube2(A), the common sub-cube Cube3(A) contained in the common cube Cube3 can be determined. It can be seen that according to the original sub-cube Cube1(X) and the original sub-cube Cube2(X), the common sub-cube Cube3(X) contained in the common cube Cube3 can be determined, where (X) can be flexibly replaced by Figure 2 Various query dimensions such as (B), (C), (A,B), (A,C), (B,C), (A,B,C), etc.

[0123] Furthermore, considering that there is a risk of data leakage when each data participant transmits the generated multiple original sub-cubes to the data query platform, in order to improve the transmission security of the original sub-cubes, the data participant can transmit the original sub-cubes to the data query platform in a preset encryption method. Accordingly, respectively obtaining the M original sub-cubes generated by each of the N data participants according to the M preset query dimensions includes: respectively obtaining the M original sub-cubes encrypted and transmitted by each of the N data participants according to the preset encryption method, and decrypting the M original sub-cubes.

[0124] Among them, the preset encryption method is an encryption method set according to actual encryption requirements, such as a symmetric encryption method, an asymmetric encryption method, a pre-shared encryption method, etc., and the embodiments of the present disclosure do not limit this.

[0125] Therefore, after the data query platform receives the encrypted transmission of M original sub-cubes, it will decrypt the M original sub-cubes according to a preset decryption method that matches the preset encryption method, so as to determine the corresponding public sub-cubes based on the decrypted M original sub-cubes, thereby improving transmission security.

[0126] Furthermore, after determining the multiple public sub-cubes included in the public data cube, in response to a data query request from a data participant, a target public sub-cube matching the target query dimension can be searched from the multiple public sub-cubes.

[0127] Among them, matching with the target query dimension means that the preset query dimension corresponding to the common sub-cube matches with the target query dimension, that is, the preset query dimension can contain the target query dimension.

[0128] It should be noted that since the preset query dimension is determined based on the dimension combination between multiple preset single dimensions, and the target query dimension also includes at least one single dimension, when the preset query dimension matches the target query dimension, the dimension combination corresponding to the preset query dimension includes each single dimension in the target query dimension.

[0129] Exemplarily, for a target query dimension of (dimension A, dimension B), the preset query dimensions such as (dimension A, dimension B), (dimension A, dimension B, dimension C), (dimension A, dimension B, dimension D), (dimension A, dimension B, dimension C, dimension D), etc. all match the target query dimension.

[0130] Correspondingly, the target public sub-cube that matches the target query dimension is a public sub-cube corresponding to the preset query dimension that matches the target query dimension.

[0131] It should also be noted that, when the target metric indicator and the target aggregation method are non-default values, the data query request also includes the target metric indicator and the target aggregation method. Accordingly, the target common sub-cube in the embodiment of the present disclosure not only matches the target query dimension, but also matches the target metric indicator and the target aggregation method, that is, the preset metric indicator and the preset aggregation method corresponding to the target common sub-cube respectively match the target metric indicator and the target aggregation method.

[0132] The preset metric and the target metric may include one or more metric indicators, respectively. The preset aggregation method and the target aggregation method may include one or more aggregation methods, respectively.

[0133] Correspondingly, the target common sub-cube matches the preset metric index, which means that the preset metric index can include the target metric index. The target aggregation method matches the preset aggregation method, which means that the preset aggregation method can include the target aggregation method.

[0134] Step S130: Obtain a target query result corresponding to the data query request according to the matched target public sub-cube, and send the target query result to the data participant of the data query request.

[0135] The target query result is the request data corresponding to the data query request, which can be the multidimensional data contained in the target common sub-cube itself, or can be the calculation result data obtained by performing calculation processing on the multidimensional data contained in the target common sub-cube.

[0136] Correspondingly, when the data query request is to query the business data of the target query dimension or to query the metric data obtained by aggregating and calculating the business data according to the target query dimension, the corresponding data contained in the target public sub-cube can be directly used as the target query result.

[0137] When the data query request is for querying the business data of the target query dimension and / or the result data obtained by performing secondary data operations on the metric indicator data obtained by aggregating and calculating the business data according to the target query dimension, the data operation corresponding to the data query request can be performed in the target sub-cube, so that the operation result data is used as the target query result.

[0138] For example, a data query request is an SQL query statement, and thus the corresponding SQL query statement is executed in the multidimensional data of the target sub-cube, and data operations are performed on the multidimensional data of the target sub-cube according to the data operation logic of the SQL query statement to obtain operation result data, and the operation result data is used as the target query result.

[0139] In the data query method provided by the embodiment of the present disclosure, each data participant needs to generate an original sub-cube according to the preset query dimension, so that the common sub-cubes contained in the public data cube can be determined based on the original sub-cubes generated by each data participant. It can be seen that the common sub-cubes contained in the public data cube correspond to the data processing results of each data participant under the preset query dimension. Therefore, when performing data query, the embodiment of the present disclosure does not need to interact with the original data, but only needs to match the target query dimension with the preset query dimension corresponding to each public sub-cube, and the corresponding target query result can be obtained according to the matched target public sub-cube, which not only avoids the leakage of original data, but also avoids unified summary query of a large amount of original data of each data participant, effectively improving the query efficiency.

[0140] In addition, in order to achieve better technical effects, those skilled in the art may also make various changes and modifications to the above embodiments:

[0141] In an optional implementation, in order to improve the query efficiency of obtaining the target query result from the target common sub-cube, the common sub-cube corresponding to the preset query dimension matching the target query dimension may be selected as the target common sub-cube with the least number of single dimensions contained in the dimension combination corresponding to the common sub-cube. Accordingly, the multiple preset query dimensions are determined according to the dimension combination between the preset multiple single dimensions, and the target common sub-cube matching the target query dimension is searched from the multiple common sub-cubes included in the common data cube, including: searching for multiple candidate common sub-cubes matching the target query dimension from the multiple common sub-cubes included in the common data cube; wherein the candidate common sub-cubes matching the target query dimension include: the candidate common sub-cubes containing the target query dimension in the corresponding dimension combination; and the candidate common sub-cube with the least number of single dimensions contained in the corresponding dimension combination is selected as the target common sub-cube.

[0142] Among them, the preset multiple single dimensions are screened from the attribute dimensions of business data according to actual business needs.

[0143] It should be noted that the dimension combination is generated by randomly combining multiple single dimensions. Accordingly, the number of single dimensions included in the preset query dimension determined according to the dimension combination can be one or more, and the embodiments of the present disclosure do not limit this.

[0144] For example, for the preset multiple single dimensions being dimension A and dimension B, the corresponding preset query dimensions determined according to the dimension combination of the preset multiple single dimensions may be (dimension A), (dimension B), (dimension A, dimension B).

[0145] In the case where the dimension combination corresponding to the public sub-cube includes the target query dimension, it is determined to be a candidate public cube matching the target query dimension.

[0146] Exemplarily, when the target query dimension is dimension A, any dimension combination corresponding to the common sub-cube that includes dimension A will be matched.

[0147] Furthermore, after determining the candidate common sub-cube, although the corresponding target query result can be obtained based on the candidate common sub-cube, the more single dimensions are contained in the corresponding dimension combination, the longer the query time required for data query based on the candidate common sub-cube.

[0148] For example, when the target query dimension is dimension A, the candidate common sub-cube Cube(A,B) corresponding to the preset query dimensions A and B requires a longer query time than the candidate common sub-cube Cube(A) corresponding to dimension A.

[0149] Therefore, by taking the candidate common sub-cube with the least number of single dimensions contained in the corresponding dimension combination as the target common sub-cube, the query time can be effectively reduced.

[0150] In an optional implementation, different data participants may have different data access permissions according to actual business needs. Therefore, in order to return the target query result corresponding to the permission to the data participant, the multiple original sub-cubes of the target public sub-cube can be screened according to the data access permission corresponding to the user identifier, thereby generating the target query result. Accordingly, according to the matched target public sub-cube, the target query result corresponding to the data query request is obtained, including: determining the user identifier of the data participant and the data access permission corresponding to the user identifier; determining the original sub-cube that matches the data access permission among the multiple original sub-cubes used to determine the target public sub-cube as the candidate original sub-cube; for the candidate original sub-cube, determining the original query result corresponding to the candidate original sub-cube; according to the original query result, the target query result corresponding to the data query request is obtained.

[0151] Among them, the user identification of the data participant is an identifier used to identify the identity of the data participant.

[0152] Different data participants have corresponding access rights. For example, data participant A can only access its own data, data participant B can access data participant A and its own data, data participant C can access all data, etc.

[0153] Accordingly, the corresponding data access rights can be determined according to the user identification of the data participant, thereby determining the original sub-cubes matching the data access rights among the multiple original sub-cubes of the target public sub-cube as candidate original sub-cubes.

[0154] Among them, the original sub-cube matching the data access permission can be determined according to the preset permission mapping table.

[0155] Specifically, each original sub-cube has a corresponding cube identifier, and the cube identifier is determined according to a user identifier of a corresponding data participant and / or a corresponding preset query dimension.

[0156] The data access rights corresponding to the user ID are determined according to a preset permission mapping table; the permission mapping table is used to store the mapping relationship between the user ID of the data participant and the cube ID of the original sub-cube with data access rights.

[0157] It should be noted that when the preset metric indicators and preset aggregation methods are non-default values, the cube identifier can also be determined based on the user identifier of the data participant and / or the corresponding preset query dimensions, preset metric indicators and preset aggregation methods.

[0158] Furthermore, by storing the mapping relationship between the user ID of the data participant and the cube ID of the original sub-cube with data access rights in the permission mapping table, the original sub-cube with data access rights can be determined based on the user ID of the data participant.

[0159] Accordingly, for the candidate original sub-cube, the original query result corresponding to the candidate original sub-cube can be determined.

[0160] The original query result is the data query result of the candidate original sub-cube corresponding to the data query request. For example, the original query result is the business data of the target query dimension contained in the candidate original sub-cube, the metric data obtained by aggregating and calculating the business data according to the target query dimension, or the operation result data obtained by performing the data operation corresponding to the data query request in the candidate original sub-cube.

[0161] Exemplarily, a data query request is an SQL query statement, and the SQL query statement is executed in the multidimensional data of the candidate original sub-cube, and data operations are performed on the multidimensional data of the candidate original sub-cube according to the data operation logic of the SQL query statement to obtain operation result data, and the operation result data is used as the original query result.

[0162] Thus, based on the original query result, the target query result corresponding to the data query request is finally obtained.

[0163] In an optional implementation, when there are multiple candidate original sub-cubes, a target query result corresponding to the data query request is obtained based on the original query results, including: merging the original query results corresponding to each candidate original sub-cube, and obtaining the target query result corresponding to the data query request based on the merged processing result.

[0164] The data structures corresponding to the various original query results are the same, so the target query result can be obtained according to the merged processing result by merging the contents of the various original query results.

[0165] For example, each original query result includes four types of data: phone number, time, region, and number of text messages, and each original query result corresponds to a different data participant. Therefore, the target query result also includes four types of data: phone number, time, region, and number of text messages, and it includes the content of all original query results.

[0166] In the embodiment of the present disclosure, a comprehensive target query result can be generated by merging the original query results corresponding to each candidate original sub-cube.

[0167] To facilitate understanding, an example is used below to introduce the implementation of the above embodiment.

[0168] Privacy computing is a general term for a series of technical routes that implement data analysis and computing under the premise of protecting the data itself from external leakage. It can achieve the goal of "data available but invisible", thereby realizing the transformation and release of data value under the premise of fully protecting data and privacy security.

[0169] The existing privacy computing technologies mainly include the following:

[0170] ① Secure Multiparty Compute (MPC): It is a branch of cryptography that distributes computing among multiple participants. Participants use their private data to participate in confidential computing and jointly complete a computing task without disclosing their private data.

[0171] ②Trusted Execution Environment (TEE): It is a hardware-based privacy protection method. Through a secure area built by software and hardware methods on the computing platform, the confidentiality and integrity of the code and data loaded inside the secure area can be protected.

[0172] ③Federated Learning (FL): It is a distributed machine learning technology with privacy protection properties. In machine learning, training data is usually aggregated from multiple data sources and transmitted to a central server for training. However, this process is prone to data leakage risks. In the federated learning model, operations are performed locally, and only intermediate operation results that do not contain privacy information are exchanged between the participants to optimize the model parameters related to each participant. Finally, a federated model is generated and applied to reasoning, thus realizing the data application mode of "raw data does not leave the local area" and "data is available but not visible".

[0173] However, the existing technology has the following defects: MPC performance challenges are great and the research and development is difficult; TEE relies on the credibility of specific hardware and hardware manufacturers, and the cost is high; FL results are poorly controlled and intermediate information is easily leaked.

[0174] In view of this, the embodiments of the present disclosure provide a data query method, a data query device, an equipment and a readable medium, which are used to solve the problems of leakage of original data of each data participant, low query efficiency and poor applicability generated by performing data query based on the original data of multiple data participants in a privacy computing scenario for multiple data participants.

[0175] In the disclosed embodiment, the data participants only need to request query data from the public data cube, and then output the final query results according to the public data cube. Therefore, it avoids the exchange of original data between the data participants, and only needs to exchange the intermediate results calculated locally based on the original data, that is, the original sub-cube. Compared with the centralized data query method that aggregates the data of all parties and then performs data calculation, it greatly improves the query efficiency of data and effectively avoids the original data, and has high applicability.

[0176] Figure 3 A flowchart of a data query method provided by an embodiment of the present disclosure is shown. Figure 3 , the data query method includes:

[0177] Step S310: respectively obtain M original sub-cubes generated by each of the N data participants according to the M preset query dimensions, and store the obtained N*M original sub-cubes in the data query platform.

[0178] Specifically, each data participant can define a data cube model according to business needs, including selecting multiple preset single dimensions, preset metrics, and preset aggregation methods. Then, each data participant extracts raw data from the private database according to the defined Cube model, performs Extract-Transform-Load (ETL), and generates the original cube.

[0179] Among them, Data Cube (also known as Data Cube) is a technology commonly used in data analysis and indexing, which can establish multi-dimensional indexes for original data. By analyzing data through Cube, the efficiency of data query can be greatly accelerated. Therefore, a Cube is a materialized view set of aggregated measurements of multiple dimensions.

[0180] Correspondingly, the generated original cube contains original sub-cubes corresponding to different preset query dimensions. The preset query dimension is a free combination of multiple preset single dimensions. For example, if there are three dimension fields a, b, and c, then according to the free combination of dimensions a, b, and c, the corresponding preset query dimensions (a, b), (a, c), (b, c), (a), (b), (c), (a, b, c) can be obtained.

[0181] For example, for the preset multiple single dimensions telephone, date, and location, the original cube constructed is as follows Figure 4 As shown, it contains the original sub-cubes corresponding to different preset query dimensions (telephone), (date), (location), (telephone, date), (telephone, location), (date, location), and (telephone, date, location).

[0182] Specifically, the original sub-cube generation of all preset query dimensions can be completed by using the Cube function. The function of the Cube function is to automatically perform grouping and aggregation operations on the dimension fields displayed in the aggregation operation group by in the SQL statement. Therefore, the generated original sub-cube is a multidimensional data set, that is, the original sub-cube is the aggregation result obtained by aggregation processing according to different preset query dimensions.

[0183] For example, all the original sub-cubes corresponding to telephone, date, and location include: Cube(telephone, date), Cube(telephone, location), Cube(date, location), Cube(telephone), Cube(date), Cube(location), Cube(telephone, date, location).

[0184] Based on the original data table of the data participant, the SQL statement for generating the original sub-cube of the above Cube is as follows:

[0185] Assume: telephone = 1, date = 2, location = 3, then:

[0186] (1)Cube(telephone,date)

[0187] select telephone,date,3,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from table group by telephone,date;

[0188] (2)Cube(telephone,location)

[0189] select telephone,2,location,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from table group by telephone,location;

[0190] (3)Cube(date,location)

[0191] select 1,date,location,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from table group by date,location;

[0192] (4)Cube(telephone)

[0193] select telephone,2,3,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from table group by telephone;

[0194] (5)Cube(date)

[0195] select 1,date,3,count(distinct call_id)as callCount,count(distinctmessage_id)as messageCount from table group by date;

[0196] (6)Cube(location)

[0197] select 1,2,location,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from table group by location;

[0198] (7)Cube(telephone,date,location)

[0199] select telephone,date,location,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from table group by telephone,date,location.

[0200] Step S320: For any preset query dimension, extract N original sub-cubes corresponding to the preset query dimension from the data query platform, and determine the common sub-cube corresponding to the preset query dimension based on the extracted N original sub-cubes; wherein N and M are natural numbers.

[0201] Among them, the original sub-cubes corresponding to the preset query dimensions generated by each data participant, that is, the intermediate calculation results of the data will be transmitted to the data query platform through a preset encryption method such as Kylin's encryption mechanism, so that the data query platform can merge these original sub-cubes into a common sub-cube contained in a common data cube.

[0202] Exemplarily, a public data cube can be generated through Kylin's hybrid model. A hybrid model is a combination of one or more data cubes. The purpose of the hybrid model is to connect (union) historical data cubes and new data cubes. It has no real storage space and is similar to a virtual database view on a table. The hybrid instance acts as a delegator, forwarding data query requests to its sub-realizations, that is, the original sub-cubes of each data participant, and then merging the results when returning from the instance.

[0203] For example, the SQL statement to aggregate all the original sub-cubes corresponding to the above telephone, date, and location into one original cube is as follows:

[0204] select telephone,date,3,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from table group by telephone,date

[0205] Union

[0206] select telephone,2,location,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from table group by telephone,location

[0207] Union

[0208] select 1,date,location,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from table group by date,location

[0209] Union

[0210] select telephone,2,3,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from table group by

[0211] telephone

[0212] Union

[0213] select 1,date,3,count(distinct call_id)as callCount,count(distinctmessage_id)as messageCount from table group by date

[0214] Union

[0215] Select 1,2,location,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from table group by

[0216] location

[0217] Union

[0218] select telephone,date,location,count(distinct call_id)as callCount,count(distinct message_id)as messageCount from table group by telephone,date,location.

[0219] Similarly, for multiple original sub-cubes generated by multiple data participants, you can refer to the above-mentioned "Union" operation to aggregate them together to form a large and comprehensive public data cube for processing data query requests from data participants.

[0220] Step S330: Obtain the target query dimension contained in the data query request of the data participant.

[0221] For example, when a data participant selects a cube model on the page, a data query request is initiated. In addition to the target query dimension, the data query request may also include the target measurement indicator and the target aggregation method.

[0222] Therefore, after receiving the data query request initiated by the data participant, the data query platform, such as the management module Coordinator it contains, can parse the target query dimension, target measurement indicator and target aggregation method contained in the data query request, and process the data query request from the public data cube.

[0223] Step S340: searching for multiple candidate public sub-cubes matching the target query dimension from multiple public sub-cubes included in the public data cube; wherein the candidate public sub-cubes matching the target query dimension include: candidate public sub-cubes including the target query dimension in the corresponding dimension combination.

[0224] Exemplarily, the data query platform, such as the management module Coordinator included therein, can route the target query to a matching target public sub-cube according to the target query dimension.

[0225] It should be noted that, when the data query request also includes the target metric and the target aggregation method, the target common sub-cube must also match the target metric and the target aggregation method. For example, the combined dimension common sub-cube must cover all target metric indicators.

[0226] Step S350: taking the candidate common sub-cube with the least number of single dimensions contained in the corresponding dimension combination as the target common sub-cube.

[0227] When searching for a matching target common sub-cube, if there are multiple candidate common sub-cubes that match the target query dimension, then the candidate common sub-cube with the least number of single dimensions contained in the corresponding dimension combination can be selected as the target common sub-cube.

[0228] For example, if the common sub-cube Cube corresponding to a single dimension matches the target query dimension, it is used as the target common sub-cube, otherwise the common sub-cube with the least number of corresponding dimensions is selected as the target common sub-cube.

[0229] For example, if the single-dimensional common sub-cube Cube(A) meets the query conditions, it will be used as the target common sub-cube. Otherwise, Cube(A,B) with the least number of dimensions is selected as the target common sub-cube from the combined-dimensional common sub-cubes Cube(A,B), Cube(A,B,C), and Cube(A,B,D).

[0230] The combined dimension common sub-cube can be obtained by performing a combination operation on the corresponding multiple common sub-cubes, which corresponds to the combined operation result after the combination operation on each common sub-cube.

[0231] Step S360: Obtain a target query result corresponding to the data query request according to the matched target public sub-cube, and send the target query result to the data participant of the data query request.

[0232] Exemplarily, an original sub-cube that matches the data access rights of a data participant is determined as a candidate original sub-cube from multiple original sub-cubes of the target common sub-cube, and then the original query result corresponding to the data query request is determined for the candidate original sub-cube, and finally the target query result is obtained by dimensionally splicing the various original query results and sent to the client of the data participant.

[0233] The corresponding data access rights can be determined according to the priority of the data participant. The higher the priority, the greater the data access rights.

[0234] As can be seen from the above, the data query method provided by the embodiment of the present disclosure has the following advantages:

[0235] (1) For data queries in multi-party privacy computing scenarios, a hybrid model based on Kylin is used to solve the problem of querying data across multiple data participants with low cost, low R&D, and secure intermediate data transmission.

[0236] (2) Through pre-computation technology, complex analytical queries are converted into simple data retrieval by exchanging space for time, thereby greatly improving query performance.

[0237] (3) There is no need for the data participants to exchange original input data between their nodes. Instead, they only need to exchange the intermediate results, i.e., the original sub-cubes, calculated locally based on the original data. Compared with the centralized processing method that aggregates the data from all parties and then calculates them, this greatly improves the computing efficiency and the leakage of original data.

[0238] (4) By encrypting the storage and transmission of the generated original sub-cube, the data can be encrypted to prevent the data from being stolen or tampered with during the transmission and storage process.

[0239] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.

[0240] In a second aspect, an embodiment of the present disclosure provides a data query device. Figure 5 A schematic diagram of a data query device provided by an embodiment of the present disclosure is shown, referring to Figure 5 The data query device 500 comprises:

[0241] Acquisition module 501: used to acquire the target query dimension contained in the data query request of the data participant.

[0242] Search module 502: used to search for a target public sub-cube that matches a target query dimension from a plurality of public sub-cubes contained in a public data cube; wherein the plurality of public sub-cubes correspond to a plurality of preset query dimensions, and each public sub-cube is determined based on a plurality of original sub-cubes generated by a plurality of data participants according to the corresponding preset query dimensions.

[0243] The sending module 503 is used to obtain the target query result corresponding to the data query request according to the matched target public sub-cube, and send the target query result to the data participant of the data query request.

[0244] In an optional implementation, the plurality of preset query dimensions are determined according to a dimension combination between the plurality of preset single dimensions;

[0245] The step of searching for a target public sub-cube matching the target query dimension from a plurality of public sub-cubes included in the public data cube includes:

[0246] Searching for multiple candidate public sub-cubes matching the target query dimension from multiple public sub-cubes included in the public data cube; wherein the candidate public sub-cubes matching the target query dimension include: candidate public sub-cubes including the target query dimension in the corresponding dimension combination;

[0247] The candidate common sub-cube with the least number of single dimensions contained in the corresponding dimension combination is taken as the target common sub-cube.

[0248] In an optional implementation, the data query device is applied to a data query platform, and before searching for a target public sub-cube matching the target query dimension from a plurality of public sub-cubes included in a public data cube, the data query device is further used to:

[0249] Respectively obtain M original sub-cubes generated by each of the N data participants according to the M preset query dimensions, and store the obtained N*M original sub-cubes in the data query platform;

[0250] For any preset query dimension, N original sub-cubes corresponding to the preset query dimension are extracted from the data query platform, and a common sub-cube corresponding to the preset query dimension is determined based on the extracted N original sub-cubes; wherein N and M are natural numbers.

[0251] In an optional implementation, any original sub-cube among the M original sub-cubes generated by each of the N data participants according to the M preset query dimensions is generated in the following manner:

[0252] The data participant extracts original data from the corresponding private database;

[0253] Performing a preset operation on the original data according to the preset query dimension corresponding to any original sub-cube to obtain operation result data;

[0254] According to the operation result data, any original sub-cube of the data participant corresponding to the preset query dimension is generated.

[0255] In an optional implementation, the obtaining of M original sub-cubes generated by each of the N data participants according to the M preset query dimensions includes:

[0256] The M original sub-cubes encrypted and transmitted by each data participant in the N data participants according to a preset encryption method are respectively obtained, and the M original sub-cubes are decrypted.

[0257] In an optional implementation, obtaining a target query result corresponding to the data query request according to the matched target common sub-cube includes:

[0258] Determine the user identification of the data participant and the data access authority corresponding to the user identification;

[0259] Determine an original sub-cube that matches the data access permission among a plurality of original sub-cubes used to determine the target common sub-cube as a candidate original sub-cube;

[0260] For the candidate original sub-cube, determining an original query result corresponding to the candidate original sub-cube;

[0261] According to the original query result, a target query result corresponding to the data query request is obtained.

[0262] In an optional implementation, when there are multiple candidate original sub-cubes, obtaining the target query result corresponding to the data query request according to the original query result includes:

[0263] The original query results corresponding to each candidate original sub-cube are merged, and the target query result corresponding to the data query request is obtained according to the merged processing result.

[0264] The functions or modules included in the device provided in the embodiments of the present disclosure can be used to execute the method described in the embodiments of the first aspect disclosed above. The specific implementation and technical effects thereof can be referred to the description of the method embodiments above, and will not be repeated here for the sake of brevity.

[0265] It should be noted that all modules involved in this embodiment are logic modules. In practical applications, a logic unit may be a physical unit, or a part of a physical unit, or may be implemented as a combination of multiple physical units. In addition, in order to highlight the innovative part of the present disclosure, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by the present disclosure, but this does not mean that there are no other units in this embodiment.

[0266] Reference Figure 6 , an embodiment of the present disclosure provides an electronic device, comprising:

[0267] One or more processors 601;

[0268] A memory 602, on which one or more programs are stored. When the one or more programs are executed by one or more processors, the one or more processors implement any one of the above data query methods;

[0269] One or more I / O interfaces 603 are connected between the processor and the memory and are configured to implement information exchange between the processor and the memory.

[0270] Among them, the processor 601 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 602 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 603 is connected between the processor 601 and the memory 602, and can realize information interaction between the processor 601 and the memory 602, including but not limited to a data bus (Bus), etc.

[0271] In some embodiments, the processor 601 , the memory 602 , and the I / O interface 603 are connected to each other through a bus, and further connected to other components of the computing device.

[0272] This embodiment further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the data query method provided by this embodiment is implemented. To avoid repeated description, the specific steps of the data query method are not repeated here.

[0273] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0274] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0275] Those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present embodiment and to form different embodiments.

[0276] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and substance of the present disclosure, and these modifications and improvements are also considered to be within the scope of protection of the present disclosure.

Claims

1. A data query method, characterized in that: The method comprises: Obtain the target query dimension contained in the data query request of the data participant; Searching for a target public sub-cube matching the target query dimension from a plurality of public sub-cubes contained in a public data cube; wherein the plurality of public sub-cubes correspond to a plurality of preset query dimensions, and each public sub-cube is determined according to a plurality of original sub-cubes generated by a plurality of data participants according to the corresponding preset query dimensions; According to the matched target public sub-cube, a target query result corresponding to the data query request is obtained, and the target query result is sent to a data participant of the data query request.

2. The data query method according to claim 1, characterized in that: The plurality of preset query dimensions are determined according to a dimension combination between a plurality of preset single dimensions; The step of searching for a target public sub-cube matching the target query dimension from a plurality of public sub-cubes included in the public data cube includes: Searching for multiple candidate public sub-cubes matching the target query dimension from multiple public sub-cubes included in the public data cube; wherein the candidate public sub-cubes matching the target query dimension include: candidate public sub-cubes including the target query dimension in the corresponding dimension combination; The candidate common sub-cube with the least number of single dimensions contained in the corresponding dimension combination is taken as the target common sub-cube.

3. The data query method according to claim 1, characterized in that: The method is executed by a data query platform, and before searching for a target public sub-cube matching the target query dimension from a plurality of public sub-cubes contained in a public data cube, the method further comprises: Respectively obtain M original sub-cubes generated by each of the N data participants according to the M preset query dimensions, and store the obtained N*M original sub-cubes in the data query platform; For any preset query dimension, N original sub-cubes corresponding to the preset query dimension are extracted from the data query platform, and a common sub-cube corresponding to the preset query dimension is determined based on the extracted N original sub-cubes; wherein N and M are natural numbers.

4. The data query method according to claim 3, characterized in that: Any original sub-cube among the M original sub-cubes generated by each of the N data participants according to the M preset query dimensions is generated in the following manner: The data participant extracts original data from the corresponding private database; Performing a preset operation on the original data according to the preset query dimension corresponding to any original sub-cube to obtain operation result data; According to the operation result data, any original sub-cube of the data participant corresponding to the preset query dimension is generated.

5. The data query method according to claim 3, characterized in that: The step of respectively obtaining M original sub-cubes generated by each of the N data participants according to the M preset query dimensions includes: The M original sub-cubes encrypted and transmitted by each data participant in the N data participants according to a preset encryption method are respectively obtained, and the M original sub-cubes are decrypted.

6. The data query method according to any one of claims 1 to 5, characterized in that: The obtaining, according to the matched target common sub-cube, a target query result corresponding to the data query request includes: Determine the user identification of the data participant and the data access authority corresponding to the user identification; Determine an original sub-cube that matches the data access permission among a plurality of original sub-cubes used to determine the target common sub-cube as a candidate original sub-cube; For the candidate original sub-cube, determining an original query result corresponding to the candidate original sub-cube; According to the original query result, a target query result corresponding to the data query request is obtained.

7. The data query method according to claim 6, characterized in that: In the case that there are multiple candidate original sub-cubes, obtaining the target query result corresponding to the data query request according to the original query result includes: The original query results corresponding to each candidate original sub-cube are merged, and the target query result corresponding to the data query request is obtained according to the merged processing result.

8. A data query device, characterized in that: The device comprises: An acquisition module, used to acquire a target query dimension contained in a data query request of a data participant; A search module, used to search for a target public sub-cube matching the target query dimension from a plurality of public sub-cubes contained in a public data cube; wherein the plurality of public sub-cubes correspond to a plurality of preset query dimensions, and each public sub-cube is determined according to a plurality of original sub-cubes generated by a plurality of data participants according to the corresponding preset query dimensions; A sending module is used to obtain a target query result corresponding to the data query request according to the matched target public sub-cube, and send the target query result to a data participant of the data query request.

9. An electronic device, characterized in that: include: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7; One or more I / O interfaces are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.

10. A computer readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 7.