CN-115510154-B - Block chain-based evidence-storing data generation method and device and computer equipment
Abstract
The application relates to a method, a device and computer equipment for generating certification data based on a blockchain. The method comprises the steps of obtaining a target business bill, determining a target uplink format conversion template corresponding to the target business bill, determining a business field type corresponding to each business field, determining a mapping mode corresponding to each business field according to a mapping relation between each business field type and the target uplink format conversion template, mapping each business field according to the mapping mode corresponding to each business field to obtain at least one certificate field, and obtaining target certificate data with a standard uplink format according to the at least one certificate field. By adopting the method, the accuracy of generating the evidence-storing data can be improved.
Inventors
- HE CHENG
- LIN ZEPENG
- HUANG QINGLIN
Assignees
- 金蝶软件(中国)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20220922
Claims (17)
- 1. A blockchain-based prover data generation method, the method comprising: The method comprises the steps of obtaining a target business bill, determining a target uplink format conversion template corresponding to the target business bill according to a preset business association relation, wherein the target business bill comprises a plurality of business fields, the target uplink format conversion template comprises a mapping relation between a business field type and a certificate storage field type, a data authority identifier and an uplink component, the uplink component comprises a plurality of sub-conditions, and each sub-condition has a logic association relation, and the target uplink format conversion template is a template which is realized through intelligent contracts of a block chain and has a standard uplink format; Determining a service field type corresponding to each service field, and determining a certificate storage field type corresponding to each service field according to each service field type and the mapping relation, wherein the certificate storage field type comprises a common type and a designated type; Determining a mapping mode of mapping each service field into a corresponding to-be-generated evidence field according to the evidence field type, wherein the mapping mode comprises an automatic conversion mode, a value conversion mode and a hash processing mode, and the mapping mode of mapping the service field into the corresponding to-be-generated evidence field is determined to be the hash processing mode if the evidence field type is the appointed type and the service field type of the service field is the special type; Mapping each service field according to a mapping mode corresponding to each service field to obtain at least one certificate storage field; And obtaining target certification data with a standard uplink format according to the at least one certification field, wherein the target certification data is used for being uplink to a blockchain.
- 2. The method of claim 1, wherein prior to the acquiring the target business document, the method further comprises: The service association interface comprises a plurality of service documents and a plurality of uplink format conversion templates; responding to the association operation aiming at a plurality of business documents and a plurality of uplink format conversion templates, and obtaining the business association relation between the business documents and the uplink format conversion templates; the determining the target uplink format conversion template corresponding to the target business document comprises the following steps: and under the condition that the target business bill is obtained, determining a target uplink format conversion template corresponding to the target business bill according to the business association relation.
- 3. The method of claim 1, wherein after the determining the target ul format conversion template corresponding to the target business document, the method further comprises: Determining a field value corresponding to each service field, and determining a target field value corresponding to each sub-condition; screening the target field values corresponding to each sub-condition according to each sub-condition to obtain a plurality of screening results; according to the logic association relation between each sub-condition, associating a plurality of screening results to obtain an association result; And when the association result is characterized as true, the target business document is used as the target business document which passes the screening.
- 4. The method of claim 3, wherein the logical association comprises at least one of a logical AND, a logical OR, the screening result comprises any one of true or false, the associating the plurality of screening results according to the logical association between each of the sub-conditions to obtain an association result comprises: determining a current sub-condition and an adjacent sub-condition adjacent to the current sub-condition; According to the logical association relation between the current sub-condition and the adjacent sub-condition, associating the screening result corresponding to the current sub-condition with the screening result corresponding to the adjacent sub-condition to obtain an association result; And taking the adjacent sub-condition as a new current sub-condition, taking the association result as a screening result of the new current sub-condition, and returning to the step of determining the adjacent sub-condition adjacent to the current sub-condition to continue until all the screening results are associated.
- 5. The method according to claim 1, wherein the determining a mapping manner corresponding to each service field according to each service field type and the mapping relationship includes: For each service field in a plurality of service fields, determining a certificate storage field type corresponding to the current service field according to the mapping relation and the service field type of the current service field; And determining a mapping mode corresponding to the current service field according to the type of the certificate field.
- 6. The method of claim 5, wherein determining the type of the certificate field corresponding to the current service field according to the mapping relationship and the type of the service field of the current service field comprises: When the service field type is at least one of a character string type, a numerical value type, a basic data type and an entry type, determining that the type of the certificate storage field corresponding to the current service field is a common type according to the mapping relation; And when the service field type is at least one of a multi-choice type, an accessory field and a special type, determining that the type of the certificate storage field corresponding to the current service field is a specified type according to the mapping relation.
- 7. The method of claim 5, wherein the determining, according to the type of the certificate field, a mapping manner corresponding to the current service field includes: when the type of the certificate storage field is a common type, determining that the mapping mode corresponding to the current service field is an automatic conversion mode; mapping each service field according to the mapping mode corresponding to each service field to obtain at least one certificate storage field, wherein the mapping method comprises the following steps: And mapping the current service field according to the automatic conversion mode to obtain a current certificate field corresponding to the certificate field type.
- 8. The method of claim 5, wherein the determining, according to the type of the certificate field, a mapping manner corresponding to the current service field includes: When the type of the certificate storage field is a specified type, determining that the mapping mode corresponding to the current service field is a value conversion mode; mapping each service field according to the mapping mode corresponding to each service field to obtain at least one certificate storage field, wherein the mapping method comprises the following steps: And mapping each service field according to the value conversion mode to obtain at least one certificate storage field.
- 9. The method of claim 8, wherein the value conversion method includes any one of a splicing process and a sequence process, and wherein mapping each service field according to the value conversion method to obtain at least one certificate field includes: determining a plurality of first service fields of which the mapping mode is the value conversion mode; When the value conversion mode is splicing processing, adding a separator between each first service field, and splicing the first service fields added with the separator to obtain a certificate storage field; when the value conversion mode is sequence processing, each first service field is subjected to serialization processing according to a preset standard data format, and a certificate storage field is obtained.
- 10. The method of claim 5, wherein the determining, according to the type of the certificate field, a mapping manner corresponding to the current service field includes: when the type of the certificate storage field is a designated type and is provided with a manual configuration identifier, determining that the mapping mode corresponding to the current service field is a hash processing mode; mapping each service field according to the mapping mode corresponding to each service field to obtain at least one certificate storage field, wherein the mapping method comprises the following steps: Determining a selected plurality of second service fields in response to a selection operation for the plurality of service fields; carrying out serialization processing on each second service field according to a preset standard data format to obtain a service character string; and determining a hash value corresponding to the service character string, and taking the hash value as a certificate field.
- 11. The method of claim 1, wherein obtaining target forensic data in a standard uplink format from the at least one forensic field comprises: synthesizing each certificate storage field to obtain candidate certificate storage data, and determining an identity corresponding to the target business bill according to the data authority identification; when a target digital identity matched with the identity is found from a preset database, the candidate certificate data are used as certificate data with a standard uplink format; the method further comprises the steps of: And associating the target digital identity with the target certification data, and uploading the target certification data to the blockchain through the target digital identity.
- 12. The method according to claim 1, wherein the method further comprises: When a uplink task is received, determining a uplink mode in the uplink task; when the uplink mode is a timing batch mode, determining all target business documents generated in a preset uplink time period; And determining the target certification storage data corresponding to each target business bill, and uploading each target certification storage data to the blockchain by calling a preset interface.
- 13. The method according to claim 12, wherein the method further comprises: When the uplink mode is an event triggering mode, monitoring a plurality of service events, wherein the service events comprise at least one of service bill approval, service bill pushing and service bill closing; When a target business event is monitored, determining a target business document corresponding to the target business event; and determining target certification data corresponding to the target business bill, and uploading the target certification data to the blockchain by calling a preset interface.
- 14. A blockchain-based forensic data generation device, the device comprising: The system comprises a service receipt acquisition module, a target uplink format conversion module and a target uplink format conversion module, wherein the service receipt acquisition module is used for acquiring a target service receipt and determining a target uplink format conversion module corresponding to the target service receipt according to a preset service association relation, the target service receipt comprises a plurality of service fields, the target uplink format conversion module comprises a mapping relation between a service field type and a certificate storage field type, a data authority identifier and an uplink component, the uplink component comprises a plurality of sub-conditions, and each sub-condition has a logic association relation; The mapping mode determining module is used for determining the service field type corresponding to each service field, and determining the evidence storage field type corresponding to each service field according to each service field type and the mapping relation; determining a mapping mode of mapping each service field to a corresponding to-be-generated certificate field according to the certificate field type, wherein the mapping mode of mapping the service field to the corresponding to-be-generated certificate field is a hash processing mode if the certificate field type is the specific type and the service field type of the service field is the special type; The system comprises a service field, a certification data determining module, a certification data processing module and a certification processing module, wherein the service field is used for processing a block chain, the certification data determining module is used for respectively mapping each service field according to a mapping mode corresponding to each service field to obtain at least one certification field, obtaining target certification data with a standard uplink format according to the at least one certification field, and the target certification data is used for being uplink to the block chain.
- 15. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 13 when the computer program is executed.
- 16. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 13.
- 17. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 13.
Description
Block chain-based evidence-storing data generation method and device and computer equipment Technical Field The present application relates to the field of blockchain technologies, and in particular, to a blockchain-based method, device, and computer apparatus for generating certification data. Background With the development of the blockchain technology, business systems of different enterprises can take business documents as one type of certification data and uplink the certification data to the blockchain, namely, the blockchain certification. The stored business document cannot be tampered, is convenient to share by all parties, can be used as electronic evidence when disputes occur, and realizes full-link credibility and the like. At present, when the service system and the blockchain system are integrated, the service system needs to adopt the forms of SDK or API and the like supported by the blockchain bottom layer framework, and redevelop different heterogeneous service documents to meet the required intelligent contracts, and the functions of interaction and integration with the blockchain and the like. However, the existing blockchain underlying system is huge and complex, and the business system and the blockchain system often adopt different development languages, development specifications, data storage modes and the like, so that the difficulty of system development is high. Therefore, aiming at the business documents with larger structural difference, how to accurately obtain the certification data with the standard uplink format under the condition of reducing the development flow of the business system, thereby ensuring the data integration of the business system and the blockchain system is the problem to be solved by the application. Disclosure of Invention In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, a computer readable storage medium, and a computer program product for generating forensic data that can improve data uplink accuracy. In a first aspect, the present application provides a blockchain-based method of generating forensic data. The method comprises the following steps: the method comprises the steps of obtaining a target business bill, and determining a target uplink format conversion template corresponding to the target business bill, wherein the target business bill comprises a plurality of business fields, and the target uplink format conversion template comprises a mapping relation between a business field type and a certificate storage field type; Determining the type of each service field corresponding to each service field, and determining the mapping mode corresponding to each service field according to each service field type and the mapping relation; Mapping each service field according to a mapping mode corresponding to each service field to obtain at least one certificate storage field; And obtaining target certification data with a standard uplink format according to the at least one certification field, wherein the target certification data is used for being uplink to a blockchain. In one embodiment, before the target business document is acquired, a business association interface is displayed, the business association interface comprises a plurality of business documents and a plurality of uplink format conversion templates, business association relations between the business documents and the uplink format conversion templates are obtained in response to association operations for the business documents and the uplink format conversion templates, and the determining of the target uplink format conversion templates corresponding to the target business document comprises determining the target uplink format conversion templates corresponding to the target business document according to the business association relations under the condition that the target business document is acquired. In one embodiment, the target uplink format conversion template comprises a uplink condition, the uplink component comprises a plurality of sub-conditions, each sub-condition has a logic association relation, after the target uplink format conversion template corresponding to the target service bill is determined, the method further comprises the steps of determining a field value corresponding to each service field, determining a target field value corresponding to each sub-condition, screening the target field value corresponding to each sub-condition according to each sub-condition to obtain a plurality of screening results, associating the screening results according to the logic association relation between the sub-conditions to obtain an association result, and taking the target service bill as a screened target service bill when the association result is characterized as true. In one embodiment, the logic association relation comprises at least one of logic AND, logic OR, wherein the screening result comprises any one of true