Business data voucher automatic generation and storage method

By monitoring data change events in the business system, generating PDF voucher documents, and storing them on the blockchain, the problem of scattered and incomplete voucher data in cross-border business is solved. This enables the automated generation, integration, and secure storage of vouchers, improving their credibility and convenience.

CN121327059APending Publication Date: 2026-01-13YOUDINGTE TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511522467.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

In modern international trade and cross-border business, traditional paper-based voucher management methods are difficult to meet enterprises' needs for the completeness, credibility, and traceability of business vouchers. Electronic voucher management suffers from problems such as data dispersion and difficulty in unified integration, resulting in incomplete voucher information and an inability to cover the entire data record chain.

Method used

By monitoring data change events from multiple business systems, utilizing a monitoring proxy module and a unified data access interface, change notifications are generated. The data set is then converted into a PDF-format credential document, and after performing SHA-256 hash calculations, it is stored on the blockchain platform, achieving automated data collection, integration, and secure storage.

Benefits of technology

It creates a unified credential document covering the entire business chain, ensuring the accuracy and logical rationality of credential data, improving the credibility and ease of use of credentials, supporting rapid verification and tamper detection, and solving the security risks of decentralized data storage and centralized evidence storage platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121327059A_ABST
    Figure CN121327059A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data voucher processing, and discloses a business data voucher automatic generation and storage method. The method comprises the following steps: monitoring data change events of a plurality of service systems, and analyzing the data change events to obtain a change notification; acquiring a data set in each service system according to the change notice, and performing PDF format conversion on the data set to obtain a voucher document; performing SHA-256 Hash calculation on the voucher document to obtain a data abstract value which uniquely identifies the voucher document; and submitting the data abstract value to a block chain platform for evidence storage to obtain an evidence storage record. According to the invention, the accuracy and logic rationality of the business data in the voucher are ensured, the automatic conversion from the business data to the standardized voucher document is realized, and the use convenience of the voucher is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data certificate processing, and particularly relates to a business data certificate automatic generation and storage method. BACKGROUND

[0002] In modern international trade and cross-border business, the business process usually involves multiple links such as procurement, freight, customs declaration, warehouse in and out, financial pledge, etc., and a large amount of business data and certificate documents will be generated in each link. With the continuous improvement of the complexity of global supply chain and the increasingly strict regulatory compliance requirements, enterprises have higher requirements for the integrity, credibility and traceability of business certificates. The traditional paper certificate management mode has been difficult to meet the needs of modern business, and although electronic certificate management has improved efficiency, it still faces many challenges in data integration, authenticity verification and tamper protection. The current business certificate management has the problem of scattered data and difficulty in unified integration. The data in different links are stored in independent business systems such as procurement systems, transportation systems, customs declaration systems and warehouse systems, and it is difficult for enterprises to form complete and unified business certificates. In addition, although operation logs can be recorded within a single system, cross-link data records are missing, and the complete business chain from the manufacturer to the final consignee cannot be covered, resulting in incomplete certificate information. SUMMARY

[0003] The main purpose of the present application is to provide a business data certificate automatic generation and storage method, which ensures the accuracy and logical rationality of the business data in the certificate, realizes the automatic conversion from business data to standardized certificate documents, and improves the use convenience of the certificate.

[0004] To achieve the above purpose, the present application provides a business data certificate automatic generation and storage method, comprising the following steps: listening to data change events of multiple business systems and analyzing the data change events to obtain change notifications; obtaining data sets in each business system according to the change notifications, and performing PDF format conversion on the data sets to obtain certificate documents; performing SHA-256 hash calculation on the certificate documents to obtain a data digest value uniquely identifying the certificate documents; submitting the data digest value to a blockchain platform for storage to obtain a storage record.

[0005] Optionally, in the first implementation manner of the first aspect of the present application, the listening to data change events of multiple business systems and analyzing the data change events to obtain change notifications comprises: The listening agent module is deployed in the plurality of business systems, and when a business data is added, deleted or modified, a database trigger mechanism is triggered to capture a data change event; Based on a preset business association mapping table, the data change events belonging to the same business process in the procurement system, the freight system, the customs declaration system, the warehouse in / out system and the pledge system are associated to obtain a first event set; According to the change amount threshold, the business link weight and the compliance requirement, an event importance score is calculated, and the first event set is filtered based on the event importance score to obtain a second event set; The second event set of the same business process is integrated into a single change record to generate a change notification.

[0006] Optionally, in the second implementation manner of the first aspect of the present application, the data set in each business system is obtained according to the change notification, and the data set is converted into a PDF format to obtain a voucher document, comprising: According to the business process identifier in the change notification, the procurement data is obtained from the procurement system, the freight data is obtained from the freight system, the customs declaration data is obtained from the customs declaration system, the warehouse in / out data is obtained from the warehouse in / out system, and the pledge data is obtained from the pledge system through a unified data access interface to obtain an original data set; The time stamps of different business systems in the original data set are converted into a unified time format, the currency amount is converted into a standard numerical format, and the commodity code is converted into an international standard code to obtain a standardized data set; The business logic verification is performed on the standardized data set to obtain a trusted data set; According to the business process order from the manufacturer to the final consignee, the procurement data, the freight data, the customs declaration data, the warehouse in / out data and the pledge data in the trusted data set are time-associated and business-associated to obtain a data set; The data set is organized and arranged according to a voucher template and converted into a PDF format to obtain a voucher document.

[0007] Optionally, in the third implementation manner of the first aspect of the present application, the business logic verification is performed on the standardized data set to obtain a trusted data set, comprising: The data integrity of the contract number and the supplier information of the procurement data, the transportation number and the carrier information of the freight data, the customs declaration number and the commodity code of the customs declaration data, the warehouse location and the inventory quantity of the warehouse in / out data, and the pledge description and the evaluation value of the pledge data in the standardized data set are checked to obtain a field integrity check list; Based on the data records passed in the field integrity checking list, verify whether the cargo quantity and contract amount are within the preset business scope, check whether the procurement time is earlier than the shipment time and the shipment time is earlier than the warehousing time, and obtain valid data records; Compare the procurement contract cargo quantity in the valid data record with the declared quantity in the customs declaration, calculate the difference between the contract amount and the actual payment amount, and match and verify the total weight of the cargo with the load limit of the transport vehicle, to obtain a verification report; According to the verification report, filter out business data with complete fields and passed consistency verification, and mark and isolate abnormal records with missing data or logical contradictions, to obtain a trusted data set.

[0008] Optionally, in a fourth implementation manner of the first aspect of the present application, the data set is arranged and converted into a PDF format according to the voucher template to obtain a voucher document, including: According to the type characteristics of the business process in the data set, a standard template is selected from a preset voucher template library, and the procurement data, freight data, customs data, warehouse data and pledge data are filled into the corresponding field positions of the standard template one by one to obtain a template instance; The business data in the template instance is rearranged according to a preset time flow order to obtain a data organization structure; The data organization structure is input into a PDF document generator for layout rendering to obtain a PDF document; A document identifier containing generation time and version information is embedded in the header position of the PDF document, and a two-dimensional code image containing a blockchain verification address is inserted in the footer position to obtain a voucher document.

[0009] Optionally, in a fifth implementation manner of the first aspect of the present application, the data organization structure is input into a PDF document generator for layout rendering to obtain a PDF document, including: Content data is extracted from the data organization structure; The display width and required number of lines of each paragraph of text are calculated based on the type identifier in the content data to obtain rendering data; The display area in the PDF page is allocated according to the length and importance of the text content in the rendering data to obtain a layout scheme; The text drawing function of the PDF document generator is called to output each paragraph of business text according to the layout scheme, the table drawing function is called to generate a data-aligned table structure, and the page control function is called to set the margin and pagination, to obtain a PDF document.

[0010] Optionally, in the sixth implementation form of the first aspect of the present application, the SHA-256 hash calculation on the certificate document to obtain the data digest value uniquely identifying the certificate document comprises: performing a structural integrity check on the certificate document to verify whether the document header, the business content area and the page footer are complete without missing, and extracting the key business segment content of the procurement data, the freight data, the customs declaration data, the warehouse in / out data and the pledge data respectively to obtain a document byte stream; splitting the document byte stream according to a fixed data block length to obtain a data block set; performing SHA-256 hash algorithm calculation on each data block in the data block set in sequence according to the serial number to obtain a hash value sequence; concatenating each hash digest in the hash value sequence according to the original serial number of the data block to obtain a total hash string after concatenation, and performing SHA-256 operation on the total hash string after concatenation again to generate the data digest value uniquely identifying the certificate document.

[0011] Optionally, in the seventh implementation form of the first aspect of the present application, the submission of the data digest value to the block chain platform for notarization to obtain a notarization record comprises: establishing an encrypted communication connection with a preset block chain platform using a two-way SSL certificate, completing platform access verification by submitting a pre-configured identity authentication certificate, obtaining operation permissions and a unique session identifier allocated by the block chain platform to obtain a secure connection session; combining and packaging the data digest value, the business type identifier of the certificate document, the generation timestamp and the data source information based on the secure connection session to obtain notarization request data; submitting the notarization request data to a smart notarization contract pre-deployed on the block chain platform, and writing the notarization request data into a block chain ledger after the smart notarization contract performs format verification and permission verification on the notarization request data to obtain an on-chain transaction record; extracting a globally unique notarization number, a transaction confirmation hash value and a block chain confirmation timestamp automatically generated by the smart notarization contract from the on-chain transaction record to obtain a notarization record.

[0012] Optionally, in the eighth implementation form of the first aspect of the present application, the business data certificate automatic generation and notarization method further comprises: receiving a certificate verification request submitted by a verification party, parsing the notarization number and the certificate document to be verified from the certificate verification request, and identifying the verification mode specified in the certificate verification request to obtain verification request information; generating a to-be-verified hash value according to the verification mode in the verification request information. using the storage number in the verification request information as a query condition, retrieving the corresponding storage record through a query interface of the blockchain platform, extracting the data digest value and storage time information at the time of initial storage from the retrieved storage record, and obtaining an on-chain storage hash value; comparing the to-be-verified hash value and the on-chain storage hash value by string, and obtaining a credential integrity verification result.

[0013] Optionally, in a ninth implementation manner of the first aspect of the present application, the step of comparing the to-be-verified hash value and the on-chain storage hash value by string, and obtaining a credential integrity verification result, comprises: performing a format specification check on the to-be-verified hash value and the on-chain storage hash value, and obtaining a standard hash value pair; comparing the to-be-verified hash value and the on-chain storage hash value in the standard hash value pair by bit according to the character position sequence, checking whether the characters at each position are completely identical from the first character, recording the corresponding position index and character content when a mismatched character is found, and obtaining a character comparison record; calculating a similarity score of the hash value based on the number and distribution of the difference positions in the character comparison record, determining a complete matching state when the difference positions are zero, analyzing the distribution pattern of the difference characters when there are difference positions to identify the tampering type, and obtaining a matching degree analysis result; performing a comprehensive credibility evaluation according to the matching degree analysis result in combination with the storage time of the credential, the business data type, and the historical verification record, and obtaining a credential integrity verification result.

[0014] In summary, the application realizes the automatic collection and integration of heterogeneous system data such as procurement, freight, customs declaration, warehouse in and out, and pledge by deploying a listening agent module and a unified data access interface in multiple business systems, and solves the technical problems of scattered data storage and the need for manual aggregation in traditional solutions. Based on a business correlation mapping table and a process sequencing mechanism, the business data scattered in different systems are time-correlated and business-correlated according to the complete business process from the manufacturer to the final consignee, forming a unified voucher document covering the entire business chain. Through a multi-level business logic verification mechanism, including field integrity checking, value range verification, time sequence logic verification, and cross-system consistency verification, the accuracy and logical reasonableness of the business data in the voucher are ensured, and the credibility of the voucher is improved. The SHA-256 algorithm is used to perform block hashing calculation and multi-level hash merging processing on the voucher document to generate a unique data digest value, realizing accurate digital fingerprint identification of the voucher content, and being able to detect any minor tampering behavior. The voucher hash value is stored on a state-backed blockchain platform through a smart contract, and the decentralized consensus mechanism and tamper-proof characteristics of the blockchain are used to provide a trusted third-party evidence storage service for the voucher, solving the security risks of possible attacks or self-tampering of the centralized evidence storage platform. A multi-dimensional verification system based on evidence number direct verification, document hash verification, and credibility evaluation is established to support fast verification needs in different business scenarios and locate tampering positions to provide detailed verification reports. Through the voucher template library and the PDF document generator, automatic conversion from business data to standardized voucher documents is realized, a two-dimensional code containing blockchain verification information is embedded, mobile end fast verification is supported, and the convenience of using the voucher is improved. BRIEF DESCRIPTION OF DRAWINGS

[0015] Figure 1 is a step schematic diagram of the business data voucher automatic generation and evidence storage method in an embodiment of the application.

[0016] The implementation, functional features and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical scheme and advantages of the application more clear, the application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application and do not limit the application.

[0018] Referring to Figure 1 , the embodiment provides a business data voucher automatic generation and evidence storage method, including the following steps: S1, listening to data change events of multiple business systems, and analyzing the data change events to obtain change notifications; Wherein, a listening agent module is pre-deployed in each business system, and the listening agent module captures the change event in the first time and encapsulates it into a standardized event object containing data primary key, change type, timestamp and before and after state snapshot through the linkage mechanism with the underlying database trigger when the core business data occurs addition, deletion, modification and other operations in the procurement, freight, customs, warehouse in and out and pledge and other systems. In order to avoid the event isolation caused by the information fragmentation between different systems, a business association mapping table is maintained in the system, which defines the key data identifiers involved in the same business process in different systems and their corresponding relationship. When the listening module captures the event, the multi-source change events belonging to the same procurement to delivery chain are automatically associated through the mapping table to obtain the first event set covering the procurement, transportation, customs, warehousing and pledge links. The first event set is filtered through the event importance scoring model, the scoring model considers the change amount threshold, business link weight and compliance requirements and other factors to calculate the importance score of the event, and the events which have substantial impact on the voucher value or compliance are retained. When the importance score exceeds the preset threshold, the corresponding event is classified into the second event set, and the low value events are automatically excluded to avoid the generation of redundant vouchers. Based on the second event set, according to the unique identifier of the business process, multiple change events in the same business chain within a short time are merged and processed, a change record is generated through the time window algorithm and logical integration mechanism, and a change notification is output.

[0019] S2, according to the change notification, obtaining a data set in each business system, and converting the data set into a PDF format to obtain a voucher document; Specifically, the business process identifier contained in the change notification is analyzed, the procurement system, the freight system, the customs declaration system, the warehouse in / out system and the pledge system are connected respectively through a preset unified data access interface, and the contract terms and price information in the procurement link, the transportation route and carrier information in the freight link, the commodity code and tax rate information in the customs declaration link, the inventory quantity and quality inspection record in the warehouse in / out link, and the collateral description and evaluation value in the pledge link are obtained in sequence to form an original data set. The timestamp fields of different business systems in the original data set are uniformly converted, marked with a standard international time format, different currency amounts used in each business system are standardized numerical conversion to avoid the influence of currency differences on calculation, and the commodity code is mapped to an international standard code to ensure data consistency and connectivity in cross-border business. After standardization, business logic verification is performed to verify whether the contract amount and the remittance amount are consistent, whether the transportation weight and the vehicle carrying capacity are matched, whether the customs declaration quantity and the procurement quantity are consistent, and whether the pledge value is reasonably corresponding to the contract record, and a reliable data set is obtained under multi-dimensional rule verification. According to the business process order from the manufacturer to the final consignee, the procurement, freight, customs declaration, warehouse in / out and pledge data in the reliable data set are time-correlated and logically correlated, so that the data can be clearly mapped into a complete transaction chain, ensuring that the voucher content has full-link traceability. Through the voucher template generation engine, the data set after verification and correlation is arranged according to the established format template, the dynamic placeholders are filled in, and the metadata such as timestamp, data source and version information are embedded to automatically generate a PDF format voucher document.

[0020] S3, performing SHA-256 hash calculation on the voucher document to obtain a data digest value uniquely identifying the voucher document; It should be noted that the structural integrity check on the credential document verifies the existence of the document header, the business content area and the page tail through the analysis of the internal structure of the PDF document, ensures that the document has not been truncated, damaged or illegally tampered with, and extracts the key business segment content of the procurement data, freight data, customs data, warehouse data and pledge data in the document respectively in the process. The document byte stream is divided into a set of data blocks in sequence according to the fixed data block length. Each data block in the data block set is sequentially executed according to the original sequence number. The SHA-256 hash algorithm is operated to obtain a corresponding data block hash value sequence. The hash value itself has the characteristics of one-way and anti-collision, and can uniquely identify the content of a single data block. All hash digests in the data block hash value sequence are concatenated in the original order of the data block to form a total hash string covering the entire document content, and a unique and fixed length data digest value is generated by executing the SHA-256 operation on the total hash string.

[0021] S4, submit the data digest value to the blockchain platform for notarization to obtain a notarization record.

[0022] Specifically, through the communication security module, a two-way SSL certificate is used to establish an encrypted communication connection with the pre-configured blockchain platform, ensuring the integrity and confidentiality of the data in transmission, and completing the access verification of the platform by submitting the pre-configured identity authentication credentials, obtaining the operation permission and unique session identifier allocated by the blockchain platform, and forming a secure connection session that can be continuously interacted. Based on the secure connection session, the credential document data digest value and the business type identifier, the generation timestamp and the data source information and other core elements are combined and packaged according to the pre-defined data mode to obtain the notarization request data. The notarization request data is submitted to the smart notarization contract pre-deployed on the blockchain platform. The contract will automatically verify the format specification of the data and the validity of the permission of the submitter. Only requests that meet the contract logic can be accepted and written into the blockchain ledger to generate the corresponding on-chain transaction record. With the consensus confirmation of multiple nodes in the blockchain network, the globally unique notarization number, transaction confirmation hash value and blockchain confirmation timestamp automatically generated by the smart notarization contract are extracted from the on-chain transaction record, and these key data are integrated into the final notarization record.

[0023] In one example, data change events of multiple business systems are listened to, and the data change events are parsed to obtain change notifications, including: A listening agent module is deployed in the multiple business systems, and when business data is added, deleted or modified, a database trigger mechanism is triggered to capture data change events; Based on a preset business association mapping table, data change events in the procurement system, the freight system, the customs declaration system, the warehouse in / out system and the pledge system that belong to the same business process are associated to obtain a first event set; An event importance score is calculated according to a change amount threshold value, a business link weight and a compliance requirement, and the first event set is screened based on the event importance score to obtain a second event set; The second event set of the same business process is integrated into a single change record to generate a change notification.

[0024] In this example, lightweight data capture components are introduced in core business links such as procurement systems, freight systems, customs systems, warehouse systems, and pledge systems. These components capture real-time changes through trigger mechanisms with underlying databases. When users or systems perform operations such as insertion, update, or deletion on business data, triggers can instantly generate standardized messages containing data primary keys, operation types, timestamps, and data snapshots before and after changes, and deliver them to the central monitoring processing module through message queue mechanisms to ensure that data events are not missed due to differences between heterogeneous systems. At the same time, the central processing module calls a pre-set business association mapping table, which defines the correspondence between business process identifiers across systems, such as the correspondence between procurement contract numbers and customs declaration numbers, and the correspondence between freight batch numbers and warehouse entry numbers. By comparing these key identifiers, data change events from different business systems but belonging to the same business process are automatically associated to form a first event set covering procurement, transportation, customs, warehousing, and pledge links. The importance of the event is quantitatively evaluated. The evaluation model introduces three main parameters: change amount, business link weight, and compliance requirements. The change amount is based on the actual value, and when the amount exceeds the pre-set threshold, the importance of the event is increased; the business link weight is set based on the criticality of the process, for example, the customs link has a higher weight coefficient than the ordinary warehouse record because it involves tax and regulatory compliance; the compliance requirement evaluation is a binary or multi-level assignment combining external regulatory rules and internal risk strategies. The importance score of the event is calculated by a linear weighting model, for example, using the method "score = amount factor x a + weight factor x b + compliance factor x g", where a, b, and g are pre-set weight coefficients and are dynamically adjusted according to historical business risk cases. The event score calculated by the linear weighting model is compared with the pre-set threshold, and when the score is higher than the threshold, the event enters the second event set, and events below the threshold are automatically filtered to reduce the generation of invalid vouchers. The second event set in the same business process is merged and integrated. Since multiple changes related to the same business process may occur in a short period of time, such as procurement price adjustment and corresponding payment information update, these events are aggregated within a time window to eliminate duplication and conflicts, generating a single change record containing comprehensive change content. The single change record retains the core fields of the key events and is organized in chronological and business logic order to form a change chain. The merged change record is packaged as a standardized change notification, which contains process identifier, change summary, trigger time, and impact range, etc.

[0025] In one example, a data set in each business system is obtained according to the change notification, and the data set is converted to PDF format to obtain a voucher document, including: According to the business process identification in the change notification, the procurement data is obtained from the procurement system, the freight data is obtained from the freight system, the customs declaration data is obtained from the customs declaration system, the warehouse in / out data is obtained from the warehouse in / out system, and the pledge data is obtained from the pledge system through the unified data access interface, to obtain an original data set; The time stamps of different business systems in the original data set are converted into a unified time format, the currency amounts are converted into a standard numerical format, and the commodity codes are converted into international standard codes, to obtain a standardized data set; The business logic verification is performed on the standardized data set, to obtain a trusted data set; The procurement data, the freight data, the customs declaration data, the warehouse in / out data and the pledge data in the trusted data set are time-associated and business-associated according to the business process sequence from the manufacturer to the final consignee, to obtain a data collection; The data collection is organized and arranged according to the voucher template and converted into a PDF format, to obtain a voucher document.

[0026] In this example, a unified data access interface is constructed, which can mask the differences in database architecture, interface protocol and data structure of different business systems, and provide consistent calling methods between procurement system, freight system, customs declaration system, warehouse system and pledge system. When the system receives a change notification containing a business process identifier, the data access interface automatically identifies the relevant business node according to the identifier, and extracts contract terms, supplier qualifications and price information from the procurement system, extracts carrier name, transportation mode and voyage route from the freight system, extracts commodity code, customs declaration rate and customs clearance status from the customs declaration system, extracts warehouse location, inventory quantity and quality inspection record from the warehouse system, and extracts pledge description, valuation and pledge period from the pledge system, etc., to form a raw data set covering the whole process. Standardization processing is performed on the raw data set, including converting the local time stamp or regional time representation in different systems into a unified international standard time format, uniformly converting the currency amounts involved in the procurement and payment links and retaining the standard numerical precision, and mapping various commodity codes used in the customs declaration link to international universal codes to eliminate data semantic differences, to obtain a standardized data set that can be directly compared and operated. Business logic verification is performed on the standardized data set, which verifies whether the procurement quantity and the customs declaration quantity match, whether the transportation weight and the cargo weight marked in the contract are consistent, whether the warehouse records correspond to the actual inventory changes, and whether the pledge valuation forms a reasonable interval relationship with the procurement contract and the payment amount, and a trusted data set is obtained after verification. The trusted data set is reorganized according to the business process sequence from the manufacturer to the final consignee, time correlation and business correlation are established, the procurement contract can be correctly associated with the corresponding freight batch, the freight information can be smoothly connected to the customs declaration process, the customs declaration completed data can be matched to the warehouse link, and the pledge information can form a logical closed loop with the previous procurement and financial links, to obtain a multi-link data set. A preset voucher template generation engine is called to organize and arrange various information in the data set according to industry standards and regulatory requirements, fill in the necessary dynamic placeholders in the layout and automatically embed meta-information, including generating time stamp, data source system identifier and version number, etc., and then convert the document to PDF format conforming to international common specifications to form a voucher document.

[0027] In one example, business logic verification is performed on the standardized data set to obtain a trusted data set, including: checking the data integrity of the contract number and supplier information in the procurement data, the transportation number and carrier information in the freight data, the customs declaration number and commodity code in the customs declaration data, the warehouse location and inventory quantity in the warehouse data, and the pledge description and valuation in the pledge data in the standardized data set, to obtain a field integrity check list; Based on the data records passed in the field integrity check list, verify whether the quantity of goods and the contract amount are within the preset business scope, check whether the procurement time is earlier than the delivery time and the delivery time is earlier than the warehousing time, and obtain valid data records; Compare the quantity of goods in the procurement contract in the valid data records with the declared quantity in the customs declaration, calculate the difference between the contract amount and the actual payment amount, and match and verify the total weight of the goods with the load limit of the transport vehicle to obtain a verification report; According to the verification report, filter out business data with complete fields and pass the consistency verification, and mark and isolate abnormal records with missing data or logical contradictions to obtain a trusted data set.

[0028] In this example, the standardized data set is subjected to field integrity check, and the contract number in the procurement data and the supplier information, the transport number in the freight data and the carrier information, the customs declaration number in the customs data and the commodity code, the storage location in the warehouse data and the inventory quantity, and the pledge description in the pledge data and the evaluation value are compared one by one according to the preset business rules to ensure that there is no missing or null value in the key fields at the semantic level and the format conforms to the established standard, and a field integrity check list is generated, in which each business record is marked as passed or failed. The data records that pass the preliminary check are subjected to logical consistency check, which specifically includes verifying whether the quantity of goods and the contract amount fall within the preset reasonable business scope, such as the contract amount cannot be lower than the lower limit of the commodity market reference price, nor can it exceed the set tolerance upper limit, and checking whether the procurement time set in the contract is earlier than the delivery time and the delivery time is earlier than the warehousing time, which avoids unreasonable time sequence caused by data errors or human tampering through time sequence logic verification, and obtains valid data records that conform to business logic. The quantity of goods in the procurement contract in the valid data records is compared with the declared quantity in the customs declaration one by one to determine whether the difference between the two is within the allowed deviation threshold; at the same time, the contract amount agreed upon and the actual payment amount are calculated for the difference, and if the difference exceeds the preset proportion threshold, an alert will be triggered; the total weight of the goods is matched and verified with the maximum load limit of the transport vehicle to avoid impossible transport bearing. Through the above comparison and calculation, a verification report is generated, which lists the comparison results of each data in quantity, amount and weight, and indicates whether the difference is over-standard and the source of the abnormality. According to the verification report, the data is classified and processed, the business data with complete fields and passing the logical and numerical comparison is filtered out to form a trusted data set; for data records with missing fields, logical contradictions or numerical abnormalities, an abnormality mark is automatically added and stored separately.

[0029] According to the check report, business data with complete fields and passing consistency verification is screened out, and abnormal records with data missing or logical contradiction are marked and isolated to obtain a trusted data set, including: performing multi-level correlation analysis on the business data in the check report, establishing a data correlation topology graph reflecting the inherent dependence relationship of the business process by identifying the deep business logic correlation between procurement data, freight data, customs data, warehouse data and pledge data instead of only direct data matching relationship, and obtaining a business data correlation graph with high-order correlation characteristics; based on the business data correlation graph, embedded feature learning is performed on multi-dimensional business data, deep feature representation of data at each business link is extracted through multi-layer business feature embedding analysis algorithm, and key business fields with the greatest contribution to the credibility of the voucher are identified by combining key business feature sparse extraction technology to obtain a business data feature matrix containing deep feature information; the business data feature matrix is input into a business feature importance weight calculation module, a business feature importance weight matrix is obtained by learning a business feature weight distribution scheme with sparsity, assigning higher weights to core business elements such as contract amount, cargo quantity and time node, and assigning lower weights to auxiliary business information; according to the business feature importance weight matrix, key field screening is performed on the business data, and the screening strategy is dynamically adjusted according to the relationship between the data size and the field dimension by using an adaptive optimization algorithm, coarse-grained screening is used when the data size is large, and fine-grained screening is used when the field dimension is high, to obtain simplified business data containing an optimal business feature subset; intelligent marking processing is performed on records with data quality problems or logical conflicts in the simplified business data, the influence weight of the abnormal records is calculated based on the business feature weight matrix, high-weight abnormal records are marked and processed preferentially, and low-weight abnormal records are generally marked and isolated in batches to obtain a trusted data set optimized by high-order feature analysis.

[0030] In one example, the data set is organized and arranged according to the voucher template and converted into PDF format to obtain a voucher document, including: According to the type characteristics of the business process in the data set, a matching standard template is selected from the preset voucher template library, and the procurement data, freight data, customs data, warehouse data and pledge data are filled into the corresponding field positions of the standard template one by one to obtain a template instance; The business data in the template instance is rearranged according to the preset time flow order to obtain a data organization structure; The data organization structure is input into a PDF document generator for layout rendering to obtain a PDF document; The document identification containing the generation time and version information is embedded in the header position of the PDF document, and the two-dimensional code image containing the blockchain verification address is inserted in the footer position to obtain a voucher document.

[0031] In this example, a pre-set credential template library is established, which contains multiple standardized format styles, and each template corresponds to a specific business process type feature, such as contract and payment information required for cross-border procurement process, carrier and route information required for freight process, tax rate and coding information required for customs declaration process, warehouse and quantity information required for warehouse in / out process, and collateral description and evaluation value required for pledge process. The type features of the business process in the data set are analyzed and matched with the pre-set rules in the template library, and the matching standard template is selected. For example, when the process identifier shows that the set involves cross-border procurement and is accompanied by financial pledge, a composite template containing procurement, transportation, customs declaration, warehouse, and pledge fields is selected. According to the field mapping rules, the procurement data, freight data, customs declaration data, warehouse in / out data, and pledge data are filled into the corresponding field positions of the template one by one, and the field mapping function f(datai)→template fieldj is executed to obtain a template instance with complete business information. The business data in the template instance is rearranged according to the pre-set time process order. The procurement contract data is taken as the starting point, followed by the delivery data matched with the procurement time, then the customs declaration information is introduced, followed by the warehouse in / out record, and finally the pledge related data is appended. Through the rearrangement of the time sequence, the data organization structure conforming to the business logic chain is formed, that is, the data sequence D={procurement, freight, customs declaration, warehouse in / out, pledge}, which is reordered according to the constraint condition t(procurement)<t(freight)<t(in / out) to obtain the time chain arrangement. The data organization structure is input into the PDF document generator, and the data is visualized and arranged through the layout rendering module. The PDF generator automatically adjusts the table boundaries, font size, line spacing, and paragraph structure according to the format constraints in the template to generate a PDF document with complete content and conforming to industry standards. The document identification containing the generation time and version number is embedded in the header position of the PDF document. At the same time, a two-dimensional code image containing the blockchain verification address is automatically inserted in the footer position of the document to obtain the credential document. The two-dimensional code is generated by encoding the on-chain storage number and verification interface address, realizing the integration verification of the credential on and off the chain. When the user or the supervisor needs to verify, he or she only needs to scan the two-dimensional code to call the blockchain interface to check the authenticity of the document.

[0032] In one example, the data organization structure is input into the PDF document generator for layout rendering to obtain a PDF document, including: extracting content data from the data organization structure; calculating the display width and required number of lines of each segment of text based on the type identifier in the content data to obtain rendering data; allocating display areas in the PDF page according to the length and importance of the text content in the rendering data to obtain a layout scheme; According to the layout scheme, the PDF document generator is called to output each segment of business text by the text drawing function, to generate data-aligned table structure by the table drawing function, and to set the page margin and pagination by the page control function, so as to obtain the PDF document.

[0033] In this example, the content data in the organizational structure is extracted one by one, including business process description text, contract clause information, freight detail data, customs declaration list items, warehouse entry and exit records, and evaluation of collateral, etc. The type identifier is used to determine the presentation method of each segment of data, for example, contract clauses belong to long text, freight and customs items belong to table data, and time stamp and amount data belong to numerical key fields. Based on the type identifier in the content data, the display requirements of the text are calculated to obtain rendering data. Through the font metric module of the layout engine, the display width of each segment of text is estimated according to the selected font family, font size and line spacing parameters, and the number of lines required by each segment of text is calculated by converting the available width of the page, for example, number of lines = ⌈total character width ÷ page effective width⌉, wherein the total character width is determined by the font properties and the actual number of characters determined by the type identifier. The display area is allocated in the PDF page according to the length and importance of the text content in the rendering data. Considering the length of the text occupying the page space, and introducing the importance of the business content as a weight factor, the display space is reasonably allocated in the limited page area. When a segment of text is marked as "key clause" or "mandatory field for supervision", the importance weight is higher, and a larger display area is automatically allocated to ensure that it will not affect readability due to compact layout; and for ordinary explanatory text, the area is reduced according to a lower weight, wherein the length of the text determines the minimum space requirement, and the importance determines the additional expansion space. In this process, the segments of text are arranged in the order of the business process, so that the layout scheme is not only reasonable in space utilization, but also coherent in logical presentation, and the layout scheme is obtained. The layout scheme is input to call the rendering function of the PDF document generator. Through the text drawing function, each segment of business text is output according to the specified coordinate position and font parameters, and the line spacing is kept consistent when the page is broken; for the part containing numerical data and cross-system alignment information, the table drawing function is used to generate a table structure with clear boundaries and balanced column width, so that the freight quantity, customs code and inventory record fields can be intuitively aligned and verified; the page margin setting and pagination control are performed on the whole document by the page control function, so as to ensure that the page breaks naturally when the data volume is large, the header and footer are consistent, and the generated document is standardized, and finally the PDF document is output.

[0034] In one example, the SHA-256 hash calculation is performed on the certificate document to obtain a data digest value uniquely identifying the certificate document, including: Perform structural integrity check on the voucher document to verify whether the document header, business content area and page footer are complete and intact, and extract the key business segment content of procurement data, freight data, customs data, warehouse data and pledge data respectively to obtain the document byte stream; Split the document byte stream according to the fixed data block length to obtain a data block set; Perform SHA-256 hash algorithm calculation on each data block in the data block set in sequence according to the sequence number to obtain a hash value sequence; String splice each hash digest in the hash value sequence according to the original sequence number of the data block to obtain a spliced total hash string, and perform SHA-256 operation on the spliced total hash string again to generate a data digest value uniquely identifying the voucher document.

[0035] In this example, the voucher document is subjected to structural integrity check, including verifying each of the three parts of the PDF document, i.e. the document header, business content area and page footer. The document header contains file identification, version information and format declaration, the business content area contains business data of key links such as procurement, freight, customs, warehouse and pledge, and the page footer contains end marker and possible digital signature information. By parsing the internal structure tree of the document, it is confirmed whether these areas are complete, and if the structure is incomplete, an exception is thrown to prevent subsequent processes. After confirming the structural integrity, the procurement contract number and supplier field, freight waybill number and carrier field, customs declaration number and commodity code field, warehouse location and inventory quantity field, and pledge description and evaluation value field are extracted respectively to convert the core business segment content into a byte stream. The document byte stream is split according to the fixed data block length to form a data block set. For example, assuming the length of the document byte stream is L and the length of each data block is k, the number of data blocks is represented as n=⌈L÷k⌉. The data block set obtained by splitting is arranged in the original order from the 1st block to the nth block. Perform SHA-256 hash algorithm calculation on each data block, which has the properties of one-wayness and avalanche effect, i.e. even if only one byte in the data block changes, the output hash digest will be completely different. Each data block generates a hash digest of 256 bits after operation, and a hash value sequence H={h1,h2,…,h n} is obtained. String splice each hash digest in the hash value sequence according to the original sequence number of the data block to form a continuous large string. Perform SHA-256 operation on the spliced total hash string again to generate a data digest value D, which is the global digital fingerprint of the entire voucher document.

[0036] The SHA-256 hash algorithm is sequentially executed on each data block in the data block set in sequence order to obtain a hash value sequence, including: applying an optimized weight distribution window to each data block in the data block set for preprocessing, setting differential weight coefficients according to byte positions within the data block, setting lower weights for bytes in the starting and ending 16% regions of the data block, and setting higher weights for bytes in the central region, to obtain a weighted data block with weight optimization characteristics; inputting the weighted data block into a multi-level data processing unit for iterative operation, increasing the data correlation strength between adjacent bytes by increasing the data processing level, reducing the hash calculation error and data information loss caused by data block boundary segmentation, and obtaining a processed data block with multi-level correlation optimization; executing a hash value distribution concentration optimization algorithm on the processed data block, concentrating the data feature extraction region by controlling the effective hash calculation range, and applying noise suppression technology to reduce the interference of irrelevant data on the hash result, to obtain an optimized data block with optimal distribution characteristics; performing hash operation on the optimized data block according to the improved SHA-256 algorithm process, using the weight optimization and noise suppression data distribution characteristics to improve the distinguishability and uniqueness of the hash value, reducing the probability of hash collision between different credential documents, and obtaining a single-block hash value with enhanced unique identification capability; sequentially combining the single-block hash values according to the original processing sequence number of the data block to form a complete hash feature representation reflecting the optimized processing of the entire credential document, and obtaining a hash value sequence.

[0037] In one example, the data digest value is submitted to the blockchain platform for notarization to obtain a notarization record, including: A two-way SSL certificate is used to establish an encrypted communication connection with the preset blockchain platform, platform access verification is completed by submitting preconfigured identity authentication credentials, operation permissions and a unique session identifier allocated by the blockchain platform are obtained, and a secure connection session is obtained; Based on the secure connection session, the data digest value is combined and packaged with the business type identifier of the credential document, the generation timestamp and the data source information to obtain a notarization request data; The notarization request data is submitted to the smart notarization contract pre-deployed on the blockchain platform, and the smart notarization contract writes the notarization request data into the blockchain ledger after performing format verification and permission verification on the notarization request data, to obtain an on-chain transaction record; The globally unique notarization number, transaction confirmation hash value and blockchain confirmation timestamp automatically generated by the smart notarization contract are extracted from the on-chain transaction record to obtain a notarization record.

[0038] In this example, a two-way SSL certificate is used to establish an encrypted communication connection with the preset blockchain platform. The exchange and verification of both parties' certificates ensure that both parties are legitimate nodes, avoiding man-in-the-middle attacks and fake access risks. In the handshake phase, the system submits pre-configured identity authentication credentials, including platform-issued digital certificates, access keys, or account signatures. After verification, the platform assigns the system a specific range of operating permissions and a unique session identifier, generating a secure connection session. After the session is established, the data encapsulation phase of the evidence request begins. The data digest value generated by the hash calculation of the certificate document will serve as the core identifier, combined with the business type identifier of the certificate document, the generation timestamp, and the data source information. The combination operation follows a pre-set data structure model, such as R = {D, T, ts, S}, where D is the digest value calculated by SHA-256, T identifies the business type corresponding to the certificate (such as procurement, customs declaration, or pledge), ts is the standardized timestamp of the document generation, and S is the unique identifier of the data source system. Through encapsulation, the evidence request data with complete business context is obtained. The encapsulated evidence request data is submitted to the smart evidence contract pre-deployed on the blockchain platform. The smart evidence contract is written in a smart contract language and has the ability to automatically execute predefined logic. Upon receiving the evidence request data, the contract first performs format verification to ensure that the data conforms to the standard structure, the fields are complete, and the timestamp is within a reasonable range. If any abnormalities are found, the contract will reject the on-chain submission. At the same time, the contract calls the permission verification module to check whether the submitter's identity credentials have the right to write to the blockchain ledger. Only when both verification and validation are successful will the evidence request data be written to the blockchain ledger, generating a chain transaction record. After the transaction is completed and written to the ledger, the globally unique evidence number, transaction confirmation hash value, and blockchain confirmation timestamp generated by the smart evidence contract are extracted from the chain transaction record. The evidence number is encoded by combining the timestamp, block height, and business type to ensure uniqueness. The transaction confirmation hash value is the transaction identifier generated after the blockchain consensus, used for quick query and verification, while the confirmation timestamp provides chain-on-time proof for the certificate record. These information are summarized as evidence records, forming a chain-on and chain-off correspondence with the local certificate document.

[0039] In one example, the business data certificate automatic generation and evidence storage method further comprises: receiving a certificate verification request submitted by the verification party, parsing the evidence number and the certificate document to be verified from the certificate verification request, and identifying the verification mode specified in the certificate verification request to obtain verification request information; generating a to-be-verified hash value according to the verification mode in the verification request information; Using the storage number in the verification request information as a query condition, the corresponding storage record is retrieved through the query interface of the blockchain platform, the data digest value and the storage time information at the time of storage are extracted from the retrieved storage record, and the on-chain storage hash value is obtained; The to-be-verified hash value is compared with the on-chain storage hash value by string-by-string matching, and a credential integrity verification result is obtained.

[0040] In this example, a credential verification request submitted by a verification party is received, and the credential verification request is in the form of a standardized data message, which includes a copy of the to-be-verified credential document, a storage number, and selection information of a verification mode. After receiving the request, it is parsed to confirm whether the storage number field exists and is in a legal format, and the to-be-verified credential document is extracted as the original input, while identifying the verification mode specified by the verification party, such as a whole document-based overall hash verification mode, or a local hash verification mode based on key business paragraphs, or a mode that only relies on the storage number for quick on-chain record verification, to obtain verification request information. According to the verification mode in the verification request information, a corresponding to-be-verified hash value is generated. If the verification mode is overall verification, the to-be-verified credential document is subjected to integrity checking after confirming that the document header, business content, and tail exist, the byte stream is extracted and SHA-256 hash digest is calculated for each block according to the block processing method, the hash digests of all blocks are spliced and subjected to SHA-256 operation again to obtain the global hash value; if the verification mode is local verification, only the key paragraph content such as procurement contract, customs declaration, or collateral assessment is extracted according to the preset business rules, and the same block and hash operation is performed on the key paragraph content to obtain the local hash value. According to the storage number in the verification request information, a standard query interface of the blockchain platform is called to retrieve the storage record corresponding to the storage number from the distributed ledger. During the query process, the blockchain platform locates the block where the storage transaction is located through indexing, and returns core contents including the data digest value generated at the time of storage, storage time information, and transaction confirmation hash. The data digest value is denoted as H, and the storage time information is retained as a time marker for on-chain authentication, to obtain an immutable reference hash value on the blockchain. The to-be-verified hash value calculated locally is compared with the hash value in the blockchain storage record by string-by-string matching, and it is determined whether the two are completely identical. If they are identical in every character, it means that the to-be-verified credential document has not been changed in structure and content, and the verification result is “complete and reliable”; if there is a difference between the two, even if only one character is different, it can be inferred that the credential document has been tampered with or damaged after storage, and the verification result is returned as a failure and an exception is prompted.

[0041] In one example, the to-be-verified hash value is compared with the on-chain storage hash value by string-by-string matching, and a credential integrity verification result is obtained, including: A format specification check is performed on the to-be-verified hash value and the on-chain evidence hash value, obtaining a standard hash value pair; The to-be-verified hash value in the standard hash value pair and the on-chain evidence hash value are compared bit by bit according to the character position order, starting from the first character, to check whether the characters at each position are completely identical. When a mismatched character is found, the corresponding position index and character content are recorded, obtaining a character comparison record; Based on the difference position quantity and distribution in the character comparison record, the similarity score of the hash value is calculated. When the difference position is zero, it is determined as a complete matching state. When there is a difference position, the distribution pattern of the difference character is analyzed to identify the tampering type, obtaining a matching degree analysis result; According to the matching degree analysis result, the evidence storage time, business data type and historical verification record are comprehensively evaluated to obtain a certificate integrity verification result.

[0042] In this example, the to-be-verified hash value and the on-chain evidence hash value are subjected to a format specification check to ensure that both have consistent length, character set and encoding rules before comparison. Since the result generated by SHA-256 hash operation is a fixed-length hexadecimal string, it is detected whether the hash value meets the expected length (for example, 256 bits corresponding to 64-bit hexadecimal string), and it is checked whether there are illegal characters. When it is found that there are spaces, mixed cases or inconsistent encoding, standardization processing is performed to convert it into a unified lowercase hexadecimal string, obtaining a standard hash value pair that can be directly compared, denoted as H v and H c , representing the to-be-verified hash value and the on-chain evidence hash value respectively. The to-be-verified hash value in the standard hash value pair and the on-chain evidence hash value are compared bit by bit according to the character position order. The comparison process starts from the first character and checks whether the characters at each position are completely identical. When a character at a certain position is found to be mismatched, the corresponding position index and the specific content of the difference character are recorded, forming a character comparison record. For example, if a difference occurs at the 15th position, the record content is "index=15, H v character=a, H cThe character=f". The similarity score of the hash value is calculated based on the character comparison record, and the overall matching degree is analyzed through the number and distribution of difference positions. If the number of difference positions is zero, it means that the two hash values are completely consistent, and the certificate document has not been tampered with or damaged since the storage, and it is determined to be a complete matching state; if there are difference positions, it means that the document has deviation from the state when it is stored. The total number of difference positions is counted, and further analysis is carried out in combination with the distribution mode of the difference characters. For example, when the difference characters are concentrated in the first half, it means that the document header or structure information is modified; when the difference characters are distributed in multiple positions and exist sporadically, it means that the document has encountered random damage in the transmission or storage process. Through the analysis of the difference distribution mode, the matching degree analysis result is output. Based on the matching degree analysis result, and in combination with the storage time of the certificate, the type of business data, and the historical verification record, the comprehensive credibility is evaluated. The storage time can reflect the length of time that the certificate exists on the chain, and a longer storage time means higher credibility; the type of business data determines the importance of the certificate in the overall business chain, for example, a certificate involving financial pledge will be given higher weight in credibility evaluation; the historical verification record provides a consistency reference for the results in multiple verifications, and if a certificate is consistent in multiple verifications, it means that it is more reliable. By comprehensively considering these factors, an integrity verification result of the current certificate is output.

[0043] It should be noted that in this document, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, device, article or method including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or inherent to such a process, device, article or method. Without more limitations, the element defined by the statement "including a…" does not exclude the presence of another identical element in the process, device, article or method including the element.

[0044] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the present application specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for automatically generating and storing business data vouchers, characterized in that, include: Monitor data change events from multiple business systems, parse the data change events, and obtain change notifications; The data sets from each business system are obtained according to the change notification, and the data sets are converted into PDF format to obtain voucher documents; Perform a SHA-256 hash calculation on the credential document to obtain a data digest value that uniquely identifies the credential document; The data digest value is submitted to the blockchain platform for notarization, resulting in a notarization record.

2. The method for automatically generating and storing business data vouchers according to claim 1, characterized in that, The process involves monitoring data change events from multiple business systems, parsing these events, and obtaining change notifications, including: A monitoring agent module is deployed in the multiple business systems. When business data is added, deleted, or modified, a database trigger mechanism is triggered to capture the data change event. Based on a preset business association mapping table, data change events belonging to the same business process in the procurement system, freight system, customs declaration system, warehousing system, and pledge system are associated to obtain a first event set; The importance score of an event is calculated based on the change amount threshold, the weight of the business process, and the compliance requirements. The first set of events is then filtered based on the importance score to obtain a second set of events. The second set of events in the same business process is integrated into a single change record, and a change notification is generated.

3. The method for automatically generating and storing business data vouchers according to claim 1, characterized in that, The step involves obtaining data sets from various business systems based on the change notification, converting the data sets into PDF format to obtain voucher documents, including: Based on the business process identifier in the change notification, the original dataset is obtained by retrieving procurement data from the procurement system, freight data from the freight system, customs declaration data from the customs declaration system, warehousing data from the warehousing system, and pledge data from the pledge system through the unified data access interface. The timestamps of different business systems in the original dataset are converted into a unified time format, the currency amounts are converted into a standard numerical format, and the product codes are converted into international standard codes to obtain a standardized dataset. Perform business logic verification on the standardized dataset to obtain a trusted dataset; According to the business process sequence from the manufacturer to the final consignee, the procurement data, freight data, customs declaration data, warehousing data and pledge data in the trusted dataset are linked by time and business to obtain a data set; The data set is organized and arranged according to the voucher template and converted to PDF format to obtain the voucher document.

4. The method for automatically generating and storing business data vouchers according to claim 3, characterized in that, The step of performing business logic verification on the standardized dataset to obtain a trusted dataset includes: Check the data integrity of the standardized dataset, including contract number and supplier information of procurement data, waybill number and carrier information of freight data, customs declaration number and commodity code of customs declaration data, warehouse location and inventory quantity of inbound and outbound data, and description and appraised value of pledged assets, to obtain a field integrity checklist. Based on the data records that have passed the field integrity checklist, verify whether the quantity of goods and the contract amount are within the preset business scope, check whether the purchase time is earlier than the delivery time and the delivery time is earlier than the warehousing time, and obtain valid data records. The verification report is obtained by comparing the quantity of goods in the purchase contract in the valid data record with the quantity declared in the customs declaration, calculating the difference between the contract amount and the actual payment amount, and matching the total weight of the goods with the load limit of the transport vehicle. Based on the verification report, business data with complete fields and passing consistency verification are selected, while abnormal records with missing data or logical contradictions are marked and isolated to obtain a trusted dataset.

5. The method for automatically generating and storing business data vouchers according to claim 4, characterized in that, The process of organizing and arranging the data set according to the voucher template and converting it to PDF format to obtain a voucher document includes: Based on the type characteristics of the business processes in the data set, a matching standard template is selected from the pre-set voucher template library. The purchase data, freight data, customs declaration data, inbound and outbound data, and pledge data are filled into the corresponding field positions of the standard template one by one to obtain a template instance. The business data in the template instance is rearranged according to a preset time flow order to obtain a data organization structure; The data organization structure is input into a PDF document generator for layout and rendering to obtain a PDF document; A document identifier containing the generation time and version information is embedded in the header of the PDF document, and a QR code image containing the blockchain verification address is inserted in the footer to obtain a credential document.

6. The method for automatically generating and storing business data vouchers according to claim 5, characterized in that, The process of inputting the data organization structure into a PDF document generator for layout and rendering to obtain a PDF document includes: Extract content data from the data organization structure; Based on the type identifier in the content data, the display width and required number of lines for each segment of text are calculated to obtain the rendering data; Based on the length and importance of the text content in the rendered data, a display area is allocated on the PDF page to obtain a layout scheme; Following the layout scheme, the PDF document generator's text drawing function is used to output the business text in each segment, the table drawing function is used to generate a data-aligned table structure, and the page control function is used to set the page margins and pagination to obtain the PDF document.

7. The method for automatically generating and storing business data vouchers according to claim 1, characterized in that, The step of performing SHA-256 hash calculation on the credential document to obtain a data digest value that uniquely identifies the credential document includes: Perform a structural integrity check on the voucher document to verify whether the document header, business content area and page footer are complete and without missing parts. At the same time, extract the key business segment content of the procurement data, freight data, customs declaration data, warehouse entry and exit data and pledge data respectively to obtain the document byte stream. The document byte stream is divided into data block sets according to fixed data block lengths; For each data block in the data block set, the SHA-256 hash algorithm is executed sequentially according to the sequence number to obtain a hash value sequence; The hash digests in the hash value sequence are concatenated in the original sequence number order of the data blocks to obtain the concatenated total hash string. The concatenated total hash string is then subjected to SHA-256 operation again to generate a data digest value that uniquely identifies the credential document.

8. The method for automatically generating and storing business data vouchers according to claim 1, characterized in that, The step of submitting the data digest value to the blockchain platform for notarization and obtaining the notarization record includes: Establish an encrypted communication connection with the preset blockchain platform using a two-way SSL certificate, complete the platform access verification by submitting pre-configured identity authentication credentials, obtain the operation permissions and unique session identifier assigned by the blockchain platform, and obtain a secure connection session; Based on the secure connection session, the data digest value is combined and encapsulated with the business type identifier, generation timestamp and data source information of the credential document to obtain the evidence storage request data; The evidence storage request data is submitted to a smart evidence storage contract pre-deployed on the blockchain platform. After performing format verification and permission verification on the evidence storage request data, the smart evidence storage contract writes the evidence storage request data into the blockchain ledger to obtain on-chain transaction records. Extract the globally unique notarization number, transaction confirmation hash value, and blockchain confirmation timestamp automatically generated by the smart notarization contract from the on-chain transaction records to obtain the notarization record.

9. The method for automatically generating and storing business data vouchers according to claim 1, characterized in that, The method for automatically generating and storing business data credentials also includes: Receive a credential verification request submitted by the verifier, parse the evidence storage number and the credential document to be verified from the credential verification request, and identify the verification mode specified in the credential verification request to obtain verification request information; Generate a hash value to be verified based on the verification mode in the verification request information; Using the certificate number in the verification request information as the query condition, the corresponding certificate record is retrieved through the query interface of the blockchain platform. The data digest value and certificate time information at the time of the certificate are extracted from the retrieved certificate record to obtain the on-chain certificate hash value. The hash value to be verified is compared with the on-chain evidence storage hash value string by string to obtain the certificate integrity verification result.

10. The method for automatically generating and storing business data vouchers according to claim 9, characterized in that, The step of performing a string-by-string matching and comparison between the hash value to be verified and the on-chain evidence storage hash value to obtain the credential integrity verification result includes: The format and standardization of the hash value to be verified and the on-chain evidence storage hash value are checked to obtain standard hash value pairs; The hash value to be verified in the standard hash value pair is compared with the on-chain evidence storage hash value in character position order. Starting from the first character, each character position is checked to see if they are completely identical. When a mismatch is found, the corresponding position index and character content are recorded to obtain the character comparison record. The similarity score of the hash value is calculated based on the number and distribution of the differences in the character comparison record. When the number of differences is zero, it is determined to be a complete match. When there are differences, the distribution pattern of the differences in the characters is analyzed to identify the type of tampering and obtain the matching degree analysis result. Based on the matching degree analysis results, combined with the voucher's storage time, business data type, and historical verification records, a comprehensive credibility assessment is conducted to obtain the voucher integrity verification result.

Citation Information

Cited By

  • Automatic process management method and system applied to foreign trade business intellectualization

    CN121581817A

  • An automatic process management method and system applied to foreign trade business intelligence

    CN121581817B