CN115017532B - User data processing method, device and system based on block chain - Google Patents

User data processing method, device and system based on block chain Download PDF

Info

Publication number
CN115017532B
CN115017532B CN202210946768.2A CN202210946768A CN115017532B CN 115017532 B CN115017532 B CN 115017532B CN 202210946768 A CN202210946768 A CN 202210946768A CN 115017532 B CN115017532 B CN 115017532B
Authority
CN
China
Prior art keywords
data
target data
subchain
tag
chain
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.)
Active
Application number
CN202210946768.2A
Other languages
Chinese (zh)
Other versions
CN115017532A (en
Inventor
丁军红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Aerospace Aoxiang Ventilation Technology Co ltd
Original Assignee
Beijing Aerospace Aoxiang Ventilation Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Aerospace Aoxiang Ventilation Technology Co ltd filed Critical Beijing Aerospace Aoxiang Ventilation Technology Co ltd
Priority to CN202210946768.2A priority Critical patent/CN115017532B/en
Publication of CN115017532A publication Critical patent/CN115017532A/en
Application granted granted Critical
Publication of CN115017532B publication Critical patent/CN115017532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2211/00Indexing scheme relating to details of data-processing equipment not covered by groups G06F3/00 - G06F13/00
    • G06F2211/007Encryption, En-/decode, En-/decipher, En-/decypher, Scramble, (De-)compress
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a user data processing method, a device and a system based on a block chain, relates to the technical field of intelligent Internet, and mainly aims to safely store user behavior data, enable a user to control the behavior data by himself and share the behavior data safely, and enable enterprises to provide services for the user better. The main technical scheme of the invention is as follows: acquiring target data; determining a tag data set corresponding to the target data, wherein the target data at least corresponds to one tag data; encrypting the target data to obtain encrypted target data; and storing the encrypted target data and the tag data set into block chain system data, so that the server feeds back the encrypted target data to the client after receiving a data access request sent by the client, and the client processes the encrypted target data. The invention is used for processing the user data.

Description

User data processing method, device and system based on block chain
Technical Field
The invention relates to the technical field of intelligent internet, in particular to a user data processing method and device based on a block chain.
Background
The block chain system is based on technologies such as a P2P network technology, an encryption technology, a timestamp technology, a block chain and the like, and comprises a data layer, a network layer, a consensus layer, an application layer and the like, wherein a plurality of nodes for running block chain software exist in the block chain system, the nodes communicate through the P2P network, and the chain block structure based on the timestamp is jointly maintained according to a consensus mechanism. Compared with the traditional centralized system, the block chain system has two core characteristics: firstly, data is difficult to tamper, and secondly, decentralization is performed. Based on the two characteristics, the information recorded by the block chain is more real and reliable.
With the rapid development of the mobile internet and the comprehensive development of the ecosystem of the mobile phone operating system, the application of the mobile internet is increased explosively. More and more enterprises begin to use mobile applications to provide services for users, namely, the mobile applications are used as carriers, a recommendation system is used as a core, and when different users use the mobile applications, the obtained contents are contents which are estimated to be liked by the users possibly after modeling analysis is carried out on application programs according to historical behavior data of the current users. However, the above method has several problems, firstly, the behavior data of the user is stored in the internal server of different enterprises, the user cannot control the behavior data by himself, and data security problems such as loss and leakage are easily caused, secondly, when the user uses mobile applications of different enterprises providing the same service, the behavior data cannot be shared, and user experience is greatly influenced. Therefore, how to permanently and securely store the user behavior data and enable the user to control and share the behavior data by himself/herself is a problem to be solved.
Disclosure of Invention
In view of the foregoing problems, the present invention provides a method and an apparatus for processing user data based on a blockchain, and mainly aims to securely store user behavior data, and enable a user to control and share the behavior data by himself, so that an enterprise can better provide services for the user.
In order to solve the technical problem, the invention provides the following scheme:
in a first aspect, the present invention provides a method for processing user data based on a block chain, which is applied to a server, and the method includes:
acquiring target data;
determining a tag data set corresponding to the target data, wherein the target data at least corresponds to one tag data;
encrypting the target data to obtain encrypted target data;
and storing the encrypted target data and the tag data set into block chain system data, so that the server feeds back the encrypted target data to the client after receiving a data access request sent by the client, and the client processes the encrypted target data.
In a second aspect, the present invention provides a method for processing user data based on a block chain, which is applied to a client, and the method includes:
generating a data access request according to an operation event of a user;
sending the data access request to a server, so that the server can acquire encrypted target data in a corresponding target data sub-chain and a corresponding label data sub-chain from blockchain system data, wherein the encrypted target data is determined in the corresponding target data sub-chain and the corresponding label data sub-chain based on the data access request;
and receiving the encrypted target data fed back by the server so that the user can process the encrypted target data.
In a third aspect, the present invention provides a device for processing user data based on a block chain, which is applied to a server, and the device includes:
the acquisition unit is used for acquiring target data corresponding to a user;
a determining unit, configured to determine a tag data set corresponding to target data obtained by the obtaining unit, where the target data corresponds to at least one tag data;
an encryption unit configured to encrypt the target data obtained by the obtaining unit to obtain encrypted target data;
the storage unit is configured to store the encrypted target data obtained by the encryption unit and the tag data set obtained by the determination unit into blockchain system data, so that the server feeds back the encrypted target data to the client after receiving a data access request sent by the client, so that the client processes the encrypted target data.
In a fourth aspect, the present invention provides a device for processing user data based on a block chain, which is applied to a client, and the device includes:
the generating unit is used for generating a data access request according to the operation event;
a sending unit, configured to send the data access request obtained by the generating unit to a server, so that the server obtains encrypted target data in a corresponding target data sub-chain and a tag data sub-chain from block chain system data, where the encrypted target data is determined in the corresponding target data sub-chain and the tag data sub-chain based on the data access request;
and the receiving unit is used for receiving the encrypted target data obtained by the reading unit fed back by the server so as to process the encrypted target data.
In a fifth aspect, the present invention further provides a user data processing system based on a blockchain, the system includes a server and a client,
when the server side processes user data, the server side executes any one of the block chain-based user data processing methods applied to the client side;
when the client performs user data processing, the client executes any one of the above block chain-based user data processing methods applied to the server.
In order to achieve the above object, according to a sixth aspect of the present invention, a storage medium is provided, where the storage medium includes a stored program, and when the program runs, a device on which the storage medium is located is controlled to execute the block chain-based user data processing method of the first aspect.
In order to achieve the above object, according to a seventh aspect of the present invention, there is provided a processor for executing a program, wherein the program executes to execute the block chain based user data processing method of the first aspect.
By means of the technical scheme, when user data are processed, target data, namely behavior data corresponding to a user, can be obtained first, then a tag data set corresponding to the target data is determined, the target data at least corresponds to one tag data, namely the target data of the user can be determined rapidly through the tag data in the tag data set, then the target data are encrypted to obtain the encrypted target data, the target data are safer in the subsequent processing process, and finally the encrypted target data and the tag data set are stored in block chain system data, so that after a data access request sent by a client is received by a server, the encrypted target data are fed back to the client, and the encrypted target data are processed by the client. The block chain-based user data processing method provided by the invention can encrypt the behavior data of the user and store the behavior data and the label data set corresponding to the behavior data in the block chain system together, so that the problems of data loss and data leakage are avoided.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a block chain-based user data processing method applied to a server according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating another block chain-based user data processing method applied to a client according to an embodiment of the present invention;
fig. 3 is a block diagram illustrating a user data processing apparatus based on a block chain for a server according to an embodiment of the present invention;
fig. 4 is a block diagram illustrating another block chain-based user data processing apparatus applied to a server according to an embodiment of the present invention;
fig. 5 is a block diagram illustrating a user data processing apparatus based on a blockchain applied to a client according to an embodiment of the present invention;
fig. 6 is a block diagram illustrating another block chain-based user data processing apparatus applied to a client according to an embodiment of the present invention;
fig. 7 is a block diagram illustrating a user data processing system based on a block chain according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The block chain system is based on technologies such as a P2P network technology, an encryption technology, a timestamp technology and a block chain, and comprises a data layer, a network layer, a consensus layer, an application layer and the like, wherein a plurality of nodes for running block chain software exist in the block chain system, the nodes communicate through the P2P network, and the chain type block structure based on the timestamp is jointly maintained according to a consensus mechanism. Compared with the traditional centralized system, the block chain system has two core characteristics: the first is that data is difficult to tamper with, and the second is decentralized. Based on the two characteristics, the information recorded by the block chain is more real and reliable.
With the rapid development of the mobile internet and the comprehensive development of the ecosystem of the mobile phone operating system, the common installation of the smart phone operating system and the appearance of a mobile phone application program store greatly enrich the internet surfing function of the mobile phone, and the application of the mobile internet is increased explosively. Therefore, more and more enterprises begin to use mobile applications to provide services for users, that is, the mobile applications are used as carriers, and a recommendation system is used as a core. However, the method has the following problems that firstly, the behavior data of the user is stored in the internal server of different enterprises, the user cannot control the behavior data by himself, and data security problems such as loss and leakage are easily caused, and secondly, when the user uses mobile applications of different enterprises providing the same service, the behavior data cannot be shared, so that user experience is greatly influenced. Therefore, how to permanently and securely store the user behavior data and enable the user to control and share the behavior data by himself/herself is a problem to be solved. Therefore, an embodiment of the present invention provides a user data processing method based on a block chain, which is applied to a server, and by using the method, user behavior data can be stored safely, and a user can control and share the behavior data safely, so that an enterprise can provide services for the user better, and specific execution steps of the method are shown in fig. 1, and the method includes:
101. target data is acquired.
It should be noted that, in this embodiment, the target data is behavior data of a user, and the behavior data includes behavior data of the user at the enterprise server using the enterprise service, operation behavior data of the user at the client (enterprise mobile application), and corresponding environment data, where the behavior data of the user at the enterprise server using the enterprise service includes, but is not limited to, a service usage time of the user for a certain service, a keyword searched by the user, order placing information of the user, and the like. The operation behavior data of the user of the client (enterprise mobile application) and the corresponding environment data include, but are not limited to, terminal information (operating system, mobile phone model, etc.), dwell time of the page, content sharing, etc. Specifically, capturing of target data may be implemented by integrating a server SDK in an application system inside an enterprise by a developer of the enterprise and integrating a client SDK in client software of the enterprise by the developer of the enterprise, where the client includes but is not limited to a mobile application, an applet, an H5 website, a PC website, and the like, and the target data may be one piece of data or multiple pieces of data in a preset time period, for which, this embodiment is not specifically limited, and the target data obtained may be in the following representation form, for example: the user information, (2) environment information, (3) time, (4) content and product, (5) behavior, that is, who, under what environment, at what time, for what content, what has been done, constitute a complete piece of target data, but the above representation is only one of examples, and the representation in the actual application can be set according to the user customization.
102. And determining a label data set corresponding to the target data.
The target data at least corresponds to one tag data, and it should be noted that in this step, the tag data set is generated by performing feature analysis and keyword extraction on the target data, and has an effect of classifying and retrieving the target data, so that the position of the target data can be quickly located by the tag data in the tag data set.
Specifically, first, the process corresponding to the feature analysis of the target data is as follows: the behavior object in the target data may be determined first, and then the behavior object may be subjected to feature analysis to obtain a first tag data subset, that is, the attribute feature of the behavior object may be extracted to form the first feature subset, and this manner is generally performed by analyzing the data definition of the behavior object by the current enterprise, and depending on the behavior object data source of the current enterprise, the behavior object data source represents the standpoint of the current enterprise, and lacks objectivity to some extent. The first feature subset and the second feature subset obtain a set of attribute features of the behavior object based on two different ways, which are substantially obtained or label data, and are equivalent to performing semantic analysis on the behavior object in the target data, because the blockchain system data includes a plurality of nodes, the first feature subset is only a feature label set obtained for a current node, and for the second feature subset, the blockchain system data is oriented to each node in the blockchain system data, a feature query result is fed back for each node of the same feature query request, and one feature query result may not include label data or may include one or more label data, and therefore, the second feature subset is formed based on a plurality of feature query results fed back by the plurality of nodes, and therefore, the obtained second feature subset is more comprehensive and accurate relative to the feature label data of the first feature subset, so that the first label data subset is generated based on the first feature subset and the second feature subset, so that the feature analysis on the target data is more objective and real.
And for a specific generation process: a minimum tag number threshold m may be preset by user customization, and then the second feature subset and the first feature subset are combined and then are subjected to summary sorting, that is, a new set may be generated by determining the occurrence frequency a of each tag data and performing descending sorting, and then the comparison frequency b is calculated, where b satisfies b =2/N, and a specific algorithm of b may be set based on user customization, N denotes the number of nodes in the blockchain system, and the characteristic of the blockchain system is known, and if a is greater than b, it indicates that at least more than half of the nodes in the blockchain system have fed back the tag data, and then it indicates that the tag data is more objective and real, at this time, the number of the tag data in the new set, where a is greater than or equal to b, is calculated as N, and when N is greater than m, the first N tag data in the new set is retained to generate the first tag data subset. When n is less than or equal to m, the first m label data in the new set are reserved to generate the first label data subset, and it should be noted that if the number of labels in the new set is less than m, the first label data subset is generated by directly using all the label data in the new set.
That is to say, the minimum number m of tags is to ensure that each target data corresponds to at least m effective tags, and the comparison times b have the effect of determining the tag data fed back by more than half of the nodes in all the tag data, that is, obtaining the optimal tag of each target data, and if the optimal tag is more than the effective tags, the optimal tag is directly used to generate the first tag data subset, otherwise, the effective tags are used to generate the first tag data subset, and since the tag data in the new set are arranged in a descending order, the effective tags contain all the optimal tags, and if the optimal tag is less than the effective tags, and the number of all the tag data in the new set cannot meet the number requirement of the effective tags, all the tag data in the new set are directly used to generate the first tag data subset. By the method, the tag data in the first tag data subset can be ensured to be more objective and accurate.
Secondly, the process corresponding to the keyword extraction of the target data is as follows: the target data may be subjected to keyword extraction to obtain the second tag data subset, and the keyword extraction technology includes, but is not limited to, TF-IDF algorithm, textRank algorithm, and the like, which is not specifically limited in this embodiment.
And finally, combining the first tag data subset and the second tag data subset to obtain a tag data set, namely a more complete keyword set corresponding to the target data.
For example, assume that the target data is: a user purchases the S1 skateboard after consuming 341.2 yuan in 19 th of 5 th of 1985;
then, the second tag data subset after keyword extraction = [ 'consume', 'S1 slide' ];
and for the first subset of tag data:
wherein, the behavior objects are: s1, sliding plates; assuming a total of 5 nodes in the blockchain system, then,
a first subset of features = [ 'motion', 'slide board', 'beginner', 'land wash' ];
a second feature subset = [ node 1= [ 'hobby', 'slide board', 'walk' ], node 2 [ 'surf', 'slide board', 'beginner', 'professional', ] node 3= [ 'ski', 'slide board', 'professional', ] node 4= [ 'sport', 'slide board', 'beginner' ], node 5= [ 'sport', 'slide board', 'beginner', 'land-to-the-board' ];
combining the above 2 feature subsets, calculating the occurrence times a of the tag data, then sorting according to the times,
then the new set = [ 'skateboard' a =6, 'beginner' a =4, 'sports' a =3, 'surfboard' a =2, 'hobby' a =1, 'walking' a =1, 'surfing' a =1, 'skiing' a =1, 'professional' a =1];
given the number of nodes N =5, b =5/2=2 can be calculated (in the computer field, two integers are divided, only a part of the quotient is kept, namely, the quotient of 5/2 is 2, the remainder is 1, only 2 is kept at this time, and if any one of the divisor and the dividend is a floating point number, the result is a floating point number, such as 5.0/2 = 2.5), then the tag data in which the number of occurrences a of all the tag data in the new set is greater than or equal to 2 are [ 'slide' a =6], [ 'beginner' a =4], [ 'motion' a =3], [ 'landboard' a =2], that is, N =4, respectively;
the first condition is as follows: if the preset label number threshold value m =3,
since n =4,m =3, the rule that n is greater than m is satisfied, and then the first n label data in the new set are used as the first label data subset finally generated, i.e. the first label data subset at this time = [ 'slide plate', 'beginner', 'motion' a =3, 'dash plate' ];
then, after merging the first tag data subset and the second tag data subset, the obtained tag data set is: [ 'consumption', 'S1 slide', 'beginner', 'sport', 'continental board' ];
case two: if the preset threshold m =4,
since n =4,m =4, the rule that n is less than or equal to m is satisfied, then the first m label data in the new set are used as the first label data subset finally generated, i.e. the first label data subset at this time = [ 'slide board', 'beginner', 'sport', 'land wash' ];
then after merging the first tag data subset and the second tag data subset, the obtained tag data set is: [ 'consumption', 'S1 skateboard', 'beginner', 'sports', 'land surfing board' ];
and a third situation: if the preset threshold m =10,
since n =4,m =10, that is, n is smaller than m, it is known from the second case that the first m label data in the new set should be used as the first label data subset finally generated, but it is known that the total number of all label data in the new set is 9, which is smaller than m, obviously, the first label data subset is not applicable in the first case and the second case, and therefore, the first label data subset can be directly generated by using all the label data in the new set, that is, the first label data subset at this time = [ 'skateboard', 'beginner', 'sport', 'land surfing', 'hobby', 'interest', 'walking by substituting for walking', 'skiing', 'professional' ];
after the merging process of the first tag data subset and the second tag data subset, the obtained tag data set is: [ 'consumption', 'S1 skateboard', 'beginner', 'sports', 'land surfing', 'hobby', 'walking', 'surfing', 'skiing', 'professional' ].
103. And encrypting the target data to obtain the encrypted target data.
It should be noted that, in this step, since the target data is obtained based on a single user, a pair of encryption and decryption keys may be allocated to the user after the target data is obtained, that is, the target data is encrypted, and an asymmetric encryption algorithm, generally an RSA algorithm, may be used when the key is generated, where a public key is used for encryption at the server and a private key is used for decryption of the target data after the public key is encrypted at the client. Therefore, the user can decrypt the encrypted target data encrypted by the public key at the client according to the private key, and the subsequent operation aiming at the target data is safer.
104. And storing the encrypted target data and the encrypted tag data set into the block chain system data, so that the service end feeds back the encrypted target data to the client end after receiving a data access request sent by the client end, and the client end processes the encrypted target data.
It should be noted that the blockchain system data is formed by data stored in a plurality of node servers, and may run in any one server individually, and when the stored data changes, the blockchain system data is shared to other servers, so that the blockchain system data in other servers changes commonly, while in this embodiment, the server may be a node server in the blockchain system, or if the node server outside the blockchain system is a node server outside the blockchain system, the node server inside the blockchain system only needs to send the stored data to the node server outside the blockchain system after the node server determines the stored data based on a common identification mechanism, so that a specific process may generate a target data subchain and a tag data set subchain corresponding to the user when acquiring the encrypted target data and the tag data set for the first time, and then store the target data subchain and the tag data set into the blockchain system data, wherein the target data subchain is used for storing the encrypted target data, the tag data set subchain, and the tag data set subchain are used for storing the target data corresponding to the same public key of the encrypted data set, and the public key of the target data set, so that when the target data set and the target data set are used for storing the public key, the public key of the encrypted data set, and the target data set, and the public key of the target data set, and public key of the target data set can be used for quickly, the target data subchain is formed by encrypted target data, the tag data set subchain is formed by tag data in the tag data set, and finally the target data subchain and the tag data set subchain are stored in the block chain system data.
Further, a specific process for generating a target data subchain and a tag data set subchain corresponding to the same public key is as follows: the encrypted target data and the encrypted tag data can be firstly subjected to block division to generate a target data subchain, then block division is respectively carried out on each tag data and a block ID of a block where the encrypted target data is located to generate a tag data set subchain, and finally an association relation between a public key and the target data subchain and the tag data set subchain is established to obtain the target data subchain and the tag data set subchain which correspond to the same public key. The target data subchain at least comprises one block, the block chaining of the target data subchain is established based on a time sequence, and each block not only stores target data, but also redundantly stores tag data corresponding to the target data, so that the target data subchain can completely reflect behavior data of a user along with the time.
Correspondingly, the tag data set subchain also at least comprises one block, and the block chaining of the subchain is established based on the tag data blocking, that is, only one tag data is stored in one block, and the block ID identification of the block where the target data corresponding to the tag data is located is also redundantly stored, wherein each block can generate a unique block ID identification based on the data stored in the block, and for the generation algorithm of the block ID identification, an algorithm capable of generating unique IDs based on different data, such as a discrete function, can be adopted, and the discrete function is only one example of the unique block ID identifications generated in the embodiment, and can be specifically selected according to the actual application situation.
The association relationship may be specifically obtained by converting the public key into two different ID identifiers, where a correspondence exists between the ID identifiers and the public key, and replacing the two ID identifiers with the block ID identifier of the first block in the target data sub-chain and the tag data set sub-chain, so as to determine the corresponding target data sub-chain and tag data set sub-chain through the same public key. Since the public key and the private key are distributed based on the user and have uniqueness, the public key may be a substantially unique string, and thus may be converted into two different ID identifications, for example, the public key is assumed to be: the user01, two different ID identifications converted by the user01 may be a user01A and a user01B, that is, the public key may be converted by adding characters, and the user01A and the user01B are converted based on the user01, that is, there is a corresponding relationship between the ID identifications and the public key, so that the user01A and the user01B may replace the tile ID identification of the first tile of the target data subchain and the tag data set subchain so as to identify the same public key corresponding to the target data subchain and the tag data set subchain, thereby avoiding a situation that data of the same user is repeatedly stored in the tile chain system data, saving resource space, and besides by adding characters, the association between the public key and the tile ID identification of the first tile in the target data subchain and the tag data set subchain may be realized by directly establishing a relationship table and storing in the tile chain system data, which may be specifically selected according to an actual application situation.
Through the above manner, according to the corresponding relationship between the tag data and the encrypted target data, not only can one or all encrypted target data desired by the user within a certain time or a certain period of time be quickly retrieved based on the target data subchain, but also the block where the encrypted target data is located in the target data subchain can be quickly located according to the tag data in the tag data set subchain and the block ID stored in one block thereof, so that the target data desired by the user can be quickly retrieved, thereby improving the retrieval efficiency of the encrypted target data, and facilitating the user to process the retrieved encrypted target data at the client, for example, decryption viewing or authorized sharing and the like.
Further, since the target data is overlapped by the user continuously over time, in order to ensure that the newly generated target data and tag data set can be stored in the target data sub-chain and tag data set sub-chain corresponding to the user in the blockchain system data, after acquiring the encrypted target data, the method further includes: searching whether a historical target data subchain and a historical label data set subchain which correspond to the public key exist in the block chain system data, if not, generating the target data subchain and the label data set subchain which correspond to the same public key, and if so, correspondingly adding the encrypted target data and the encrypted label data set to the historical target data subchain and the historical label data set subchain. According to the method, a data block to be added to a target data subchain is formed in a way of firstly performing block division on encrypted target data according to an adding mode of the encrypted target data, then the data block is correspondingly added to the tail end of the existing target data subchain on the basis of time sequence, according to the adding mode of a tag data set, a tag block to be added to the tag data set subchain is formed in a way of firstly performing block division on tag data in the tag data set, whether tag data with the same tag block to be added exist in the existing tag block in the tag data set subchain is detected, if the tag data exist, the same tag blocks can be combined to obtain a tag block stored with one tag data and a plurality of block ID identifications, and therefore the subsequent retrieval efficiency of the encrypted target data based on a client is further improved.
Based on the implementation manner shown in fig. 1, it can be seen that, when processing user data, the method, the apparatus, and the system for processing user data based on a block chain according to the present invention may first obtain target data, that is, behavior data corresponding to a user, then determine a tag data set corresponding to the target data, where the target data corresponds to at least one tag data, that is, the target data of the user may be quickly determined by using the tag data in the tag data set, and then encrypt the target data to obtain encrypted target data, so that the target data is safer in a subsequent processing process, and finally store the encrypted target data and the tag data set in block chain system data, so that after receiving a data access request sent by a client, a server feeds back the encrypted target data to the client, so that the client processes the encrypted target data. The block chain-based user data processing method provided by the invention can encrypt the behavior data of the user and store the behavior data and the label data set corresponding to the behavior data in the block chain system together, so that the problems of data loss and data leakage are avoided.
Further, another block chain-based user data processing method is provided in an embodiment of the present invention, and is applied to a client, as shown in fig. 2, the specific steps are as follows:
201. and generating a data access request according to the operation event.
It should be noted that, in this embodiment, the operation event includes operations of user login, authorization, inputting configuration content, and the like, and the specific operation event of the user may be actually understood as an event in which the content of the configuration data access request performs a specific function, such as a click event, a scroll event, a drag event, an input event, and other different events, where the authorization operation may use an oauth2.0 protocol, and the above operations are all completed at the client, where the client may be a mobile application, an applet, an H5 website, a PC website, and the like running on an intelligent mobile terminal such as a PC, a mobile phone, a tablet computer, and the like. The generated data access request may include user information, time information, tag information, and the like configured by the user, and the data desired by the user can be specifically found through the information.
202. Sending the data access request to a server, so that the server acquires encrypted target data in a corresponding target data sub-chain and a tag data sub-chain from the blockchain system data, wherein the encrypted target data is determined in the corresponding target data sub-chain and the tag data sub-chain based on the data access request.
It should be noted that, because the data access request is generated at the client, if a user wants to search stored data in the blockchain system data, the generated data access request needs to be sent to the server, the server sends the data access request to the blockchain system data, finds a target data sub-chain and a tag data sub-chain corresponding to the user in the blockchain system data, determines data that the user wants, that is, encrypted target data, in the target data sub-chain and the tag data sub-chain corresponding to the user, and then takes the encrypted target data as a feedback result of the blockchain system data.
The data access request records configuration content of the target data obtained by the user after encryption, so that the configuration content can be analyzed so as to find a target data subchain and a tag data subchain corresponding to the user in the blockchain system data, the encrypted target data wanted by the user can be read in the target data subchain and the tag data subchain based on the data access request, and specifically, the data access request is analyzed so as to obtain corresponding request configuration content, wherein the request configuration content comprises user information, time information and tag information; determining the corresponding target data subchain and the corresponding tag data set subchain according to user information; determining the encrypted target data in the target data subchain according to the time information; and/or determining tag data in the tag data set subchain according to the tag information; acquiring block ID identifications commonly stored on blocks where the label data are located; and determining encrypted target data in the target data sub-chain based on the block ID identification. The time information may be time point information or time period information, and the tag information may be single tag data or multiple tag data, which is not limited in this embodiment, because not only encrypted target data but also tag data corresponding to the encrypted target data are stored in each block of the target data sub-chain, and the target data sub-chain is chained based on a time sequence, encrypted target data stored in a corresponding data block can be quickly read in the target data sub-chain based on the time information. Each block of the tag data set subchain stores not only tag data, but also a block ID identification of a block where encrypted target data corresponding to the tag data is located, and the tag data set subchain is chained based on single tag data, so that the tag block where the one or more tag data are located can be quickly determined in the tag data set subchain through tag information, and the corresponding one or more data blocks can be determined in the target data subchain through the block ID identification stored in the block, so that the encrypted target data stored in the one or more data blocks can be quickly read. Meanwhile, the operation of reading the encrypted target data can be simultaneously executed based on the time information and the tag information, so that the encrypted target data corresponding to one or more tag data (tag information) can be quickly read in a certain time period (time information), or the encrypted target data in a certain time period (time information) can be determined in one or more tag data (tag information), thereby further improving the retrieval efficiency and accuracy of the encrypted target data, and facilitating the execution of the subsequent step 203.
203. And receiving the encrypted target data fed back by the server so as to process the encrypted target data.
It should be noted that, based on the step 202, since the encrypted target data has been read in the target data sub-chain and the tag data sub-chain corresponding to the user according to the data access request, if the user wants to process the encrypted target data at the client, the read encrypted target data needs to be fed back from the server to the client, so that the user can decrypt and view the encrypted target data encrypted by using the public key based on the private key. That is, based on the interface corresponding to the oauth2.0 protocol in step 201, the data is shared to different enterprise mobile applications providing the same service, so that an information island between enterprises is broken, and further, the enterprises can better provide services for individuals, so as to achieve the purposes of improving user experience and improving user satisfaction.
Based on the implementation manner of fig. 2, it can be seen that in the method, the apparatus, and the system for processing user data based on a blockchain provided by the present invention, when processing user data, a data access request may be generated according to an operation event, and then the data access request is sent to a server, so that the server obtains encrypted target data in a target data sub-chain and a tag data sub-chain corresponding to the user in blockchain system data, where the encrypted target data is determined in the target data sub-chain and the tag data sub-chain corresponding to the user based on the data access request, and finally receives encrypted target data fed back by the server, so that the user processes the encrypted target data, that is, encrypted behavior data. By the user data processing method based on the block chain, provided by the invention, a user can quickly determine the corresponding target data sub-chain and the corresponding tag data sub-chain in the block chain system data, quickly locate the desired behavior data in the target data sub-chain and the tag data sub-chain, and then decrypt and view the received encrypted behavior data for use, so that the user data can be safely and reliably shared to mobile applications of different enterprises providing the same service, an information island between the enterprises is broken, and the enterprises can better provide services for individuals, so that the purposes of improving user experience and improving user satisfaction degree are achieved.
Further, as an implementation of the method shown in fig. 1, an embodiment of the present invention provides a user data processing apparatus based on a blockchain, which is applied to a server, and is configured to implement the method shown in fig. 1 to safely store user behavior data, and enable a user to control and share the behavior data safely, so that an enterprise provides a service better for the user. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not described again one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method. As shown in fig. 3, the apparatus includes:
an acquisition unit 31 for acquiring target data;
a determining unit 32, configured to determine a tag data set corresponding to the target data obtained by the obtaining unit 31;
an encryption unit 33 configured to encrypt the target data obtained by the obtaining unit 31 to obtain encrypted target data;
a storing unit 34, configured to store the encrypted target data obtained by the encrypting unit 33 and the tag data set obtained by the determining unit 32 into blockchain system data, so that after receiving a data access request sent by a client, the server feeds back the encrypted target data to the client, so that the client processes the encrypted target data.
Further, as shown in fig. 4, the determining unit 32 includes:
a first determining subunit 321, configured to determine a behavior object in the target data;
an analysis subunit 322, configured to perform feature analysis on the behavior object obtained by the first determining subunit 321 to obtain a first tag data subset;
an extraction subunit 323, configured to perform keyword extraction on the target data to obtain a second tag data subset;
a processing subunit 324, configured to perform a merging process on the first tag data subset obtained by the analysis subunit 322 and the second tag data subset obtained by the extraction subunit 323 to obtain the tag data set.
Further, as shown in fig. 4, the analyzing subunit 322 includes:
an extracting module 3221, configured to extract attribute features of the behavior object to form the first feature subset;
a first generating module 3222, configured to generate a feature query request based on the behavior object;
a processing module 3223, configured to send the feature query request obtained by the first generating sub-module 3222 to the blockchain system data, and form a second feature subset according to a feature query result fed back by the blockchain system data;
a second generating module 3224 is configured to generate the first tag data subset based on the first feature subset obtained by the extracting module 3221 and the second feature subset obtained by the processing module 3223.
Further, as shown in fig. 4, the storage unit 34 includes:
a first obtaining subunit 341, configured to obtain a public key of the encrypted target data;
a generating subunit 342, configured to generate a target data sub-chain and a tag data set sub-chain, where the target data sub-chain is formed by the encrypted target data, and the tag data set sub-chain is formed by the tag data in the tag data set, and the target data sub-chain corresponds to the public key obtained by the same first obtaining subunit 341;
a storing subunit 343, configured to store the target data subchain and the tag data set subchain obtained by the generating subunit 342 into the blockchain system data.
Further, as shown in fig. 4, the generating subunit 342 includes:
a third generating module 3421, configured to perform block division on the encrypted target data and the tag data, and generate the target data sub-chain;
a fourth generating module 3422, configured to perform block division on the tag data and the block ID of the block where the encrypted target data obtained by the third generating module 3421 is located, and generate the tag data set sub-chain;
an establishing module 3423, configured to establish an association relationship between the public key and the target data sub-chain obtained by the third generating module 3421 and the tag data set sub-chain obtained by the fourth generating module 3422, so as to obtain the target data sub-chain and the tag data set sub-chain corresponding to the same public key.
Further, as shown in fig. 4, the establishing module 3423 includes:
a conversion sub-module 34231, configured to convert the public key into two different ID identifications, where a correspondence exists between the ID identification and the public key;
a replacing submodule 34232, configured to replace the ID identifiers obtained by the two converting submodules 34231 with the tile ID identifier of the first tile in the target data sub-chain and the tag data set sub-chain, so as to determine the corresponding target data sub-chain and the tag data set sub-chain through the same public key.
Further, as shown in fig. 4, after obtaining the public key of the encrypted target data, the apparatus further includes:
a searching subunit 344, configured to search, in the blockchain system data, whether a history target data subchain and a history tag data set subchain corresponding to the public key obtained by the obtaining subunit exist;
an executing subunit 345, configured to, if the finding subunit 344 finds, in the blockchain system data, that there are no historical target data subchain and historical tag data set subchain corresponding to the public key, execute to generate a target data subchain and a tag data set subchain corresponding to the same public key;
an adding subunit 346, configured to, if the finding subunit 344 finds, in the blockchain system data, that there are a historical target data subchain and a historical tag data set subchain that correspond to the public key, correspondingly add the encrypted target data and tag data set to the historical target data subchain and the historical tag data set subchain.
Further, as an implementation of the method shown in fig. 2, an embodiment of the present invention further provides a user data processing apparatus based on a block chain, which is applied to a client, and is used for implementing the method shown in fig. 2 to safely store user behavior data, and enabling a user to control and share the behavior data by himself/herself, so that an enterprise better provides services for the user. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method. As shown in fig. 5, the apparatus includes:
a generating unit 41 for generating a data access request according to the operation event;
a sending unit 42, configured to send the data access request obtained by the generating unit 41 to a server, so that the server obtains encrypted target data in a corresponding target data sub-chain and a tag data sub-chain from blockchain system data, where the encrypted target data is determined in the corresponding target data sub-chain and the tag data sub-chain based on the data access request;
a receiving unit 43, configured to receive the encrypted target data obtained by the sending unit 42 fed back by the server, so as to process the encrypted target data.
Further, as shown in fig. 6, the sending unit 42 includes:
the parsing subunit 421 is configured to parse the data access request to obtain corresponding request configuration content, where the request configuration content includes user information, time information, and tag information;
a second determining subunit 422, configured to determine the corresponding target data subchain and the tag data set subchain according to the user information obtained by the analyzing subunit 431;
a first reading subunit 423, configured to read the encrypted target data from the target data sub-chain obtained by the second determining subunit 422 according to the time information obtained by the parsing subunit 431; and/or
A third determining subunit 424, configured to determine, according to the tag information obtained by the parsing subunit 421, the tag data in the tag data set sub-chain obtained by the second determining subunit 422;
a second obtaining subunit 425, configured to obtain a block ID identifier that is commonly stored in the block where the tag data obtained by the third determining subunit 424 is located;
a second reading sub-unit 426, configured to read the encrypted target data in the target data sub-chain based on the block ID identification obtained by the second obtaining sub-unit 425.
Further, an embodiment of the present invention further provides a user data processing system based on a block chain, as shown in fig. 7, the system includes a server 51 and a client 52, wherein,
the server 51 may be configured to execute any one of the above block chain-based user data processing methods applied to the server when performing user data processing.
The client 52 may be configured to execute any one of the above block chain-based user data processing methods applied to the client when performing user data processing.
The device for processing the user data based on the block chain applied to the server side comprises a processor and a memory, wherein the acquisition unit, the processing unit, the encryption unit, the storage unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The user data processing device based on the block chain applied to the client comprises a processor and a memory, wherein the generating unit, the sending unit, the receiving unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, the user behavior data is safely stored by adjusting kernel information, and the user can control the behavior data and share the behavior data safely, so that an enterprise can better provide services for the user.
The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), including at least one memory chip.
An embodiment of the present invention provides a storage medium, on which a program is stored, and the program, when executed by a processor, implements the block chain-based user data processing method.
The embodiment of the invention provides a processor, which is used for running a program, wherein the user data processing method based on a block chain is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: acquiring target data; determining a tag data set corresponding to the target data, wherein the target data at least corresponds to one tag data; encrypting the target data to obtain encrypted target data; and storing the encrypted target data and the tag data set into block chain system data, so that the server feeds back the encrypted target data to the client after receiving a data access request sent by the client, and the client processes the encrypted target data.
Further, determining a tag data set corresponding to the target data includes: determining a behavior object in the target data; performing feature analysis on the behavior object to obtain a first tag data subset; extracting keywords from the target data to obtain a second tag data subset; and merging the first tag data subset and the second tag data subset to obtain the tag data set.
Further, performing feature analysis on the behavior object to obtain a first data tag subset, including: extracting attribute features of the behavior objects to form a first feature subset; generating a characteristic query request based on the behavior object; sending the feature query request to the block chain system data, and forming a second feature subset according to a feature query result fed back by the block chain system data; generating the first subset of tag data based on the first subset of features and the second subset of features.
Further, storing the encrypted target data and the tag data set into blockchain system data includes: acquiring a public key of the encrypted target data; generating a target data subchain and a tag data set subchain which correspond to the same public key, wherein the target data subchain is formed by the encrypted target data, and the tag data set subchain is formed by the tag data in the tag data set; storing the target data subchain and the tag data set subchain into the blockchain system data.
Further, generating a target data subchain and a tag data set subchain corresponding to the same public key, where the target data subchain is formed by the encrypted target data, and the tag data set subchain is formed by the tag data in the tag data set, including: dividing the encrypted target data and the encrypted tag data into blocks, and generating the target data subchain; respectively carrying out block division on the block ID identifications of the blocks where the tag data and the encrypted target data are located, and generating the tag data set subchain; and establishing an association relation between the public key and the target data sub-chain and the label data set sub-chain so as to obtain the target data sub-chain and the label data set sub-chain corresponding to the same public key.
Further, establishing an association relationship between the public key and the target data subchain and the tag data set subchain includes: converting the public key into two different identity ID identifications, wherein a corresponding relation exists between the identity ID identification and the public key; and replacing the block ID identification of the first block in the target data sub-chain and the tag data set sub-chain with the two identity ID identifications respectively, so as to determine the corresponding target data sub-chain and the tag data set sub-chain through the same public key.
Further, after obtaining the public key of the encrypted target data, the method further includes: searching whether a historical target data subchain and a historical tag data set subchain corresponding to the public key exist in the blockchain system data; if the public key does not exist, generating a target data subchain and a tag data set subchain which correspond to the same public key; and if so, correspondingly adding the encrypted target data and the encrypted tag data set to the historical target data subchain and the historical tag data set subchain.
The embodiment of the present invention further provides another device, where the device includes a processor, a memory, and a program stored in the memory and capable of running on the processor, and the processor implements the following steps when executing the program: generating a data access request according to the operation event; sending the data access request to a server, so that the server can acquire encrypted target data in a corresponding target data sub-chain and a corresponding label data sub-chain from blockchain system data, wherein the encrypted target data is determined in the corresponding target data sub-chain and the corresponding label data sub-chain based on the data access request; and receiving the encrypted target data fed back by the server so that the user can process the encrypted target data.
Further, the encrypted target data is determined in the corresponding target data sub-chain and the tag data sub-chain based on the data access request, and includes: analyzing the data access request to obtain corresponding request configuration content, wherein the request configuration content comprises user information, time information and label information; determining the target data subchain and the tag data set subchain corresponding to the user according to the user information; determining the encrypted target data in the target data subchain according to the time information; and/or determining the tag data in the tag data set subchain according to the tag information; acquiring block ID identifications commonly stored on blocks where the label data are located; determining the encrypted target data in the target data sub-chain based on the block ID identification.
The device in the embodiment of the invention can be a server, a PC, a PAD, a mobile phone and the like.
An embodiment of the invention provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring target data; determining a tag data set corresponding to the target data, wherein the target data at least corresponds to one tag data; encrypting the target data to obtain encrypted target data; and storing the encrypted target data and the tag data set into block chain system data, so that the server feeds back the encrypted target data to the client after receiving a data access request sent by the client, and the client processes the encrypted target data.
Further, determining a tag data set corresponding to the target data includes: determining a behavior object in the target data; performing feature analysis on the behavior object to obtain a first tag data subset; extracting keywords from the target data to obtain a second tag data subset; and merging the first tag data subset and the second tag data subset to obtain the tag data set.
Further, performing feature analysis on the behavior object to obtain a first data tag subset, including: extracting attribute features of the behavior objects to form a first feature subset; generating a feature query request based on the behavioral object; sending the feature query request to the block chain system data, and forming a second feature subset according to a feature query result fed back by the block chain system data; generating the first subset of tag data based on the first subset of features and the second subset of features.
Further, storing the encrypted target data and the tag data set into blockchain system data includes: acquiring a public key of the encrypted target data; generating a target data subchain and a tag data set subchain corresponding to the same public key, wherein the target data subchain is composed of the encrypted target data, and the tag data set subchain is composed of the tag data in the tag data set; storing the target data subchain and the tag data set subchain into the blockchain system data.
Further, generating a target data subchain and a tag data set subchain corresponding to the same public key, where the target data subchain is formed by the encrypted target data, and the tag data set subchain is formed by the tag data in the tag data set, including: partitioning the encrypted target data and the tag data into blocks, and generating the target data subchain; respectively carrying out block division on the tag data and the block ID of the block where the encrypted target data is located, and generating the tag data set subchain; and establishing an association relation between the public key and the target data sub-chain and the label data set sub-chain so as to obtain the target data sub-chain and the label data set sub-chain corresponding to the same public key.
Further, establishing an association relationship between the public key and the target data sub-chain and the tag data set sub-chain includes: converting the public key into two different identity ID identifications, wherein a corresponding relation exists between the identity ID identifications and the public key; replacing the block ID identifications of the first block in the target data subchain and the tag data set subchain with the two identity ID identifications respectively so as to determine the corresponding target data subchain and the tag data set subchain through the same public key.
Further, after obtaining the public key of the encrypted target data, the method further includes: searching whether a historical target data subchain and a historical tag data set subchain corresponding to the public key exist in the blockchain system data; if the public key does not exist, generating a target data subchain and a tag data set subchain which correspond to the same public key; and if so, correspondingly adding the encrypted target data and the encrypted tag data set to the historical target data subchain and the historical tag data set subchain.
Embodiments of the present invention also provide another computer program product, which, when executed on a data processing apparatus, is adapted to perform a procedure for initializing: generating a data access request according to the operation event; sending the data access request to a server, so that the server can acquire encrypted target data in a corresponding target data sub-chain and a corresponding label data sub-chain from blockchain system data, wherein the encrypted target data is determined in the corresponding target data sub-chain and the corresponding label data sub-chain based on the data access request; and receiving the encrypted target data fed back by the server so that the user can process the encrypted target data.
Further, the encrypted target data is determined in the corresponding target data sub-chain and the tag data sub-chain based on the data access request, and includes: analyzing the data access request to obtain corresponding request configuration content, wherein the request configuration content comprises user information, time information and label information; determining the target data subchain and the tag data set subchain corresponding to the user according to the user information; determining the encrypted target data in the target data subchain according to the time information; and/or determining the tag data in the sub-chain of tag data sets according to the tag information; acquiring block ID identifications commonly stored in the blocks where the label data are located; determining the encrypted target data in the target data subchain based on the block ID identification.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims (10)

1. A user data processing method based on a block chain is characterized in that the method is applied to a server side and comprises the following steps:
acquiring target data;
determining a tag data set corresponding to the target data, wherein the target data at least corresponds to one tag data;
encrypting the target data to obtain encrypted target data;
storing the encrypted target data and the tag data set into block chain system data, so that the server side feeds back the encrypted target data to the client side after receiving a data access request sent by the client side, and the client side processes the encrypted target data;
storing the encrypted target data and the tag data set into blockchain system data, including:
acquiring a public key of the encrypted target data;
generating a target data subchain and a tag data set subchain which correspond to the same public key, wherein the target data subchain is formed by the encrypted target data, and the tag data set subchain is formed by the tag data in the tag data set;
storing the target data subchain and the tag data set subchain into the blockchain system data;
generating a target data subchain and a tag data set subchain corresponding to the same public key, the target data subchain being composed of the encrypted target data, the tag data set subchain being composed of the tag data in the tag data set, including:
dividing the encrypted target data and the encrypted tag data into blocks, and generating the target data subchain;
respectively carrying out block division on the tag data and the block ID of the block where the encrypted target data is located, and generating the tag data set subchain;
establishing an association relationship between the public key and the target data subchain and the tag data set subchain to obtain the target data subchain and the tag data set subchain which correspond to the same public key;
establishing an association relationship between the public key and the target data sub-chain and the tag data set sub-chain, including:
converting the public key into two different identity ID identifications, wherein a corresponding relation exists between the identity ID identifications and the public key;
and replacing the block ID identification of the first block in the target data sub-chain and the tag data set sub-chain with the two identity ID identifications respectively, so as to determine the corresponding target data sub-chain and the tag data set sub-chain through the same public key.
2. The method of claim 1, wherein determining the tag dataset to which the target data corresponds comprises:
determining a behavior object in the target data;
performing feature analysis on the behavior object to obtain a first tag data subset;
extracting keywords from the target data to obtain a second tag data subset;
and merging the first tag data subset and the second tag data subset to obtain the tag data set.
3. The method of claim 2, wherein performing a feature analysis on the behavioral object to obtain a first subset of data tags comprises:
extracting attribute features of the behavior objects to form a first feature subset;
generating a characteristic query request based on the behavior object;
sending the feature query request to the block chain system data, and forming a second feature subset according to a feature query result fed back by the block chain system data;
generating the first subset of tag data based on the first subset of features and the second subset of features.
4. The method of claim 1, wherein after obtaining the public key of the encrypted target data, the method further comprises:
searching whether a historical target data subchain and a historical tag data set subchain corresponding to the public key exist in the blockchain system data;
if the public key does not exist, generating a target data subchain and a tag data set subchain which correspond to the same public key;
and if so, correspondingly adding the encrypted target data and the encrypted tag data set to the historical target data subchain and the historical tag data set subchain.
5. A user data processing method based on a block chain is applied to a client and comprises the following steps:
generating a data access request according to the operation event;
sending the data access request to a server, so that the server can obtain encrypted target data in a corresponding target data sub-chain and a corresponding label data sub-chain from block chain system data, wherein the encrypted target data is determined in the corresponding target data sub-chain and the corresponding label data sub-chain based on the data access request;
receiving the encrypted target data fed back by the server so as to process the encrypted target data;
the encrypted target data is determined in the corresponding target data subchain and tag data subchain based on the data access request, and includes:
analyzing the data access request to obtain corresponding request configuration content, wherein the request configuration content comprises user information, time information and label information;
determining the corresponding target data subchain and the corresponding tag data set subchain according to the user information;
determining the encrypted target data in the target data subchain according to the time information; and/or
Determining the tag data in the tag data set subchain according to the tag information;
acquiring block ID identifications commonly stored in the blocks where the label data are located;
determining the encrypted target data in the target data sub-chain based on the block ID identification.
6. A device for processing user data based on a block chain, applied to a server, the device comprising:
an acquisition unit configured to acquire target data;
a determining unit, configured to determine a tag data set corresponding to target data obtained by the obtaining unit, where the target data corresponds to at least one tag data;
an encryption unit configured to encrypt the target data obtained by the obtaining unit to obtain encrypted target data;
the storage unit is used for storing the encrypted target data obtained by the encryption unit and the tag data set obtained by the determination unit into the blockchain system data, so that the server side feeds back the encrypted target data to the client side after receiving a data access request sent by the client side, and the client side processes the encrypted target data;
the memory cell includes:
a first obtaining subunit, configured to obtain a public key of the encrypted target data;
a generating subunit, configured to generate a target data subchain and a tag data set subchain, where the target data subchain and the tag data set subchain correspond to a public key obtained by the same first obtaining subunit, and the target data subchain is formed by the encrypted target data, and the tag data set subchain is formed by the tag data in the tag data set;
a storage subunit, configured to store the target data subchain and the tag data set subchain obtained by the generation subunit into the blockchain system data;
the generation subunit includes:
a third generating module, configured to perform block division on the encrypted target data and the tag data, and generate the target data sub-chain;
a fourth generating module, configured to perform block division on the tag data and the block ID of the block in which the encrypted target data obtained by the third generating module is located, and generate the tag data set sub-chain;
an establishing module, configured to establish an association relationship between the public key and a target data subchain obtained by the third generating module and a tag data set subchain obtained by the fourth generating module, so as to obtain the target data subchain and the tag data set subchain that correspond to the same public key;
the establishing module comprises:
the conversion submodule is used for converting the public key into two different identity ID identifications, and a corresponding relation exists between the identity ID identifications and the public key;
and the replacing submodule is used for replacing the ID identifications obtained by the two conversion submodules with the block ID identification of the first block in the target data subchain and the tag data set subchain respectively so as to determine the corresponding target data subchain and the tag data set subchain through the same public key.
7. A user data processing device based on a block chain is applied to a client and comprises:
the generating unit is used for generating a data access request according to the operation event;
a sending unit, configured to send the data access request obtained by the generating unit to a server, so that the server obtains encrypted target data in a corresponding target data sub-chain and a tag data sub-chain from blockchain system data, where the encrypted target data is determined in the corresponding target data sub-chain and tag data sub-chain based on the data access request;
a receiving unit, configured to receive the encrypted target data obtained by the sending unit and fed back by the server, so as to process the encrypted target data;
the transmitting unit includes:
the analysis subunit is used for analyzing the data access request to obtain corresponding request configuration content, wherein the request configuration content comprises user information, time information and label information;
the second determining subunit is configured to determine the corresponding target data subchain and the corresponding tag data set subchain according to the user information obtained by the analyzing subunit;
the first reading subunit reads the encrypted target data from the target data subchain obtained by the second determining subunit according to the time information obtained by the analyzing subunit; and/or
A third determining subunit, configured to determine, according to the tag information obtained by the parsing subunit, the tag data in the tag data set child chain obtained by the second determining subunit;
the second obtaining subunit is configured to obtain a block ID identifier that is commonly stored in a block where the tag data obtained by the third determining subunit is located;
a second reading subunit, configured to read the encrypted target data in the target data sub-chain based on the block ID identifier obtained by the second obtaining subunit.
8. A user data processing system based on a block chain is characterized by comprising a server side and a client side,
when the server performs user data processing, executing the user data processing method based on the block chain according to any one of claims 1 to 4;
when the client performs user data processing, the method for processing user data based on blockchains according to claim 5 is performed.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device on which the storage medium is located is controlled to execute the user data processing method based on the block chain according to any one of claims 1 to 4 or 5.
10. A processor, characterized in that the processor is configured to execute a program, wherein the program is configured to execute the method for processing user data based on blockchain according to any one of claims 1 to 4 or 5 when executing the program.
CN202210946768.2A 2022-08-09 2022-08-09 User data processing method, device and system based on block chain Active CN115017532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210946768.2A CN115017532B (en) 2022-08-09 2022-08-09 User data processing method, device and system based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210946768.2A CN115017532B (en) 2022-08-09 2022-08-09 User data processing method, device and system based on block chain

Publications (2)

Publication Number Publication Date
CN115017532A CN115017532A (en) 2022-09-06
CN115017532B true CN115017532B (en) 2023-01-17

Family

ID=83065554

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210946768.2A Active CN115017532B (en) 2022-08-09 2022-08-09 User data processing method, device and system based on block chain

Country Status (1)

Country Link
CN (1) CN115017532B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116561812A (en) * 2023-07-12 2023-08-08 联仁健康医疗大数据科技股份有限公司 Data processing method and device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106777340A (en) * 2017-01-13 2017-05-31 腾讯科技(深圳)有限公司 The determination method and relevant device of a kind of label
CN108959310A (en) * 2017-05-23 2018-12-07 易链科技(深圳)有限公司 Data processing method, device and computer readable storage medium based on block chain
KR102020000B1 (en) * 2018-10-31 2019-09-09 주식회사 스위클 Personal information providing system using one time private key based on block chain of proof of use and method thereof
CN111586008A (en) * 2020-04-29 2020-08-25 中国联合网络通信集团有限公司 Block chain message management method, node equipment and block chain node system

Also Published As

Publication number Publication date
CN115017532A (en) 2022-09-06

Similar Documents

Publication Publication Date Title
Zhang et al. PIC: Enable large-scale privacy preserving content-based image search on cloud
Zhang et al. Cold-start recommendation using bi-clustering and fusion for large-scale social recommender systems
WO2013078307A1 (en) Image searching
CN112148702B (en) File retrieval method and device
CN113449048B (en) Data label distribution determining method and device, computer equipment and storage medium
CN111191255B (en) Information encryption processing method, server, terminal, device and storage medium
CN111753324B (en) Private data processing method, private data computing method and applicable equipment
Al Sibahee et al. Efficient encrypted image retrieval in IoT-cloud with multi-user authentication
Qin et al. Privacy-preserving outsourcing of image global feature detection
CN115017532B (en) User data processing method, device and system based on block chain
Guo et al. Enabling secure cross-modal retrieval over encrypted heterogeneous IoT databases with collective matrix factorization
Mirbakhsh et al. Leveraging clustering to improve collaborative filtering
CN106708829B (en) Data recommendation method and recommendation system
JP2015018559A (en) Method for enriching multimedia content, and corresponding device
CN111899741A (en) Audio keyword encryption method and device, storage medium and electronic device
Tiwari et al. Implicit preferences discovery for biography recommender system using twitter
US9529840B1 (en) Real-time duplicate detection of videos in a massive video sharing system
CN1980134A (en) Apparatus and method for providing multimedia contents
Soni et al. Data security in recommendation system using homomorphic encryption
Yu et al. Streaming algorithms for news and scientific literature recommendation: Submodular maximization with a d-knapsack constraint
CN113515778A (en) Multi-party privacy data fusion method and device and electronic equipment
Magdy et al. Privacy preserving search index for image databases based on SURF and order preserving encryption
Wang et al. Recommender systems and their security concerns
Xi et al. On-device integrated re-ranking with heterogeneous behavior modeling
Elmisery et al. Privacy aware group based recommender system in multimedia services

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
GR01 Patent grant
GR01 Patent grant