CN113627145A - Method, device, equipment and medium for generating file of parameterized configuration - Google Patents

Method, device, equipment and medium for generating file of parameterized configuration Download PDF

Info

Publication number
CN113627145A
CN113627145A CN202110879415.0A CN202110879415A CN113627145A CN 113627145 A CN113627145 A CN 113627145A CN 202110879415 A CN202110879415 A CN 202110879415A CN 113627145 A CN113627145 A CN 113627145A
Authority
CN
China
Prior art keywords
file
template
service data
determining
static
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110879415.0A
Other languages
Chinese (zh)
Inventor
周静一
石明
王俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202110879415.0A priority Critical patent/CN113627145A/en
Publication of CN113627145A publication Critical patent/CN113627145A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • G06F40/143Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a medium for generating a file of parameterized configuration, wherein the method comprises the following steps: acquiring a file generation request, and determining service data to be filled and a file type to be generated according to the file generation request; determining a corresponding PDF file template according to the file type; determining element identifiers corresponding to the service data, and determining corresponding element attributes according to the element identifiers; if the file template is a static file template, filling corresponding service data into the form field according to the requirement of the element attribute according to the element identifier configured in the attribute of at least one form field in the static file template; and calling a PDF file processing component, and combining and generating a file based on the service data filled in the form field and the static file template. The technical scheme of the embodiment of the invention can improve the reusability of the file generation program, reduce the development and maintenance difficulty and improve the expandability.

Description

Method, device, equipment and medium for generating file of parameterized configuration
Technical Field
The embodiment of the invention relates to a computer data processing technology, in particular to a method, a device, equipment and a medium for generating a file of parameterized configuration.
Background
With the acceleration of modernization and informatization construction steps and the continuous upgrade of office requirements, paperless office concepts have penetrated into various industries. In the field of banks, in order to improve counter business efficiency and improve customer experience, various types of certificates, receipt, contracts and the like in business are converted into electronic files in a PDF format for circulation processing.
The current form synthesis method is to synthesize business data by receiving business data, analyzing the business data, combining corresponding configuration, and finally generating a file based on the business data, which can support business data of different data streams.
The prior art can receive various types of service data, but only can synthesize a single type of file finally, and is difficult to adapt to the expansibility and the complexity of a form format in practical application. With the continuous expansion of services, the types and styles of forms are more and more, and the defects of the prior art are gradually presented: different processing methods are needed for different types of forms, reusability of form processing programs is low, and development period is long; each form has respective corresponding configuration and processing, and thus, has poor maintainability and expandability.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a medium for generating a file with parameterized configuration, so as to improve reusability of a file generation program, reduce development and maintenance difficulty, and improve extensibility.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a file generation method for parameterized configuration, including:
acquiring a file generation request, and determining service data to be filled and a file type to be generated according to the file generation request;
determining a corresponding PDF file template according to the file type;
determining an element identifier corresponding to the service data, and determining a corresponding element attribute according to the element identifier;
if the file template is a static file template, filling corresponding service data into the form field according to the requirement of element attributes according to the element identifier configured in the attribute of at least one form field in the static file template;
and calling a PDF file processing component, and combining and generating a file based on the service data filled in the form field and the static file template.
In order to achieve the above object, a second embodiment of the present invention provides a file generation apparatus for parameterized configuration, including:
the file type determining module is used for acquiring a file generating request and determining the service data to be filled and the file type to be generated according to the file generating request;
the file template determining module is used for determining a corresponding PDF file template according to the file type;
the element attribute determining module is used for determining an element identifier corresponding to the service data and determining a corresponding element attribute according to the element identifier;
a configuration module, if the file template is a static file template, filling the corresponding service data into the form field according to the requirement of the element attribute according to the element identifier configured in the attribute of at least one form field in the static file template;
and the file generation module is used for calling the PDF file processing component, and combining and generating a file based on the service data filled in the form field and the static file template.
In order to achieve the above object, a third embodiment of the present invention provides an electronic device for generating a file of parameterized configuration, where the electronic device includes:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the parameterized configuration file generation method as described above.
To achieve the above object, a fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the file generation method for parameterized configuration as described above.
According to the file generation method, the device, the equipment and the medium for parametric configuration provided by the embodiment of the invention, firstly, a file generation request is obtained, and business data to be filled and a file type to be generated are determined according to the file generation request; determining a corresponding PDF file template according to the file type; then determining element identifiers corresponding to the service data, and determining corresponding element attributes according to the element identifiers; if the file template is a static file template, filling corresponding service data into the form field according to the requirement of the element attribute according to the element identifier configured in the attribute of at least one form field in the static file template; and finally, calling a PDF file processing component, and combining and generating a file based on the service data filled in the form field and the static file template. The reusability of the file generation program is improved, the development and maintenance difficulty is reduced, and the expandability is improved.
Drawings
FIG. 1 is a flowchart of a file generation method for parameterized configuration according to an embodiment of the present invention;
FIG. 2 is a flowchart of a file generation method for parameterized configuration according to an embodiment of the present invention;
FIG. 3 is a flowchart of a file generation method for parameterized configuration according to another embodiment of the present invention;
FIG. 4 is a block diagram of a file generation apparatus for parameterized configuration according to an embodiment of the present invention;
FIG. 5 is a block diagram of an apparatus to which the file generation method for parameterized configuration is applied according to an embodiment of the present invention;
FIG. 6 is a block diagram of a basic information module according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating a file generation method for parameterized configuration in an embodiment of the present invention;
FIG. 8 is a diagram illustrating the structure of a table increment module according to an embodiment of the present invention;
fig. 9 is a block diagram of a file generation electronic device for parameterized configuration according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
In the prior art, a file is generated based on service data finally by receiving the service data, analyzing the service data, combining corresponding configuration and synthesizing the service data, but the problem is that a program needs to be correspondingly operated every time a file is generated at present, and the reusability of the program is low; if a new file needs to be generated, a corresponding new program needs to be developed and generated, and the development period is long; further, when the same data in a plurality of files changes, for example, when an address changes, each file generation program needs to be updated, which results in poor maintainability and poor expandability.
Based on the above technical problem, embodiments of the present invention provide a method, an apparatus, a device, and a medium for generating a file with parameterized configuration, so as to improve reusability of a file generation program, reduce development and maintenance difficulties, and improve extensibility.
The following describes a file generation method for parameterized configuration according to an embodiment of the first aspect of the present invention.
Example one
Fig. 1 is a flowchart of a file generation method for parameterized configuration according to an embodiment of the present invention. The device can be executed by a parameterized configuration device, which can be implemented in software and/or hardware, and can be integrated in a server, such as a service platform dedicated to generating files in a bank system or a file generation device arranged in each business system. As shown in fig. 1, the file generation method of the parameterized configuration includes:
s101, acquiring a file generation request, and determining service data to be filled and a file type to be generated according to the file generation request;
the file generation request can be generated by a bank counter clerk, a business manager and the like by clicking the business type through a business window. Alternatively, the request may be generated by automated transaction processing software of the bank, either individually or in bulk. The file generation request includes the service data and a file type determined by analysis or directly specified. For example, if a client needs to handle bank account opening business, a bank counter clerk needs to click an account opening business window in a computer to generate an account opening file generation request; alternatively, the client needs to transact the loan transaction, and the clerk needs to generate the loan document generation request by clicking on the loan transaction window in the computer. This example is illustrated by only exemplifying two of the services in the bank, and the other service types are referred to the above two and are not listed. In addition, the file request may be generated in other manners in the art, and the present invention is not limited in this respect.
Determining the service data to be filled and the file type to be generated according to the file generation request means that the service data to be filled in the account opening file comprises a client name, an identity card number, an account number of an account opening row, an address of the account opening row, a contact way and the like, and the file type to be generated is the account opening file type, still taking the account opening file generation request and the loan file generation request as examples; the business data to be filled in the loan documents comprises borrower names, borrower identity card numbers, guarantor names, guarantor identity card numbers, borrower names, loan amounts, return dates, interest rate and the like, and the types of the documents to be generated are loan document types. It should be noted that the service data in the two examples are only a few service data, and the service data in practice is subject to the specific bank provision, which is not listed in this example.
According to an embodiment of the present invention, determining the service data to be filled and the file type to be generated according to the file generation request may specifically include:
and generating a request for the file generated by adopting the extensible markup language, and analyzing the data to acquire the service data to be filled.
It should be noted that, in order to satisfy various banking businesses and ensure the security of the file generation request, the file generation request may adopt an extensible markup language, and the file generation request is encrypted. When a file generation request is sent, a corresponding key pair is generated by using a uniform elliptic curve asymmetric key algorithm, a corresponding public key is used for encryption in the file generation request, and a corresponding private key is needed for decryption after the file generation request is received.
In addition, in order to prevent malicious calling, a white list mode can be adopted, if the access system in the white list does not send the file generation request, the illegal file generation request is directly rejected, and waste of system resources is reduced. And if the access system in the white list sends a file generation request, decrypting the file generation request by using a corresponding private key so as to determine the service data to be filled and the file type to be generated according to the decrypted file generation request.
S102, determining a corresponding PDF file template according to the file type;
the PDF file template may be divided into a static file template and a dynamic file template according to a service scenario and a file style, and it should be explained that the static file template generally refers to a template having a certain format and field requirements. For example, the business data to be filled in the account opening file includes a client name, an identity card number, an account number of an account opening row, an address of the account opening row, a contact way, and the like, wherein the client name, the identity card number, the account number of the account opening row, the address of the account opening row, the contact way, and the fields or the selectable ranges to be filled in are basically unchanged, and the positions in the template are also determined. The dynamic file template refers to that fields, formats and the like of contents in files are changed and unfixed along with business requirements, for example, in a short message subscription business, the subscription contents are not fixed and need to be generated by adopting the dynamic file template. That is to say, the static file template generally shows a fixed content, the difference is only on the content to be filled, and the dynamic file template shows a fixed content, which needs to be shown dynamically according to the actual situation. Thus, the corresponding PDF file template (whether a static file template or a dynamic file template) is determined according to the file type.
S103, determining element identifiers corresponding to the service data, and determining corresponding element attributes according to the element identifiers;
the element identifier may be understood as a label or a number, the element may be understood as service data to be filled, for example, the service data includes a name, an identity card number, a contact manner, a photo (i.e., four elements), and the like, and the label or the number of the name may be 1, the label or the number of the identity card number may be 2, and so on. Because there are many business contents in the bank, many business related files need to be generated, and each file includes a plurality of business data to be filled, i.e. elements, so that the elements to be filled in all the files can be numbered in advance. After the service data to be filled in is determined according to the file generation request, the element identifier corresponding to the service data can be determined.
And determining a corresponding element attribute according to the element identifier, for example, if the service data corresponding to the element identifier 1 is a name, the element name is the name, the element type is a text element, and the element length is 4 characters in the element attribute. For example, if the service data corresponding to the element identifier 4 is a photo, the element name is a photo, and the element type is a picture element. The elements to be filled in each file can be given attributes. Wherein the element attributes include at least one of: element serial number, element name, element Chinese meaning, element type, element length and value are necessary to be input or not; the element types include at least one of: text elements, picture elements, rich text elements, and signature elements.
Therefore, the business data corresponding to all files in the bank can be represented by element identification and element attributes. The corresponding relation between the service data and the element identification and the corresponding relation between the element identification and the element attribute can be formulated in advance and updated continuously according to the service requirement.
According to an embodiment of the present invention, determining an element identifier corresponding to service data, and determining a corresponding element attribute according to the element identifier specifically includes:
and matching and determining the element identifier corresponding to the service data according to the element identifier index corresponding to the file template, and determining the corresponding element attribute according to the element identifier.
It should be noted that after the corresponding relationship between the service data and the element identifier and the corresponding relationship between the element identifier and the element attribute are preset, the element identifier may be configured in advance for the file template, and then the element identifier corresponding to the service data to be filled in may be determined through the element identifier index, and the corresponding element attribute may be determined according to the element identifier. Thus, the business data is associated with the element attributes by the element identification.
S104, if the file template is a static file template, filling corresponding service data into the form field according to the requirement of the element attribute according to the element identifier configured in the attribute of at least one form field in the static file template;
the static file template account opening PDF file template is characterized in that a plurality of form fields are preset in advance, each form field corresponds to an element identifier, the element identifiers in each form field are also configured in advance, and the position of each form field can be set according to actual requirements. In step S103, the correspondence between the service data and the element identifier and the correspondence between the element identifier and the element attribute have been made in advance, so that after the PDF document template for opening an account is generated, the service data under the element attribute corresponding to the element identifier can be matched according to the element identifier in each form field. For example, if the corresponding element identifier in a certain form field is 1, then the element name in the element attribute corresponding to the element identifier 1 is name, and the element type is text element, then the business data of name is filled into the corresponding form field. And if the corresponding element identifier in a certain form field is 4, the element name is a photo and the element type is a picture element in the element attribute corresponding to the element identifier 4, and then the business data of the photo is filled in the corresponding form field. And repeating the steps until all the service data of the account opening PDF file template are filled in the corresponding form fields.
In addition, besides the above-mentioned corresponding relation mode index, the template element index may also be stored by using a graph structure, each static file template in the static template graph structure is stored in the first-level child node of the root node, and the element identifier configured in the list domain attribute of each static file template is stored in the lower-level child node of the first-level child node.
And S105, calling a PDF file processing component, and combining and generating a file based on the service data filled in the form field and the static file template.
Therefore, for the static file template, after all form fields in the template are filled with service data, the PDF file processing component is called, so that the service data filled in the form fields and the static file template can be synthesized to generate a file. Wherein the static document template comprises at least one of: opening an account application, borrowing contract, credit investigation authorization and receipt; furthermore, for different static file templates, corresponding element identifiers can be configured in each form field in advance, corresponding element attributes are determined according to the corresponding element identifiers, and corresponding service data are filled into the form fields according to the element attributes. Therefore, different files (opening application, borrowing contract, credit investigation authorization and receipt) can be generated by setting a universal file generation program, the universality is strong, in addition, if business data is added or changed, the template can be only updated, the element attribute is added or modified, the expandability is strong, the development and maintenance difficulty is reduced, the same element attribute (such as name, identity card number and the like) can be matched into different static file templates (opening application, borrowing contract, credit investigation authorization and receipt), and the reusability is strong.
According to an embodiment of the present invention, the merging and generating a file based on the service data filled in the form field and the static file template may specifically include:
and merging to generate a file based on the service data and the static file template filled in the form field and the data format configured by the static file template.
It should be noted that the data format includes at least one of the following: font style, font size, horizontal alignment, and vertical alignment. For the static file template, a corresponding data format can be configured in advance, for example, an account opening file, business data filled in one form field is a name, business data filled in one form field is an identity card number, and then the data format configured for the static file template can be a font of song, the font size is four, the alignment mode is a vertical alignment mode, and the like; taking the receipt file as an example, the business data filled in one form field is a name, the business data filled in one form field is an identity card number, and then the data format configured by the static file template can be that the font is song, the font size is small five, the alignment mode is a horizontal alignment mode, and the like; after filling corresponding service data in each form field, corresponding data formats can be configured, and finally, files are generated after combination. The flexibility of the static file template is improved.
It can be understood that, the static file template traverses the element association relationship, and fills the associated elements in the corresponding template with the service data, i.e. the synthesis operation of the file is completed, if the corresponding values have special marks of non-file types, the special marks need to be converted and then filled; if the user-defined style special mark exists, the user-defined style is set during filling.
According to an embodiment of the present invention, as shown in fig. 2, after generating a file or acquiring a file, the method further includes:
and S106, calling the value-added processing component, and performing at least one of signature adding processing, signature checking processing, storage processing, downloading processing and sending processing on the generated file.
After the file synthesis is completed, operations such as signature adding, signature checking, storage, downloading, sending and the like can be performed, and the file can be selectively used according to business requirements. The operation of adding labels, storing and sending can be sent when a synthesis request is sent, a scene number field is used for representing the operation, the field is represented by a 4-bit character, a first bit represents synthesis, a second bit represents adding labels, a third bit represents storing and a fourth bit represents sending, a value 1 represents operation, a value 0 represents no operation, if the file only needs to be synthesized, the file can be represented as 1000, corresponding processing logic is packaged into a file value-added processing component, and in the process of generating the file, if the analysis shows that the value-added operation is needed, the value-added processing component is directly loaded to finish the corresponding operation.
The generated file is signed, namely, a digital certificate is added, so that the authenticity and the validity of the file can be ensured, the file can be prevented from being tampered, and meanwhile, the system can record the signing result and the signing time. And (4) carrying out signature checking on the generated file to check whether the file is falsified and is a valid file, returning the result, and simultaneously recording the signature checking result and time by the system. And storing the generated file, wherein the generated file can be stored to a platform such as an object storage platform for permanent storage, and meanwhile, the system can record the position, the storage result and the time of form storage. And downloading the generated file, wherein the generated file can be downloaded by a calling system, the file number to be downloaded is input at the front end, the system searches and returns the corresponding file stream, and the number of the downloaded file and the downloading times are recorded. And sending the generated file, wherein the calling system can transmit the client information, the generated file is directly sent to the client in a mail, mobile phone or other modes, and the system records the sending mode, the sending result and the time. Therefore, after the file is generated, the value-added operation of the value-added processing component is beneficial to improving the applicability of the file.
Example two
Fig. 3 is a flowchart of a file generation method for parameterized configuration according to another embodiment of the present invention. The embodiment is based on the technical scheme of the embodiment and optimized and improved. As shown in fig. 3, the method comprises the steps of:
s201, acquiring a file generation request, and determining service data to be filled and a file type to be generated according to the file generation request;
s202, determining a corresponding PDF file template according to the file type;
steps S201 and S202 in this embodiment are the same as steps S101 and S102 in the first embodiment, please refer to the explanation in the first embodiment, and are not repeated in this embodiment.
S203, if the file template is a dynamic file template, processing the service data according to the data format configured by the dynamic file template to generate service data content conforming to the data format;
wherein the dynamic document template comprises at least one of: the method comprises the steps of comprehensive contract book, transaction detail file, multi-channel cash fetching, instant voice short message notification and instant voice mail notification. The data format includes at least one of: font style, font size, horizontal alignment, and vertical alignment. Taking the instant message notification as an example, when the service data (birthday blessing) to be filled and the file type (instant message notification type) to be generated are determined according to the file generation request, and the PDF file template determined according to the instant message notification type is a dynamic PDF file template, the birthday blessing needs to be edited according to the data format configured by the dynamic PDF file template, for example, in the edited birthday blessing, the font style may be a song style, the font size may be four, and the alignment mode may be horizontal alignment. For another example, if the service data to be filled is a new year blessing, the font style may be a regular font, the font size may be four symbols, and the alignment mode may be vertical alignment. After the service data content conforming to the data format is generated, the correctness, integrity and normalization of the service data can be verified.
And S204, calling a PDF file processing component, and adding the service data content into the file.
Therefore, the service data is processed according to the data format configured by the dynamic file template to generate the service data content conforming to the data format, and the service data content is added to the file. It should be noted that the data formats may be numbered in advance, and after the dynamic PDF file template is generated, the data format of the PDF file template may be configured (the data format with the corresponding number is selected), and in addition, in addition to the corresponding format, a graph structure mode may be adopted, where a root node of each graph structure of the dynamic template corresponds to a dynamic file template of a service class, and at least one data format configured by the dynamic file template is recorded in a first-level child node of the root node.
Therefore, different data formats can be configured for the same dynamic PDF file template according to requirements, the same data format can be configured to different PDF file templates, and the universality and reusability of the PDF file template are improved; if the data format is adjusted, the data format can be added or deleted singly, and the expandability and the maintainability are good.
According to an embodiment of the present invention, adding the service data content to the file specifically includes:
and splicing at least two service data contents according to the layout sequence of the service data in the file generation request, and adding the spliced contents into the file.
Taking two service data as an example, the dynamic file template is still notified by an instant message, for example, if a birthday and a new year of a certain client are the same day, two service data, namely a birthday blessing and a new year blessing, need to be generated, and thus, the birthday blessing service data needs to be processed according to the birthday blessing data format configured by the dynamic file template to generate birthday blessing service data content conforming to the birthday blessing data format, and in addition, the new year blessing service data needs to be processed according to the new year blessing data format configured by the dynamic file template to generate new year blessing service data content conforming to the new year blessing data format. The file generation request is configured with layouts for two service data, such as a birthday blessing and a new year blessing top-bottom layout arrangement, or a birthday blessing and a new year blessing top-bottom layout arrangement. For another example, in the instant voice mail notification, two service data, namely a birthday blessing and a new year blessing, may be provided, one in the upper left corner and one in the lower right corner, and these layouts may be configured in the file generation request by themselves. Finally, after the business data are processed according to the data format configured by the dynamic file template, the plurality of business data are laid out according to the layout in the file generation request.
It can be understood that the dynamic file template firstly sets a file format, then traverses the content list to be filled, draws one by one according to the style, and finally splices into the whole file.
According to an embodiment of the present invention, adding the service data content to the file specifically includes:
searching a static file template, wherein the element identifier of the form field attribute corresponds to the form field of the dynamic data, and adding the service data content into the searched form field; wherein the number of the form fields corresponding to the dynamic data is one or more.
That is, a form field corresponding to dynamic data may be configured in the static file template, an element identifier may be configured in the form field, and the element identifier may be searched for, and corresponding service data may be added to the form field. For example, in the static file template corresponding to the type of the account opening file, there are 4 form fields, where an element identifier corresponding to one form field is 1, the service data to be filled is a name, an element identifier corresponding to one form field is 2, the service data to be filled is an identity card number, an element identifier corresponding to one form field is 3, the service data to be filled is a picture, an element identifier corresponding to one form field is 4, and the service data to be filled is dynamic data, where the dynamic data may be a commitment of a client or a protocol content supplemented when an account is opened. And then after generating the dynamic file template and processing the service data according to the data format configured by the dynamic file template, the element identifier 4 in the corresponding form field in the static file template can be searched, and the service data is added to the form field of the static file template.
The static file template may have a plurality of form fields corresponding to the dynamic data, and the search and fill manner is the same as that of a form field having only one dynamic data, which is not described herein again.
It should be noted that, in the foregoing two embodiments, the file type to be generated is determined according to the file generation request, and the corresponding PDF file template is determined according to the file type to be generated, which may adopt two ways, one way is to input a number in the file generation request and directly search the PDF file template corresponding to the number, and the other way is to input a keyword for handling a service and a keyword of related service data in the file generation request and generate the PDF file template according to fuzzy matching between the keyword and the keyword. Therefore, the mode of generating the PDF file template is more intelligent and automatic. In addition, if file generation fails, the file generation request may be resubmitted. And each time a file is generated, the file number, the generation result and the generation time can be included in the file.
EXAMPLE III
Fig. 4 is a block diagram of a file generation apparatus for parameterized configuration according to an embodiment of the present invention. As shown in fig. 4, the apparatus 100 includes:
the file type determining module 101 is configured to obtain a file generation request, and determine service data to be filled and a file type to be generated according to the file generation request;
the file template determining module 102 is configured to determine a corresponding PDF file template according to a file type;
the element attribute determining module 103 is configured to determine an element identifier corresponding to the service data, and determine a corresponding element attribute according to the element identifier;
a first configuration module 104, configured to, if the file template is a static file template, fill the corresponding service data into the form field according to the requirement of the element attribute according to the element identifier configured in the attribute of at least one form field in the static file template;
the first file generating module 105 is configured to invoke a PDF file processing component, and merge and generate a file based on the service data filled in the form field and the static file template.
According to an embodiment of the invention, the apparatus further comprises:
the second configuration module is used for processing the service data according to the data format configured by the dynamic file template to generate service data content conforming to the data format if the file template is the dynamic file template;
and the second file generation module is used for calling the PDF file processing component and adding the service data content into the file.
According to an embodiment of the present invention, the second file generation module includes:
and the second file generation unit is used for splicing at least two service data contents according to the layout sequence of the service data in the file generation request and adding the spliced service data contents into the file.
According to an embodiment of the present invention, the second file generation module includes:
a second file generation unit, configured to search for a static file template, where an element identifier of a form field attribute corresponds to a form field of the dynamic data, and add service data content to the searched form field; wherein the number of the form fields corresponding to the dynamic data is one or more.
According to one embodiment of the present invention, a first file generation module includes:
and the first file generating unit is used for merging and generating files based on the business data and the static file template filled in the form field and the data format configured by the static file template.
According to one embodiment of the invention, the data format comprises at least one of: font style, font size, horizontal alignment, and vertical alignment.
According to one embodiment of the invention, the element attributes include at least one of: element serial number, element name, element Chinese meaning, element type, element length and value are necessary to be input or not; the element types include at least one of: text elements, picture elements, rich text elements, and signature elements.
According to one embodiment of the invention, the static document template includes at least one of: opening an account application, borrowing contract, credit investigation authorization and receipt;
the dynamic document template includes at least one of: the method comprises the steps of comprehensive contract book, transaction detail file, multi-channel cash fetching, instant voice short message notification and instant voice mail notification.
According to one embodiment of the invention, the element attribute determination module includes:
and the element attribute determining unit is used for matching and determining the element identifier corresponding to the service data according to the element identifier index corresponding to the file template, and determining the corresponding element attribute according to the element identifier.
According to an embodiment of the invention, the apparatus further comprises:
and the value-added module is used for calling the value-added processing component and performing at least one of signature adding processing, signature checking processing, storage processing, downloading processing and sending processing on the generated file.
According to one embodiment of the present invention, a file type determination module includes:
and the data analysis module is used for generating a request for the file generated by adopting the extensible markup language and analyzing the data to acquire the service data to be filled.
According to one embodiment of the invention, the template element index is stored by adopting a graph structure, each static file template in the static template graph structure is stored in a first-level child node of a root node, and an element identifier configured in a single-domain attribute of each static file template is stored in a lower-level child node of the first-level child node; the root node of each dynamic template graph structure corresponds to a dynamic file template of a service class, and at least one data format configured by the dynamic file template is recorded in the first-level child node of the root node.
It should be noted that this embodiment is a device corresponding to the first embodiment, and specific contents have been described in detail in the method embodiment, which is not described herein again. The parameterized-configured file generation device provided by the embodiment of the invention can execute the parameterized-configured file generation method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
According to a specific embodiment of the present invention, a method for generating a file of a parameterized configuration includes the following steps:
1) defining elements to be filled in the form, namely contents to be filled, wherein the information comprises information such as element numbers, element Chinese meanings, element types, element lengths, verification and the like;
2) defining form basic styles, including information such as font size, font style, horizontal centering mode, vertical centering mode, margin and the like, wherein each style has a unique number;
3) creating a template library, wherein the template library comprises a series of files with different formats, including PDF (portable document format) and texts, and each file has a unique number;
4) the forms are divided into static forms and dynamic forms according to form styles and service scenes, and all types of forms can be met. The static form expresses contents to be filled by using the form field attribute by using the characteristic that the form field attribute of the PDF file can be edited, the name corresponding to the form field attribute is a predefined element number, and the corresponding relation between a template file and an element is recorded; the dynamic form is dynamically spliced according to the input service data;
5) and receiving input information, screening out service data from the input information, analyzing the corresponding form type, and loading a processing component to complete form synthesis.
It can be understood that the form in this embodiment is the file in embodiments one to three.
It should be noted that the static form uses the PDF file as a template, where predefined element information is independent, and only when the form domain attribute in the PDF file is represented by the element information, the element and the template are related. If one information needs to be filled in a plurality of places in the file, corresponding element information can be multiplexed in the place to be filled, and elements can also be multiplexed in different templates, so that the maintenance of the information is reduced. The style of the content to be populated may be configured using a default base or may be customized.
The dynamic form uses texts with style tags as templates, each text is named according to content categories, the styles used in the templates are predefined style numbers and can be combined randomly, and the styles can be configured by default or can be customized.
More specifically, the file generation method for parameterized configuration according to the embodiment of the present invention:
1) basic information (elements to be filled in, form base style) is defined.
The method comprises the steps of predefining styles in a form file, wherein each style has a unique number, different types of styles can be randomly overlapped and comprise a font style, a font size, a horizontal alignment mode, a vertical alignment mode and the like, the predefined styles are obtained through statistics according to the existing form file and serve as default styles of the form, and the self-defined styles can be received in the synthesis process.
In addition, parts to be filled are extracted according to the form file and predefined, the parts to be filled are called elements to be filled, each element has a unique number, and types can include texts, pictures, signatures and the like. The elements are independent, and the same element can have different styles in different files.
2) A library of templates, i.e. a series of files of different styles, is created.
According to the form category and the service scene, the form category can be divided into two types: static forms and dynamic forms. The static form generally shows fixed content, the difference is only on the content to be filled, the dynamic form shows unfixed content, and needs to be dynamically shown according to actual conditions. Different types of template formats are different, PDF file portable document formats and editable characteristics are utilized, the static form uses the PDF file as a template, the part to be filled is abstracted into form domain attributes, and the attribute names are element numbers; and if the dynamic form needs to be dynamically spliced and displayed, the text with the style label is used as the template. Each template has unique number, template name, template effective date and other information, and the static template also records the association relationship between the template and the elements.
The types of common opening application books, borrowing contracts, credit investigation authorization books, receipt and the like in banking business are fixed in style, the integral content difference is only on the client information and the loan information, the forms can be classified into static forms, the form files are converted into PDF files to serve as templates, and information and the like needing to be filled are expressed by element numbers; the display contents of the types of the comprehensive contract book, the transaction detail file and the like are not fixed, the types of the forms are classified into dynamic forms according to actual service conditions, the form files are divided into different parts according to content types, each part is used as a template, the content is a text with style labels, and the templates are named according to the types.
3) And receiving input information and screening out service data.
And receiving external input information, screening out the business data corresponding to the elements to be filled in the form file from the external input information, checking the correctness, the completeness and the normalization of the data, preprocessing the business data and recording the preprocessed business data.
4) And analyzing the form type according to the service data, loading a processing component, and combining the service data to complete form synthesis.
The processing component integrates static form and dynamic form processing logic, encapsulates the general operation of the PDF file, and covers all types of form synthesis functions. Analyzing the business data, and if the business data is a static template, filling the corresponding business data into the corresponding form domain by traversing the incidence relation between the template and the element, thereby completing form synthesis; if the template is a dynamic template, gradually drawing the text information according to the style to complete form synthesis. And then additional services of the form file are provided, including functions of adding labels, checking labels, storing, downloading and sending.
According to the file generation apparatus 300 with parameterized configuration provided in an embodiment of the present invention, as shown in fig. 5, the apparatus 300 mainly provides form synthesis services based on the proposed method for synthesizing the parameterized configuration form, and can quickly construct a PDF file by a templated parameter configuration manner, thereby reducing development cost in form synthesis. The method is convenient to better adapt to the service requirement, and also provides some value added services, including functions of signature adding, signature checking, storing, downloading and sending.
The device 300 can be divided into a basic information module 301, a form analysis module 302, a form synthesis module 303, and a form value-added module 304, wherein the basic information module 301 is a basis for system operation, the form analysis module 302 is a system preview domain, the form synthesis module 303 is a system core processing domain, and the form value-added module 304 is a system additional value-added domain.
1) Referring to fig. 6 for further description of basic information module 301, basic information module 301 is used for system basic information configuration and service processing information recording, and includes records of element information unit 3011, template information unit 3012, template element association information unit 3013, access system information unit 3014, service information unit 3015, form processing information unit 3016, system parameter information unit 3017, form style information unit 3018, and form value-added service information unit 3019.
Specifically, the element information unit 3011 is configured to store information of elements to be filled in the form file, and includes: the element type comprises an element serial number, an element name, an element Chinese meaning, an element type, an element length, whether a value is necessary to be input or not and the like, wherein the element type supports ordinary text, pictures and rich text.
The template information unit 3012 is configured to store information of a series of templates in the template library, where the information includes a template serial number, a template name, a template effective date, a template validity period, and a template type, where the template types are static templates and dynamic templates.
The template element association information unit 3013 is configured to store corresponding form field attributes in the template file, where the information includes a template number and an element name.
The access system information unit 3014 configures a system white list supporting invocation to ensure validity of the request, where the information includes information such as an access system number, a system name, and a system state, and the state includes "valid" and "invalid".
The service information unit 3015 stores the received service data, and if a failure occurs in the form synthesis process, the corresponding service information may be obtained again from the system and manually retransmitted.
A new form number is generated during each service process, and the form processing information unit 3016 is configured to record a form processing result, including the form number, the processing result, and the processing time.
The system parameter information unit 3017 is used to configure system common parameters, such as template file storage location, processing thread number, and the like.
The form style information unit 3018 is configured to store basic style information of the form, including font size, font style, horizontal alignment, vertical alignment, and the like, where each style has a unique number, and is set as a default style of the form.
The form value-added service information unit 3019 is configured to record and provide form value-added service processing information, which includes form tagging processing information, tag verification processing information, storage information, download information, and sending processing information.
2) The form parsing module 302 is described as follows:
in order to ensure the request security and prevent malicious calling, a system entrance adopts a white list mode to directly reject illegal requests, thereby reducing the waste of system resources and transmitting calling system numbers in request messages.
In order to meet various types of form services, the request message adopts an extensible markup language, wherein the service data is identified by using a fixed name ContentData (directory data), the character data is utilized to receive various types of character input, the character data is not influenced by message analysis, and the service data adopts a character data mode to store the content to be filled. The static template has only one parent node, the node name is the template number to be used, the child nodes are element information to be filled, the < element number > service data < element number > format is used for storage, the form default style is used for synthesis, if the definition is needed, the style attribute is directly added into the node name, and a plurality of nodes are divided by commas, such as frontsize: 12; the dynamic template has a plurality of parent nodes according to actual services, the node name is a file category, and the child nodes are contents to be displayed under the category and use a # style tag #: and storing the service data in a JSON format, wherein if the data is notified in a # style1#, drawing is carried out by using a form default style, if the data needs to be customized, style attributes are directly added into a page tag, and a plurality of data are divided by commas, such as color: and (red). The style name needs to conform to the attributes of the common page style.
In order to ensure the safety of data transmission, the message needs to be encrypted, and in order to ensure the transmission rate, only the message body part needs to be encrypted by adopting an elliptic curve asymmetric key algorithm. When a request is sent, a corresponding key pair is generated by using a uniform elliptic curve asymmetric key algorithm, a corresponding public key is used for encryption in a request message, and a system needs to use a corresponding private key for decryption after the message is received.
The module is used for preprocessing the front-end calling information by the system, checking the request validity, message decryption, screening service data, analyzing the service data, and checking the information integrity and validity. The specific processing flow can be seen in fig. 7, and is explained in detail:
and acquiring system access system information, wherein the status marked as 'valid' is the white list allowed to be accessed. And matching the calling system number in the message with the white list of the access system, if not, directly rejecting the request to finish the operation, and if so, directly entering the next step (namely, whether the request is legal or not).
The system starts to decrypt by using the private key to obtain the plaintext information of the message body. And finding out the nodes corresponding to the service data, and screening out the service data.
And acquiring corresponding character data from the service data, and automatically analyzing the template to be used by the service, the template type and the corresponding filling data by combining the configured template information and adopting a recursive mode.
In the static template, whether the data to be filled is complete or not can be checked according to the incidence relation of the template elements, and whether the data meets the specification or not can be checked. The dynamic template content is determined by the incoming service data, and the standard specification is not available. If the verification is passed, the next step is carried out; otherwise, returning the information that the specific verification fails, and ending directly.
Preprocessing the verified service data, storing the static template according to a key value pair mode, wherein the key is an element number, the value is corresponding service data, combining defined element information, and if a non-text format is involved, performing special marking on the corresponding value; special labeling is also needed if custom styles are involved. And the dynamic template stores the corresponding text and the corresponding pattern according to the sequence in the service data. And the preprocessed data are put into a cache to generate a form number, record service information, record form basic information and return the form number.
3) The form composition module 303 is described as follows:
the form synthesis module 303 is a system core processing domain, loads different data according to the form type analyzed in the previous template, and automatically matches a method corresponding to the PDF processing component to complete template synthesis, and the specific processing flow is as follows:
and loading the preprocessed business data from the cache, and loading different data according to the analyzed template type. The static template needs to load template element association information and style information; the dynamic template only needs to load style information.
And loading a PDF processing component, wherein the component encapsulates PDF file general operations including PDF file style setting, form field filling, paragraph chapter drawing and the like, and integrates static template and dynamic template processing modes.
And automatically matching the corresponding processing mode through the template type. Traversing the incidence relation of the template elements by the static template, filling the incidence elements in the corresponding template by using service data, namely completing the synthesis operation of the form, and if the corresponding values have non-file type special marks, converting the non-file type special marks and then filling the non-file type special marks; if the user-defined style special mark exists, the user-defined style is set during filling. The dynamic template firstly sets a form file format, then traverses a content list to be filled, draws the content list one by one according to the style, and finally splices the content list into a whole file. After the synthesis is completed, the form processing information, the form synthesis result and the time are updated.
4) The form increment module 304 is described as follows:
the form value-added module 304 is an additional value-added domain of the system, and after the form synthesis is completed, operations such as signature adding, signature checking, storage, downloading, sending and the like can be performed, and the form value-added module is selectively used according to service requirements. The operation of adding labels, storing and sending can be sent when a synthesis request is sent, a scene number field is used for representing the operation, the field is represented by a 4-bit character, a first bit represents synthesis, a second bit represents adding labels, a third bit represents storing and a fourth bit represents sending, a value 1 represents operation, a value 0 represents no operation, if the form only needs to be synthesized, the form can be represented as 1000, corresponding processing logic is packaged into a form additional function processing component, and in a synthesis module, if the value-added operation is analyzed to be needed, the additional function processing component is directly loaded to finish the corresponding operation.
As shown in fig. 8, the form value-added module 304 includes:
the form signing unit 3041 is used to synthesize the finished PDF file, add a digital certificate, ensure the authenticity and validity of the file, and prevent tampering, and the system records the signing result and time.
The form signing unit 3042 is configured to receive an input file, verify whether the file is tampered, and return a result, and the system records a signature verification result and time.
The form storage unit 3043 is used to store the synthesized PDF file to a platform such as an object storage platform for permanent storage, and the system records the storage location, storage result and time of the form.
The form downloading unit 3044 is used to invoke the system to download the synthesized PDF file, input the number of the file to be downloaded at the front end, search and return the corresponding file stream by the system, and record the number of the downloaded file and the downloading times.
The form sending unit 3045 is used to invoke the system to transfer the customer information, send the synthesized PDF file to the customer directly by mail, mobile phone, etc., and record the sending method, sending result and time.
With the support of the above device, the processing flow of the embodiment of the invention is as follows: firstly, configuring access system information, element information, template information and style information; then, a template base is established, the file type used by the template is determined according to the form type and the service scene, the static template uses a PDF format, the content to be filled in the form file is abstracted into form field attributes, the attribute names are predefined element numbers, element information can be multiplexed, and after the editing is finished, the template and the element association information are recorded; dynamic templates use style-tagged text. After the device receives the request message, the data verification and preprocessing work is completed through the analysis module, and after the verification is passed, the flow is transferred to the form synthesis module to complete the form synthesis operation. After the synthesis is completed, the calling system can also perform additional operations such as signature adding, storage, transmission, downloading, signature verification and the like.
Based on the device, the device supports the synthesis of various form files, can provide a mechanism for inputting and analyzing various form data, can provide a request and data transmission safety mechanism, can make the form files templated, establish a template library, namely a series of files with different formats, can provide additional operations such as form tagging, storage, transmission, downloading, tag verification and the like, and stores information such as element information, template element associated information, an access system and the like in a database table form, and can be configured, and element information can be multiplexed in one template and a plurality of templates, thereby reducing the maintenance cost. Various components of PDF are packaged, multi-type form operation is fused, the method is suitable for all templates, and development cost is reduced. Furthermore, the device can support the synthesis of various forms, remarkably improve the reusability, expandability and maintainability of the application, reduce the development cost, improve the application adaptability and remarkably improve the form synthesis rate. Different form synthesis work can be completed through differentiated input of service data, and complexity of form formats can be well adapted.
EXAMPLE five
Fig. 9 is a block diagram of a file generation electronic device for parameterized configuration according to an embodiment of the present invention. As shown in fig. 9, the electronic apparatus 200 includes:
one or more processors 201;
a storage 202 for storing one or more programs;
when the one or more programs are executed by the one or more processors 201, the one or more processors 201 are caused to implement the parameterized configuration file generation method as described above.
The method comprises the following steps:
s101, acquiring a file generation request, and determining service data to be filled and a file type to be generated according to the file generation request;
s102, determining a corresponding PDF file template according to the file type;
s103, determining an element identifier corresponding to the service data, and determining a corresponding element attribute according to the element identifier;
s104, if the file template is a static file template, filling corresponding service data into the form field according to the requirement of element attributes according to the element identifier configured in the attribute of at least one form field in the static file template;
and S105, calling a PDF file processing component, and combining and generating a file based on the service data filled in the form field and the static file template.
As shown in fig. 9, the electronic apparatus 200 includes a processor 201, a storage device 202, an input device 203, and an output device 204; the number of the processors 201 in the device may be one or more, and one processor 201 is taken as an example in fig. 9; the processor 201, the storage means 202, the input means 203 and the output means 204 in the device may be connected by a bus or other means, as exemplified by the bus connection in fig. 9.
The storage device 202 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions corresponding to the parameterized configuration file generation method in the embodiment of the present invention. The processor 201 executes various functional applications and data processing of the device by executing software programs, instructions, and modules stored in the storage device 202, that is, implements the above-described file generation method of the parameterized configuration.
The storage device 202 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the storage 202 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage 202 may further include memory located remotely from the processor 201, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 203 is operable to receive an input text generation request and to generate key signal inputs relating to customer settings and function control of the apparatus. The output device 204 may include a display device such as a display screen.
EXAMPLE six
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by the processor 201, implements the file generation method for parameterized configuration as described above.
The method comprises the following steps:
s101, acquiring a file generation request, and determining service data to be filled and a file type to be generated according to the file generation request;
s102, determining a corresponding PDF file template according to the file type;
s103, determining an element identifier corresponding to the service data, and determining a corresponding element attribute according to the element identifier;
s104, if the file template is a static file template, filling corresponding service data into the form field according to the requirement of element attributes according to the element identifier configured in the attribute of at least one form field in the static file template;
and S105, calling a PDF file processing component, and combining and generating a file based on the service data filled in the form field and the static file template.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the file generation method for parameterized configuration provided by any embodiments of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
To sum up, according to the file generation method, apparatus, device and medium for parameterized configuration provided in the embodiments of the present invention, the method first obtains a file generation request, and determines service data to be filled and a file type to be generated according to the file generation request; determining a corresponding PDF file template according to the file type; then determining element identifiers corresponding to the service data, and determining corresponding element attributes according to the element identifiers; if the file template is a static file template, filling corresponding service data into the form field according to the requirement of the element attribute according to the element identifier configured in the attribute of at least one form field in the static file template; and finally, calling a PDF file processing component, and combining and generating a file based on the service data filled in the form field and the static file template. The reusability of the file generation program is improved, the development and maintenance difficulty is reduced, and the expandability is improved.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (15)

1. A file generation method for parameterized configuration is characterized by comprising the following steps:
acquiring a file generation request, and determining service data to be filled and a file type to be generated according to the file generation request;
determining a corresponding PDF file template according to the file type;
determining an element identifier corresponding to the service data, and determining a corresponding element attribute according to the element identifier;
if the file template is a static file template, filling corresponding service data into the form field according to the requirement of element attributes according to the element identifier configured in the attribute of at least one form field in the static file template;
and calling a PDF file processing component, and combining and generating a file based on the service data filled in the form field and the static file template.
2. The method of claim 1, wherein after determining the corresponding file template according to the file type, further comprising:
if the file template is a dynamic file template, processing the service data according to a data format configured by the dynamic file template to generate service data content conforming to the data format;
and calling a PDF file processing component to add the service data content to the file.
3. The method of claim 2, wherein adding the service data content to a file comprises:
and splicing at least two service data contents according to the layout sequence of the service data in the file generation request, and adding the spliced service data contents into the file.
4. The method of claim 2, wherein adding the service data content to a file comprises:
searching the static file template, wherein the element identifier of the form field attribute corresponds to the form field of the dynamic data, and adding the service data content into the searched form field; wherein the number of the form fields corresponding to the dynamic data is one or more.
5. The method of claim 1, wherein merging the generated file based on the business data filled in the form field and the static file template comprises:
and merging to generate a file based on the service data and the static file template filled in the form field and the data format configured by the static file template.
6. The method according to claim 2 or 5, wherein the data format comprises at least one of: font style, font size, horizontal alignment, and vertical alignment.
7. The method of claim 1, wherein the element attributes comprise at least one of: element serial number, element name, element Chinese meaning, element type, element length and value are necessary to be input or not; the element types include at least one of: text elements, picture elements, rich text elements, and signature elements.
8. The method of claim 2, wherein the static document template comprises at least one of: opening an account application, borrowing contract, credit investigation authorization and receipt;
the dynamic document template includes at least one of: the method comprises the steps of comprehensive contract book, transaction detail file, multi-channel cash fetching, instant voice short message notification and instant voice mail notification.
9. The method of claim 1, wherein determining an element identifier corresponding to the service data and determining a corresponding element attribute according to the element identifier comprises:
and matching and determining the element identifier corresponding to the service data according to the element identifier index corresponding to the file template, and determining the corresponding element attribute according to the element identifier.
10. The method of claim 1, after generating the file or obtaining the file, further comprising:
and calling the value-added processing component, and performing at least one operation of signature adding processing, signature checking processing, storage processing, downloading processing and sending processing on the generated file.
11. The method of claim 1, wherein determining the service data to be filled and the file type to be generated according to the file generation request comprises:
and generating a request for the file generated by adopting the extensible markup language, and analyzing the data to acquire the service data to be filled.
12. The method according to claim 1, wherein the template element index is stored in a graph structure, each static file template in the static template graph structure is stored in a first level child node of the root node, and the element identifier configured in each static file template form field attribute is stored in a lower level child node of the first level child node; the root node of each dynamic template graph structure corresponds to a dynamic file template of a service class, and at least one data format configured by the dynamic file template is recorded in the first-level child node of the root node.
13. An apparatus for generating a file of a parameterized configuration, comprising:
the file type determining module is used for acquiring a file generating request and determining the service data to be filled and the file type to be generated according to the file generating request;
the file template determining module is used for determining a corresponding PDF file template according to the file type;
the element attribute determining module is used for determining an element identifier corresponding to the service data and determining a corresponding element attribute according to the element identifier;
a configuration module, if the file template is a static file template, filling the corresponding service data into the form field according to the requirement of the element attribute according to the element identifier configured in the attribute of at least one form field in the static file template;
and the file generation module is used for calling the PDF file processing component, and combining and generating a file based on the service data filled in the form field and the static file template.
14. A file-generating electronic device for parameterized configuration, the electronic device comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the parameterized configuration file generation method of any of claims 1-12.
15. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method for file generation of a parameterized configuration according to any one of claims 1 to 12.
CN202110879415.0A 2021-08-02 2021-08-02 Method, device, equipment and medium for generating file of parameterized configuration Pending CN113627145A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110879415.0A CN113627145A (en) 2021-08-02 2021-08-02 Method, device, equipment and medium for generating file of parameterized configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110879415.0A CN113627145A (en) 2021-08-02 2021-08-02 Method, device, equipment and medium for generating file of parameterized configuration

Publications (1)

Publication Number Publication Date
CN113627145A true CN113627145A (en) 2021-11-09

Family

ID=78382108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110879415.0A Pending CN113627145A (en) 2021-08-02 2021-08-02 Method, device, equipment and medium for generating file of parameterized configuration

Country Status (1)

Country Link
CN (1) CN113627145A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113822025A (en) * 2021-11-25 2021-12-21 深圳市明源云链互联网科技有限公司 Office file automatic generation method, device, equipment and storage medium
CN114169306A (en) * 2021-12-13 2022-03-11 平安养老保险股份有限公司 Method, device and equipment for generating electronic receipt and readable storage medium
CN114493551A (en) * 2022-03-28 2022-05-13 中国光大银行股份有限公司 Contract generation method and device, electronic equipment and storage medium
CN114970487A (en) * 2022-07-27 2022-08-30 中建电子商务有限责任公司 Method for generating OFD electronic contract based on rich text
CN116401218A (en) * 2023-06-08 2023-07-07 天津金城银行股份有限公司 File export method and terminal equipment

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113822025A (en) * 2021-11-25 2021-12-21 深圳市明源云链互联网科技有限公司 Office file automatic generation method, device, equipment and storage medium
CN114169306A (en) * 2021-12-13 2022-03-11 平安养老保险股份有限公司 Method, device and equipment for generating electronic receipt and readable storage medium
CN114493551A (en) * 2022-03-28 2022-05-13 中国光大银行股份有限公司 Contract generation method and device, electronic equipment and storage medium
CN114493551B (en) * 2022-03-28 2022-07-05 中国光大银行股份有限公司 Contract generation method and device, electronic equipment and storage medium
CN114970487A (en) * 2022-07-27 2022-08-30 中建电子商务有限责任公司 Method for generating OFD electronic contract based on rich text
CN114970487B (en) * 2022-07-27 2023-01-06 中建电子商务有限责任公司 Method for generating OFD electronic contract based on rich text
CN116401218A (en) * 2023-06-08 2023-07-07 天津金城银行股份有限公司 File export method and terminal equipment
CN116401218B (en) * 2023-06-08 2023-09-19 天津金城银行股份有限公司 File export method and terminal equipment

Similar Documents

Publication Publication Date Title
CN113627145A (en) Method, device, equipment and medium for generating file of parameterized configuration
CN110535660B (en) Evidence obtaining service system based on block chain
US8443185B2 (en) System for management and processing of electronic vendor mail
WO2018201895A1 (en) Interface code generation method, apparatus, terminal device and medium
US8386998B2 (en) Software development apparatus for model that requires security
CN110490721B (en) Financial voucher generating method and related product
WO2021218166A1 (en) Contract signing method and apparatus, device and computer-readable storage medium
CN110737630B (en) Method and device for processing electronic archive file, computer equipment and storage medium
US20210349955A1 (en) Systems and methods for real estate data collection, normalization, and visualization
CN109981322A (en) The method and apparatus of cloud resource management based on label
CN109493087A (en) A kind of method, computer installation and computer readable storage medium based on two dimensional code examination Immovable Property Registration information
CN112348326A (en) Bank business processing method and system
CN113064562A (en) Man-machine interaction printing method and system based on block chain
CN114971571A (en) Bill processing method and device based on mailbox
CN112328486A (en) Interface automation test method and device, computer equipment and storage medium
CN111681141A (en) File authentication method, file authentication device and terminal equipment
CN109558192A (en) A kind of implementation method, device, storage medium and the computer equipment of video face label
CN109344372B (en) Big data-based document generation method and system
CN112669000A (en) Government affair item processing method and device, electronic equipment and storage medium
EP1797666A2 (en) Concept based message security system
CN112527289A (en) Dynamic form system based on Golang and Mongodb
CN113378549B (en) Document verification method and device, computer equipment and storage medium
CN111062676A (en) Method and device for realizing government affair approval process
CN110324361A (en) The method, apparatus of authentification of message calculates equipment and medium
CN113537985B (en) Data verification method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination