Disclosure of Invention
Embodiments of the present invention provide an electronic contract management method and apparatus, a storage medium, and an electronic device, so that the validity of an electronic contract can be verified while the subsequent security of the electronic contract is ensured.
In a first aspect, an embodiment of the present invention provides an electronic contract management method, including:
acquiring an electronic contract checking instruction, wherein the electronic contract checking instruction comprises identification information of an electronic contract;
acquiring an electronic contract to be verified from a preset block chain according to the identification information, and converting the electronic contract to be verified into a first character string by using a preset secure hash algorithm;
acquiring a second character string from a preset safe storage platform according to the identification information, wherein the second character string is generated after the initial effective electronic contract corresponding to the identification information is converted by using the preset safe hash algorithm;
and determining whether the electronic contract to be verified is valid according to the first character string and the second character string.
In one possible design, the electronic contract management method further includes:
acquiring an electronic contract, wherein the electronic contract comprises a first electronic signature of a first user and a second electronic signature of a second user;
encrypting the electronic contract by using a preset encryption algorithm, and storing the encrypted electronic contract to a first node, wherein the first node is one node in the preset block chain;
and converting the electronic contract into a character string by using the preset secure hash algorithm, and storing the character string to the preset secure storage platform.
In one possible design, the obtaining the electronic contract includes:
acquiring a first electronic contract, wherein the first electronic contract is a contract added with the first electronic signature on an initial electronic contract;
acquiring a second electronic contract, wherein the second electronic contract is the first electronic contract added with the second electronic signature, and the electronic contract is the second electronic contract.
In one possible design, the electronic contract management method further includes:
recording a first time at which the first electronic signature is appended to the initial electronic contract, the first electronic contract including the first time;
recording a second time at which the second electronic signature is added to the first electronic contract, the second electronic contract including the second time.
In one possible design, before the obtaining the first electronic contract, the method further includes:
determining first identity information of a first user as legal information;
and determining the initial electronic contract according to a selection instruction input by a first user, wherein the initial electronic contract is an electronic contract template file in a preset electronic contract database.
In one possible design, the electronic contract management method further includes:
obtaining a first fingerprint added to the initial electronic contract, the first electronic signature including the first fingerprint;
obtaining a second fingerprint added to the first electronic contract, the second electronic signature including the second fingerprint.
In a second aspect, an embodiment of the present invention further provides an electronic contract management apparatus, including:
the instruction acquisition module is used for acquiring an electronic contract verification instruction, and the electronic contract verification instruction comprises identification information of an electronic contract;
the contract acquisition module is used for acquiring the electronic contract to be verified from a preset block chain according to the identification information;
the character string conversion module is used for converting the electronic contract to be verified into a first character string by using a preset secure hash algorithm;
the character string acquisition module is used for acquiring a second character string from a preset safe storage platform according to the identification information, wherein the second character string is generated after the initial effective electronic contract corresponding to the identification information is converted by using the preset safe hash algorithm;
and the contract checking module is used for determining whether the electronic contract to be checked is valid according to the first character string and the second character string.
In one possible design, the contract obtaining module is further configured to obtain an electronic contract, where the electronic contract includes a first electronic signature of a first user and a second electronic signature of a second user; the device, still include:
the contract encryption module is used for encrypting the electronic contract by using a preset encryption algorithm and storing the encrypted electronic contract to a first node, wherein the first node is one node in the preset block chain;
the character string conversion module is further configured to convert the electronic contract into a character string by using the preset secure hash algorithm, and store the character string to the preset secure storage platform.
In one possible design, the contract obtaining module is specifically configured to:
acquiring a first electronic contract, wherein the first electronic contract is a contract added with the first electronic signature on an initial electronic contract;
acquiring a second electronic contract, wherein the second electronic contract is the first electronic contract added with the second electronic signature, and the electronic contract is the second electronic contract.
In one possible design, the electronic contract management apparatus further includes: the time recording module is specifically used for:
recording a first time at which the first electronic signature is appended to the initial electronic contract, the first electronic contract including the first time;
recording a second time at which the second electronic signature is added to the first electronic contract, the second electronic contract including the second time.
In one possible design, the electronic contract management apparatus further includes:
the identity determining module is used for determining that the first identity information of the first user is legal information;
and the template selection module is used for determining the initial electronic contract according to a selection instruction input by a first user, wherein the initial electronic contract is an electronic contract template file in a preset electronic contract database.
In one possible design, the electronic contract management apparatus further includes: the fingerprint acquisition module is specifically configured to:
obtaining a first fingerprint added to the initial electronic contract, the first electronic signature including the first fingerprint;
obtaining a second fingerprint added to the first electronic contract, the second electronic signature including the second fingerprint.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
a processor; and the number of the first and second groups,
a memory for storing executable instructions of the processor;
the display is connected with the processor and used for displaying a component selection page;
wherein the processor is configured to perform any one of the possible electronic contract management methods of the first aspect via execution of the executable instructions.
In a fourth aspect, an embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any one of the possible electronic contract management methods in the first aspect.
The embodiment of the invention provides an electronic contract management method, an electronic contract management device, a storage medium and electronic equipment, by acquiring the electronic contract checking instruction and acquiring the electronic contract to be checked from the preset block chain according to the identification information in the electronic contract checking instruction, and converts the electronic contract to be verified into a first character string by using a preset secure hash algorithm, and further acquires a second character string converted according to the initially validated electronic contract from a preset secure storage platform according to the identification information, and finally, whether the electronic contract to be verified is valid or not is determined according to the first character string and the second character string, and therefore, the subsequent safety of the electronic contract is ensured by storing the electronic contract in the block chain, and by comparing with the initially effective electronic contract in the preset safe storage platform, the validity of the electronic contract can be reliably verified.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
With the development of internet technology, electronic contracts are applied in a variety of life scenarios. More and more users find that the problems of going out to travel, renting houses or handling business can be solved through online electronic contracts. Wherein the electronic contract is an electronic agreement signed electronically over an electronic information network to define rights obligations between two or more parties. With the development of electronic technology, electronic contracts occupy a place in electronic business activities due to the characteristics of convenience in transmission, cost saving and the like. In order to better utilize the electronic contract to guarantee the legitimate interests of the consumer and the operator, it is an important link to maintain the information security of individuals and enterprises to keep the electronic contract properly and safely. Currently, the electronic contract is usually stored in a third-party electronic contract platform or stored in an offline hard disk storage manner.
However, in the above storage method, since the electronic contract is simply stored in a single storage medium, the subsequent security of the electronic contract cannot be ensured, there is a risk of losing, tampering, or even leaking the electronic contract, and the validity of the electronic contract cannot be reliably verified.
In view of the above problems, embodiments of the present invention provide an electronic contract management method, apparatus, storage medium, and electronic device, by acquiring the electronic contract checking instruction and acquiring the electronic contract to be checked from the preset block chain according to the identification information in the electronic contract checking instruction, and converts the electronic contract to be verified into a first character string by using a preset secure hash algorithm, and further acquires a second character string converted according to the initially validated electronic contract from a preset secure storage platform according to the identification information, and finally, whether the electronic contract to be verified is valid or not is determined according to the first character string and the second character string, and therefore, the subsequent safety of the electronic contract is ensured by storing the electronic contract in the block chain, and by comparing with the initially effective electronic contract in the preset safe storage platform, the validity of the electronic contract can be reliably verified.
Fig. 1 is a schematic diagram of an application scenario of an electronic contract management method according to an exemplary embodiment of the present invention, fig. 2 is a schematic diagram of an application scenario of an electronic contract management method according to another exemplary embodiment of the present invention, and fig. 3 is a schematic diagram of a structure of a block chain of electronic contract storage. As shown in fig. 1, the electronic contract management method provided by the present embodiment may be applied to an electronic contract contracting system. The electronic contract signing system may include a plurality of user terminals (for example, the first computer 101 and the second computer 102, or the first smart phone 101 and the second smart phone 102), and the plurality of user terminals perform data interaction through the server 200.
With continued reference to fig. 3, the data storage of the server 200 may be in a manner of storing to a Block Chain, where the Block Chain (Block Chain) is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, and an encryption algorithm. And the blockchain may include a plurality of storage nodes (e.g., a first node 201, a second node 202, a third node 203, a fourth node 204, a fifth node 205, etc.).
The following may explain in detail the operation logic of the electronic contract signing system by combining the specific signing process of the electronic contract signing system:
the first step, real name authentication.
Specifically, the real-name authentication function of the main body in the electronic contract refers to that the real identities of all parties to be signed can be quickly confirmed through a CA Certificate issued by a Certificate Authority (CA) or an eID authentication system of a public security department, so that the authenticity and reliability of the contract are guaranteed, and the guarantee is provided for signing the online electronic contract without seeing the face. It should be noted that the electronic contract can be established online by supporting the enterprise holding the digital certificate or the user holding the digital certificate, and the identity of the enterprise or the user can be proved and the identity of the other party can be identified.
And secondly, signing on line.
In this step, the online signing function of the electronic contract can be performed quickly (e.g., within 1 minute) in different manners such as a Personal Computer (PC), an Application (APP), a WeChat, H5, and so on. The user can finish the signing of the electronic contract of the own party by uploading the prepared electronic contract or generating the contract by using a contract template function, adopting an exclusive electronic signature and acquiring a random dynamic password by a reserved mobile phone.
And step three, sending the contract.
After the user writes the contract body and covers the personal electronic signature, the user can send the self-signed contract to the opposite side after the processing is finished, the signed contract is sent to the opposite side for signing at the first time, and meanwhile, the sending time is accurately recorded on the file.
And fourthly, sending the contract.
After the contract is sent, the opposite side can receive a relevant notice, the opposite side needs to log in the platform, the received electronic contract is subjected to electronic signature, and the short message is verified, so that the effective signature can be completed. In the process, the electronic contract platform issues a CA certificate through a national authority and ensures the fingerprint uniqueness of the certificate, so that the tampering is invalid and the true validity of the signature can be identified.
And fifthly, contract storage and judicial guarantee.
The electronic contract is stored in an online electronic contract platform, and the signed contract is stored in an encrypted manner. Meanwhile, the platform converts the valid electronic contract signature version by using a Secure Hash Algorithm (abbreviated as SHA), wherein the SHA is a cryptographic Hash function family and is a Secure Hash Algorithm certified by Federal Information Processing Standards (FIPS). It is an algorithm that can calculate a character string (also called message digest) with a fixed length. For example: SHA256 is a 256-bit secure hash algorithm.
The transformed validation value is then stored on the blockchain platform, and the transaction ID value and/or transformed validation value returned by the blockchain platform is sent to the judicial authority (e.g., internet court). Thereby ensuring the original output of the contract and ensuring the legal effectiveness of the contract.
And sixthly, contract storage and judicial guarantee.
By utilizing the online contract management function of the electronic contract, the contract signing party can carry out management such as searching, inquiring, checking, classifying, downloading and the like on the self-related electronic contract at any time and any place, and the whole process is electronic operation, so that various warehousing, manpower and time costs generated by paper contract management are saved, the calling and calling of related personnel are facilitated, and the working efficiency of later-period service is greatly improved.
FIG. 4 is a flowchart illustrating an electronic contract management method according to an example embodiment of the invention. As shown in fig. 4, the electronic contract management method provided by this embodiment includes:
step 101, obtaining an electronic contract verification instruction.
Specifically, when the authenticity of the electronic contract needs to be confirmed, the system may acquire an input electronic contract verification instruction, where the electronic contract verification instruction includes identification information of the electronic contract, for example: the contracts may be numbered.
And 102, acquiring the electronic contract to be verified from a preset block chain according to the identification information.
And acquiring the electronic contract to be verified from the preset block chain according to the identification information, and converting the electronic contract to be verified into a first character string by using a preset secure hash algorithm. It should be noted that the predetermined blockchain includes a plurality of storage nodes, so as to ensure that data stored in the blockchain is not tampered.
And 103, converting the electronic contract to be verified into a first character string by using a preset secure hash algorithm.
After the electronic contract to be verified is obtained from the preset block chain according to the identification information, the electronic contract to be verified can be converted into the first character string by using a preset secure hash algorithm. It should be noted that, according to the same electronic contract, character strings with fixed length and the same length can be calculated.
And 104, acquiring a second character string from a preset safe storage platform according to the identification information.
And then, a second character string can be acquired from the preset safe storage platform according to the identification information, wherein the second character string is generated after the initial effective electronic contract corresponding to the identification information is converted by using a preset safe hash algorithm. It should be noted that the preset secure storage platform may be a server of a court, and when the electronic contract becomes effective, the signature effective version of the electronic contract is converted by using SHA, the effective value is stored in the blockchain platform, and the transaction ID value and/or the converted effective value returned by the blockchain platform are/is sent to a judicial institution (e.g., an internet court). Thereby ensuring the original output of the contract and ensuring the legal effectiveness of the contract.
And 105, determining whether the electronic contract to be verified is valid according to the first character string and the second character string.
After a first character string converted according to the electronic contract to be verified and a second character string converted according to the initially effective electronic contract are respectively acquired. Because the same electronic contract is subjected to the preset safe hash algorithm, the character strings with fixed length and the same length can be calculated, and if the same electronic contract is subjected to the preset safe hash algorithm, different character strings are calculated.
In this embodiment, an electronic contract verification instruction is obtained, an electronic contract to be verified is obtained from a preset block chain according to identification information in the electronic contract verification instruction, the electronic contract to be verified is converted into a first character string by using a preset secure hash algorithm, a converted second character string according to an initially valid electronic contract is also obtained from a preset secure storage platform according to the identification information, and finally, whether the electronic contract to be verified is valid is determined according to the first character string and the second character string.
Fig. 5 is a flowchart illustrating an electronic contract storage manner according to an example embodiment of the present invention. As shown in fig. 5, the electronic contract storage method provided by this embodiment includes:
step 201, determining an initial electronic contract.
Specifically, before the electronic contract is signed, the first identity information of the first user may be determined to be legal information. The real-name authentication function of the main body in the electronic contract means that the real identity of each party to be signed can be quickly confirmed through a Certificate Authority (CA) issued by a CA or an eID authentication system of a public security department, so that the authenticity and reliability of the contract are guaranteed, and the guarantee is provided for signing the online electronic contract without meeting.
Then, an initial electronic contract is determined according to a selection instruction input by the first user, wherein the initial electronic contract is an electronic contract template file in a preset electronic contract database. In addition, the user can upload an electronic contract prepared by the user or generate an initial electronic contract by using a contract template function through different modes such as a PC terminal, an APP, WeChat, H5 and the like.
Step 202, obtaining a first electronic contract.
Specifically, after the initial electronic contract is determined, a first electronic contract may be acquired, where the first electronic contract is a contract to which a first electronic signature is added to the initial electronic contract. It is appreciated that the first electronic contract may be a contract signed by the first party on the initial electronic contract.
And step 203, acquiring a second electronic contract.
After the user (for example, the first party) finishes writing the contract body and covers the personal electronic signature, and the user can send the contract signed by the user to the other party (for example, the second party) after the processing is finished. The system may obtain a second electronic contract that is the contract with the second electronic signature added to the first electronic contract. It should be understood that the second electronic contract, which is the electronic contract signed by both parties, and includes the first electronic signature of the first user (e.g., party a) and the second electronic signature of the second user (e.g., party b), may also be regarded as the initial effective electronic contract.
In the process of signing the contract, a first time to add a first electronic signature on the initial electronic contract may also be recorded, the first electronic contract including the first time, and a second time to add a second electronic signature on the first electronic contract, the second electronic contract including the second time may also be recorded. In order to ensure the accuracy of time, the electronic contract signing system can also periodically time-synchronize with the time service center server.
In addition, in order to further improve the authenticity of the electronic contract, during the process of signing the contract, a first fingerprint (for example, fingerprint of the first party) added on the initial electronic contract can be acquired, the first electronic signature comprises the first fingerprint, and a second fingerprint (for example, fingerprint of the second party) added on the first electronic contract is acquired, and the second electronic signature comprises the second fingerprint.
And 204, encrypting the electronic contract by using a preset encryption algorithm, and storing the encrypted electronic contract to the first node.
And 205, converting the electronic contract into a character string by using a preset secure hash algorithm, and storing the character string to a preset secure storage platform.
Fig. 6 is a schematic structural diagram of an electronic contract management apparatus according to an example embodiment of the present invention. As shown in fig. 6, the electronic contract management apparatus 300 provided by the present embodiment includes:
the instruction acquisition module 301 is configured to acquire an electronic contract verification instruction, where the electronic contract verification instruction includes identification information of an electronic contract;
a contract obtaining module 302, configured to obtain an electronic contract to be verified from a preset block chain according to the identification information;
the character string conversion module 303 is configured to convert the electronic contract to be verified into a first character string by using a preset secure hash algorithm;
a character string obtaining module 304, configured to obtain a second character string from a preset secure storage platform according to the identification information, where the second character string is a character string generated after an initial effective electronic contract corresponding to the identification information is converted by using the preset secure hash algorithm;
a contract checking module 305, configured to determine whether the electronic contract to be checked is valid according to the first character string and the second character string.
On the basis of the embodiment shown in fig. 6, fig. 7 is a schematic structural diagram of an electronic contract management apparatus according to another exemplary embodiment of the present invention. As shown in fig. 7, the contract obtaining module 302 is further configured to obtain an electronic contract, where the electronic contract includes a first electronic signature of a first user and a second electronic signature of a second user; the device, still include:
a contract encryption module 306, configured to encrypt the electronic contract by using a preset encryption algorithm, and store the encrypted electronic contract to a first node, where the first node is a node in the preset block chain;
the character string conversion module is further configured to convert the electronic contract into a character string by using the preset secure hash algorithm, and store the character string to the preset secure storage platform.
In one possible design, the contract obtaining module 302 is specifically configured to:
acquiring a first electronic contract, wherein the first electronic contract is a contract added with the first electronic signature on an initial electronic contract;
acquiring a second electronic contract, wherein the second electronic contract is the first electronic contract added with the second electronic signature, and the electronic contract is the second electronic contract.
In one possible design, the electronic contract management apparatus 300 further includes: the time recording module 307 is specifically configured to:
recording a first time at which the first electronic signature is appended to the initial electronic contract, the first electronic contract including the first time;
recording a second time at which the second electronic signature is added to the first electronic contract, the second electronic contract including the second time.
In one possible design, the electronic contract management apparatus 300 further includes:
an identity determination module 308, configured to determine that the first identity information of the first user is legal information;
the template selection module 309 is configured to determine the initial electronic contract according to a selection instruction input by the first user, where the initial electronic contract is an electronic contract template file in a preset electronic contract database.
In one possible design, the electronic contract management apparatus 300 further includes: the fingerprint obtaining module 310 is specifically configured to:
obtaining a first fingerprint added to the initial electronic contract, the first electronic signature including the first fingerprint;
obtaining a second fingerprint added to the first electronic contract, the second electronic signature including the second fingerprint.
It should be noted that the electronic contract management apparatuses provided in the embodiments shown in fig. 7 to 8 can be used to execute the electronic contract management method provided in any of the above embodiments, and the specific implementation manner and technical effects are similar and will not be described again here.
Fig. 8 is a schematic structural diagram of an electronic device shown in accordance with an example embodiment of the present invention. As shown in fig. 8, the present embodiment provides an electronic device 400, including:
a processor 401; and the number of the first and second groups,
a memory 402 for storing executable instructions of the processor, which may also be a flash (flash memory);
wherein the processor 401 is configured to perform the steps of the above-described method via execution of the executable instructions. Reference may be made in particular to the description relating to the preceding method embodiment.
Alternatively, the memory 402 may be separate or integrated with the processor 401.
When the memory 402 is a device independent from the processor 401, the electronic device 40 may further include:
a bus 403 for connecting the processor 401 and the memory 402.
The present embodiment also provides a readable storage medium, in which a computer program is stored, and when at least one processor of the electronic device executes the computer program, the electronic device executes the methods provided by the above various embodiments.
The present embodiment also provides a readable storage medium, in which a computer program is stored, and when at least one processor of the electronic device executes the computer program, the electronic device executes the methods provided by the above various embodiments.
The present embodiment also provides a program product comprising a computer program stored in a readable storage medium. The computer program can be read from a readable storage medium by at least one processor of the electronic device, and the execution of the computer program by the at least one processor causes the electronic device to implement the methods provided by the various embodiments described above.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.