CN116070244A - Account book data processing method and device, storage medium and electronic equipment - Google Patents

Account book data processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN116070244A
CN116070244A CN202310161191.9A CN202310161191A CN116070244A CN 116070244 A CN116070244 A CN 116070244A CN 202310161191 A CN202310161191 A CN 202310161191A CN 116070244 A CN116070244 A CN 116070244A
Authority
CN
China
Prior art keywords
data
function
contract
processing
intelligent contract
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310161191.9A
Other languages
Chinese (zh)
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.)
Boc Financial Technology Co ltd
Original Assignee
Boc Financial 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 Boc Financial Technology Co ltd filed Critical Boc Financial Technology Co ltd
Priority to CN202310161191.9A priority Critical patent/CN116070244A/en
Publication of CN116070244A publication Critical patent/CN116070244A/en
Pending legal-status Critical Current

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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Data Mining & Analysis (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a method and a device for processing account book data, a storage medium and electronic equipment, which can be applied to the field of blockchain or financial, and the method comprises the following steps: determining an intelligent contract to be processed, and adding processing function data into the intelligent contract to obtain a processed intelligent contract; executing the processing intelligent contract when a transaction instruction is received, generating encrypted account book data corresponding to the transaction instruction by using an encryption function in the processing function data, and uploading the account book data in a preset blockchain; by modifying the intelligent contract, the processing intelligent contract is obtained, so that encrypted account book data can be obtained after the processing intelligent contract is executed, and then the account book data is uplink, so that the data of the blockchain are ensured to be ciphertext data, the direct theft of the data in the blockchain by illegal persons can be effectively avoided, and the leakage of private data of a user is avoided.

Description

Account book data processing method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a method and apparatus for processing ledger wall data, a storage medium, and an electronic device.
Background
With the development of random computer technology, intelligent contracts are increasingly widely used, and in order to ensure the security of data of the intelligent contracts, the data of the intelligent contracts are generally subjected to uplink processing, so that the data can be prevented from being tampered.
At present, data of an intelligent contract is stored in a blockchain in a plaintext manner, so that after an lawbreaker obtains the data authority of the blockchain through illegal means, plaintext data in the blockchain can be directly stolen, and data leakage is caused.
Disclosure of Invention
In view of the above, the present invention provides a method and apparatus for processing ledger data, a storage medium, and an electronic device, by modifying an intelligent contract, the modified intelligent contract has an encryption function, so that the intelligent contract is used to generate encrypted ledger data, and then the encrypted ledger data is uplinked, thereby preventing lawbreakers from directly stealing data in a blockchain, and improving security of the data.
In order to achieve the above object, the embodiment of the present invention provides the following technical solutions:
a method of processing ledger data, comprising:
determining an intelligent contract to be processed;
adding processing function data into the intelligent contract to obtain a processing intelligent contract;
and when a transaction instruction is received, executing the processing intelligent contract to generate encrypted account book data by using an encryption function in the processing function data, and uploading the account book data in a preset blockchain.
The method, optionally, the determining the smart contract to be processed includes:
receiving a contract processing instruction;
analyzing the contract processing instruction to obtain a contract identification code;
and determining an intelligent contract corresponding to the contract identification code from a preset contract set, and determining the intelligent contract as an intelligent contract to be processed.
The above method, optionally, the adding processing function data in the smart contract includes:
inserting a data processing function in the smart contract, the data processing function including an encryption function and a decryption function;
inquiring application information of each function which calls a preset writing function in the intelligent contract by using a preset inquiry instruction;
for each function application information, based on the location information of the function application information, call information of the encrypted function and call information of the decrypted function are inserted in the smart contract.
The method, optionally, further comprises:
when a data query request is received, determining account data corresponding to the data query request in the blockchain as target data;
and decrypting the account data by using a decryption function in the data processing function to obtain decrypted data, and displaying the decrypted data to a user corresponding to the data query request.
The method, optionally, further comprises:
and generating prompt information of successful uplink of the account book data, and feeding back the prompt information to a user corresponding to the transaction instruction.
A processing apparatus of ledger data, comprising:
a first determining unit configured to determine an intelligent contract to be processed;
the adding unit is used for adding processing function data into the intelligent contract to obtain a processing intelligent contract;
and the uplink unit is used for executing the processing intelligent contract when receiving the transaction instruction, generating encrypted account book data by using an encryption function in the processing function data, and uplink the account book data in a preset blockchain.
The above apparatus, optionally, the first determining unit includes:
a receiving subunit, configured to receive a contract processing instruction;
the acquisition subunit is used for analyzing the contract processing instruction and acquiring a contract identification code;
and the determining subunit is used for determining the intelligent contract corresponding to the contract identification code in a preset contract set and determining the intelligent contract as the intelligent contract to be processed.
The above device, optionally, the adding unit includes:
a first insertion subunit configured to insert a data processing function in the smart contract, where the data processing function includes an encryption function and a decryption function;
the query subunit is used for querying application information of each function which invokes a preset writing function in the intelligent contract by using a preset query instruction;
and a second inserting subunit configured to insert, for each function application information, call information of the encrypted function and call information of the decrypted function in the smart contract based on location information of the function application information.
The above device, optionally, further comprises:
a second determining unit, configured to determine, when a data query request is received, ledger data corresponding to the data query request in the blockchain as target data;
and the display unit is used for decrypting the account book data by using a decryption function in the data processing function to obtain decrypted data, and displaying the decrypted data to a user corresponding to the data query request.
The above device, optionally, further comprises:
and the generation unit is used for generating prompt information of successful uplink of the account book data and feeding back the prompt information to a user corresponding to the transaction instruction.
A storage medium comprising stored instructions, wherein the instructions, when executed, control a device on which the storage medium resides to perform a method of processing ledger data as described above.
An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to perform a method of processing ledger data as described above by one or more processors.
Compared with the prior art, the invention has the following advantages:
the invention provides a method and a device for processing account book data, a storage medium and electronic equipment, wherein the method comprises the following steps: determining an intelligent contract to be processed, and adding processing function data into the intelligent contract to obtain a processed intelligent contract; executing the processing intelligent contract when a transaction instruction is received, generating encrypted account book data corresponding to the transaction instruction by using an encryption function in the processing function data, and uploading the account book data in a preset blockchain; by modifying the intelligent contract, the processing intelligent contract is obtained, so that encrypted account book data can be obtained after the processing intelligent contract is executed, and then the account book data is uplink, so that the data of the blockchain are ensured to be ciphertext data, the direct theft of the data in the blockchain by illegal persons can be effectively avoided, and the leakage of private data of a user is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a method flowchart of a method for processing ledger data according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for determining a pending intelligent contract according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for adding processing function data in a smart contract according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an account book data processing device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In this application, 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 phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As known from the background art, the data of the intelligent contract is stored in the blockchain in a plaintext manner, so that the data is easily directly stolen by lawbreakers, and the data is leaked. In addition, in many of the existing domestic blockchain landing applications based on Hyperledger Fabric, there are often cases where there is a need to link up data related to personal privacy, such as identification card numbers, user IDs, and the like. Although the blockchain can guarantee the tamper resistance of the data to a certain extent, people who illegally master the rights of the blockchain database can still check and obtain the plaintext privacy information and use the plaintext privacy information, so that the privacy data of the user is revealed.
In order to solve the problems, the invention provides a processing scheme of account book data, and the scheme provided by the invention can ensure that the data stored in a block chain is encrypted, thereby avoiding direct theft of the data by lawbreakers and avoiding data leakage.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor devices, distributed computing environments that include any of the above devices or devices, and the like.
Referring to fig. 1, a method flowchart of a method for processing ledger data provided in an embodiment of the present invention is specifically described below:
s101, determining an intelligent contract to be processed.
The smart contracts to be processed may be smart contracts that have not been modified by the modification logic of the present invention.
Referring to fig. 2, a flowchart of a method for determining a smart contract to be processed according to an embodiment of the present invention is specifically described below:
s201, receiving a contract processing instruction.
The contract processing instruction may be an instruction sent by a developer, where the instruction includes, but is not limited to, authority information of the developer, personal information, boarding information of the contract, content of the contract to be processed, and the like.
Preferably, the rights information and contract level may be used by the system to determine the order of processing of the smart contracts.
S202, analyzing the contract processing instruction to obtain a contract identification code.
Preferably, the contract identification code may be a unique identification code of the intelligent contract, and the contract identification code may be composed of english letters with upper and lower cases, numbers, and special symbols. The contract identification code is the identification code of the intelligent contract.
S203, determining an intelligent contract corresponding to the contract identification code in a preset contract set, and determining the intelligent contract as an intelligent contract to be processed.
The contract set comprises a plurality of intelligent contracts, and the contract identification code traverses each intelligent contract in the contract set, so that the intelligent contract corresponding to the contract identification code can be obtained.
Each smart contract has a unique contract identification code.
According to the invention, the intelligent contracts to be processed can be accurately determined in the contract set by using the contract identification code, the appointed intelligent contracts are modified by the contract processing instructions sent by the staff, one contract processing instruction corresponds to one intelligent contract, and the follow-up tracing and the omission of the intelligent contracts are facilitated.
S102, adding processing function data into the intelligent contract to obtain the processing intelligent contract.
The determined intelligent contracts to be processed at least comprise a uplink function and a query function, and after the intelligent contracts to be processed are determined, the intelligent contracts are required to be modified, so that the processing intelligent contracts are obtained, and the processing intelligent contracts have the operations of encrypting, decrypting and the like on data which need to be uplink.
When processing function data is added to the smart contract, a pre-written modification script may be executed, and based on modification logic in the modification script, the processing function data may be added to the smart contract, and then a processed smart contract may be obtained.
Preferably, the system may need to process multiple intelligent contracts at the same time, if the number of intelligent contracts to be processed at a certain moment exceeds the processing capacity of the system, each intelligent contract may be ranked according to authority information and contract grade information in contract processing instructions corresponding to the intelligent contracts, then the intelligent contracts are processed according to the ranking order, for example, each intelligent contract is firstly ranked according to contract grade information, ranked according to the order of the contract grade from high to low, and when the contract grade is equal, the intelligent contracts are ranked according to the authority information, for example, the intelligent contracts are ranked according to the order of the authority from high to low.
Referring to fig. 3, a flowchart of a method for adding processing function data in an intelligent contract according to an embodiment of the present invention is specifically described below:
s301, inserting a data processing function in the intelligent contract, wherein the data processing function comprises an encryption function and a decryption function.
Preferably, the data processing function is inserted at the data end of the smart contract, in particular, the data processing function is inserted after the last line of data of the smart contract.
Preferably, the blockchain referred to in the present invention may be a Fabric blockchain network. To accommodate the characteristics of the Fabric blockchain network, the data processing functions include encryption functions including, but not limited to, PKCS5 packing for encryption and AesEncrypt functions for bit filling; decryption functions include, but are not limited to, PKCS5UnPadding for decryption and aeschrypt functions for bit filling.
Furthermore, the encryption function and the decryption function mentioned in the present invention can be adjusted and set according to the actual requirement and the blockchain of the actual application besides the functions mentioned in the above examples.
S302, inquiring application information of each function calling a preset writing function in the intelligent contract by using a preset inquiry instruction.
The query instruction may be an AWK instruction; the preset write function may be a PutState function.
There may be multiple places in the intelligent contract where the PutState function is called, and function application information of calling the PutState function everywhere in the intelligent contract is obtained, where the function application information includes, but is not limited to, specific location information of calling the PutState function by the intelligent contract, and information whether data processed when the PutState function is called is empty or not.
S303, for each function application information, based on the position information of the function application information, inserting calling information of an encryption function and calling information of a decryption function into the intelligent contract.
The function application information includes location information of the write function in the smart contract when the write function is called, the location information includes contents such as a start location and an end location of a code for calling the write function, and the function application information includes information whether or not data processed when the write function is called is empty.
When inserting the call information of the encryption function in the smart contract, the call information on the encryption function may be inserted above the write function call, specifically, for example, the call of AesEncrypt is added above the PutState function call.
In inserting call information for a decryption function in the smart contract, call information for the decryption function may be inserted below the write function call, specifically, for example, a call of AesDecrypt is added below the PutState function call. Further, the decryption function needs to determine whether the data to be decrypted is empty when decrypting, and if so, decryption failure may be caused, because, in order to improve the success rate of decryption, when the decryption function is reused later, whether the data to be decrypted is empty may be determined first, if so, the decryption function may not be used for decrypting, and if not, the decryption function may be used for decrypting.
Further, after processing function data is added to the intelligent contract, a processing intelligent contract is obtained. After the processing intelligent contract is obtained, the processing intelligent contract can be installed and instantiated, and further, after the processing intelligent contract is obtained, the corresponding intelligent contract can be deleted.
After instantiating the process intelligence contract, all functions of the process intelligence contract can be called and the condition of the uplink can be tested so as to ensure that the subsequent process intelligence contract can be normally applied.
Preferably, when the applied blockchain is a Fabric blockchain network, the couchDB or the level db of Fabric can be used to compare whether the data on the chain is ciphertext storage, so that the data on the chain on the intelligent contract can be further ensured to be encrypted data.
Further, the processing function data is added in the intelligent contract, so that the contract realization logic of the intelligent contract is not affected, the modification is performed under the condition that the original data of the intelligent contract is unchanged, and therefore the intelligent contract which can normally realize the contract logic and encrypt the uplink data can be obtained.
And S103, executing the processing intelligent contract when a transaction instruction is received, generating encrypted account book data by using an encryption function in the processing function data, and uploading the account book data in a preset blockchain.
The transaction instruction is an instruction sent by a user, and the transaction instruction comprises a contract identification code of the processing intelligent contract, data supporting the execution of the processing intelligent contract, personal information of the user and the like.
When the processing intelligent contract is executed, transaction logic or contract logic corresponding to the contract can be realized, so that account book data can be obtained, the account book data at the moment is plaintext data, then encryption processing can be carried out on the account book data by using an encryption function in the processing intelligent contract, preferably, the encryption processing involves contents such as bit filling and encryption, so that the encrypted account book data corresponding to the transaction instruction can be obtained, and then the encrypted account book data is uplink in a blockchain.
Further, after the encrypted account book data is uploaded, prompt information of successful account book data uploading can be generated, and the prompt information is fed back to the user corresponding to the transaction instruction, so that the user can know that the requested transaction is successful.
It should be noted that, the invention can also query the data on the blockchain, and the specific query process is as follows: receiving a data query request, and determining account data corresponding to the data query request in a blockchain as target data; and decrypting the account data by using a decryption function in the data processing function to obtain decrypted data, and displaying the decrypted data to a user corresponding to the data query request.
The data query request may be a request sent by a user, where the data query request includes a data identifier of data to be queried, and then the corresponding data is searched through the data identifier, where it should be noted that the data identifier is a unique data identifier, and the data identifier may be used to determine the target data in the blockchain.
Preferably, after the target data is determined, whether the target data is empty or not may be judged first, if the target data is empty, decryption is not required, and if the target data is not empty, decryption may be performed using the decrypted data in the processing smart contract, so that the user may obtain the decrypted data.
In the method provided by the embodiment of the invention, an intelligent contract to be processed is determined, and processing function data is added in the intelligent contract to obtain a processed intelligent contract; executing the processing intelligent contract when a transaction instruction is received, generating encrypted account book data corresponding to the transaction instruction by using an encryption function in the processing function data, and uploading the account book data in a preset blockchain; by modifying the intelligent contract, the processing intelligent contract is obtained, so that encrypted account book data can be obtained after the processing intelligent contract is executed, and then the account book data is uplink, so that the data of the blockchain are ensured to be ciphertext data, the direct theft of the data in the blockchain by illegal persons can be effectively avoided, and the leakage of private data of a user is avoided.
The invention provides a scheme for explaining the application scene, which is specifically as follows:
and 1, constructing a plurality of accounting nodes, and constructing a Fabric block chain network by using the accounting nodes.
And 2, creating a channel of the blockchain network.
And step 3, writing an intelligent contract, wherein the intelligent contract at least comprises a uplink and inquires two functions.
Step 4, writing a script which can be used for modifying the intelligent contract, and modifying logic of the intelligent contract after executing the script is as follows:
step 1) reading an externally input intelligent contract file path and an AES key randomly generated by the outside, wherein other symmetrical encryption algorithms can be selected besides the algorithm exemplified by the invention;
step 2) adding PKCS5Padding and AesEncrypt functions for encryption and bit filling and PKCS5Unpadding and AesDecrypt functions for decryption in sequence at the bottommost part of the intelligent contract;
step 3) reading the intelligent contract, and searching all places calling the PutState function in the intelligent contract through an AWK instruction, wherein the call of AesEncrypt is added above the PutState function call;
step 4) find the places of all PutState through AWK instruction, and add the decryption function AesDecrypt below it. The point of difference from AesEncrypt is that decryption fails because the queried data may be empty. Therefore, whether the queried data is empty or not needs to be judged outside the decryption function;
and 5) re-outputting the modified intelligent contract file to a new file, and deleting the original file.
Further, after the intelligent contract is modified, a new intelligent contract is obtained, then the original intelligent contract can be deleted, the data redundancy is reduced, and the utilization rate of the memory is improved.
And 5, installing and instantiating the modified intelligent contract.
And step 6, calling all intelligent contract functions and testing the uplink condition.
And 7, comparing with a couchDB or a level DB of the fabric to see whether the data on the chain is ciphertext storage.
By using the method provided by the invention, the intelligent contract can be modified based on an external program, the on-chain data can be ensured to be stored in a ciphertext under the condition that the original logic of the intelligent contract is not affected, and the method can be applied to any intelligent contract written based on the Go language and used for Fabric. By the method provided by the invention, the intelligent contract can have the functions of encrypting the uplink data and decrypting the queried on-link data in a very short time, so that an illegal user cannot directly browse and utilize the privacy data related to the user on the link, and the privacy data of the user is ensured to a greater extent.
Corresponding to the method shown in fig. 1, the invention also provides a device for processing account book data, which is used for supporting the specific implementation of the method shown in fig. 1, and the device can be arranged in a system.
Referring to fig. 4, a schematic structural diagram of an account book data processing device according to an embodiment of the present invention is specifically described below:
a first determining unit 401 for determining an intelligent contract to be processed;
an adding unit 402, configured to add processing function data to the smart contract, to obtain a processed smart contract;
and the uplink unit 403 is configured to execute the processing intelligent contract when receiving a transaction instruction, generate encrypted ledger data using an encryption function in the processing function data, and uplink the ledger data in a preset blockchain.
In the device provided by the embodiment of the invention, the intelligent contract to be processed is determined, and the processing function data is added in the intelligent contract to obtain the processed intelligent contract; executing the processing intelligent contract when a transaction instruction is received, generating encrypted account book data corresponding to the transaction instruction by using an encryption function in the processing function data, and uploading the account book data in a preset blockchain; by modifying the intelligent contract, the processing intelligent contract is obtained, so that encrypted account book data can be obtained after the processing intelligent contract is executed, and then the account book data is uplink, so that the data of the blockchain are ensured to be ciphertext data, the direct theft of the data in the blockchain by illegal persons can be effectively avoided, and the leakage of private data of a user is avoided.
In an apparatus provided by another embodiment of the present invention, a first determining unit 401 of the apparatus includes:
a receiving subunit, configured to receive a contract processing instruction;
the acquisition subunit is used for analyzing the contract processing instruction and acquiring a contract identification code;
and the determining subunit is used for determining the intelligent contract corresponding to the contract identification code in a preset contract set and determining the intelligent contract as the intelligent contract to be processed.
In an apparatus provided in another embodiment of the present invention, an adding unit 402 of the apparatus includes:
a first insertion subunit configured to insert a data processing function in the smart contract, where the data processing function includes an encryption function and a decryption function;
the query subunit is used for querying application information of each function which invokes a preset writing function in the intelligent contract by using a preset query instruction;
and a second inserting subunit configured to insert, for each function application information, call information of the encrypted function and call information of the decrypted function in the smart contract based on location information of the function application information.
In another embodiment of the present invention, there is provided an apparatus further comprising:
a second determining unit, configured to determine, when a data query request is received, ledger data corresponding to the data query request in the blockchain as target data;
and the display unit is used for decrypting the account book data by using a decryption function in the data processing function to obtain decrypted data, and displaying the decrypted data to a user corresponding to the data query request.
In another embodiment of the present invention, there is provided an apparatus further comprising:
and the generation unit is used for generating prompt information of successful uplink of the account book data and feeding back the prompt information to a user corresponding to the transaction instruction.
The embodiment of the invention also provides a storage medium, which comprises stored instructions, wherein the instructions are used for controlling equipment where the storage medium is located to execute the method for processing the account book data when running.
The embodiment of the present invention further provides an electronic device, whose structural schematic diagram is shown in fig. 5, specifically including a memory 501, and one or more instructions 502, where the one or more instructions 502 are stored in the memory 501, and configured to be executed by the one or more processors 503, where the one or more instructions 502 perform the following operations:
determining an intelligent contract to be processed;
adding processing function data into the intelligent contract to obtain a processing intelligent contract;
and when a transaction instruction is received, executing the processing intelligent contract to generate encrypted account book data by using an encryption function in the processing function data, and uploading the account book data in a preset blockchain.
The specific implementation process and derivative manner of the above embodiments are all within the protection scope of the present invention.
It should be noted that the method and device for processing ledger wall data, the storage medium and the electronic device provided by the invention can be used in the artificial intelligence field, the blockchain field, the distributed field, the cloud computing field, the big data field, the internet of things field, the mobile interconnection field, the network security field, the chip field, the virtual reality field, the augmented reality field, the holographic technical field, the quantum computing field, the quantum communication field, the quantum measurement field, the digital twin field or the financial field. The foregoing is merely an example, and the application fields of the method and apparatus for processing ledger data, the storage medium and the electronic device provided by the present invention are not limited.
The information of the user involved in the invention is obtained in a legal mode, and the obtained information is legal information.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for processing ledger data, comprising:
determining an intelligent contract to be processed;
adding processing function data into the intelligent contract to obtain a processing intelligent contract;
and when a transaction instruction is received, executing the processing intelligent contract to generate encrypted account book data by using an encryption function in the processing function data, and uploading the account book data in a preset blockchain.
2. The method of claim 1, wherein the determining the smart contract to process comprises:
receiving a contract processing instruction;
analyzing the contract processing instruction to obtain a contract identification code;
and determining an intelligent contract corresponding to the contract identification code from a preset contract set, and determining the intelligent contract as an intelligent contract to be processed.
3. The method of claim 1, wherein adding processing function data in the smart contract comprises:
inserting a data processing function in the smart contract, the data processing function including an encryption function and a decryption function;
inquiring application information of each function which calls a preset writing function in the intelligent contract by using a preset inquiry instruction;
for each function application information, based on the location information of the function application information, call information of the encrypted function and call information of the decrypted function are inserted in the smart contract.
4. A method according to claim 3, further comprising:
when a data query request is received, determining account data corresponding to the data query request in the blockchain as target data;
and decrypting the account data by using a decryption function in the data processing function to obtain decrypted data, and displaying the decrypted data to a user corresponding to the data query request.
5. The method as recited in claim 1, further comprising:
and generating prompt information of successful uplink of the account book data, and feeding back the prompt information to a user corresponding to the transaction instruction.
6. A ledger-book data processing apparatus, comprising:
a first determining unit configured to determine an intelligent contract to be processed;
the adding unit is used for adding processing function data into the intelligent contract to obtain a processing intelligent contract;
and the uplink unit is used for executing the processing intelligent contract when receiving the transaction instruction, generating encrypted account book data by using an encryption function in the processing function data, and uplink the account book data in a preset blockchain.
7. The apparatus according to claim 6, wherein the first determining unit includes:
a receiving subunit, configured to receive a contract processing instruction;
the acquisition subunit is used for analyzing the contract processing instruction and acquiring a contract identification code;
and the determining subunit is used for determining the intelligent contract corresponding to the contract identification code in a preset contract set and determining the intelligent contract as the intelligent contract to be processed.
8. The apparatus according to claim 6, wherein the adding unit includes:
a first insertion subunit configured to insert a data processing function in the smart contract, where the data processing function includes an encryption function and a decryption function;
the query subunit is used for querying application information of each function which invokes a preset writing function in the intelligent contract by using a preset query instruction;
and a second inserting subunit configured to insert, for each function application information, call information of the encrypted function and call information of the decrypted function in the smart contract based on location information of the function application information.
9. A storage medium comprising stored instructions that, when executed, control a device in which the storage medium resides to perform the method of processing ledger data according to any one of claims 1-5.
10. An electronic device comprising a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to perform the method of ledger data processing of any one of claims 1-5 by one or more processors.
CN202310161191.9A 2023-02-23 2023-02-23 Account book data processing method and device, storage medium and electronic equipment Pending CN116070244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310161191.9A CN116070244A (en) 2023-02-23 2023-02-23 Account book data processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310161191.9A CN116070244A (en) 2023-02-23 2023-02-23 Account book data processing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116070244A true CN116070244A (en) 2023-05-05

Family

ID=86169833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310161191.9A Pending CN116070244A (en) 2023-02-23 2023-02-23 Account book data processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116070244A (en)

Similar Documents

Publication Publication Date Title
CN108810006B (en) Resource access method, device, equipment and storage medium
US10523705B2 (en) Password breach registry
JP6079875B2 (en) Application execution program, application execution method, and information processing terminal device for executing application
CN105446713A (en) Safe storage method and equipment
CN112287372B (en) Method and apparatus for protecting clipboard privacy
US20140281499A1 (en) Method and system for enabling communications between unrelated applications
CN105975867B (en) A kind of data processing method
CN110070360B (en) Transaction request processing method, device, equipment and storage medium
CN107196907A (en) A kind of guard method of Android SO files and device
JP2012065123A (en) Ic card system, communication terminal therefor and portable terminal therefor
US20110154436A1 (en) Provider Management Methods and Systems for a Portable Device Running Android Platform
CN102799815A (en) Method and device for safely loading program library
US20220092155A1 (en) Protecting an item of software
CN114222288A (en) Equipment identifier generation method, equipment identifier verification method and device
CN107992760A (en) Secret key wiring method, device, equipment and storage medium
KR102542213B1 (en) Real-time encryption/decryption security system and method for data in network based storage
CN114896621B (en) Application service acquisition method, encryption method, device and computer equipment
CN110457959B (en) Information transmission method and device based on Trust application
CN116070244A (en) Account book data processing method and device, storage medium and electronic equipment
CN111931222B (en) Application data encryption method, device, terminal and storage medium
CN105574425B (en) Access the method and device of storage data
CN110737910B (en) Android log decryption management method, device, equipment and medium
US20040105547A1 (en) Software protection
KR20210154017A (en) Method and system for protecting file using class dispersion and sequential memory loading
CN111562916B (en) Method and device for sharing algorithm

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