Purchase file generation method and system based on modularized file template
Through the component-based file template generation method, the problems of inefficient and security risks of traditional procurement file formulation are solved, and efficient and secure procurement file generation and management are achieved.
Patent Information
- Application Number
- CN202411566788.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-03-07
AI Technical Summary
Traditional procurement documents are inefficient in drafting, prone to errors, and pose safety risks, especially paper materials are easily forged.
The component-based file template generation method is adopted to obtain and parse historical procurement files through the server, create component libraries, provide a visual interface for file template configuration and data entry, and realize electronic signatures and encrypted storage.
It improves the efficiency and quality of procurement documents, reduces errors, enhances the security of documents, and prevents forgery.
Smart Images

Figure CN119578386A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of document management, and in particular to a procurement document generation method and system based on componentized document templates. Background Art
[0002] During the operation of an enterprise, a large number of items need to be purchased, such as office equipment, equipment consumables, production materials, etc. In the process of purchasing items, an enterprise needs to prepare relevant procurement documents, such as procurement activity records, procurement budgets, bidding documents, tender documents, bid evaluation criteria, evaluation reports, bid determination documents, contract texts, acceptance certificates, responses to inquiries, and complaint handling decisions.
[0003] With regard to the preparation of procurement documents, it is traditionally generally adopted to make adaptive modifications by referring to procurement documents prepared in the past. If relevant procurement documents have not been prepared in the past, they will be prepared from scratch. This has the disadvantages of low preparation efficiency and easy errors in the preparation process. In addition, procurement documents prepared traditionally are paper materials, which are only stamped with official seals and are easy to be forged, posing certain security risks.
[0004] Therefore, how to provide a procurement document generation method and system based on componentized document templates to improve the efficiency, quality and security of procurement document drafting has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a procurement document generation method and system based on componentized document templates, so as to improve the efficiency, quality and security of procurement document drafting.
[0006] In a first aspect, the present invention provides a method for generating a procurement document based on a componentized document template, comprising the following steps:
[0007] Step S1: The server obtains a large number of historical procurement files, and parses each of the historical procurement files to obtain a corresponding file structure;
[0008] Step S2: the server creates several components based on the file structure, configures the elements contained in each component, and stores each component in a pre-created component library;
[0009] Step S3: After verifying the received procurement document preparation request, the server displays the document template configuration panel through a visual interface;
[0010] Step S4: Based on a preset interaction mode, components in the component library are selected through the file template configuration panel, and the selected components are typeset to obtain a file template for generating a procurement document;
[0011] Step S5, setting a signature rule, entering the procurement data into the document template to generate a procurement document, electronically signing the procurement document according to the signature rule to obtain a signature QR code, and loading the signature QR code onto the procurement document;
[0012] Step S6: export the electronically signed procurement document, and encrypt and store the electronically signed procurement document.
[0013] Furthermore, the step S1 is specifically as follows:
[0014] The server automatically obtains a large number of historical procurement documents from the database through the ETL tool, identifies the file content of each of the historical procurement documents through OCR technology, and parses the content of each of the files through a pre-trained large language model to obtain the corresponding file structure.
[0015] Furthermore, the step S2 is specifically as follows:
[0016] The server creates a plurality of components based on the file structure, wherein the components at least include a directory, a label, a first-level title, a second-level title, a third-level title, a fourth-level title, a fifth-level title, a sixth-level title, a text, a comment, a line break, a table, an underline, and a page break;
[0017] Configure the elements contained in each of the components, the elements at least include bidder qualification requirements, purchaser contact address, agency address, agency service fee information, project implementation location and general labels; the same labels at least include project name, project number, purchaser name, supply scope and interface, negotiation main items, procurement document basic format, purchaser contact, purchaser contact number and agency contact;
[0018] Configuring component parameters and component styles of each of the components, wherein the component parameters of the catalog at least include catalog group name, catalog name, element code, file type, procurement method, project type, enablement status, element editing flag, component editing flag and operation flag; the operation flag includes modification and deletion;
[0019] Each of the components is stored in a pre-created component library.
[0020] Furthermore, the step S3 is specifically as follows:
[0021] The server receives a procurement document preparation request, parses the procurement document preparation request to obtain an account number, a password, a first timestamp, and a hash value, wherein the hash value is obtained by performing a hash calculation on the account number, the password, and the first timestamp;
[0022] After the server performs integrity verification on the account, password and first timestamp through the hash value, it performs timeliness verification through the first timestamp, and then verifies the legitimacy of the account and password through the preset user management table. If the verification passes, the file template configuration panel is displayed through a visual interface.
[0023] Furthermore, in step S5, the signature rule is specifically as follows:
[0024] A data interception rule and a pair of public and private keys are set, signature basic data are intercepted from the procurement document based on the data interception rule, the current second timestamp is obtained, MAC calculation is performed on the signature basic data and the second timestamp to obtain a MAC value, the signature basic data, the second timestamp and the MAC value are signed by the private key to obtain signature data, the signature basic data, the second timestamp, the MAC value and the signature data are encrypted by the 3DES algorithm to obtain encrypted data, and the encrypted data is converted into a signature QR code by a QR code generator.
[0025] In a second aspect, the present invention provides a procurement document generation system based on componentized document templates, comprising the following modules:
[0026] A historical purchase file parsing module is used for the server to obtain a large number of historical purchase files, and parse each of the historical purchase files to obtain a corresponding file structure;
[0027] A component creation module, used for the server to create several components based on the file structure, configure the elements contained in each component, and store each component in a pre-created component library;
[0028] The file template configuration panel display module is used for displaying the file template configuration panel through a visual interface after the server verifies the received procurement document preparation request;
[0029] A file template creation module, used to select components in the component library through the file template configuration panel based on a preset interaction mode, typeset the selected components, and obtain a file template for generating a procurement document;
[0030] A procurement document generation module, used to set a signature rule, enter procurement data into the document template to generate a procurement document, electronically sign the procurement document according to the signature rule to obtain a signature QR code, and load the signature QR code onto the procurement document;
[0031] The procurement document management module is used to export the procurement document with electronic signature and encrypt and store the procurement document with electronic signature.
[0032] Furthermore, the historical procurement document parsing module is specifically used for:
[0033] The server automatically obtains a large number of historical procurement documents from the database through the ETL tool, identifies the file content of each of the historical procurement documents through OCR technology, and parses the content of each of the files through a pre-trained large language model to obtain the corresponding file structure.
[0034] Furthermore, the component creation module is specifically used to:
[0035] The server creates a plurality of components based on the file structure, wherein the components at least include a directory, a label, a first-level title, a second-level title, a third-level title, a fourth-level title, a fifth-level title, a sixth-level title, a text, a comment, a line break, a table, an underline, and a page break;
[0036] Configure the elements contained in each of the components, the elements at least include bidder qualification requirements, purchaser contact address, agency address, agency service fee information, project implementation location and general labels; the same labels at least include project name, project number, purchaser name, supply scope and interface, negotiation main items, procurement document basic format, purchaser contact, purchaser contact number and agency contact;
[0037] Configuring component parameters and component styles of each of the components, wherein the component parameters of the catalog at least include catalog group name, catalog name, element code, file type, procurement method, project type, enablement status, element editing flag, component editing flag and operation flag; the operation flag includes modification and deletion;
[0038] Each of the components is stored in a pre-created component library.
[0039] Furthermore, the file template configuration panel display module is specifically used to:
[0040] The server receives a procurement document preparation request, parses the procurement document preparation request to obtain an account number, a password, a first timestamp, and a hash value, wherein the hash value is obtained by performing a hash calculation on the account number, the password, and the first timestamp;
[0041] After the server performs integrity verification on the account, password and first timestamp through the hash value, it performs timeliness verification through the first timestamp, and then verifies the legitimacy of the account and password through the preset user management table. If the verification passes, the file template configuration panel is displayed through a visual interface.
[0042] Furthermore, in the procurement document generation module, the signature rule is specifically as follows:
[0043] A data interception rule and a pair of public and private keys are set, signature basic data are intercepted from the procurement document based on the data interception rule, the current second timestamp is obtained, MAC calculation is performed on the signature basic data and the second timestamp to obtain a MAC value, the signature basic data, the second timestamp and the MAC value are signed by the private key to obtain signature data, the signature basic data, the second timestamp, the MAC value and the signature data are encrypted by the 3DES algorithm to obtain encrypted data, and the encrypted data is converted into a signature QR code by a QR code generator.
[0044] The advantages of the present invention are:
[0045] 1. Obtain a large number of historical procurement files through the server and parse them to obtain the corresponding file structure. Create several components based on the file structure, configure the elements contained in each component and store them in the component library; then verify the received procurement file drafting request, display the file template configuration panel through the visual interface, select the components in the component library through the file template configuration panel based on the preset interaction method, layout the selected components, and obtain the file template for generating procurement files; then set a signature rule, enter the procurement data in the file template to generate the procurement file, and electronically sign the procurement file according to the signature rule. to the signature QR code, load the signature QR code on the procurement document, and finally export the procurement document with electronic signature, and encrypt and store the procurement document with electronic signature; that is, through the interactive method of dragging and dropping, in the file template configuration panel, you can select and layout the components in the component library to quickly generate a file template, and then enter the procurement data in the file template to quickly generate a procurement document without starting from scratch. The components can also reduce the amount of data entered by the user to reduce errors in the drafting process, and the generated procurement documents can be electronically signed, which greatly improves the efficiency, quality and security of procurement document drafting.
[0046] 2. Automatically obtain a large number of historical procurement documents from the database through ETL tools, identify the file content of each historical procurement document through OCR technology, and parse the content of each file through a pre-trained large language model to obtain the corresponding file structure. That is, the file structure is obtained from a large number of historical procurement documents through a large language model. This can not only ensure the accuracy of file structure acquisition, but also ensure the comprehensiveness of file structure acquisition, thereby ensuring the quality of subsequent component creation and avoiding the loss of related components that affect the generation of procurement documents.
[0047] 3. By setting the procurement document draft request to carry the account number, password, first timestamp and hash value, the integrity can be checked through the hash value, the timeliness can be checked through the first timestamp, and the legitimacy can be checked through the account number and password. The file template configuration panel will be displayed through the visual interface only after the verification is passed, preventing illegal personnel from arbitrarily configuring file templates, thereby greatly improving the security of procurement document generation.
[0048] 4. By setting data interception rules and a pair of public and private keys, the basic data of the signature is intercepted from the procurement document based on the data interception rules, the current second timestamp is obtained, MAC calculation is performed on the basic data of the signature and the second timestamp to obtain the MAC value, the basic data of the signature, the second timestamp and the MAC value are signed by the private key to obtain the signature data, the basic data of the signature, the second timestamp, the MAC value and the signature data are encrypted by the 3DES algorithm to obtain the encrypted data, and the encrypted data is converted into a signature QR code by the QR code generator; the encrypted data is obtained by scanning the signature QR code to prevent the relevant data from being stolen in plain text. After the encrypted data is decrypted by the 3DES algorithm, the signature data is verified by the public key, and the integrity is checked by the MAC value, and the timeliness is checked by the second timestamp. Multiple security measures have been taken before and after, which greatly improves the difficulty of forging the signature QR code, thereby greatly improving the security of the procurement document. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.
[0050] Figure 1 It is a flow chart of a method for generating procurement documents based on componentized document templates of the present invention.
[0051] Figure 2 It is a structural schematic diagram of a procurement document generation system based on componentized document templates of the present invention. DETAILED DESCRIPTION
[0052] The overall idea of the technical solution in the embodiments of the present application is as follows: in the file template configuration panel, components in the component library are selected and arranged in an interactive manner by dragging and dropping to quickly generate a file template, and then procurement data is entered into the file template to quickly generate a procurement document without starting from scratch. Components can also reduce the amount of data entered by users to reduce errors in the drafting process, and the generated procurement documents are electronically signed, thereby improving the efficiency, quality and security of procurement document drafting.
[0053] Please refer to Figure 1 to Figure 2 As shown, a preferred embodiment of a procurement document generation method based on a componentized document template of the present invention comprises the following steps:
[0054] Step S1: The server obtains a large number of historical procurement files, and parses each of the historical procurement files to obtain a corresponding file structure;
[0055] Step S2: the server creates several components based on the file structure, configures the elements contained in each component, and stores each component in a pre-created component library;
[0056] Step S3: After verifying the received procurement document preparation request, the server displays the document template configuration panel through a visual interface;
[0057] Step S4: Based on the preset interaction mode, components in the component library are selected through the file template configuration panel, and the selected components are typeset to obtain a file template for generating a procurement file; the interaction mode at least includes dragging, pulling, and dragging; by setting the interaction mode to at least include dragging, pulling, and dragging, the user can select the corresponding interaction mode as needed during the file template configuration process, thereby greatly improving the user experience of the file template configuration;
[0058] Step S5, setting a signature rule, entering the procurement data into the document template to generate a procurement document, electronically signing the procurement document according to the signature rule to obtain a signature QR code, and loading the signature QR code onto the procurement document;
[0059] Step S6: export the electronically signed procurement document, and encrypt and store the electronically signed procurement document for later traceability.
[0060] During specific implementation, the procurement documents may be exported in different formats as required, such as PDF format.
[0061] The encrypted storage of the electronically signed procurement document is specifically as follows:
[0062] The electronically signed procurement document is encrypted into first-level encrypted data by the Twofile algorithm, each character in the first-level encrypted data is mapped by a preset first mapping rule to obtain second-level encrypted data, each character of the second-level encrypted data is shifted right by 7 bits to obtain third-level encrypted data, the third-level encrypted data is encrypted into fourth-level encrypted data by the XTEA algorithm, each character in the fourth-level encrypted data is mapped by a preset second mapping rule to obtain fifth-level encrypted data, the number 1 and the letter I in the fifth-level encrypted data are swapped, and the number 8 and the letter B are swapped to obtain sixth-level encrypted data, and the sixth-level encrypted data is encrypted by the RC6 algorithm to obtain an encrypted file; the encrypted file is stored in a preset path, and the encrypted file is distributedly backed up to the blockchain.
[0063] The procurement file is encrypted into first-level encrypted data by the Twofile algorithm, and each character in the first-level encrypted data is mapped by the preset first mapping rule to obtain second-level encrypted data, and each character of the second-level encrypted data is shifted right by 7 bits to obtain third-level encrypted data, and the third-level encrypted data is encrypted into fourth-level encrypted data by the XTEA algorithm, and each character in the fourth-level encrypted data is mapped by the preset second mapping rule to obtain fifth-level encrypted data, and the number 1 and the letter I in the fifth-level encrypted data are swapped, and the number 8 and the letter B are swapped to obtain sixth-level encrypted data, and the sixth-level encrypted data is encrypted by the RC6 algorithm to obtain an encrypted file; the encrypted file is stored in a preset path, and the encrypted file is distributedly backed up to the blockchain; that is, the encryption process of the procurement file involves multiple encryption algorithms and data transformation rules. If the corresponding encryption algorithm or data transformation rule is not known, the encrypted file cannot be cracked, and at least 10 security measures are taken before and after (Twofile). sh algorithm, first mapping rule, displacement direction, number of displacement bits, XTEA algorithm, second mapping rule, swapping number 1 and letter I, swapping number 8 and letter B, RC6 algorithm, distributed backup), which greatly improves the security of procurement file storage and facilitates later traceability.
[0064] The step S1 is specifically as follows:
[0065] The server automatically obtains a large number of historical procurement documents from the database through the ETL tool, identifies the file content of each of the historical procurement documents through OCR technology, and parses the content of each of the files through a pre-trained large language model to obtain the corresponding file structure.
[0066] A large number of historical procurement documents are automatically obtained from the database through ETL tools, the file content of each historical procurement document is identified through OCR technology, and the pre-trained large language model is used to parse the content of each file to obtain the corresponding file structure. That is, the file structure is obtained from a large number of historical procurement documents through a large language model. This can not only ensure the accuracy of file structure acquisition, but also ensure the comprehensiveness of file structure acquisition, thereby ensuring the quality of subsequent component creation and avoiding the loss of related components that affect the generation of procurement documents.
[0067] The step S2 is specifically as follows:
[0068] The server creates a plurality of components based on the file structure, wherein the components at least include a directory, a label, a first-level title, a second-level title, a third-level title, a fourth-level title, a fifth-level title, a sixth-level title, a text, a comment, a line break, a table, an underline, and a page break;
[0069] Configure the elements contained in each of the components, the elements at least include bidder qualification requirements, purchaser contact address, agency address, agency service fee information, project implementation location and general labels; the same labels at least include project name, project number, purchaser name, supply scope and interface, negotiation main items, procurement document basic format, purchaser contact, purchaser contact number and agency contact;
[0070] Configuring component parameters and component styles of each of the components, wherein the component parameters of the catalog at least include catalog group name, catalog name, element code, file type, procurement method, project type, enablement status, element editing flag, component editing flag and operation flag; the operation flag includes modification and deletion;
[0071] Each of the components is stored in a pre-created component library.
[0072] The step S3 is specifically as follows:
[0073] The server receives a procurement document preparation request, parses the procurement document preparation request to obtain an account number, a password, a first timestamp, and a hash value, wherein the hash value is obtained by performing a hash calculation on the account number, the password, and the first timestamp;
[0074] After the server performs integrity verification on the account, password and first timestamp through the hash value, it performs timeliness verification through the first timestamp, and then verifies the legitimacy of the account and password through the preset user management table. If the verification passes, the file template configuration panel is displayed through a visual interface.
[0075] By setting the procurement document draft request to carry the account number, password, first timestamp and hash value, the hash value can be used for integrity verification, the first timestamp can be used for timeliness verification, and the account number and password can be used for legality verification. Only after the verification is passed will the file template configuration panel be displayed through the visual interface to prevent illegal personnel from arbitrarily configuring file templates, thereby greatly improving the security of procurement document generation.
[0076] In step S5, the signature rule is specifically:
[0077] A data interception rule and a pair of public and private keys are set, signature basic data is intercepted from the procurement document based on the data interception rule, the current second timestamp is obtained, MAC calculation is performed on the signature basic data and the second timestamp to obtain a MAC value, the signature basic data, the second timestamp and the MAC value are signed by the private key to obtain signature data, the signature basic data, the second timestamp, the MAC value and the signature data are encrypted by the 3DES algorithm to obtain encrypted data, and the encrypted data is converted into a signature QR code by a QR code generator. The public key is used to verify the signature data.
[0078] By setting data interception rules and a pair of public and private keys, the basic data of the signature is intercepted from the procurement document based on the data interception rules, the current second timestamp is obtained, MAC calculation is performed on the basic data of the signature and the second timestamp to obtain the MAC value, the basic data of the signature, the second timestamp and the MAC value are signed by the private key to obtain the signature data, the basic data of the signature, the second timestamp, the MAC value and the signature data are encrypted by the 3DES algorithm to obtain the encrypted data, and the encrypted data is converted into a signature QR code by a QR code generator; the encrypted data is obtained by scanning the signature QR code to prevent the relevant data from being stolen in plain text. After the encrypted data is decrypted by the 3DES algorithm and the signature data is verified by the public key, the integrity can be checked by the MAC value, and the timeliness can be checked by the second timestamp. Multiple security measures have been taken before and after, which greatly improves the difficulty of forging the signature QR code, and thus greatly improves the security of the draft procurement documents.
[0079] A preferred embodiment of a procurement document generation system based on componentized document templates of the present invention includes the following modules:
[0080] A historical purchase file parsing module is used for the server to obtain a large number of historical purchase files, and parse each of the historical purchase files to obtain a corresponding file structure;
[0081] A component creation module, used for the server to create several components based on the file structure, configure the elements contained in each component, and store each component in a pre-created component library;
[0082] The file template configuration panel display module is used for displaying the file template configuration panel through a visual interface after the server verifies the received procurement document preparation request;
[0083] The file template creation module is used to select components in the component library through the file template configuration panel based on a preset interaction mode, typeset the selected components, and obtain a file template for generating a procurement document; the interaction mode at least includes dragging, pulling, and dragging; by setting the interaction mode to at least include dragging, pulling, and dragging, the user can select the corresponding interaction mode as needed during the file template configuration process, thereby greatly improving the user experience of the file template configuration;
[0084] A procurement document generation module, used to set a signature rule, enter procurement data into the document template to generate a procurement document, electronically sign the procurement document according to the signature rule to obtain a signature QR code, and load the signature QR code onto the procurement document;
[0085] The procurement document management module is used to export the procurement document after the electronic signature, and encrypt and store the procurement document after the electronic signature for later traceability.
[0086] During specific implementation, the procurement documents may be exported in different formats, such as PDF format, as required.
[0087] The encrypted storage of the electronically signed procurement document is specifically as follows:
[0088] The electronically signed procurement document is encrypted into first-level encrypted data by the Twofile algorithm, each character in the first-level encrypted data is mapped by a preset first mapping rule to obtain second-level encrypted data, each character of the second-level encrypted data is shifted right by 7 bits to obtain third-level encrypted data, the third-level encrypted data is encrypted into fourth-level encrypted data by the XTEA algorithm, each character in the fourth-level encrypted data is mapped by a preset second mapping rule to obtain fifth-level encrypted data, the number 1 and the letter I in the fifth-level encrypted data are swapped, and the number 8 and the letter B are swapped to obtain sixth-level encrypted data, and the sixth-level encrypted data is encrypted by the RC6 algorithm to obtain an encrypted file; the encrypted file is stored in a preset path, and the encrypted file is distributedly backed up to the blockchain.
[0089] The procurement file is encrypted into first-level encrypted data by the Twofile algorithm, and each character in the first-level encrypted data is mapped by the preset first mapping rule to obtain second-level encrypted data, and each character of the second-level encrypted data is shifted right by 7 bits to obtain third-level encrypted data, and the third-level encrypted data is encrypted into fourth-level encrypted data by the XTEA algorithm, and each character in the fourth-level encrypted data is mapped by the preset second mapping rule to obtain fifth-level encrypted data, and the number 1 and the letter I in the fifth-level encrypted data are swapped, and the number 8 and the letter B are swapped to obtain sixth-level encrypted data, and the sixth-level encrypted data is encrypted by the RC6 algorithm to obtain an encrypted file; the encrypted file is stored in a preset path, and the encrypted file is distributedly backed up to the blockchain; that is, the encryption process of the procurement file involves multiple encryption algorithms and data transformation rules. If the corresponding encryption algorithm or data transformation rule is not known, the encrypted file cannot be cracked, and at least 10 security measures are taken before and after (Twofile). sh algorithm, first mapping rule, displacement direction, number of displacement bits, XTEA algorithm, second mapping rule, swapping number 1 and letter I, swapping number 8 and letter B, RC6 algorithm, distributed backup), which greatly improves the security of procurement file storage and facilitates later traceability.
[0090] The historical procurement document parsing module is specifically used for:
[0091] The server automatically obtains a large number of historical procurement documents from the database through the ETL tool, identifies the file content of each of the historical procurement documents through OCR technology, and parses the content of each of the files through a pre-trained large language model to obtain the corresponding file structure.
[0092] A large number of historical procurement documents are automatically obtained from the database through ETL tools, the file content of each historical procurement document is identified through OCR technology, and the pre-trained large language model is used to parse the content of each file to obtain the corresponding file structure. That is, the file structure is obtained from a large number of historical procurement documents through a large language model. This can not only ensure the accuracy of file structure acquisition, but also ensure the comprehensiveness of file structure acquisition, thereby ensuring the quality of subsequent component creation and avoiding the loss of related components that affect the generation of procurement documents.
[0093] The component creation module is specifically used for:
[0094] The server creates a plurality of components based on the file structure, wherein the components at least include a directory, a label, a first-level title, a second-level title, a third-level title, a fourth-level title, a fifth-level title, a sixth-level title, a text, a comment, a line break, a table, an underline, and a page break;
[0095] Configure the elements contained in each of the components, the elements at least include bidder qualification requirements, purchaser contact address, agency address, agency service fee information, project implementation location and general labels; the same labels at least include project name, project number, purchaser name, supply scope and interface, negotiation main items, procurement document basic format, purchaser contact, purchaser contact number and agency contact;
[0096] Configuring component parameters and component styles of each of the components, wherein the component parameters of the catalog at least include catalog group name, catalog name, element code, file type, procurement method, project type, enablement status, element editing flag, component editing flag and operation flag; the operation flag includes modification and deletion;
[0097] Each of the components is stored in a pre-created component library.
[0098] The file template configuration panel display module is specifically used for:
[0099] The server receives a procurement document preparation request, parses the procurement document preparation request to obtain an account number, a password, a first timestamp, and a hash value, wherein the hash value is obtained by performing a hash calculation on the account number, the password, and the first timestamp;
[0100] After the server performs integrity verification on the account, password and first timestamp through the hash value, it performs timeliness verification through the first timestamp, and then verifies the legitimacy of the account and password through the preset user management table. If the verification passes, the file template configuration panel is displayed through a visual interface.
[0101] By setting the procurement document draft request to carry the account number, password, first timestamp and hash value, the hash value can be used for integrity verification, the first timestamp can be used for timeliness verification, and the account number and password can be used for legality verification. Only after the verification is passed will the file template configuration panel be displayed through the visual interface to prevent illegal personnel from arbitrarily configuring file templates, thereby greatly improving the security of procurement document generation.
[0102] In the procurement document generation module, the signature rules are specifically as follows:
[0103] A data interception rule and a pair of public and private keys are set, signature basic data is intercepted from the procurement document based on the data interception rule, the current second timestamp is obtained, MAC calculation is performed on the signature basic data and the second timestamp to obtain a MAC value, the signature basic data, the second timestamp and the MAC value are signed by the private key to obtain signature data, the signature basic data, the second timestamp, the MAC value and the signature data are encrypted by the 3DES algorithm to obtain encrypted data, and the encrypted data is converted into a signature QR code by a QR code generator. The public key is used to verify the signature data.
[0104] By setting data interception rules and a pair of public and private keys, the basic data of the signature is intercepted from the procurement document based on the data interception rules, the current second timestamp is obtained, MAC calculation is performed on the basic data of the signature and the second timestamp to obtain the MAC value, the basic data of the signature, the second timestamp and the MAC value are signed by the private key to obtain the signature data, the basic data of the signature, the second timestamp, the MAC value and the signature data are encrypted by the 3DES algorithm to obtain the encrypted data, and the encrypted data is converted into a signature QR code by a QR code generator; the encrypted data is obtained by scanning the signature QR code to prevent the relevant data from being stolen in plain text. After the encrypted data is decrypted by the 3DES algorithm and the signature data is verified by the public key, the integrity can be checked by the MAC value, and the timeliness can be checked by the second timestamp. Multiple security measures have been taken before and after, which greatly improves the difficulty of forging the signature QR code, and thus greatly improves the security of the draft procurement documents.
[0105] In summary, the advantages of the present invention are:
[0106] 1. Obtain a large number of historical procurement files through the server and parse them to obtain the corresponding file structure. Create several components based on the file structure, configure the elements contained in each component and store them in the component library; then verify the received procurement file drafting request, display the file template configuration panel through the visual interface, select the components in the component library through the file template configuration panel based on the preset interaction method, layout the selected components, and obtain the file template for generating procurement files; then set a signature rule, enter the procurement data in the file template to generate the procurement file, and electronically sign the procurement file according to the signature rule. to the signature QR code, load the signature QR code on the procurement document, and finally export the procurement document with electronic signature, and encrypt and store the procurement document with electronic signature; that is, through the interactive method of dragging and dropping, in the file template configuration panel, you can select and layout the components in the component library to quickly generate a file template, and then enter the procurement data in the file template to quickly generate a procurement document without starting from scratch. The components can also reduce the amount of data entered by the user to reduce errors in the drafting process, and the generated procurement documents can be electronically signed, which greatly improves the efficiency, quality and security of procurement document drafting.
[0107] 2. Automatically obtain a large number of historical procurement documents from the database through ETL tools, identify the file content of each historical procurement document through OCR technology, and parse the content of each file through a pre-trained large language model to obtain the corresponding file structure. That is, the file structure is obtained from a large number of historical procurement documents through a large language model. This can not only ensure the accuracy of file structure acquisition, but also ensure the comprehensiveness of file structure acquisition, thereby ensuring the quality of subsequent component creation and avoiding the loss of related components that affect the generation of procurement documents.
[0108] 3. By setting the procurement document draft request to carry the account number, password, first timestamp and hash value, the integrity can be checked through the hash value, the timeliness can be checked through the first timestamp, and the legitimacy can be checked through the account number and password. The file template configuration panel will be displayed through the visual interface only after the verification is passed, preventing illegal personnel from arbitrarily configuring file templates, thereby greatly improving the security of procurement document generation.
[0109] 4. By setting data interception rules and a pair of public and private keys, the basic data of the signature is intercepted from the procurement document based on the data interception rules, the current second timestamp is obtained, MAC calculation is performed on the basic data of the signature and the second timestamp to obtain the MAC value, the basic data of the signature, the second timestamp and the MAC value are signed by the private key to obtain the signature data, the basic data of the signature, the second timestamp, the MAC value and the signature data are encrypted by the 3DES algorithm to obtain the encrypted data, and the encrypted data is converted into a signature QR code by the QR code generator; the encrypted data is obtained by scanning the signature QR code to prevent the relevant data from being stolen in plain text. After the encrypted data is decrypted by the 3DES algorithm, the signature data is verified by the public key, and the integrity is checked by the MAC value, and the timeliness is checked by the second timestamp. Multiple security measures have been taken before and after, which greatly improves the difficulty of forging the signature QR code, thereby greatly improving the security of the procurement document.
[0110] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.
Claims
1. A procurement document generation method based on componentized document templates, characterized in that: The steps include: Step S1: The server obtains a large number of historical procurement files, and parses each of the historical procurement files to obtain a corresponding file structure; Step S2: the server creates several components based on the file structure, configures the elements contained in each component, and stores each component in a pre-created component library; Step S3: After verifying the received procurement document preparation request, the server displays the document template configuration panel through a visual interface; Step S4: Based on a preset interaction mode, components in the component library are selected through the file template configuration panel, and the selected components are typeset to obtain a file template for generating a procurement document; Step S5, setting a signature rule, entering the procurement data into the document template to generate a procurement document, electronically signing the procurement document according to the signature rule to obtain a signature QR code, and loading the signature QR code onto the procurement document; Step S6: export the electronically signed procurement document, and encrypt and store the electronically signed procurement document.
2. A method for generating procurement documents based on componentized document templates as claimed in claim 1, characterized in that: The step S1 is specifically as follows: The server automatically obtains a large number of historical procurement documents from the database through the ETL tool, identifies the file content of each of the historical procurement documents through OCR technology, and parses the content of each of the files through a pre-trained large language model to obtain the corresponding file structure.
3. The method for generating procurement documents based on componentized document templates according to claim 1, characterized in that: The step S2 is specifically as follows: The server creates a plurality of components based on the file structure, wherein the components at least include a directory, a label, a first-level title, a second-level title, a third-level title, a fourth-level title, a fifth-level title, a sixth-level title, a text, a comment, a line break, a table, an underline, and a page break; Configure the elements contained in each of the components, the elements at least include bidder qualification requirements, purchaser contact address, agency address, agency service fee information, project implementation location and general labels; the same labels at least include project name, project number, purchaser name, supply scope and interface, negotiation main items, procurement document basic format, purchaser contact, purchaser contact number and agency contact; Configuring component parameters and component styles of each of the components, wherein the component parameters of the catalog at least include catalog group name, catalog name, element code, file type, procurement method, project type, enablement status, element editing flag, component editing flag and operation flag; the operation flag includes modification and deletion; Each of the components is stored in a pre-created component library.
4. The method for generating procurement documents based on componentized document templates according to claim 1, characterized in that: The step S3 is specifically as follows: The server receives a procurement document preparation request, parses the procurement document preparation request to obtain an account number, a password, a first timestamp, and a hash value, wherein the hash value is obtained by performing a hash calculation on the account number, the password, and the first timestamp; After the server performs integrity verification on the account, password and first timestamp through the hash value, it performs timeliness verification through the first timestamp, and then verifies the legitimacy of the account and password through the preset user management table. If the verification passes, the file template configuration panel is displayed through a visual interface.
5. The method for generating procurement documents based on componentized document templates according to claim 1, characterized in that: In step S5, the signature rule is specifically: A data interception rule and a pair of public and private keys are set, signature basic data are intercepted from the procurement document based on the data interception rule, the current second timestamp is obtained, MAC calculation is performed on the signature basic data and the second timestamp to obtain a MAC value, the signature basic data, the second timestamp and the MAC value are signed by the private key to obtain signature data, the signature basic data, the second timestamp, the MAC value and the signature data are encrypted by the 3DES algorithm to obtain encrypted data, and the encrypted data is converted into a signature QR code by a QR code generator.
6. A procurement document generation system based on componentized document templates, characterized in that: Includes the following modules: A historical purchase file parsing module is used for the server to obtain a large number of historical purchase files, and parse each of the historical purchase files to obtain a corresponding file structure; A component creation module, used for the server to create several components based on the file structure, configure the elements contained in each component, and store each component in a pre-created component library; The file template configuration panel display module is used for displaying the file template configuration panel through a visual interface after the server verifies the received procurement document preparation request; A file template creation module, used to select components in the component library through the file template configuration panel based on a preset interaction mode, typeset the selected components, and obtain a file template for generating a procurement document; A procurement document generation module, used to set a signature rule, enter procurement data into the document template to generate a procurement document, electronically sign the procurement document according to the signature rule to obtain a signature QR code, and load the signature QR code onto the procurement document; The procurement document management module is used to export the procurement document with electronic signature and encrypt and store the procurement document with electronic signature.
7. A procurement document generation system based on componentized document templates as claimed in claim 6, characterized in that: The historical procurement document parsing module is specifically used for: The server automatically obtains a large number of historical procurement documents from the database through the ETL tool, identifies the file content of each of the historical procurement documents through OCR technology, and parses the content of each of the files through a pre-trained large language model to obtain the corresponding file structure.
8. A procurement document generation system based on componentized document templates as claimed in claim 6, characterized in that: The component creation module is specifically used for: The server creates a plurality of components based on the file structure, wherein the components at least include a directory, a label, a first-level title, a second-level title, a third-level title, a fourth-level title, a fifth-level title, a sixth-level title, a text, a comment, a line break, a table, an underline, and a page break; Configure the elements contained in each of the components, the elements at least include bidder qualification requirements, purchaser contact address, agency address, agency service fee information, project implementation location and general labels; the same labels at least include project name, project number, purchaser name, supply scope and interface, negotiation main items, procurement document basic format, purchaser contact, purchaser contact number and agency contact; Configuring component parameters and component styles of each of the components, wherein the component parameters of the catalog at least include catalog group name, catalog name, element code, file type, procurement method, project type, enablement status, element editing flag, component editing flag and operation flag; the operation flag includes modification and deletion; Each of the components is stored in a pre-created component library.
9. A procurement document generation system based on componentized document templates as claimed in claim 6, characterized in that: The file template configuration panel display module is specifically used for: The server receives a procurement document preparation request, parses the procurement document preparation request to obtain an account number, a password, a first timestamp, and a hash value, wherein the hash value is obtained by performing a hash calculation on the account number, the password, and the first timestamp; After the server performs integrity verification on the account, password and first timestamp through the hash value, it performs timeliness verification through the first timestamp, and then verifies the legitimacy of the account and password through the preset user management table. If the verification passes, the file template configuration panel is displayed through a visual interface.
10. A procurement document generation system based on componentized document templates as claimed in claim 6, characterized in that: In the procurement document generation module, the signature rules are specifically as follows: A data interception rule and a pair of public and private keys are set, signature basic data are intercepted from the procurement document based on the data interception rule, the current second timestamp is obtained, MAC calculation is performed on the signature basic data and the second timestamp to obtain a MAC value, the signature basic data, the second timestamp and the MAC value are signed by the private key to obtain signature data, the signature basic data, the second timestamp, the MAC value and the signature data are encrypted by the 3DES algorithm to obtain encrypted data, and the encrypted data is converted into a signature QR code by a QR code generator.