Blockchain-based data acquisition method, device, equipment, and medium
By determining the importance of data and encrypting it in the blockchain network, the problem of low efficiency in obtaining response data due to the large amount of resources occupied by data interaction between nodes is solved, and fast and secure data transmission and acquisition is achieved.
Patent Information
- Application Number
- CN202411742402.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2044-11-29
AI Technical Summary
In a blockchain network, data interaction and data response between nodes occupy a large amount of resources, resulting in inefficient response data acquisition.
By determining whether the second node authorizes the first node to obtain data, generating and transmitting encrypted information on the importance of the data, using symmetric encryption information to prepare computing resources, generating and transmitting an encrypted data set, and finally transmitting encrypted response data to ensure secure and efficient acquisition.
It realizes the fast and secure transmission of encrypted response data in the blockchain network, improves data acquisition efficiency, and ensures data privacy and security.
Smart Images

Figure CN119675927B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a blockchain-based data acquisition method, apparatus, device, and computer-readable medium. Background Art
[0002] Currently, blockchain is increasingly being used in our daily lives. Blockchain technology offers advantages such as decentralization, transparency, and high security. Data access within blockchains is typically achieved through direct asymmetric encryption algorithms, enabling data to be accessed between nodes within the blockchain.
[0003] However, the inventors have discovered that when using the above method to obtain data, the following technical problems often occur:
[0004] The data interaction and data response between two nodes occupy a large amount of blockchain resources, waste a long time, and result in low efficiency in obtaining response data.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the Invention
[0006] The content of this disclosure is used to briefly introduce concepts that will be described in detail in the detailed description section below. The content of this disclosure is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0007] Some embodiments of the present disclosure propose blockchain-based data acquisition methods, devices, equipment, and media to solve one or more of the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide a blockchain-based data acquisition method, comprising: in response to receiving data acquisition information sent by a first node in a target blockchain, determining whether a second node authorizes the first node to acquire data corresponding to the data acquisition information, wherein the second node is an acquisition object corresponding to the data acquisition information; in response to determining that the second node authorizes the first node to acquire data corresponding to the data acquisition information, sending encrypted data importance information generated by the second node for the data acquisition information to the first node, so that the first node can decrypt the encrypted data importance information to obtain data importance information in response to receiving the data acquisition information representing the first node. The node confirms the confirmation information that the above-mentioned data importance information is correct, and sends the symmetric encryption information generated by the above-mentioned first node for the above-mentioned confirmation information to the above-mentioned second node, so that the above-mentioned second node can obtain computing resources for the above-mentioned data acquisition information; obtains the encrypted data set for the above-mentioned target data set sent by the above-mentioned first node, wherein the above-mentioned encrypted data set is generated based on the above-mentioned data importance information; sends the above-mentioned encrypted data set to the above-mentioned second node, so that the above-mentioned second node can generate response data for the above-mentioned encrypted data set according to the obtained computing resources; sends the encrypted response data corresponding to the above-mentioned response data sent by the above-mentioned second node to the above-mentioned first node, so that the above-mentioned first node can obtain the above-mentioned response data.
[0009] In a second aspect, some embodiments of the present disclosure provide a data acquisition device based on blockchain, comprising: a determination unit, configured to determine, in response to receiving data acquisition information sent by a first node in a target blockchain, whether the second node authorizes the first node to acquire the data corresponding to the data acquisition information, wherein the second node is the acquisition object corresponding to the data acquisition information; a first sending unit, configured to, in response to determining that the second node authorizes the first node to acquire the data corresponding to the data acquisition information, send the data importance encrypted information generated by the second node for the data acquisition information to the first node, so that the first node can decrypt the data importance encrypted information to obtain the data importance information; a second sending unit, configured to, in response to receiving a signal representing the first node, The node confirms the confirmation information that the above-mentioned data importance information is correct, and sends the symmetric encryption information generated by the above-mentioned first node for the above-mentioned confirmation information to the above-mentioned second node, so that the above-mentioned second node can obtain computing resources for the above-mentioned data acquisition information; the acquisition unit is configured to obtain the encrypted data set for the above-mentioned target data set sent by the above-mentioned first node, wherein the above-mentioned encrypted data set is generated based on the above-mentioned data importance information; the third sending unit is configured to send the above-mentioned encrypted data set to the above-mentioned second node, so that the above-mentioned second node can generate response data for the above-mentioned encrypted data set according to the acquired computing resources; the fourth sending unit is configured to send the encrypted response data corresponding to the above-mentioned response data sent by the above-mentioned second node to the above-mentioned first node, so that the above-mentioned first node can obtain the above-mentioned response data.
[0010] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0011] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
[0012] In a fifth aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which implements the method described in any implementation manner in the first aspect when executed by a processor.
[0013] The aforementioned embodiments of the present disclosure have the following beneficial effects: Through the blockchain-based data acquisition methods of some embodiments of the present disclosure, encrypted response data can be quickly and efficiently sent to a first node, allowing the first node to securely and efficiently obtain the response data. Specifically, the low efficiency of response data acquisition is caused by the large amount of blockchain resources occupied by data interaction and data response between the two nodes, which wastes a considerable amount of time and results in low response data acquisition efficiency. Based on this, the blockchain-based data acquisition methods of some embodiments of the present disclosure first determine, in response to receiving data acquisition information sent by a first node in a target blockchain, whether a second node authorizes the first node to obtain data corresponding to the data acquisition information. The second node is the acquisition target corresponding to the data acquisition information. Here, by determining whether the second node authorizes the first node to obtain the corresponding data, the data privacy of the second node can be effectively protected. Next, in response to determining that the second node authorizes the first node to obtain the data corresponding to the data acquisition information, encrypted data importance information generated by the second node for the data acquisition information is sent to the first node, so that the first node can decrypt the encrypted data importance information to obtain the data importance information. Here, by sending the encrypted data importance information to the first node, not only is the secure transmission of the data importance information to the first node effectively guaranteed, but it also allows the first node to confirm whether the importance of the dataset corresponding to the data acquisition information is consistent with that determined by the second node. The obtained data importance not only reflects the importance of the target dataset but also determines the encryption method for the target dataset. Using different encryption methods for different data importances can effectively ensure the security of the target dataset in different situations. Next, in response to receiving confirmation information indicating that the first node has confirmed the data importance information is correct, the symmetric encryption information generated by the first node for the confirmation information is sent to the second node, allowing the second node to obtain computing resources for the data acquisition information. By using the symmetric encryption information corresponding to the confirmation information, the encrypted transmission of the confirmation information can be quickly and efficiently achieved. By sending the symmetric encryption information to the second node, the second node can effectively prepare the corresponding computing resources to generate response data for the target dataset. Furthermore, the encrypted dataset for the target dataset sent by the first node is obtained, facilitating the secure transmission of the target dataset. The encrypted dataset is generated based on the data importance information. Furthermore, the encrypted data set is sent to the second node, so that the second node can quickly and efficiently generate response data for the encrypted data set based on the acquired computing resources.Finally, the encrypted response data corresponding to the response data sent by the second node is sent to the first node, so that the first node can securely and efficiently obtain the response data. In summary, through the encrypted transmission of data between the first node and the second node, as well as the determination of data importance information and the pre-preparation of computing resources, the encrypted response data can be sent to the first node quickly and efficiently, allowing the first node to securely and efficiently obtain the response data. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0015] Figure 1 is a flowchart of some embodiments of the blockchain-based data acquisition method according to the present disclosure;
[0016] Figure 2 1 is a schematic diagram of the structure of some embodiments of the blockchain-based data acquisition device according to the present disclosure;
[0017] Figure 3 It is a structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0019] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.
[0020] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0021] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0022] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0023] With regard to the collection, storage, and use of user personal information (such as data acquisition information) involved in this disclosure, before performing the corresponding operations, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, fulfilling the obligation to inform the personal information subjects, and obtaining the authorization and consent of the personal information subjects in advance.
[0024] Continue to refer Figure 1 , shows a process 100 of some embodiments of the blockchain-based data acquisition method according to the present disclosure. The blockchain-based data acquisition method includes the following steps:
[0025] Step 101: In response to receiving data acquisition information sent by a first node in a target blockchain, determine whether a second node authorizes the first node to obtain data corresponding to the data acquisition information.
[0026] In some embodiments, in response to receiving data acquisition information sent by a first node in a target blockchain, an executing entity (e.g., an electronic device) of the blockchain-based data acquisition method may determine whether a second node has authorized the first node to acquire the data corresponding to the data acquisition information. The second node is the acquisition target corresponding to the data acquisition information. The target blockchain may be a pre-deployed blockchain comprising a first node and a second node. The first node may be a node that acquires response data corresponding to a target dataset. For example, the first node may be a server or a client. The data acquisition information may be information indicating the acquisition of response data corresponding to the target dataset. In practice, the data acquisition information may be a request for acquiring response data. The second node may be a node that generates response data for the target dataset. For example, the second node may be a server that has deployed neural network models corresponding to various generation tasks. For example, the various generation tasks may include image recognition tasks, object detection tasks, and machine translation tasks. The corresponding neural network models may include image recognition neural network models, object detection neural network models, and machine translation neural network models. The data corresponding to the data acquisition information may be the response data corresponding to the target dataset.
[0027] Step 102, in response to determining that the second node authorizes the first node to obtain the data corresponding to the data acquisition information, the data importance encryption information generated by the second node for the data acquisition information is sent to the first node, so that the first node can decrypt the data importance encryption information to obtain the data importance information.
[0028] In some embodiments, in response to determining that the second node authorizes the first node to obtain the data corresponding to the data acquisition information, the execution entity may send the data importance encrypted information generated by the second node for the data acquisition information to the first node, so that the first node can decrypt the data importance encrypted information to obtain the data importance information. The data importance encrypted information may be information obtained by encrypting the data importance information. The data importance information may represent the importance of the target data set, and may also represent the task importance of the target data set corresponding to the execution task. For example, the data importance information may be one of the following: the data set is important, the data set is not important.
[0029] In some optional implementations of some embodiments, the encrypted information of the importance of the data is generated by the following steps:
[0030] The first step is to parse the data acquisition information to generate data domain information, data confidentiality level information, and data acquisition requirement information. The data domain information may be information about the domain of the target dataset corresponding to the data acquisition information. For example, the data domain information may be the logistics domain. The data confidentiality level information may be the confidentiality level of the target dataset. For example, the data confidentiality level information may be level 1 confidentiality. The data acquisition requirement information may be information about the requirements for obtaining the response data corresponding to the target dataset. For example, the data acquisition requirement information may require the corresponding response data to be output within 30 seconds. The data acquisition requirement information may also require the response data to have an accuracy greater than 90%.
[0031] As an example, the execution entity may parse the data acquisition information using a preset regular expression formula to generate data domain information, data confidentiality level information, and data acquisition requirement information.
[0032] The second step is to generate data importance information corresponding to the data acquisition information based on the data domain information, the data confidentiality level information and the data acquisition requirement information.
[0033] As an example, the execution entity may query the data importance information corresponding to the data domain information, the data confidentiality information, and the data acquisition requirement information through an association relationship table.
[0034] The third step is to encrypt the data importance information using a symmetric encryption algorithm to generate the encrypted data importance information. The symmetric encryption algorithm can be one of the following: DES algorithm, 3DES algorithm, TDEA algorithm, Blowfish algorithm, RC5 algorithm, IDEA algorithm.
[0035] In some optional implementations of some embodiments, the first node decrypts the encrypted information of the data importance by the following steps:
[0036] The data importance encrypted information is decrypted according to a symmetric encryption algorithm to generate data importance information.
[0037] Step 103, in response to receiving confirmation information indicating that the first node confirms that the data importance information is correct, the symmetric encryption information generated by the first node for the confirmation information is sent to the second node, so that the second node can obtain computing resources for the data acquisition information.
[0038] In some embodiments, in response to receiving confirmation information indicating that the first node confirms that the data importance information is correct, the execution entity may send the symmetric encryption information generated by the first node for the confirmation information to the second node, so that the second node can obtain computing resources for the data acquisition information. The confirmation information may indicate that the first node confirms whether the data importance information is incorrect. The symmetric encryption information for the confirmation information may be information after the confirmation information is symmetrically encrypted. The computing resources may be the computing resources required to generate response data based on the target data set. For example, the computing resources may be CPU resources, GPU resources, etc.
[0039] Step 104: Obtain the encrypted data set for the target data set sent by the first node.
[0040] In some embodiments, the execution entity may obtain an encrypted dataset for the target dataset sent by the first node, wherein the encrypted dataset is generated based on the data importance information, and the encrypted dataset may be an encrypted dataset of the target dataset.
[0041] In some optional implementations of some embodiments, the encrypted data set is generated by the following steps:
[0042] The first step is to determine the encryption method corresponding to the target data set based on the above data importance information.
[0043] As an example, the execution entity may determine the encryption method corresponding to the data importance information based on a table representing the association between the data importance and the encryption method.
[0044] In the second step, in response to determining that the encryption method is the first encryption method based on the encoding and decoding model, for each target data item in the target dataset, the target data item is input into the encoding model of the first encryption method to generate encoded data. The encoding model includes a predetermined number of encoding layers connected in series, and the encoded data is the output of a random number of encoding layers. For example, the encoding model includes 10 downsampling convolutional layers connected in series. That is, the predetermined number may be 10. The random number is less than or equal to the predetermined number.
[0045] For example, the target data is the first target data, and the encoded data corresponding to the first target data may be the convolution result of the 5th downsampling convolution layer.
[0046] The third step is to determine the random number set corresponding to the obtained encoded data set.
[0047] The fourth step is to determine the model identifier corresponding to the above encoding model as the target model identifier. The target model identifier can represent the identity information of the encoding model. For example, the target model identifier can be "89761".
[0048] The fifth step is to vectorize the target model identifier to generate a model identifier vector.
[0049] The sixth step is to determine the model input order corresponding to each target data in the above target data set.
[0050] In the seventh step, the individual encoded data in the above encoded data set are spliced according to the above model input order to generate a spliced data set.
[0051] Step 8: Determine the stitching method corresponding to the above stitching data set.
[0052] In the ninth step, the above splicing method is vectorized to generate a splicing vector.
[0053] In step 10, the target model vector, the concatenated vector, and the random number set are added to a predetermined position in the concatenated dataset to generate an encrypted dataset, wherein the predetermined position may be a pre-set position.
[0054] In some optional implementations of some embodiments, inputting the target data into the encoding model in the first encryption method to generate encoded data includes the following steps:
[0055] The first step is to obtain the data input time and data input size corresponding to the target data. The data input time can be the input time of the target data into the encoding model. The data input size can be the data byte size of the target data into the encoding model.
[0056] In the second step, the target data, data input time and data input size are randomly spliced to obtain the first spliced data.
[0057] In the third step, the first concatenated data is input into a first coding layer included in a coding model to generate first coded data. The first coding layer may be a convolutional layer with multiple layers connected in series.
[0058] In the fourth step, the first coded data is input to a second coding layer included in the coding model to generate second coded data. The second coding layer may be a convolutional layer with multiple layers connected in series.
[0059] In the fifth step, the second encoded data is input to a third encoding layer included in the encoding model to generate third encoded data. The third encoding layer may be a convolutional layer with multiple layers connected in series.
[0060] In the sixth step, the target data, data input time and data input size are randomly spliced again to obtain the second spliced data.
[0061] In the seventh step, the second spliced data is input into the first coding layer included in the coding model to generate fourth coded data.
[0062] In the eighth step, the fourth encoded data is input into the second encoding layer included in the encoding model to generate fifth encoded data.
[0063] In the ninth step, the fifth encoded data is input into the third encoding layer included in the encoding model to generate sixth encoded data.
[0064] Step 10: Get two random numbers. The value of each random number is in the range [1,3].
[0065] In the eleventh step, the output coding information of the coding layer corresponding to the value of the first digit of the two-digit random number is used as the first initial coding information.
[0066] In the twelfth step, the output coding information of the coding layer corresponding to the value of the second digit of the two-digit random number is used as the second initial coding information.
[0067] In the thirteenth step, the first initial coding information and the second initial coding information are fused to generate fused coding information as coding data.
[0068] Alternatively, as one of the inventive points, this solves the problem of "the relatively fixed encoding data generated by the encoding network, which may lead to data leakage during the encoding process." Based on this, the present disclosure randomly generates encoding results by setting multiple encoding layers in the encoding network and setting random numbers to obtain the output of the corresponding encoding layer, thus avoiding the problem of data leakage caused by the estimated encoding results.
[0069] In some optional implementations of some embodiments, after the "tenth step", the steps further include:
[0070] In response to determining that the encryption method is the second encryption method based on the asymmetric encryption algorithm, the target data set is encrypted according to the public key preset by the second node to generate an encrypted data set.
[0071] Step 105 : Send the encrypted data set to the second node, so that the second node can generate response data for the encrypted data set based on the acquired computing resources.
[0072] In some embodiments, the execution entity may send the encrypted data set to the second node, so that the second node can generate response data for the encrypted data set based on the acquired computing resources.
[0073] In some optional implementations of some embodiments, the encrypted dataset corresponds to a target generation task. For example, the encrypted dataset corresponds to an image dataset, and the target generation task may be an image recognition task.
[0074] Optionally, the execution subject may send the encrypted data set to the second node, so that the second node can generate response data for the encrypted data set according to the neural network model corresponding to the target generation task in the computing resources.
[0075] In some optional implementations of some embodiments, the second node generates response data through the following steps:
[0076] In the first step, the target model vector and the splicing vector at the predetermined position are extracted from the above encrypted data set.
[0077] In the second step, the target model vector and the splicing vector are decoded to generate a target model identifier, a splicing method and a random number set.
[0078] The third step is to determine the decoding model corresponding to the target model identifier. The decoding model can be a multi-layer series of upsampling convolution layers.
[0079] The fourth step is to generate an encoded data set for the encrypted data set based on the target model identifier and the splicing method.
[0080] Step 5: For each encoded data in the above encoded data set, perform the following generation steps:
[0081] Sub-step 1: Determine the random number corresponding to the encoded data. For example, the random number is 5.
[0082] Sub-step 2: determining at least one decoding layer in the decoding model corresponding to the random number. Each random number corresponds to at least one serially connected decoding layer.
[0083] Sub-step 3: input the above-mentioned encoded data into the above-mentioned at least one decoding layer to output target data.
[0084] The sixth step is to generate a neural network model corresponding to the task according to the above objectives, and generate response data for the obtained target data set.
[0085] As an example, the execution entity may input a target data set into a neural network model to generate response data.
[0086] In some optional implementations of some embodiments, after the sixth step, the steps further include:
[0087] In the first step, each data in the above encrypted data set is decrypted according to the pre-set private key to generate the target data set.
[0088] The second step is to generate a neural network model corresponding to the task based on the above objectives and generate response data for the above target data set.
[0089] As an example, the execution entity may input a target data set into a neural network model to generate response data.
[0090] Step 106: Send the encrypted response data corresponding to the response data sent by the second node to the first node, so that the first node can obtain the response data.
[0091] In some embodiments, the execution entity may send encrypted response data corresponding to the response data sent by the second node to the first node, so that the first node can obtain the response data. The encrypted response data may be data obtained by encrypting the response data. For example, the encrypted response data may be response data encrypted and decrypted using a public key corresponding to the first node and a private key corresponding to the first node.
[0092] The aforementioned embodiments of the present disclosure have the following beneficial effects: Through the blockchain-based data acquisition methods of some embodiments of the present disclosure, encrypted response data can be quickly and efficiently sent to a first node, allowing the first node to securely and efficiently obtain the response data. Specifically, the low efficiency of response data acquisition is caused by the large amount of blockchain resources occupied by data interaction and data response between the two nodes, which wastes a considerable amount of time and results in low response data acquisition efficiency. Based on this, the blockchain-based data acquisition methods of some embodiments of the present disclosure first determine, in response to receiving data acquisition information sent by a first node in a target blockchain, whether a second node authorizes the first node to obtain data corresponding to the data acquisition information. The second node is the acquisition target corresponding to the data acquisition information. Here, by determining whether the second node authorizes the first node to obtain the corresponding data, the data privacy of the second node can be effectively protected. Next, in response to determining that the second node authorizes the first node to obtain the data corresponding to the data acquisition information, encrypted data importance information generated by the second node for the data acquisition information is sent to the first node, so that the first node can decrypt the encrypted data importance information to obtain the data importance information. Here, by sending the encrypted data importance information to the first node, not only is the secure transmission of the data importance information to the first node effectively guaranteed, but it also allows the first node to confirm whether the importance of the dataset corresponding to the data acquisition information is consistent with that determined by the second node. The obtained data importance not only reflects the importance of the target dataset but also determines the encryption method for the target dataset. Using different encryption methods for different data importances can effectively ensure the security of the target dataset in different situations. Next, in response to receiving confirmation information indicating that the first node has confirmed the data importance information is correct, the symmetric encryption information generated by the first node for the confirmation information is sent to the second node, allowing the second node to obtain computing resources for the data acquisition information. By using the symmetric encryption information corresponding to the confirmation information, the encrypted transmission of the confirmation information can be quickly and efficiently achieved. By sending the symmetric encryption information to the second node, the second node can effectively prepare the corresponding computing resources to generate response data for the target dataset. Furthermore, the encrypted dataset for the target dataset sent by the first node is obtained, facilitating the secure transmission of the target dataset. The encrypted dataset is generated based on the data importance information. Furthermore, the encrypted data set is sent to the second node, so that the second node can quickly and efficiently generate response data for the encrypted data set based on the acquired computing resources.Finally, the encrypted response data corresponding to the response data sent by the second node is sent to the first node, so that the first node can securely and efficiently obtain the response data. In summary, through the encrypted transmission of data between the first node and the second node, as well as the determination of data importance information and the pre-preparation of computing resources, the encrypted response data can be sent to the first node quickly and efficiently, allowing the first node to securely and efficiently obtain the response data.
[0093] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a data acquisition device based on blockchain. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the blockchain-based data acquisition device can be specifically applied to various electronic devices.
[0094] like Figure 2 As shown, a data acquisition device 200 based on blockchain includes: a determining unit 201, a first sending unit 202, a second sending unit 203, an acquisition unit 204, a third sending unit 205 and a fourth sending unit 206. The determining unit 201 is configured to, in response to receiving data acquisition information sent by the first node in the target blockchain, determine whether the second node authorizes the first node to obtain the data corresponding to the data acquisition information, wherein the second node is the acquisition object corresponding to the data acquisition information; the first sending unit 202 is configured to, in response to determining that the second node authorizes the first node to obtain the data corresponding to the data acquisition information, send the data importance level encrypted information generated by the second node for the data acquisition information to the first node, so that the first node can decrypt the data importance level encrypted information to obtain the data importance level information; the second sending unit 203 is configured to, in response to receiving a signal indicating that the first node confirms that the data importance level information is correct. confirmation information, and sends the symmetric encryption information generated by the first node for the confirmation information to the second node, so that the second node can obtain computing resources for the data acquisition information; an acquisition unit 204 is configured to obtain the encrypted data set for the target data set sent by the first node, wherein the encrypted data set is generated based on the data importance information; a third sending unit 205 is configured to send the encrypted data set to the second node, so that the second node can generate response data for the encrypted data set according to the acquired computing resources; a fourth sending unit 206 is configured to send the encrypted response data corresponding to the response data sent by the second node to the first node, so that the first node can obtain the response data.
[0095] It is understandable that the units recorded in the blockchain-based data acquisition device 200 and the reference Figure 1 Therefore, the operations, features, and beneficial effects described above for the method are also applicable to the blockchain-based data acquisition device 200 and the units contained therein, and will not be repeated here.
[0096] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device (eg, an electronic device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0097] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory 302 or a program loaded from a storage device 308 into a random access memory 303. Various programs and data required for the operation of the electronic device 300 are also stored in the random access memory 303. The processing device 301, the read-only memory 302, and the random access memory 303 are connected to each other via a bus 304. An input / output interface 305 is also connected to the bus 304.
[0098] Typically, the following devices may be connected to the input / output interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as needed.
[0099] In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network via the communication device 309, or installed from the storage device 308, or installed from the read-only memory 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are performed.
[0100] It should be noted that in some embodiments of the present disclosure, the computer-readable medium mentioned above may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0101] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0102] The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist independently without being assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: in response to receiving the data acquisition information sent by the first node in the target blockchain, determines whether the second node authorizes the above-mentioned first node to obtain the data corresponding to the above-mentioned data acquisition information, wherein the above-mentioned second node is the acquisition object corresponding to the above-mentioned data acquisition information; in response to determining that the above-mentioned second node authorizes the above-mentioned first node to obtain the data corresponding to the above-mentioned data acquisition information, sends the data importance encryption information generated by the above-mentioned second node for the above-mentioned data acquisition information to the above-mentioned first node, so that the above-mentioned first node can decrypt the above-mentioned data importance encryption information and obtain the data importance information in response to receiving the data acquisition information. The method further comprises: receiving confirmation information indicating that the first node has confirmed that the data importance information is correct, sending the symmetric encrypted information generated by the first node for the confirmation information to the second node, so that the second node can obtain computing resources for the data acquisition information; obtaining the encrypted data set for the target data set sent by the first node, wherein the encrypted data set is generated based on the data importance information; sending the encrypted data set to the second node, so that the second node can generate response data for the encrypted data set according to the obtained computing resources; and sending the encrypted response data corresponding to the response data sent by the second node to the first node, so that the first node can obtain the response data.
[0103] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0104] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0105] The units described in some embodiments of the present disclosure may be implemented in software or in hardware. The units described may also be provided in a processor. For example, they may be described as follows: a processor includes a determination unit, a first sending unit, a second sending unit, an acquisition unit, a third sending unit, and a fourth sending unit. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the acquisition unit may also be described as a "unit for acquiring the encrypted data set for the target data set sent by the first node."
[0106] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0107] Some embodiments of the present disclosure also provide a computer program product, including a computer program, which implements any of the above-mentioned blockchain-based data acquisition methods when executed by a processor.
[0108] The above description is only an illustration of some preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.
Claims
1. A data acquisition method based on blockchain, comprising: In response to receiving data acquisition information sent by a first node in a target blockchain, determining whether a second node authorizes the first node to acquire data corresponding to the data acquisition information, wherein the second node is the acquisition object corresponding to the data acquisition information, the first node is a node that acquires response data corresponding to the target dataset, the second node is a node that generates response data for the target dataset, and the data acquisition information is information indicating the acquisition of the response data corresponding to the target dataset; In response to determining that the second node authorizes the first node to obtain the data corresponding to the data acquisition information, sending the data importance level encrypted information generated by the second node for the data acquisition information to the first node, so that the first node decrypts the data importance level encrypted information to obtain the data importance level information; In response to receiving confirmation information indicating that the first node confirms that the data importance information is correct, sending the symmetrically encrypted information generated by the first node for the confirmation information to the second node, so that the second node can obtain computing resources for the data acquisition information; Obtaining an encrypted data set for the target data set sent by the first node, wherein the encrypted data set is generated based on the data importance information and is generated by the following steps: determining an encryption method corresponding to the target data set based on the data importance information; in response to determining that the encryption method is a first encryption method based on an encoding and decoding model, inputting, for each target data in the target data set, the target data into an encoding model in the first encryption method to generate encoded data, wherein the encoding model includes a predetermined number of encoding layers connected in series, and the encoded data is an output result of a random number of encoding layers; Determine the random number set corresponding to the obtained encoded data set; determine the model identifier corresponding to the encoding model as the target model identifier; vectorize the target model identifier to generate a model identifier vector; determine the model input order corresponding to each target data in the target data set; splice each encoded data in the encoded data set according to the model input order to generate a spliced data set; determine the splicing method corresponding to the spliced data set; vectorize the splicing method to generate a splicing vector; add the model identifier vector, the splicing vector and the random number set to a predetermined position in the spliced data set to generate an encrypted data set; Sending the encrypted data set to the second node, so that the second node generates response data for the encrypted data set according to the neural network model corresponding to the target generation task in the computing resource, wherein the encrypted data set corresponds to the target generation task; The encrypted response data corresponding to the response data sent by the second node is sent to the first node, so that the first node obtains the response data.
2. The method according to claim 1, wherein The data importance encrypted information is generated by the following steps: Performing information analysis on the data acquisition information to generate data domain information, data confidentiality level information, and data acquisition requirement information; Generate data importance information corresponding to the data acquisition information according to the data domain information, the data confidentiality level information and the data acquisition requirement information; The data importance information is encrypted using a symmetric encryption algorithm to generate the data importance encrypted information.
3. The method according to claim 1, wherein The second node generates response data through the following steps: Extracting a target model vector and a splicing vector at a predetermined position from the encrypted data set; Decoding the target model vector and the splicing vector to generate a target model identifier, a splicing method, and a random number set; Determine a decoding model corresponding to the target model identifier; generating an encoded data set for the encrypted data set according to the target model identifier and the splicing method; For each encoded data in the encoded data set, the following generation steps are performed: Determining a random number corresponding to the encoded data; determining at least one decoding layer in the decoding model corresponding to the random number; inputting the encoded data to the at least one decoding layer to output target data; Generate response data for the obtained target data set based on the neural network model corresponding to the target generation task.
4. The method according to claim 2, wherein: The method further comprises: In response to determining that the encryption mode is the second encryption mode based on an asymmetric encryption algorithm, the target data set is encrypted according to the public key preset by the second node to generate an encrypted data set.
5. The method according to claim 4, wherein The second node generates response data through the following steps: Decrypting each data in the encrypted data set according to a preset private key to generate a target data set; Generate response data for the target data set based on the neural network model corresponding to the target generation task.
6. A data acquisition device based on blockchain, comprising: a determining unit configured to, in response to receiving data acquisition information sent by a first node in a target blockchain, determine whether a second node authorizes the first node to acquire data corresponding to the data acquisition information, wherein the second node is an acquisition object corresponding to the data acquisition information, the first node is a node that acquires response data corresponding to the target dataset, the second node is a node that generates response data for the target dataset, and the data acquisition information is information indicating acquisition of the response data corresponding to the target dataset; a first sending unit configured to, in response to determining that the second node authorizes the first node to obtain the data corresponding to the data acquisition information, send encrypted data importance information generated by the second node for the data acquisition information to the first node, so that the first node decrypts the encrypted data importance information to obtain the data importance information; a second sending unit configured to, in response to receiving confirmation information indicating that the first node confirms that the data importance information is correct, send the symmetrically encrypted information generated by the first node for the confirmation information to the second node, so that the second node can obtain computing resources for the data acquisition information; An acquisition unit is configured to acquire an encrypted data set for the target data set sent by the first node, wherein the encrypted data set is generated based on the data importance information, and the encrypted data set is generated by the following steps: determining an encryption method corresponding to the target data set according to the data importance information; in response to determining that the encryption method is a first encryption method based on an encoding and decoding model, for each target data in the target data set, inputting the target data into a coding model in the first encryption method to generate coded data, wherein the coding model includes a predetermined number of coding layers connected in series, and the coded data is a random number of coding layers. Output the result; determine the random number set corresponding to the obtained encoded data set; determine the model identifier corresponding to the encoding model as the target model identifier; vectorize the target model identifier to generate a model identifier vector; determine the model input order corresponding to each target data in the target data set; splice each encoded data in the encoded data set according to the model input order to generate a spliced data set; determine the splicing method corresponding to the spliced data set; vectorize the splicing method to generate a splicing vector; add the target model vector, the splicing vector and the random number set to a predetermined position in the spliced data set to generate an encrypted data set; a third sending unit configured to send the encrypted data set to the second node, so that the second node generates response data for the encrypted data set according to the neural network model corresponding to the target generation task in the computing resource, wherein the encrypted data set corresponds to the target generation task; The fourth sending unit is configured to send the encrypted response data corresponding to the response data sent by the second node to the first node, so that the first node can obtain the response data.
7. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer-readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Data transmission information security protection method and system under big data platform
CN118133312A
Model data storage method and device, electronic equipment and computer readable medium
CN118171303A