Disclosure of Invention
The embodiment of the invention provides a method and a device for supervising data of a resource account, computer equipment and a storage medium, which are used for improving the data transmission security of the resource account in the data reporting and approving process.
In order to solve the above technical problem, an embodiment of the present application provides a method for supervising data of a resource account, including:
when data to be reported of any resource account is received, acquiring block chain address information of the resource account and a private key of the resource account;
acquiring an intelligent contract corresponding to the block chain address information of the resource account, performing identity verification by adopting a private key of the resource account, calling the intelligent contract after the identity verification is passed, generating a hash value corresponding to the data to be reported, and performing chain linking processing on the data to be reported and the hash value;
acquiring the latest block chain link point based on a polling mode, acquiring the calling information of the intelligent contract according to the hash value stored in the latest block chain link point, and determining the state type of the data to be reported based on the calling information;
and based on the state type of the data to be reported, carrying out re-reporting or approval processing on the data to be reported.
Optionally, before the obtaining the block chain address information of the resource account and the private key of the resource account when the data to be reported of any one resource account is received, the method for supervising the data of the resource account further includes:
if a block chain registration request of a resource account of a client is received, generating a unique identification code of the resource account for the resource account, and sending the unique identification code to the client so that a user of the client can perform real-name information binding according to the unique identification code;
receiving real-name information which is sent by a client and corresponds to the unique identification code, determining the real-name information as account information, and generating a public key and a private key based on a private key encryption algorithm;
based on the public key and the private key, calling a block chain to generate and record an account address, and binding the unique identification code of the resource account, the account information and the account address to complete block chain registration.
Optionally, the status type of the data to be reported includes a data reporting type, an approval type, and a reject type.
Optionally, the status type of the data to be reported is a data reporting type, and the re-reporting or approving processing of the data to be reported based on the status type of the data to be reported includes:
reading the data to be reported and the account information of the resource account as the information to be approved;
and writing the information to be approved into a database, disclosing the information to be approved, and informing a higher level approval mechanism to carry out approval processing.
Optionally, the status type of the data to be reported is an approval type, the approval mechanism includes at least two layers, and the re-reporting or approval process of the data to be reported based on the status type of the data to be reported includes:
and acquiring a contract signature corresponding to the intelligent contract, and sending the contract signature to a previous level approval mechanism for approval.
Optionally, the status type of the data to be reported is a reject type, the approval mechanism includes at least two layers, and performing re-reporting or approval processing on the data to be reported based on the status type of the data to be reported includes:
and informing the next-level approval mechanism to carry out re-approval, or re-reporting data through the resource account.
In order to solve the above technical problem, an embodiment of the present application further provides a data monitoring apparatus for a resource account, including:
the data receiving module is used for acquiring the block chain address information of any resource account and the private key of the resource account when the data to be reported of the resource account is received;
the data chaining module is used for acquiring an intelligent contract corresponding to the block chain address information of the resource account, performing identity verification by adopting a private key of the resource account, calling the intelligent contract after the identity verification is passed, generating a hash value corresponding to the data to be reported, and performing chaining processing on the data to be reported and the hash value;
the type determining module is used for acquiring the latest block chain link point based on a polling mode, acquiring the calling information of the intelligent contract according to the hash value stored in the latest block chain link point, and determining the state type of the data to be reported based on the calling information;
and the data processing module is used for carrying out re-reporting or approval processing on the data to be reported based on the state type of the data to be reported.
Optionally, the data administration apparatus for resource account further includes:
the request receiving module is used for generating a unique identification code of a resource account for the resource account and sending the unique identification code to a client if a block chain registration request of the resource account of the client is received, so that a user of the client can perform real-name information binding according to the unique identification code;
the information acquisition module is used for receiving real-name information which is sent by the client and corresponds to the unique identification code, determining the real-name information as account information, and generating a public key and a private key based on a private key encryption algorithm;
and the registration module is used for calling a block chain to generate and record an account address based on the public key and the private key, and binding the unique identification code of the resource account, the account information and the account address to complete block chain registration.
Optionally, the status type of the data to be reported is a data reporting type, and the data processing module includes:
the data reading unit is used for reading the data to be reported and the account information of the resource account as the information to be approved;
and the data publicizing unit is used for writing the information to be approved into a database, publicizing the information to be approved and informing a higher level approval mechanism to carry out approval processing.
Optionally, the status type of the data to be reported is an approval type, the approval mechanism includes at least two layers, and the data processing module includes:
and the secondary approval unit is used for acquiring the contract signature corresponding to the intelligent contract and sending the contract signature to the upper-level approval mechanism for approval.
Optionally, the status type of the data to be reported is a reject type, the approval mechanism includes at least two layers, and the data processing module includes:
and the reprocessing unit is used for informing the next-level approval mechanism to carry out re-approval or to report data again through the resource account.
In order to solve the technical problem, an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the data administration method for the resource account when executing the computer program.
In order to solve the technical problem, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the data administration method for a resource account are implemented.
The method, the device, the computer equipment and the storage medium for supervising the data of the resource account, provided by the embodiment of the invention, are used for acquiring the block chain address information of the resource account and the private key of the resource account when receiving the data to be reported of any one resource account, acquiring the intelligent contract corresponding to the block chain address information of the resource account, performing identity verification by adopting the private key of the resource account, calling the intelligent contract after passing the identity verification to generate the hash value corresponding to the data to be reported, performing uplink processing on the data to be reported and the hash value, acquiring the latest block chain link point in a polling mode, acquiring the calling information of the intelligent contract according to the hash value stored in the latest block chain node, determining the state type of the data to be reported based on the calling information, performing re-reporting or approval processing on the data to be reported based on the state type of the data to be reported, the safety of data transmission in the process of examining, approving and monitoring the data information of the resource account is improved.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, as shown in fig. 1, fig. 1 is a schematic diagram of an application environment of a data monitoring method for a resource account according to an embodiment of the present invention, where the data monitoring method for a resource account provided in the present application may be applied to the application environment of fig. 1, where a block chain is composed of a plurality of nodes capable of communicating with each other, each node may be regarded as a block storage, each block storage is used for storing data, all data are included between each data node, the block storage data has a complete history record, and can be rapidly restored and expanded, an area chain is divided into a public chain, a private chain, and a federation chain, the public chain is open for any node, each organization/node can participate in the block chain calculation, and any organization/node can download and obtain complete block chain data, the private chain is a block chain, and any system does not want to participate in the private chain, the block chain backup system is not disclosed externally, and is suitable for internal data management and audit or open test of a specific organization, the authority of each node is completely equivalent in a alliance chain, people can realize trusted exchange of data without complete mutual trust, each node of the alliance chain is generally organized by a corresponding entity organization, the node can be added into and quit the network after authorization, in the process of using the whole block chain backup system, a hash function, a public key of a sender and a private key of the sender are required to be signed by using digital, the digital signature designs a hash function, the public key of the sender and a private key of the sender, the block chain has a complete distributed storage characteristic, and the basic data is actually stored in a larger network data while a data structure in a 'hash algorithm' form is used for storing basic data.
Referring to fig. 2, fig. 2 shows a data monitoring method for a resource account according to an embodiment of the present invention, which is detailed as follows:
s201: when data to be reported of any resource account is received, block chain address information of the resource account and a private key of the resource account are obtained.
Specifically, when any resource needs to report data, the block chain address information of the resource account and the private key of the resource account are obtained first.
In a specific embodiment, before obtaining the block chain address information of the resource account and the private key of the resource account when receiving the data to be reported of any one resource account, the method for supervising the data of the resource account further includes:
if a block chain registration request of a resource account of the client is received, generating a unique identification code of the resource account for the resource account, and sending the unique identification code to the client so that a user of the client binds real-name information according to the unique identification code;
receiving real-name information which is sent by a client and corresponds to the unique identification code, determining the real-name information as account information, and generating a public key and a private key based on a private key encryption algorithm;
based on the public key and the private key, calling the block chain to generate and record an account address, and binding the unique identification code and the account information of the resource account with the account address to complete block chain registration.
Illustratively, in a specific implementation process, after a block chain registration request of a resource account of an enterprise account a is received, a unique identification code (e.g., UUID) is generated for the resource account and fed back to the enterprise account a, the enterprise account a performs information filling and real name using the unique identification code and sends the information to a data monitoring device of the resource account implementing the scheme, after real name information corresponding to the unique identification code and sent by a client is received, the real name information corresponding to the unique identification code is determined as account information corresponding to the enterprise account a, a public key and a private key are generated based on a private key encryption algorithm, then a block chain is called to generate and record an account address based on the public key and the private key, and the unique identification code, the account information and the account address of the resource account are bound to complete block chain registration.
The Unique identification code is a character string for uniquely identifying the resource account, and specifically, a Universal Unique Identifier (UUID) may be used for identification, or other user-defined manners may also be used, which is not limited herein. It should be understood that, in this embodiment, the unique identification code has a one-to-one correspondence with the block chain address information of the resource account, the unique identification code is displayed to the client, and the block chain address information of the resource account is used for data identification and processing inside the block chain, which is beneficial to improving the security of the block chain account.
It should be noted that the private key of the blockchain is encrypted and stored, so as to implement transparent management of the blockchain account, that is, the enterprise account only knows the unique identification code of the enterprise account, but does not know the blockchain account of the enterprise account, and authenticates the account before calling the blockchain contract, so as to prevent the account without permission from calling the blockchain node, and thus, the security of the account is improved.
S202: the method comprises the steps of obtaining an intelligent contract corresponding to block chain address information of a resource account, carrying out identity verification by adopting a private key of the resource account, calling the intelligent contract after the identity verification is passed, generating a hash value corresponding to data to be reported, and carrying out chain chaining processing on the data to be reported and the hash value.
S203: and acquiring the latest block chain link point based on a polling mode, acquiring the calling information of the intelligent contract according to the hash value stored in the latest block chain link point, and determining the state type of the data to be reported based on the calling information.
In this embodiment, the latest block link node is polled at regular time, and the call information of the intelligent contract is obtained according to the hash value stored in the new block link node, so as to determine the state type of the data to be reported.
The status types of the data to be reported comprise a data reporting type, an approval type and a rejection type.
The reporting type refers to a state type of the data to be reported, which is corresponding to the generated calling information, and is used for reporting the data by the enterprise account through the client.
The approval type refers to a state type of the data to be reported, which corresponds to the generated calling information, wherein the approval type refers to that an approval mechanism audits the reported data of the enterprise account or audits the approval result of a lower approval mechanism.
The refusal type refers to a state type of the data to be reported, which is generated by calling an intelligent contract, through re-approval of a lower-level approval mechanism or notification of re-reporting of the data by an enterprise account after approval and refusal.
S204: and based on the state type of the data to be reported, carrying out re-reporting or approval processing on the data to be reported.
When the status type of the data to be reported is the data reporting type, the re-reporting or approval process of the data to be reported based on the status type of the data to be reported comprises the following steps:
reading data to be reported and account information of a resource account as information to be approved;
and writing the information to be approved into a database, disclosing the information to be approved, and informing a higher level approval mechanism to carry out approval processing.
When the state type of the data to be reported is an approval type, the approval mechanism at least comprises two layers, and based on the state type of the data to be reported, the re-reporting or approval processing of the data to be reported comprises the following steps:
and acquiring a contract signature corresponding to the intelligent contract, and sending the contract signature to a previous level approval mechanism for approval.
When the status type of the data to be reported is a refusal type, the approval mechanism at least comprises two layers, and based on the status type of the data to be reported, the re-reporting or approval processing of the data to be reported comprises the following steps:
and informing the next-level approval mechanism to carry out re-approval, or re-reporting the data through the resource account.
In this embodiment, when data to be reported of any resource account is received, the block chain address information of the resource account and the private key of the resource account are obtained, the intelligent contract corresponding to the block chain address information of the resource account is obtained, the private key of the resource account is used for identity verification, calling an intelligent contract after the identity authentication is passed, generating a hash value corresponding to the data to be reported, executing chain linking processing on the data to be reported and the hash value, acquiring the latest block chain link point based on a polling mode, and acquiring the calling information of the intelligent contract according to the hash value stored in the latest block chain node, determining the state type of the data to be reported based on the calling information, and re-reporting or approving the data to be reported based on the state type of the data to be reported, so that the security of data transmission in the process of approving and monitoring the data information of the resource account is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 3 shows a schematic block diagram of a data administration device of a resource account, which corresponds to the data administration method of the resource account in one-to-one correspondence. As shown in fig. 3, the data administration apparatus of the resource account includes adata receiving module 31, adata uplink module 32, atype determining module 33 and a data processing module. The functional modules are explained in detail as follows:
thedata receiving module 31 is configured to, when receiving data to be reported of any resource account, obtain block chain address information of the resource account and a private key of the resource account;
thedata chaining module 32 is configured to acquire an intelligent contract corresponding to the block chain address information of the resource account, perform identity verification by using a private key of the resource account, call the intelligent contract after the identity verification is passed, generate a hash value corresponding to the data to be reported, and perform chaining processing on the data to be reported and the hash value;
thetype determining module 33 is configured to obtain the latest block link node based on a polling manner, obtain the invocation information of the intelligent contract according to the hash value stored in the latest block link node, and determine the state type of the data to be reported based on the invocation information;
and thedata processing module 34 is configured to perform re-reporting or approval processing on the data to be reported based on the status type of the data to be reported.
Optionally, the data administration apparatus for resource account further includes:
the request receiving module is used for generating a unique identification code of the resource account for the resource account and sending the unique identification code to the client if a block chain registration request of the resource account of the client is received, so that a user of the client can perform real-name information binding according to the unique identification code;
the information acquisition module is used for receiving real-name information which is sent by the client and corresponds to the unique identification code, determining the real-name information as account information, and generating a public key and a private key based on a private key encryption algorithm;
and the registration module is used for calling the block chain to generate and record an account address based on the public key and the private key, and binding the unique identification code and the account information of the resource account with the account address to complete block chain registration.
Optionally, the status type of the data to be reported is a data reporting type, and thedata processing module 34 includes:
the data reading unit is used for reading the data to be reported and the account information of the resource account as the information to be approved;
and the data publicizing unit is used for writing the information to be approved into the database, publicizing the information to be approved and informing a higher level approval mechanism to carry out approval processing.
Optionally, the status type of the data to be reported is an approval type, the approval mechanism includes at least two layers, and thedata processing module 34 includes:
and the secondary approval unit is used for acquiring the contract signature corresponding to the intelligent contract and sending the contract signature to the upper-level approval mechanism for approval.
Optionally, the status type of the data to be reported is a reject type, the approval mechanism includes at least two layers, and thedata processing module 34 includes:
and the reprocessing unit is used for informing the next-level approval mechanism to carry out re-approval or re-report the data through the resource account.
For specific limitations of the data administration device for the resource account, reference may be made to the above limitations of the data administration method for the resource account, and details are not described here. The modules in the data supervision device of the resource account can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 4, fig. 4 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 4 comprises amemory 41, aprocessor 42, anetwork interface 43 communicatively connected to each other via a system bus. It is noted that only the computer device 4 having thecomponents connection memory 41,processor 42,network interface 43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
Thememory 41 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or D interface display memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, thememory 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, thememory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 4. Of course, thememory 41 may also include both internal and external storage devices of the computer device 4. In this embodiment, thememory 41 is generally used for storing an operating system installed in the computer device 4 and various types of application software, such as program codes for controlling electronic files. Further, thememory 41 may also be used to temporarily store various types of data that have been output or are to be output.
Theprocessor 42 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. Theprocessor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, theprocessor 42 is configured to execute the program code stored in thememory 41 or process data, such as program code for executing control of an electronic file.
Thenetwork interface 43 may comprise a wireless network interface or a wired network interface, and thenetwork interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing an interface display program, which is executable by at least one processor to cause the at least one processor to execute the steps of the data administration method for resource accounts as described above.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.