CN114580018A - Privacy computing method, device, electronic device and storage medium - Google Patents
Privacy computing method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN114580018A CN114580018A CN202210179806.6A CN202210179806A CN114580018A CN 114580018 A CN114580018 A CN 114580018A CN 202210179806 A CN202210179806 A CN 202210179806A CN 114580018 A CN114580018 A CN 114580018A
- Authority
- CN
- China
- Prior art keywords
- data
- splitting
- split
- primary key
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6245—Protecting personal data, e.g. for financial or medical purposes
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6227—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Storage Device Security (AREA)
Abstract
本申请提出一种隐私计算方法、装置、电子设备和存储介质,其中,隐私计算方法包括:接收数据搬移拆分指令,其中,数据搬移拆分指令包括目标主键列表和表名称;根据目标主键列表和表名称,从数据库中获取目标数据;根据目标主键列表、数据填充策略和目标数据,生成期望数据表;根据拆分策略对期望数据表中的数据进行拆分,以得到多个计算节点中每个计算节点对应的拆分数据;将拆分数据发送至对应的计算节点。由此,能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。
The present application proposes a privacy computing method, device, electronic device and storage medium, wherein the privacy computing method includes: receiving a data moving and splitting instruction, wherein the data moving and splitting instruction includes a target primary key list and a table name; according to the target primary key list and table name, obtain the target data from the database; generate the desired data table according to the target primary key list, data filling strategy and target data; split the data in the desired data table according to the splitting strategy to obtain multiple computing nodes. Split data corresponding to each computing node; send the split data to the corresponding computing node. Thus, privacy computing can be implemented, data security can be effectively ensured, and data leakage can be avoided.
Description
技术领域technical field
本申请涉及数据处理技术领域,尤其涉及一种隐私计算方法、装置、电子设备和存储介质。The present application relates to the technical field of data processing, and in particular, to a privacy computing method, apparatus, electronic device and storage medium.
背景技术Background technique
隐私计算(Privacy compute)是指在保护数据本身不对外泄露的前提下实现数据分析计算的技术集合。Privacy computing refers to a collection of technologies that realize data analysis and computing on the premise of protecting the data itself from being leaked to the outside world.
隐私计算是面向隐私信息全生命周期保护的计算理论和方法,是隐私信息的所有权、管理权和使用权分离时隐私度量、隐私泄漏代价、隐私保护与隐私分析复杂性的可计算模型与公理化系统。Privacy computing is a computing theory and method for the protection of privacy information throughout its life cycle. system.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种隐私计算方法、装置、电子设备及存储介质,能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。The embodiments of the present application provide a privacy computing method, device, electronic device, and storage medium, which can realize privacy computing, and can effectively ensure data security and avoid data leakage.
本申请第一方面实施例提出一种隐私计算方法,包括:接收数据搬移拆分指令,其中,所述数据搬移拆分指令包括目标主键列表和表名称;根据所述目标主键列表和所述表名称,从数据库中获取目标数据;根据所述目标主键列表、数据填充策略和所述目标数据,生成期望数据表;根据拆分策略对所述期望数据表中的数据进行拆分,以得到多个计算节点中每个所述计算节点对应的拆分数据;将所述拆分数据发送至对应的计算节点。An embodiment of the first aspect of the present application proposes a privacy computing method, including: receiving a data moving and splitting instruction, wherein the data moving and splitting instruction includes a target primary key list and a table name; according to the target primary key list and the table name, obtain the target data from the database; generate the desired data table according to the target primary key list, data filling strategy and the target data; split the data in the desired data table according to the splitting strategy to obtain multiple Splitting data corresponding to each of the computing nodes; sending the splitting data to the corresponding computing node.
另外,根据本申请上述实施例的隐私计算方法还可以具有如下附加的技术特征:In addition, the privacy computing method according to the above-mentioned embodiment of the present application may also have the following additional technical features:
在本申请的一个实施例中,所述数据搬移拆分指令通过以下方式获取:接收隐私计算指令,其中,所述隐私计算指令包括目标主键列表和目标数据信息;根据所述目标数据信息从面向数据的体系结构DOA注册中心,获取目标数据的分布情况;根据所述分布情况,确定多个数据节点;根据所述目标主键列表和所述分布情况生成所述数据搬移拆分指令,并将所述数据搬移拆分指令分别发送至所述多个数据节点。In an embodiment of the present application, the data moving and splitting instruction is obtained by: receiving a privacy calculation instruction, wherein the privacy calculation instruction includes a target primary key list and target data information; The data architecture DOA registration center obtains the distribution of target data; according to the distribution, determines a plurality of data nodes; generates the data moving and splitting instruction according to the target primary key list and the distribution, and assigns all The data moving and splitting instructions are respectively sent to the multiple data nodes.
在本申请的一个实施例中,所述分布情况包括表名称和表地址,所述多个数据节点包括至少一个一级数据节点和至少一个二级数据节点。In an embodiment of the present application, the distribution includes a table name and a table address, and the multiple data nodes include at least one primary data node and at least one secondary data node.
在本申请的一个实施例中,所述目标数据包括内容数据和所述内容数据对应的数据主键,所述根据所述目标主键列表、数据填充策略和所述目标数据,生成期望数据表,包括:根据所述内容数据和所述数据主键,生成初始数据表;基于所述数据主键从所述目标主键列表中获取填充主键,以生成填充主键集;若所述填充主键集不为空,则获取所述填充主键集中每个所述填充主键对应的填充内容;将所述填充主键和所述填充主键对应的填充内容,写入所述初始数据表以生成所述期望数据表;若所述填充主键集为空,则将所述初始数据表作为所述期望数据表。In an embodiment of the present application, the target data includes content data and a data primary key corresponding to the content data, and the desired data table is generated according to the target primary key list, the data filling strategy and the target data, including : generate an initial data table according to the content data and the data primary key; obtain a filling primary key from the target primary key list based on the data primary key to generate a filling primary key set; if the filling primary key set is not empty, then Obtain the filling content corresponding to each filling primary key in the filling primary key set; write the filling primary key and filling content corresponding to the filling primary key into the initial data table to generate the desired data table; if the If the filled primary key set is empty, the initial data table is used as the expected data table.
在本申请的一个实施例中,根据拆分策略对所述期望数据表中的数据进行拆分,以得到多个计算节点中每个所述计算节点对应的拆分数据,包括:确定所述多个计算节点中所述计算节点的数量;根据所述数量和拆分规则对所述期望数据表中的数据进行逐条拆分,以得到每个所述计算节点对应的拆分数据。In an embodiment of the present application, splitting data in the desired data table according to a splitting strategy to obtain split data corresponding to each of the computing nodes in the plurality of computing nodes includes: determining the The number of the computing nodes in the plurality of computing nodes; according to the number and the splitting rule, the data in the desired data table is split one by one to obtain the split data corresponding to each of the computing nodes.
本申请第二方面实施例提出一种隐私计算方法,包括:接收拆分数据,其中,所述拆分数据包括拆分内容数据和所述拆分内容数据对应的拆分主键;创建搬迁拆分数据表;根据所述拆分主键和搬迁策略,将所述拆分内容数据和/或所述拆分主键写入所述搬迁拆分数据表。An embodiment of the second aspect of the present application proposes a privacy computing method, including: receiving split data, wherein the split data includes split content data and a split primary key corresponding to the split content data; creating a relocation split data table; according to the split primary key and the relocation strategy, write the split content data and/or the split primary key into the relocation split data table.
另外,根据本申请上述实施例的隐私计算方法还可以具有如下附加的技术特征:In addition, the privacy computing method according to the above-mentioned embodiment of the present application may also have the following additional technical features:
在本申请的一个实施例中,所述根据所述拆分主键和搬迁策略,将所述拆分内容数据和/或所述拆分主键写入所述搬迁拆分数据表,包括:若所述搬迁拆分数据表中不存在所述拆分主键,则将所述拆分主键和所述拆分内容数据写入所述搬迁拆分数据表;若所述搬迁拆分数据表中存在所述拆分主键,所述拆分主键对应的行数据为填充内容,且所述拆分内容数据为值域范围内的数值,则将所述行数据替换为所述拆分内容数据;若所述搬迁拆分数据表中存在所述拆分主键,所述拆分主键对应的行数据为所述值域范围内的数值,且所述拆分内容数据为所述值域范围内的数值,则根据合并规则将所述拆分内容数据与所述行数据进行合并计算。In an embodiment of the present application, writing the split content data and/or the split primary key into the relocation split data table according to the split primary key and the relocation strategy includes: If the split primary key does not exist in the relocation split data table, write the split primary key and the split content data into the relocation split data table; The split primary key, the row data corresponding to the split primary key is the filling content, and the split content data is a numerical value within the value range, then the row data is replaced with the split content data; if all The split primary key exists in the relocation split data table, the row data corresponding to the split primary key is a numerical value within the range of the value range, and the split content data is a numerical value within the range of the value range, Then, the split content data and the row data are combined and calculated according to the combining rule.
本申请第三方面实施例提出了一种隐私计算装置,包括:接收模块,用于接收数据搬移拆分指令,其中,所述数据搬移拆分指令包括目标主键列表和表名称;获取模块,用于根据所述目标主键列表和所述表名称,从数据库中获取目标数据;生成模块,用于根据所述目标主键列表、数据填充策略和所述目标数据,生成期望数据表;拆分模块,用于根据拆分策略对所述期望数据表中的数据进行拆分,以得到多个计算节点中每个所述计算节点对应的拆分数据;发送模块,用于将所述拆分数据发送至对应的计算节点。An embodiment of the third aspect of the present application proposes a privacy computing device, including: a receiving module for receiving a data moving and splitting instruction, wherein the data moving and splitting instruction includes a target primary key list and a table name; an obtaining module, used for obtaining target data from the database according to the target primary key list and the table name; a generating module for generating a desired data table according to the target primary key list, the data filling strategy and the target data; the splitting module, for splitting the data in the desired data table according to the splitting strategy, so as to obtain split data corresponding to each of the computing nodes in the plurality of computing nodes; a sending module, configured to send the split data to the corresponding computing node.
本申请第四方面实施例提出了一种隐私计算装置,包括:接收模块,用于接收拆分数据,其中,所述拆分数据包括拆分内容数据和所述拆分内容数据对应的拆分主键;创建模块,用于创建搬迁拆分数据表;写入模块,用于根据所述拆分主键和搬迁策略,将所述拆分内容数据和/或所述拆分主键写入所述搬迁拆分数据表。A fourth aspect of the present application provides a privacy computing device, including: a receiving module configured to receive split data, wherein the split data includes split content data and splits corresponding to the split content data a primary key; a creation module for creating a relocation split data table; a writing module for writing the split content data and/or the split primary key into the relocation according to the split primary key and the relocation strategy Split the data table.
本申请第五方面实施例提出了一种电子设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如前述的隐私计算方法。The embodiment of the fifth aspect of the present application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and running on the processor, when the processor executes the program, the above-mentioned computer program is implemented. Privacy Computing Methods.
本申请实施例的电子设备,通过处理器执行存储在存储器上的计算机程序,能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。In the electronic device of the embodiment of the present application, by executing the computer program stored in the memory by the processor, privacy calculation can be realized, and data security can be effectively ensured, and data leakage can be avoided.
本申请第六方面实施例提出了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时,实现如前述第一方面实施例所述的隐私计算方法。Embodiments of the sixth aspect of the present application provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the privacy computing method described in the foregoing first aspect embodiment.
本申请实施例的计算机可读存储介质,通过存储计算机程序并被处理器执行,能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。The computer-readable storage medium of the embodiments of the present application can implement privacy computing by storing a computer program and being executed by a processor, and can effectively ensure data security and avoid data leakage.
本申请附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。Additional aspects and advantages of the present application will be set forth, in part, in the following description, and in part will be apparent from the following description, or learned by practice of the present application.
附图说明Description of drawings
本申请上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present application will become apparent and readily understood from the following description of embodiments taken in conjunction with the accompanying drawings, wherein:
图1为根据本申请一个实施例的隐私计算方法的流程示意图;1 is a schematic flowchart of a privacy computing method according to an embodiment of the present application;
图2为根据本申请另一个实施例的隐私计算方法的流程示意图;2 is a schematic flowchart of a privacy computing method according to another embodiment of the present application;
图3为根据本申请一个实施例的隐私计算方法的具体实例示意图;3 is a schematic diagram of a specific example of a privacy computing method according to an embodiment of the present application;
图4为根据本申请另一个实施例的隐私计算方法的流程示意图;4 is a schematic flowchart of a privacy computing method according to another embodiment of the present application;
图5为根据本申请另一个实施例的隐私计算方法的流程示意图;5 is a schematic flowchart of a privacy computing method according to another embodiment of the present application;
图6为根据本申请另一个实施例的隐私计算方法的流程示意图;6 is a schematic flowchart of a privacy computing method according to another embodiment of the present application;
图7为根据本申请一个实施例的隐私计算方法的构架示意图;7 is a schematic structural diagram of a privacy computing method according to an embodiment of the present application;
图8为根据本申请一个实施例的隐私计算装置的方框示意图;8 is a schematic block diagram of a privacy computing device according to an embodiment of the present application;
图9为根据本申请另一个实施例的隐私计算装置的方框示意图;以及FIG. 9 is a schematic block diagram of a privacy computing device according to another embodiment of the present application; and
图10为根据本申请一个实施例的电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本申请,而不能理解为对本申请的限制。The following describes in detail the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary, and are intended to be used to explain the present application, but should not be construed as a limitation to the present application.
下面参照附图描述本申请实施例的隐私计算方法、装置、电子设备和存储介质。The privacy computing method, apparatus, electronic device, and storage medium of the embodiments of the present application are described below with reference to the accompanying drawings.
本申请实施例提供的隐私计算方法,可以由电子设备来执行,该电子设备可为计算机或服务器等,此处不做任何限定。The privacy computing method provided in the embodiment of the present application may be executed by an electronic device, and the electronic device may be a computer or a server, etc., which is not limited herein.
在本申请实施例中,电子设备中可以设置有处理组件、存储组件和驱动组件。可选的,该驱动组件和处理组件可以集成设置,该存储组件可以存储操作系统、应用程序或其他程序模块,该处理组件通过执行存储组件中存储的应用程序来实现本申请实施例提供的隐私计算方法。In this embodiment of the present application, the electronic device may be provided with a processing component, a storage component, and a driving component. Optionally, the driving component and the processing component may be integrated and set, the storage component may store an operating system, an application program or other program modules, and the processing component implements the privacy provided by the embodiments of the present application by executing the application program stored in the storage component. calculation method.
图1为根据本申请实施例所提供的一种隐私计算方法的流程示意图。FIG. 1 is a schematic flowchart of a privacy computing method according to an embodiment of the present application.
本申请实施例的隐私计算方法,还可由本申请实施例提供的隐私计算装置执行,该装置可配置于电子设备中,以实现接收数据搬移拆分指令,其中,数据搬移拆分指令包括目标主键列表和表名称,并根据目标主键列表和表名称,从数据库中获取目标数据,而后根据目标主键列表、数据填充策略和目标数据,生成期望数据表,并根据拆分策略对期望数据表中的数据进行拆分,以得到多个计算节点中每个计算节点对应的拆分数据,以及将拆分数据发送至对应的计算节点,从而能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。The privacy computing method of the embodiment of the present application can also be executed by the privacy computing device provided by the embodiment of the present application, and the device can be configured in an electronic device to receive a data moving and splitting instruction, wherein the data moving and splitting instruction includes a target primary key List and table name, and obtain the target data from the database according to the target primary key list and table name, and then generate the expected data table according to the target primary key list, data filling strategy and target data, and according to the split strategy. The data is split to obtain the split data corresponding to each computing node in the multiple computing nodes, and the split data is sent to the corresponding computing node, so that privacy computing can be achieved, and data security can be effectively ensured, avoiding data Give way.
作为一种可能的情况,本申请实施例的隐私计算方法还可以由数据节点执行,其中,电子设备(例如,服务器)可为该数据节点的执行主体,由该电子设备实现该数据节点的具体功能。As a possible situation, the privacy calculation method in the embodiment of the present application may also be executed by a data node, wherein an electronic device (for example, a server) may be the executive body of the data node, and the electronic device implements the specific details of the data node. Function.
如图1所示,该隐私计算方法,可包括:As shown in Figure 1, the privacy computing method may include:
步骤101,接收数据搬移拆分指令,其中,数据搬移拆分指令可包括目标主键列表和表名称。Step 101: Receive a data moving and splitting instruction, wherein the data moving and splitting instruction may include a target primary key list and a table name.
具体地,上述隐私计算平台接收到隐私计算指令后,可根据目标数据信息从面向数据的体系结构DOA注册中心,获取目标数据的分布情况,而后根据该分布情况,确定多个数据节点,以及根据目标主键列表和分布情况生成数据搬移拆分指令,并将数据搬移拆分指令分别发送至多个数据节点,而后可由该多个数据节点的代理进程接收并响应。Specifically, after receiving the privacy calculation instruction, the above privacy computing platform can obtain the distribution of the target data from the data-oriented architecture DOA registration center according to the target data information, and then according to the distribution, determine a plurality of data nodes, and according to The target primary key list and distribution conditions generate data moving and splitting instructions, and the data moving and splitting instructions are respectively sent to multiple data nodes, which can then be received and responded to by the agent processes of the multiple data nodes.
需要说明的是,该实施例中所描述的数据搬移拆分指令可由隐私计算平台生成并将其分别发送至多个数据节点。其中,该隐私计算平台可安装(设置)在服务器上,其中,服务器可包括云服务器。It should be noted that the data moving and splitting instructions described in this embodiment may be generated by the privacy computing platform and sent to multiple data nodes respectively. Wherein, the privacy computing platform may be installed (set) on a server, wherein the server may include a cloud server.
为了清楚说明上一实施例,在本申请的一个实施例中,如图2所示,上述的数据搬移拆分指令通过以下方式(步骤)获取:In order to clearly illustrate the previous embodiment, in an embodiment of the present application, as shown in FIG. 2 , the above-mentioned data moving and splitting instructions are obtained in the following ways (steps):
步骤201,接收隐私计算指令,其中,隐私计算指令可包括目标主键列表和目标数据信息。其中,目标主键列表(可参见图3中的目标主键列表)可包括多个主键,目标数据可为分布于多个数据节点中的数据,目标数据信息可包括目标数据的基础信息(例如,目标数据的介绍信息、目标数据的类型信息等),用于引索目标数据的分布情况。Step 201: Receive a privacy calculation instruction, where the privacy calculation instruction may include a target primary key list and target data information. The target primary key list (refer to the target primary key list in FIG. 3 ) may include multiple primary keys, the target data may be data distributed in multiple data nodes, and the target data information may include basic information of the target data (for example, target data The introduction information of the data, the type information of the target data, etc.) are used to index the distribution of the target data.
需要说明的是,该实施例中所描述的隐私计算指令可由隐私计算平台接收并响应做出相关的操作。It should be noted that, the privacy computing instruction described in this embodiment can be received by the privacy computing platform and relevant operations can be performed in response.
具体地,用户可在相应的客户端创建隐私计算指令,并将该隐私计算指令发送至隐私计算平台,由隐私计算平台接收并响应。Specifically, the user can create a privacy computing instruction on a corresponding client, and send the privacy computing instruction to the privacy computing platform, and the privacy computing platform receives and responds.
作为一种可能的情况,隐私计算平台可通过相关API(Application ProgrammingInterface,应用程序接口)实时检测隐私计算事件,并在检测到隐私计算事件后,自动创建隐私计算指令,并将该隐私计算指令下发,以接收并响应于该隐私计算指令。As a possible situation, the privacy computing platform can detect privacy computing events in real time through related APIs (Application Programming Interface), and after detecting the privacy computing events, automatically create privacy computing instructions, and put the privacy computing instructions under the to receive and respond to the privacy computing instruction.
步骤202,根据目标数据信息从面向数据的体系结构DOA注册中心,获取目标数据的分布情况。其中,分布情况可包括表名称和表地址,其中,表名称和表地址可作为数据节点的引索,即通过表名称和表地址可确定对应的数据节点。Step 202: Obtain the distribution of the target data from the DOA registration center of the data-oriented architecture according to the target data information. The distribution situation may include table names and table addresses, wherein the table names and table addresses may be used as indexes of data nodes, that is, the corresponding data nodes may be determined through the table names and table addresses.
在本申请实施例中,为了数据的隐私保护,可将原始数据分布于多个数据节点中,其中,每个数据节点可以以数据表的形式存储原始数据的部分数据(即目标数据),以实现原始数据的分布式存储。应说明的是,该实施例中所描述的多个数据节点存储的部分数据(即目标数据)可合并成完整的原始数据(即目标数据)。In this embodiment of the present application, for data privacy protection, the original data may be distributed among multiple data nodes, wherein each data node may store part of the original data (ie, target data) in the form of a data table, to Implement distributed storage of raw data. It should be noted that the partial data (ie target data) stored by the multiple data nodes described in this embodiment may be combined into complete original data (ie target data).
其中,面向数据的体系结构DOA注册中心可对各种类型的数据和广义数据进行登记注册,形成逻辑的数据资源池,方便应用对数据的访问。其功能涉及但不限于:数据注册信息定义,数据属性信息,数据分类,元数据标准,元数据分类,不同类型数据的注册方法,数据索引,元数据索引,数据检索,广义数据模式识别,分布式部署,数据注册内容随需自适应机制,数据生成自动注册机制,历史数据注册与管理等,该面向数据的体系结构DOA注册中心存储有目标数据的分布情况(包括表名称和表地址)。Among them, the data-oriented architecture DOA registration center can register various types of data and generalized data to form a logical data resource pool, which is convenient for applications to access data. Its functions involve but are not limited to: data registration information definition, data attribute information, data classification, metadata standards, metadata classification, registration methods for different types of data, data indexing, metadata indexing, data retrieval, generalized data pattern recognition, distribution The data-oriented architecture DOA registration center stores the distribution of target data (including table name and table address).
具体地,隐私计算平台接收到上述目标数据信息后,可根据该目标数据信息从上述面向数据的体系结构DOA注册中心获取目标数据的分布情况(包括表名称和表地址)。Specifically, after receiving the above-mentioned target data information, the privacy computing platform can obtain the distribution of target data (including table name and table address) from the above-mentioned data-oriented architecture DOA registration center according to the target data information.
步骤203,根据分布情况,确定多个数据节点。其中,多个数据节点可包括至少一个一级数据节点和至少一个二级数据节点。Step 203: Determine a plurality of data nodes according to the distribution situation. Wherein, the plurality of data nodes may include at least one primary data node and at least one secondary data node.
具体地,隐私计算平台获取上述目标数据的分布情况后,可以该分布情况中的表名称和表地址,或者表地址为引索,确定存储目标数据的多个数据节点。Specifically, after obtaining the distribution of the target data, the privacy computing platform can use the table name and table address in the distribution, or the table address as an index, to determine multiple data nodes that store the target data.
需要说明的是,该实施例中所描述的多个数据节点还可包括一个或多个三级数据节点、四级数据节点、五级数据节点……,此处不做任何限定。It should be noted that the plurality of data nodes described in this embodiment may further include one or more third-level data nodes, fourth-level data nodes, fifth-level data nodes . . . , which is not limited herein.
步骤204,根据目标主键列表和分布情况生成数据搬移拆分指令,并将数据搬移拆分指令分别发送至多个数据节点。其中,数据搬移拆分指令用于控制数据节点对数据进行相应的处理。其中,数据搬移拆分指令可包括目标主键列表和表名称。Step 204: Generate data moving and splitting instructions according to the target primary key list and distribution, and send the data moving and splitting instructions to multiple data nodes respectively. The data moving and splitting instruction is used to control the data node to perform corresponding processing on the data. Wherein, the data moving and splitting instruction may include a target primary key list and a table name.
具体地,隐私计算平台确定上述多个数据节点后,可根据已获取到的目标主键列表和目标数据的分布情况生成数据搬移拆分指令,并将该数据搬移拆分指令分别发送至该多个数据节点,由该多个数据节点的代理进程接收并响应。Specifically, after determining the above-mentioned multiple data nodes, the privacy computing platform can generate a data moving and splitting instruction according to the obtained target primary key list and the distribution of the target data, and send the data moving and splitting instruction to the multiple data nodes respectively. The data nodes are received and responded by the proxy process of the plurality of data nodes.
在本申请实施例中,隐私计算平台可首先接收隐私计算指令,其中,隐私计算指令包括目标主键列表和目标数据信息,并根据目标数据信息从面向数据的体系结构DOA注册中心,获取目标数据的分布情况,而后根据分布情况,确定多个数据节点,并根据目标主键列表和分布情况生成数据搬移拆分指令,将数据搬移拆分指令分别发送至多个数据节点,从而能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。In this embodiment of the present application, the privacy computing platform may first receive a privacy computing instruction, where the privacy computing instruction includes a target primary key list and target data information, and obtains the target data from the DOA registration center of the data-oriented architecture according to the target data information. distribution, and then determine multiple data nodes according to the distribution, generate data moving and splitting instructions according to the target primary key list and distribution, and send the data moving and splitting instructions to multiple data nodes respectively, so that privacy computing can be achieved and can be Effectively ensure data security and avoid data leakage.
步骤102,根据目标主键列表和表名称,从数据库中获取目标数据。应说明的是,该实施例中所描述的数据库可以是上述多个数据节点的数据库,用于存储目标数据。Step 102: Acquire target data from the database according to the target primary key list and table name. It should be noted that the database described in this embodiment may be a database of the above-mentioned multiple data nodes, which is used to store target data.
在本申请实施例中,对于上述多个数据节点中的每个数据节点,可根据接收到的数据搬移拆分指令中的目标主键列表和表名称,从数据库中获取对应的目标数据。In the embodiment of the present application, for each data node in the above-mentioned multiple data nodes, corresponding target data can be obtained from the database according to the target primary key list and table name in the received data moving and splitting instruction.
具体地,数据节点的代理进程接收到上述数据搬移指令后,可以以该数据搬移指令中的目标主键列表和表名称为引索,从该数据节点的数据库中查询并获取对应的目标数据。Specifically, after receiving the data moving instruction, the agent process of the data node can use the target primary key list and table name in the data moving instruction as an index to query and obtain the corresponding target data from the database of the data node.
步骤103,根据目标主键列表、数据填充策略和目标数据,生成期望数据表。其中,数据填充策略可根据实际情况进行标定。Step 103: Generate a desired data table according to the target primary key list, the data filling strategy and the target data. Among them, the data filling strategy can be calibrated according to the actual situation.
为了清楚说明上一实施例,在本申请的一个实施例中,如图4所示,目标数据可包括内容数据和内容数据对应的数据主键,根据目标主键列表、数据填充策略和目标数据,生成期望数据表,可包括:In order to clearly illustrate the previous embodiment, in an embodiment of the present application, as shown in FIG. 4 , the target data may include content data and a data primary key corresponding to the content data. According to the target primary key list, data filling strategy and target data, the generated Desired data sheet, which can include:
步骤401,根据内容数据和数据主键,生成初始数据表。In
具体地,参见图3,数据节点的代理进程获取到上述目标数据后,可根据该目标数据中的内容数据和内容数据对应的数据主键,生成相应的初始数据表。Specifically, referring to FIG. 3 , after acquiring the above-mentioned target data, the agent process of the data node can generate a corresponding initial data table according to the content data in the target data and the data primary key corresponding to the content data.
步骤402,基于数据主键从目标主键列表中获取填充主键,以生成填充主键集。其中,填充主键集可包括多个填充主键,填充主键可为初始数据表相对于目标主键集列表缺少的主键。
在本申请实施例中,数据节点的代理进程得到上述初始数据表后,可基于该初始数据表的数据主键从目标主键列表中获取填充主键,以生成填充主键集。In the embodiment of the present application, after the agent process of the data node obtains the above-mentioned initial data table, it can obtain the filling primary key from the target primary key list based on the data primary key of the initial data table to generate the filling primary key set.
具体地,参见图3,若目标主键列表包括主键1、2、3、4和5,一级数据节点的初始数据表包括数据主键1、2和4,二级数据节点的初始数据表包括数据主键2和3,三级数据节点的初始数据表包括数据主键3和4,则一级节点的填充主键集包括填充主键3和5,二级节点的填充主键集包括填充主键1、4和5,三级数据节点的填充主键集包括填充主键1、2和5。Specifically, referring to FIG. 3, if the target primary key list includes
步骤403,若填充主键集不为空,则获取填充主键集中每个填充主键对应的填充内容。其中,填充内容为大于值域范围的数值,其中,该值域范围可根据实际情况进行标定,此处不做任何限定。
步骤404,将填充主键和填充主键对应的填充内容,写入初始数据表以生成期望数据表。Step 404: Write the filling primary key and the filling content corresponding to the filling primary key into the initial data table to generate the desired data table.
步骤405,若填充主键集为空,则将初始数据表作为期望数据表。
在本申请实施例中,在数据节点的代理进程获取到上述填充主键集后,可判断该主键集是否为空,若否,则可获取该填充主键集中每个填充主键对应的填充内容,并将该数据节点的填充主键和填充主键对应的填充内容,按照主键值的大小顺序写入该数据节点的初始数据表,以生成该数据节点的期望数据表;若是,则可将该数据节点的初始数据表作为期望数据表。In the embodiment of the present application, after the agent process of the data node obtains the above-mentioned filled primary key set, it can determine whether the primary key set is empty, and if not, can obtain the filling content corresponding to each filled primary key in the filled primary key set, and The filling primary key of the data node and the filling content corresponding to the filling primary key are written into the initial data table of the data node according to the size of the primary key value to generate the expected data table of the data node; if so, the data node can be The initial data sheet is used as the desired data sheet.
具体地,假设填充主键对应的填充内容为数值111111(大于上述的值域范围),参见图3,对于一级数据节点,可将填充主键3和该填充主键3对应的填充内容“111111”,以及填充主键5和该填充主键5对应的填充内容“111111”,按照主键值的大小顺序写入该一级数据节点的初始数据表,以生成该一级数据节点的期望数据表;对于二级数据节点,可将填充主键1和该填充主键1对应的填充内容“111111”,填充主键4和该填充主键4对应的填充内容“111111”,以及填充主键5和该填充主键5对应的填充内容“111111”,按照主键值的大小顺序写入该二级数据节点的初始数据表,以生成该二级数据节点的期望数据表;对于三级数据节点,可将填充主键1和该填充主键1对应的填充内容“111111”,填充主键2和该填充主键2对应的填充内容“111111”,以及填充主键5和该填充主键5对应的填充内容“111111”,按照主键值的大小顺序写入该三级数据节点的初始数据表,以生成该三级数据节点的期望数据表。Specifically, assuming that the filling content corresponding to the filling primary key is the numerical value 111111 (larger than the above-mentioned range of values), referring to FIG. 3 , for the primary data node, the filling
步骤104,根据拆分策略对期望数据表中的数据进行拆分,以得到多个计算节点中每个计算节点对应的拆分数据。其中,拆分策略可根据实际情况进行标定。Step 104: Split the data in the desired data table according to the splitting strategy to obtain split data corresponding to each of the multiple computing nodes. Among them, the splitting strategy can be calibrated according to the actual situation.
为了清楚说明上一实施例,在本申请的一个实施例中,如图5所示,根据拆分策略对期望数据表中的数据进行拆分,以得到多个计算节点中每个计算节点对应的拆分数据,可包括:In order to clearly illustrate the previous embodiment, in an embodiment of the present application, as shown in FIG. 5 , the data in the desired data table is split according to the splitting strategy, so as to obtain the corresponding data of each computing node among the multiple computing nodes. split data, which can include:
步骤501,确定多个计算节点中计算节点的数量。其中,计算节点可对拆分数据进行相应的处理。应说明的是,该实施例中所描述的计算节点的数量可基于上述拆分策略确定,其具体数值此处不做任何限定。Step 501: Determine the number of computing nodes in the plurality of computing nodes. The computing node can perform corresponding processing on the split data. It should be noted that the number of computing nodes described in this embodiment may be determined based on the foregoing splitting strategy, and the specific value thereof is not limited herein.
步骤502,根据数量和拆分规则对期望数据表中的数据进行逐条拆分,以得到每个计算节点对应的拆分数据。其中,拆分规则可根据实际情况进行标定。Step 502: Split the data in the desired data table one by one according to the quantity and splitting rules to obtain split data corresponding to each computing node. Among them, the splitting rule can be calibrated according to the actual situation.
在本申请实施例中,对于每个数据节点的期望数据表,可将该期望数据表中的数据逐条拆分成上述计算节点对应数量的多个数据,以得到每个计算节点对应的拆分数据。In the embodiment of the present application, for the desired data table of each data node, the data in the desired data table can be divided into pieces of data corresponding to the number of the above computing nodes one by one, so as to obtain the split corresponding to each computing node data.
举例而言,参见图3,假设有三个数据计算节点,分别为计算节点1、计算节点2和计算节点3,对于一级数据节点的期望数据表,可将该期望数据表的数据主键1对应的内容数据10拆分成2、4和4三个拆分数据,其中,计算节点1的拆分数据可为2,计算节点2的拆分数据可为4,计算节点的拆分数据可为4,以及可将该可将该期望数据表的数据主键2对应内容数据20拆分成4、8和8三个拆分数据,其中,计算节点1的拆分数据可为4,计算节点2的拆分数据可为8,计算节点的拆分数据可为8;对于二级数据节点的期望数据表,可将该期望数据表的数据主键2对应内容数据20拆分成4、8和8三个拆分数据,其中,计算节点1的拆分数据可为4,计算节点2的拆分数据可为8,计算节点的拆分数据可为8。For example, referring to Figure 3, suppose there are three data computing nodes, namely,
需要说明的是,期望数据表中填充内容的数据,例如“111111”,为非法数据,不进行拆分处理。It should be noted that the data filled with content in the expected data table, such as "111111", is illegal data and will not be split.
步骤105,将拆分数据发送至对应的计算节点。Step 105: Send the split data to the corresponding computing node.
具体地,数据节点的处理进程在得到每个计算节点的拆分数据后,可将该拆分数据发送至对应的计算节点,并由该计算节点接收并响应,从而完成本次的隐私计算。Specifically, after obtaining the split data of each computing node, the processing process of the data node can send the split data to the corresponding computing node, and the computing node receives and responds, thereby completing this privacy calculation.
本申请实施例的隐私计算方法,首先接收数据搬移拆分指令,其中,数据搬移拆分指令包括目标主键列表和表名称,并根据目标主键列表和表名称,从数据库中获取目标数据,而后根据目标主键列表、数据填充策略和目标数据,生成期望数据表,并根据拆分策略对期望数据表中的数据进行拆分,以得到多个计算节点中每个计算节点对应的拆分数据,以及将拆分数据发送至对应的计算节点,从而能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。The privacy computing method of the embodiment of the present application firstly receives a data moving and splitting instruction, wherein the data moving and splitting instruction includes a target primary key list and a table name, and obtains target data from a database according to the target primary key list and table name, and then according to The target primary key list, data filling strategy and target data, generate the desired data table, and split the data in the desired data table according to the splitting strategy to obtain the split data corresponding to each computing node in the multiple computing nodes, and The split data is sent to the corresponding computing node, so that privacy computing can be realized, and data security can be effectively ensured to avoid data leakage.
图6为根据本申请实施例所提供的另一种隐私计算方法的流程示意图。FIG. 6 is a schematic flowchart of another privacy computing method provided according to an embodiment of the present application.
本申请实施例的隐私计算方法,还可由本申请实施例提供的隐私计算装置执行,该装置可配置于电子设备中,以实现接收拆分数据,其中,拆分数据包括拆分内容数据和拆分内容数据对应的拆分主键,而后创建搬迁拆分数据表,并根据拆分主键和搬迁策略,将拆分内容数据和/或拆分主键写入搬迁拆分数据表,从而能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。The privacy computing method in the embodiment of the present application can also be executed by the privacy computing device provided in the embodiment of the present application, and the device can be configured in an electronic device to receive split data, where the split data includes split content data and split data. Split the primary key corresponding to the content data, then create a relocation and split data table, and write the split content data and/or the split primary key into the relocation and split data table according to the split primary key and the relocation strategy, so that privacy computing can be achieved , and can effectively ensure data security and avoid data leakage.
作为一种可能的情况,本申请实施例的隐私计算方法还可以由计算节点执行,其中,电子设备(例如,服务器)可为该计算节点的执行主体,由该电子设备实现该计算节点的具体功能。As a possible situation, the privacy computing method in this embodiment of the present application may also be executed by a computing node, where an electronic device (for example, a server) may be the execution body of the computing node, and the electronic device implements the specific details of the computing node. Function.
如图6所示,该隐私计算方法,可包括:As shown in Figure 6, the privacy computing method may include:
步骤601,接收拆分数据,其中,拆分数据可包括拆分内容数据和拆分内容数据对应的拆分主键。Step 601: Receive split data, where the split data may include split content data and a split primary key corresponding to the split content data.
具体地,上述数据节点的代理进程在接收到上述隐私计算平台发送的数据搬移拆分指令后,可根据该数据拆分指令中的目标主键列表和表名称,从数据库中获取目标数据,并根据目标主键列表、数据填充策略和目标数据,生成期望数据表,而后根据拆分策略对期望数据表中的数据进行拆分,以得到多个计算节点中每个计算节点对应的拆分数据,并将该拆分数据发送至对应的计算节点,由该计算节点接收该拆分数据。Specifically, after receiving the data moving and splitting instruction sent by the above-mentioned privacy computing platform, the agent process of the data node can obtain the target data from the database according to the target primary key list and table name in the data splitting instruction, and according to The target primary key list, data filling strategy and target data, generate the desired data table, and then split the data in the desired data table according to the splitting strategy to obtain the split data corresponding to each computing node in the multiple computing nodes, and The split data is sent to the corresponding computing node, and the split data is received by the computing node.
步骤602,创建搬迁拆分数据表。
具体地,计算节点(即,计算节点的代理进程)接收到上述拆分数据后,可基于预设的创建规则创建搬迁拆分数据表,此时,该搬迁拆分数据表尚未写入拆分内容数据和拆分内容数据对应的拆分主键,为空表格。Specifically, after the computing node (ie, the proxy process of the computing node) receives the above-mentioned split data, it can create a relocation and split data table based on a preset creation rule. At this time, the relocation and split data table has not yet been written into the split data table. The split primary key corresponding to the content data and the split content data is an empty table.
需要说明的是,该实施例中所描述的预设的创建规则可根据实际情况进行标定。It should be noted that the preset creation rules described in this embodiment may be calibrated according to actual conditions.
步骤603,根据拆分主键和搬迁策略,将拆分内容数据和/或拆分主键写入搬迁拆分数据表。其中,搬迁策略可根据实际情况进行标定。
为了清楚说明上一实施例,在本申请的一个实施例中,根据拆分主键和搬迁策略,将拆分内容数据和/或拆分主键写入搬迁拆分数据表,可包括:若搬迁拆分数据表中不存在拆分主键,则将拆分主键和拆分内容数据写入搬迁拆分数据表;若搬迁拆分数据表中存在拆分主键,拆分主键对应的行数据为填充内容,且拆分内容数据为值域范围内的数值,则将行数据替换为拆分内容数据;若搬迁拆分数据表中存在拆分主键,拆分主键对应的行数据为值域范围内的数值,且拆分内容数据为值域范围内的数值,则根据合并规则将拆分内容数据与行数据进行合并计算。其中,合并规则可根据实际情况进行标定。In order to clearly illustrate the previous embodiment, in an embodiment of the present application, according to the split primary key and the relocation strategy, writing the split content data and/or the split primary key into the relocation split data table may include: If there is no split primary key in the split data table, the split primary key and split content data will be written into the relocation split data table; if there is a split primary key in the relocated split data table, the row data corresponding to the split primary key will be filled. , and the split content data is a value within the value range, then replace the row data with the split content data; if there is a split primary key in the relocated split data table, the row data corresponding to the split primary key is within the range of the value range. If the split content data is a numerical value within the value range, the split content data and row data will be merged and calculated according to the merging rules. Among them, the merging rules can be calibrated according to the actual situation.
在本申请实施例中,计算节点在接收到上述拆分数据,并创建上述搬迁拆分数据表后,可根据拆分主键和搬迁策略将该拆分数据中的拆分内容数据和/或拆分主键写入该搬迁拆分数据表。其中,预设的写入规则可根据实际情况进行标定。In this embodiment of the present application, after receiving the split data and creating the relocation split data table, the computing node can split content data and/or split data in the split data according to the split primary key and the relocation strategy. The split primary key is written to the relocated split data table. Among them, the preset writing rule can be calibrated according to the actual situation.
具体地,计算节点在将上述拆分内容数据和/或拆分主键写入上述搬迁拆分数据表时,需先对搬迁拆分数据表的情况进行如下判断:Specifically, when the computing node writes the above-mentioned split content data and/or the split primary key into the above-mentioned relocation and split data table, it needs to first make the following judgment on the relocation and split data table:
若该搬迁拆分数据表中不存在拆分主键,说明搬迁拆分数据表中尚未写入拆分数据(即,该拆分主键及其对应的拆分内容数据),即搬迁拆分数据表不存在该拆分主键及其对应的拆分数据这一行的数据,则可将上述拆分主键和拆分内容数据写入该搬迁拆分数据表。If there is no split primary key in the relocation split data table, it means that no split data (ie, the split primary key and its corresponding split content data) has been written in the relocation split data table, that is, the split data table is relocated If there is no data in the row of the split primary key and its corresponding split data, the above split primary key and split content data can be written into the relocation split data table.
若该搬迁拆分数据表中存在拆分主键,说明已有拆分主键和拆分内容数据写入该搬迁拆分数据表,此时,若已写入的拆分主键对应的行数据为填充内容(即非法数据,例如“111111”),且当前需要写入的拆分内容数据为值域范围内的数值,则可将该行数据替换为当前需要写入的拆分内容数据。If there is a split primary key in the relocation split data table, it means that the split primary key and split content data have been written into the relocation split data table. At this time, if the row data corresponding to the split primary key that has been written is filled content (that is, illegal data, such as "111111"), and the current split content data to be written is a value within the value range, the row data can be replaced with the current split content data to be written.
若该搬迁拆分数据表中存在拆分主键,说明已有拆分主键和拆分内容数据写入该搬迁拆分数据表,此时,若已写入的拆分主键对应的行数据为值域范围内的数值,且当前需要写入的拆分内容数据为值域范围内的数值,则可根据合并规则将当前需要写入的拆分内容数据与行数据进行合并计算,例如相加。If there is a split primary key in the relocation split data table, it means that the split primary key and split content data have been written to the relocation split data table. At this time, if the row data corresponding to the split primary key that has been written is a value If the split content data currently needs to be written is the value within the value range, the current split content data to be written and the row data can be combined and calculated according to the merge rule, such as adding.
若该搬迁拆分数据表中存在拆分主键,说明已有拆分主键和拆分内容数据写入该搬迁拆分数据表,此时,若当前需要写入的拆分内容数据为填充内容(即非法数据,例如“111111”),则可不作操作。If there is a split primary key in the relocation split data table, it means that the split primary key and split content data have been written into the relocation split data table. That is, illegal data, such as "111111"), you can do nothing.
由此,可以将多份分布式的数据表合并为满足隐私计算的多份数据表(例如,分别存储在计算节点1、计算节点2和计算节点3中的3份数据表),按照隐私计算的规则,完成隐私计算,同时也保护了各数据节点数据信息不被泄漏。In this way, multiple distributed data tables can be combined into multiple data tables that satisfy privacy calculations (for example, three data tables stored in
本申请实施例的隐私计算方法,首先接收拆分数据,其中,拆分数据包括拆分内容数据和拆分内容数据对应的拆分主键,而后创建搬迁拆分数据表,并根据拆分主键和搬迁策略,将拆分内容数据和/或拆分主键写入搬迁拆分数据表,从而能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。The privacy computing method of the embodiment of the present application firstly receives split data, wherein the split data includes split content data and a split primary key corresponding to the split content data, and then creates a relocation split data table, and divides the data according to the split primary key and the split primary key. The relocation strategy is to write the split content data and/or the split primary key into the relocation split data table, so that privacy calculations can be realized, data security can be effectively ensured, and data leakage can be avoided.
为了使本领域技术人员更清晰地理解本申请实施例所提供的隐私计算方法,图7为隐私计算方法的构架示意图,如图7所示,可基于DOA注册中心确定多个数据节点,该多个数据节点可包括1级数据节点1、2级数据节点2-1和2-2,3级数据节点3-1和3-2,该多个数据节点可将拆分数据发送至多个计算节点,多个计算节点可包括计算节点1、计算节点2和计算节点3,由该多个计算节点将拆分数据写入搬迁拆分数据表。由此,能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。In order for those skilled in the art to more clearly understand the privacy calculation method provided by the embodiments of the present application, FIG. 7 is a schematic diagram of the architecture of the privacy calculation method. As shown in FIG. 7 , multiple data nodes may be determined based on the DOA registration center. The data nodes may include
图8为根据本申请实施例所提供的一种隐私计算装置的结构示意图。FIG. 8 is a schematic structural diagram of a privacy computing device according to an embodiment of the present application.
本申请实施例的隐私计算装置,可配置于电子设备中,以实现接收数据搬移拆分指令,其中,数据搬移拆分指令包括目标主键列表和表名称,并根据目标主键列表和表名称,从数据库中获取目标数据,而后根据目标主键列表、数据填充策略和目标数据,生成期望数据表,并根据拆分策略对期望数据表中的数据进行拆分,以得到多个计算节点中每个计算节点对应的拆分数据,以及将拆分数据发送至对应的计算节点,从而能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。The privacy computing device of the embodiment of the present application can be configured in an electronic device to receive a data moving and splitting instruction, wherein the data moving and splitting instruction includes a target primary key list and a table name, and according to the target primary key list and table name, from Obtain the target data from the database, and then generate the desired data table according to the target primary key list, data filling strategy and target data, and split the data in the desired data table according to the splitting strategy to obtain each calculation in multiple computing nodes. The split data corresponding to the node, and the split data is sent to the corresponding computing node, so that privacy computing can be achieved, and data security can be effectively ensured to avoid data leakage.
如图8所示,该隐私计算装置800可包括:接收模块810、获取模块820、生成模块830、拆分模块840和发送模块850。As shown in FIG. 8 , the
其中,接收模块810,用于接收数据搬移拆分指令,其中,数据搬移拆分指令包括目标主键列表和表名称。The receiving
获取模块820,用于根据目标主键列表和表名称,从数据库中获取目标数据。The obtaining
生成模块830,用于根据目标主键列表、数据填充策略和目标数据,生成期望数据表。The
拆分模块840,用于根据拆分策略对期望数据表中的数据进行拆分,以得到多个计算节点中每个计算节点对应的拆分数据。The
发送模块850,用于将拆分数据发送至对应的计算节点。The sending
在本申请的一个实施例中,目标数据包括内容数据和内容数据对应的数据主键,生成模块830,具体用于:根据内容数据和数据主键,生成初始数据表;基于数据主键从目标主键列表中获取填充主键,以生成填充主键集;若填充主键集不为空,则获取填充主键集中每个填充主键对应的填充内容;将填充主键和填充主键对应的填充内容,写入初始数据表以生成期望数据表;若填充主键集为空,则将初始数据表作为期望数据表。In an embodiment of the present application, the target data includes content data and a data primary key corresponding to the content data, and the
在本申请的一个实施例中,拆分模块840,具体用于:确定多个计算节点中计算节点的数量;根据数量和拆分规则对期望数据表中的数据进行逐条拆分,以得到每个计算节点对应的拆分数据。In an embodiment of the present application, the
需要说明的是,前述图1至图5对隐私计算方法实施例的解释说明也适用于该实施例的隐私计算装置,此处不再赘述。It should be noted that, the foregoing explanations of the embodiment of the privacy computing method in FIG. 1 to FIG. 5 are also applicable to the privacy computing device of this embodiment, and details are not repeated here.
本申请实施例的隐私计算装置,首先通过接收模块接收数据搬移拆分指令,其中,数据搬移拆分指令包括目标主键列表和表名称,并通过获取模块根据目标主键列表和表名称,从数据库中获取目标数据,而后通过生成模块根据目标主键列表、数据填充策略和目标数据,生成期望数据表,并通过拆分模块根据拆分策略对期望数据表中的数据进行拆分,以得到多个计算节点中每个计算节点对应的拆分数据,以及通过发送模块将拆分数据发送至对应的计算节点,从而能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。In the privacy computing device of the embodiment of the present application, firstly, the receiving module receives a data moving and splitting instruction, wherein the data moving and splitting instruction includes a target primary key list and a table name, and the acquisition module retrieves the data from the database according to the target primary key list and the table name. Obtain the target data, and then generate the desired data table according to the target primary key list, data filling strategy and target data through the generation module, and split the data in the desired data table through the splitting module according to the splitting strategy to obtain multiple calculations The split data corresponding to each computing node in the node, and the split data is sent to the corresponding computing node through the sending module, so that privacy computing can be realized, data security can be effectively ensured, and data leakage can be avoided.
图9为根据本申请实施例所提供的另一种隐私计算装置的结构示意图。FIG. 9 is a schematic structural diagram of another privacy computing device provided according to an embodiment of the present application.
本申请实施例的隐私计算装置,可配置于电子设备中,以实现接收拆分数据,其中,拆分数据包括拆分内容数据和拆分内容数据对应的拆分主键,而后创建搬迁拆分数据表,并根据拆分主键和搬迁策略,将拆分内容数据和/或拆分主键写入搬迁拆分数据表,从而能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。The privacy computing device of this embodiment of the present application can be configured in an electronic device to receive split data, where the split data includes split content data and a split primary key corresponding to the split content data, and then creates, relocates, and split data Table, and according to the split primary key and the relocation strategy, the split content data and/or the split primary key are written into the relocation split data table, so that privacy calculations can be achieved, and data security can be effectively ensured to avoid data leakage.
如图9所示,该隐私计算装置900可包括:接收模块910、创建模块920和写入模块930。As shown in FIG. 9 , the
其中,接收模块910,用于接收拆分数据,其中,拆分数据包括拆分内容数据和拆分内容数据对应的拆分主键。The receiving
创建模块920,用于创建搬迁拆分数据表。The
写入模块930,用于根据拆分主键和搬迁策略,将拆分内容数据和/或拆分主键写入搬迁拆分数据表。The
在本申请的一个实施例中,写入模块930,具体用于:若搬迁拆分数据表中不存在拆分主键,则将拆分主键和拆分内容数据写入搬迁拆分数据表;若搬迁拆分数据表中存在拆分主键、拆分主键对应的行数据为填充内容,且拆分内容数据为值域范围内的数值,则将行数据替换为拆分内容数据;若搬迁拆分数据表中存在拆分主键、拆分主键对应的行数据为值域范围内的数值,且拆分内容数据为值域范围内的数值,则根据合并规则将拆分内容数据与行数据进行合并。In an embodiment of the present application, the
需要说明的是,前述图3以及图6至图7对隐私计算方法实施例的解释说明也适用于该实施例的隐私计算装置,此处不再赘述。It should be noted that, the foregoing explanations of the embodiment of the privacy computing method in FIG. 3 and FIG. 6 to FIG. 7 are also applicable to the privacy computing device of this embodiment, and details are not repeated here.
本申请实施例的隐私计算装置,首先通过接收模块接收拆分数据,其中,拆分数据包括拆分内容数据和拆分内容数据对应的拆分主键,而后通过创建模块创建搬迁拆分数据表,并通过写入模块根据拆分主键和搬迁策略,将拆分内容数据和/或拆分主键写入搬迁拆分数据表,从而能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。The privacy computing device of the embodiment of the present application firstly receives split data through the receiving module, wherein the split data includes split content data and split primary keys corresponding to the split content data, and then creates a relocation split data table through the creation module, And through the writing module, according to the split primary key and the relocation strategy, the split content data and/or the split primary key are written into the relocation split data table, so that privacy computing can be achieved, and data security can be effectively ensured to avoid data leakage.
为了实现上述实施例,如图10所示,本申请还提出一种电子设备1000,包括存储器1010、处理器1020及存储在存储器1010上并可在处理器1020上运行的计算机程序,处理器1020执行程序,以实现本申请前述实施例提出的隐私计算方法。In order to realize the above embodiments, as shown in FIG. 10 , the present application further proposes an
本申请实施例的电子设备,通过处理器执行存储在存储器上的计算机程序,能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。In the electronic device of the embodiment of the present application, by executing the computer program stored in the memory by the processor, privacy calculation can be implemented, and data security can be effectively ensured, and data leakage can be avoided.
为了实现上述实施例,本申请还提出一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行,以实现本申请前述实施例提出的隐私计算方法。In order to implement the above-mentioned embodiments, the present application further provides a non-transitory computer-readable storage medium on which a computer program is stored, and the program is executed by a processor to implement the privacy computing method proposed in the foregoing embodiments of the present application.
本申请实施例的计算机可读存储介质,通过存储计算机程序并被处理器执行,能够实现隐私计算,且可有效的保证数据安全,避免数据泄露。The computer-readable storage medium of the embodiments of the present application, by storing a computer program and being executed by a processor, can implement privacy computing, and can effectively ensure data security and avoid data leakage.
在本说明书的描述中,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In the description of this specification, the terms "first" and "second" are only used for the purpose of description, and cannot be understood as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature delimited with "first", "second" may expressly or implicitly include at least one of that feature. In the description of the present application, "plurality" means at least two, such as two, three, etc., unless expressly and specifically defined otherwise.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, description with reference to the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples", etc., mean specific features described in connection with the embodiment or example , structure, material or feature is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and combine the different embodiments or examples described in this specification, as well as the features of the different embodiments or examples, without conflicting each other.
尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limitations on the present application. Embodiments are subject to variations, modifications, substitutions and variations.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210179806.6A CN114580018A (en) | 2022-02-25 | 2022-02-25 | Privacy computing method, device, electronic device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210179806.6A CN114580018A (en) | 2022-02-25 | 2022-02-25 | Privacy computing method, device, electronic device and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN114580018A true CN114580018A (en) | 2022-06-03 |
Family
ID=81775030
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210179806.6A Pending CN114580018A (en) | 2022-02-25 | 2022-02-25 | Privacy computing method, device, electronic device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114580018A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115063002A (en) * | 2022-06-30 | 2022-09-16 | 杭州数梦工场科技有限公司 | Risk assessment method, device and electronic device based on spatiotemporal trajectory |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2016169322A1 (en) * | 2015-04-22 | 2016-10-27 | 中兴通讯股份有限公司 | Query method and device for database, and computer storage medium |
| CN112685769A (en) * | 2020-12-25 | 2021-04-20 | 联想(北京)有限公司 | Data processing method and device of block chain and electronic equipment |
| CN113377878A (en) * | 2021-08-11 | 2021-09-10 | 浙江数秦科技有限公司 | Block chain-based hot data sharing platform |
| CN113541944A (en) * | 2021-07-16 | 2021-10-22 | 北京数牍科技有限公司 | Privacy calculation method and system based on noise source synchronization and computer equipment |
-
2022
- 2022-02-25 CN CN202210179806.6A patent/CN114580018A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2016169322A1 (en) * | 2015-04-22 | 2016-10-27 | 中兴通讯股份有限公司 | Query method and device for database, and computer storage medium |
| CN112685769A (en) * | 2020-12-25 | 2021-04-20 | 联想(北京)有限公司 | Data processing method and device of block chain and electronic equipment |
| CN113541944A (en) * | 2021-07-16 | 2021-10-22 | 北京数牍科技有限公司 | Privacy calculation method and system based on noise source synchronization and computer equipment |
| CN113377878A (en) * | 2021-08-11 | 2021-09-10 | 浙江数秦科技有限公司 | Block chain-based hot data sharing platform |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115063002A (en) * | 2022-06-30 | 2022-09-16 | 杭州数梦工场科技有限公司 | Risk assessment method, device and electronic device based on spatiotemporal trajectory |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Khan et al. | SQL Database with physical database tuning technique and NoSQL graph database comparisons | |
| WO2020005808A1 (en) | Multi-table partitions in a key-value database | |
| CN112860777B (en) | Data processing method, device and equipment | |
| CN103150394A (en) | Distributed file system metadata management method facing to high-performance calculation | |
| US8271500B2 (en) | Minimal perfect hash functions using double hashing | |
| CN110399333B (en) | Method, apparatus and computer program product for deleting snapshots | |
| CN106326309A (en) | Data query method and device | |
| US10726053B2 (en) | System for lightweight objects | |
| CN115129782A (en) | Partition level connection method and device for distributed database | |
| CN112256698B (en) | Table relation automatic association method based on multi-hash function | |
| US11036709B2 (en) | Single-level, multi-dimension, hash-based table partitioning | |
| US8548980B2 (en) | Accelerating queries based on exact knowledge of specific rows satisfying local conditions | |
| CN102169497B (en) | Method and device for managing metadata through bitmaps | |
| US9009731B2 (en) | Conversion of lightweight object to a heavyweight object | |
| CN114580018A (en) | Privacy computing method, device, electronic device and storage medium | |
| CN106021339B (en) | Resource tree-oriented semantic query method and system | |
| JP2011154496A (en) | Program and device for setting access right and access right management system | |
| US12253974B2 (en) | Metadata processing method and apparatus, and a computer-readable storage medium | |
| EP4621593A1 (en) | Data storage methods and apparatuses for graph database | |
| CN111125216B (en) | Method and device for importing data into Phoenix | |
| CN120179733A (en) | Data processing method, device, computer equipment and readable storage medium | |
| CN103810114A (en) | Method and device for distributing storage space | |
| US7987470B1 (en) | Converting heavyweight objects to lightwight objects | |
| CN118170784A (en) | Data query method, electronic device and storage medium | |
| CN116975029A (en) | Data verification methods, devices, storage media, electronic equipment and products |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |