CN115617757A - File generation method and device, electronic equipment and storage medium - Google Patents

File generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115617757A
CN115617757A CN202211316456.XA CN202211316456A CN115617757A CN 115617757 A CN115617757 A CN 115617757A CN 202211316456 A CN202211316456 A CN 202211316456A CN 115617757 A CN115617757 A CN 115617757A
Authority
CN
China
Prior art keywords
file
target
inheritance
level
structural
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
CN202211316456.XA
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202211316456.XA priority Critical patent/CN115617757A/en
Publication of CN115617757A publication Critical patent/CN115617757A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • 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
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/18Legal services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Technology Law (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a file generation method, a file generation device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a file inheritance system structure of a target file to be generated; determining a target traversal structural layer of the target file to be generated according to the file inheritance sequence of the file inheritance system structure; acquiring a target file template and target file element parameters of the target traversal structural layer; and generating the target file according to the target file template and the target file element parameters. The technical scheme of the embodiment of the invention can reduce the generation cost of the file, improve the maintainability and reusability of the file template and further improve the generation efficiency of the file.

Description

File generation method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a file generation method and device, electronic equipment and a storage medium.
Background
In the field of file processing, different file templates can be defined according to different working requirements. The document template may store relevant original data, with a certain design pattern, which may include, but is not limited to, format, font size, content frame that must be covered, header and footer, numbering requirements of the document, the style of the original and copy seal, record and document validation date, and so on. When a file needs to be generated, the file template can be applied to improve the working efficiency.
However, due to the influence of various external factors, such as enterprise policy, government policy, and standardization requirements of related documents, different types of document templates may need to be prepared for documents of the same type to generate specific documents according to the related document templates. At present, for the diversified requirements of different file templates of the same file type, the related technology needs to respectively generate corresponding file templates in sequence. Taking the second-hand house contract as an example for specific explanation, the second-hand house contract is used as a very important financing certificate in the loan process, and different places have different second-hand house contracts generated by the adopted second-hand house contract template due to influence factors such as regions, policies, intermediaries, business varieties, customer groups, fund escrow, whether the second-hand house is a personal second-hand house loan, escrow funds and the like. Most of the prior online second-hand house contracts are formed by directly fixing template files of the second-hand house contracts in codes. When other types of second-hand house contract template files need to be added, workers need to modify or generate new second-hand house contract template files and then update the codes.
In the process of implementing the invention, the inventor finds that the prior art has the following defects: the diversified demands of the unified file types on different file templates are met, and the file processing cost is increased and the file generation efficiency is low due to the fact that different file templates are sequentially generated. Still take the second-hand contract document template as an example for explanation, and in the face of the diversified requirements of the second-hand contract in the market, the original online development and application mode of the second-hand contract document template inevitably leads to the defects of low code reusability, high development cost, difficult maintenance of the contract document template and the like.
Disclosure of Invention
Embodiments of the present invention provide a file generation method and apparatus, an electronic device, and a storage medium, which can reduce the generation cost of a file, improve maintainability and reusability of a file template, and further improve the generation efficiency of the file.
According to an aspect of the present invention, there is provided a file generation method including:
acquiring a file inheritance system structure of a target file to be generated;
determining a target traversal structural layer of the target file to be generated according to the file inheritance sequence of the file inheritance system structure;
acquiring a target file template and target file element parameters of the target traversal structural layer;
and generating the target file according to the target file template and the target file element parameters.
According to another aspect of the present invention, there is provided a file generating apparatus including:
the file inheritance system structure acquisition module is used for acquiring a file inheritance system structure of a target file to be generated;
the target traversal structure layer determining module is used for determining the target traversal structure layer of the target file to be generated according to the file inheritance sequence of the file inheritance system structure;
the template element acquisition module is used for acquiring a target file template and target file element parameters of the target traversal structural layer;
and the target file generation module is used for generating a target file according to the target file template and the target file element parameters.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the file generation method of any of the embodiments of the invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the file generation method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the embodiment of the invention, the target traversal structural layer of the file inheritance system structure is determined according to the file inheritance sequence of the acquired file inheritance system structure of the target file to be generated, the target file template and the target file element parameters of the target traversal structural layer are further acquired, and the target file is generated according to the target file template and the target file element parameters, so that the problems of high generation cost, maintainability and reusability of the file template, low file generation efficiency and the like of the existing file generation method are solved, the file generation cost can be reduced, the maintainability and reusability of the file template are improved, and the file generation efficiency is further improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a file generation method according to an embodiment of the present invention;
fig. 2 is a flowchart of a file generation method according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a file inheritance architecture according to a second embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a relationship between a contract template and a contract element template according to a second embodiment of the present invention;
fig. 5 is a schematic flowchart of generating a contract document based on an inheritable document inheritance architecture according to a second embodiment of the present invention;
FIG. 6 is a schematic flowchart of another exemplary embodiment of generating a contract document based on an inheritable document inheritance architecture;
fig. 7 is a schematic diagram of a file generation apparatus according to a third embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," original, target, etc. in the description and claims of the invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a file generating method according to an embodiment of the present invention, where this embodiment is applicable to a case where a target file is generated according to a file inheritance architecture, and the method may be executed by a file generating apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device, where the electronic device may be a terminal device or a server device, and the embodiment of the present invention does not limit a specific device type of the electronic device. Accordingly, as shown in fig. 1, the method comprises the following operations:
s110, acquiring a file inheritance system structure of the target file to be generated.
The target file to be generated may be a file type that needs to be generated. By way of example, the target files to be generated may include, but are not limited to, contract files, agreement files, notification files, appointment files, and the like of the target type to be generated. The file inheritance architecture can be an inheritance architecture type comprising a plurality of structural levels, so-called inheritance, i.e. properties or methods that make subclasses have parent classes, belonging to one of the three basic properties of object-oriented. In a document inheritance architecture, each structural hierarchy can include a type of document template and document element parameters. The document template may be a document type providing a document infrastructure, and the document element parameters may be member types constituting the document template.
And aiming at different types of target files to be generated, corresponding file inheritance architectures can be configured. Therefore, in the embodiment of the present invention, when the target file to be generated is obtained, the corresponding file inheritance architecture may be determined according to the file type of the target file to be generated. Illustratively, when the target file to be generated is the contract file to be generated, the file inheritance architecture corresponding to the contract file may be determined according to the file type of the target file to be generated. When the target file to be generated is the appointed file to be generated, the file inheritance architecture corresponding to the appointed file can be determined according to the mechanism type of the target file to be generated.
The file inheritance system structure provided by the embodiment of the invention can comprise a hierarchical structure formed by a plurality of different nodes, and each hierarchical structure has a certain inheritance relationship. For example, the underlying structure may inherit the data of the previous layer structure. The file inheritance system structure treats two categories of a target file template and file element parameters to be generated, and sets a configuration relation between the file template and the file element parameters. The file element parameters serve as members of a file template, the file template can specify which file element parameters specifically constitute, and the file element parameters finish assignment of specific attributes of the file template finally. Thus, the document template may focus on the assembly of the target document, while the document element parameters may focus on the values of the document elements.
Taking the contract document as an example, the document inheritance architecture of the contract document can separate two categories of the contract template and the contract elements, and set the configuration relationship between the contract template and the contract elements. The contract elements are used as members of a contract template, the contract template specifies which contract elements specifically consist of, and the contract elements finish specific attribute assignment finally. Thus, the contract template can focus on the assembly of the contract, while the contract elements can focus on the values of the contract elements.
S120, determining a target traversal structural layer of the target file to be generated according to the file inheritance sequence of the file inheritance system structure.
The file inheritance order can be an inheritance order in the file inheritance architecture and is related to the generation mode of the file inheritance architecture. For example, when the file inheritance architecture is in the order of parent node-child node-grandchild node from top to bottom, the file inheritance order can be in a bottom-up order. When the file inheritance architecture is in the sequence of parent node-child node-grandchild node from bottom to top, the file inheritance sequence can be in the sequence from top to bottom. The target traversal structure layer is also the structure layer finally positioned when the target file to be generated inherits the architecture.
Correspondingly, after the file inheritance architecture of the target file to be generated is obtained, traversal can be started according to the target file to be generated on the file inheritance architecture according to the file inheritance sequence, so that each structural level in the file inheritance architecture can be searched layer by layer, and the target traversal structural layer matched with the target file to be generated is determined. Matching with the target file to be generated can be understood that the target traversal structure layer includes a file template and file element parameters and the like required by the target file to be generated.
And S130, acquiring a target file template and target file element parameters of the target traversal structural layer.
The target document template may be a document template included in the target traversal structure layer, and the target document element parameter may be a document element parameter included in the target traversal structure layer.
And S140, generating an object file according to the object file template and the element parameters of the object file.
The target file is also the final file to be generated corresponding to the target file to be generated. It will be appreciated that the target document needs to correspond to the target document to be generated, and may include, but is not limited to, a contract document, an agreement document, a notification document, an appointment document, etc., of the target type, for example.
In the embodiment of the invention, after the structural layers of the file inheritance system structure are sequentially traversed according to the file inheritance sequence and the target traversal structural layer is determined, the target file template and the target file element parameters which are included by the target traversal structural layer can be further obtained, so that the target file is assembled according to the target file template, and the elements of the target file are assigned by using the target file element parameters, so that the final target file is obtained.
It will be appreciated that at least one document template and at least one document element parameter may be included in each structural level of the document inheritance architecture. Therefore, after the target traversal structure layer is determined, a determination target file template may be selected from the file templates in the target traversal structure layer, the target file template may be one or more file templates in the target traversal structure layer, and a determination target file element parameter may be selected from the file element parameters in the target traversal structure layer, the target file element parameter may be one or more file element parameters in the target traversal structure layer, so as to generate a target file according to the selected target file template and the target file element parameter.
In summary, for an application scenario in which a target file to be generated has individual requirements for different file templates, the file templates and the file element parameters are fixed to form a set of corresponding file template resources, the set of corresponding file template resources are stored in the file inheritance system structure, and a management end performs corresponding configuration operations on the file inheritance system structure, so that a large amount of redundant codes and repeated development of the file templates can be avoided, and the file generation cost is reduced. Meanwhile, the file inheritance system structure has a natural inheritance structure, so that files with the same requirements do not need to be repeatedly set, the file template of the father node structure can be directly inherited as a default file template, and the file element parameters of the father node structure can also be directly inherited as default file element parameters. Personalized document templates and document element parameters which are not contained in the father node structure can be correspondingly configured in the next-level nodes. That is, the deeper the inheritance relationship, the richer the types and contents of the document template and the document element parameters included in the corresponding structural hierarchy, and the more obvious the personalized features. In addition, the file template and the file element parameters included in each structural level can be updated and maintained according to actual requirements, and reusability and maintainability are higher. When a file needs to be generated, the file inheritance system structure is traversed in sequence, the required file template and the file element parameters can be obtained through a certain layer of structure in the file inheritance system structure, and the final required file is generated through fast assembly and assignment, so that the file generation efficiency is improved.
According to the embodiment of the invention, the target traversal structural layer of the file inheritance system structure is determined according to the file inheritance sequence of the acquired file inheritance system structure of the target file to be generated, the target file template and the target file element parameters of the target traversal structural layer are further acquired, and the target file is generated according to the target file template and the target file element parameters, so that the problems of high generation cost, maintainability and reusability of the file template, low file generation efficiency and the like of the existing file generation method are solved, the file generation cost can be reduced, the maintainability and reusability of the file template are improved, and the file generation efficiency is further improved.
Example two
Fig. 2 is a flowchart of a file generation method according to a second embodiment of the present invention, which is embodied based on the above-described embodiments, and in this embodiment, a specific optional generation manner and an update manner of a file inheritance architecture are provided, and a specific optional determination manner of a target traversal structure layer is also provided. Correspondingly, as shown in fig. 2, the method of the present embodiment may include:
s210, determining the file difference content of the target file to be generated in the target area range.
The target area range may be an area range to which a target file to be generated is applicable, and the target area range may be an administrative area range of each level such as a certain province, a city, a district, a county and the like, taking the second-hand house contract file as an example. Taking the appointed document of each institution as an example, the target area range may be a hierarchical area range composed of upper and lower levels of the institution. The file difference content may be the differentiated file content of each hierarchical region range of the target file to be generated in the target region range. For example, taking the second-hand house contract document as an example, the document difference content may be differentiated contract content generated by house policies of different areas within the second-hand house contract target area.
S220, determining the structural hierarchy of the file inheritance system structure according to the target area range.
Specifically, the structural hierarchy of the file inheritance architecture can be determined according to each hierarchical region range included by the target region range. Optionally, a structure level may be configured for one level region range.
In an optional embodiment of the present invention, the target area range may include a provincial area, a city area, and a district area; the determining the structural hierarchy of the file inheritance architecture according to the target area range may include: taking a provincial region node as a first structural hierarchy of the file inheritance system structure; taking the node of the city level region as a second structure level of the file inheritance system structure; taking a region level region node as a third structural hierarchy of the file inheritance system structure; wherein the first structural level is at a higher level than the second structural level; the second structural level is at a higher level than the third structural level.
Fig. 3 is a schematic structural diagram of a file inheritance architecture according to a second embodiment of the present invention. In a specific example, as shown in fig. 3, the target area range includes a provincial area, a city area, and a district level area, each level area may be configured with a node, and each level node represents a hierarchical structure of the file inheritance architecture. The node corresponding to the provincial region can be used as a father node of the file inheritance system structure and is a first structure level of the file inheritance system structure; the node corresponding to the city level area can be used as a son node of the file inheritance system structure and is a second structure level of the file inheritance system structure; the node corresponding to the zone level region may be a grandchild node of the file inheritance architecture, and is a third structural level of the file inheritance architecture. In the three structural levels, the file inherits in sequence from father node to child node to grandchild node. That is, the second structural level may inherit the document template and document element parameters of the first structural level, and the third structural level may inherit the document template and document element parameters of the second structural level.
And S230, determining differential file generation contents of each structural level in the file inheritance system structure according to the file differential contents.
The differentiated document generation content may be content used for generating a document, such as a document template and document element parameters included in each structure level in the document inheritance architecture.
Correspondingly, after the file difference content of the target file to be generated in the target area range and the structural hierarchy of the file inheritance system structure are determined, the matched differential file generation content can be determined for each structural hierarchy of the file inheritance system structure according to the file difference content.
In an optional embodiment of the present invention, the determining, according to the file difference content, generation content of a differentiated file of each structural level in the file inheritance architecture may include: determining the provincial file generation content of a first structural level in the file inheritance system structure according to the provincial file difference content of the provincial region; determining the generation content of the market-level file of the second structural level in the file inheritance system structure according to the market-level file difference content of the market-level area; determining the generation content of the zone-level file of the third structural hierarchy in the file inheritance system structure according to the zone-level file difference content of the zone-level area; the provincial level file generation content, the city level file generation content and the district level file generation content comprise file templates and file element parameters of corresponding levels.
The provincial document generation content may be related content for generating a target document applicable to the provincial region range, and may include, but is not limited to, a document template and document element parameters applicable to the provincial region range. The document generation content may be related content for generating a target document applicable to the city-level region range, and may include, but is not limited to, a document template and document element parameters applicable to the city-level region range. The zone-level document difference content is document difference content in a zone-level area range, and the zone-level document generation content may be related content for generating a target document applicable to the zone-level area range, and may include, but is not limited to, a document template and document element parameters applicable to the zone-level area range.
S240, determining the structural file template and the structural file element parameters of each structural level according to the generation content of the differential file so as to generate the file inheritance system structure.
The structure file template is a file template corresponding to each structure level, and the structure file element parameter is a file element parameter corresponding to each structure level. It can be understood that, the deeper the upper structure hierarchy inherited by the structure hierarchy, the richer the contents of the corresponding structure document template and the structure document element parameter.
In the embodiment of the invention, after the generation content of the differentiated document of each structural level of the document inheritance architecture is determined, the structural document template and the structural document element parameters of each structural level can be configured and generated according to the generation content of the differentiated document of each structural level, so that the final document inheritance architecture is generated.
In an optional embodiment of the present invention, the file generating method may further include: obtaining the architecture updating content of the file inheritance architecture; updating the file inheritance architecture according to the architecture updating content; wherein the architecture update content comprises file update content and/or structure level update content.
The update content of the architecture is also the content that needs to update the file inheritance architecture. The document update content may be content of updating the document template and/or document element parameters existing in a certain structural hierarchy. The structural level update content may be content that updates the structural level of the file inheritance architecture.
In the embodiment of the present invention, updating the file inheritance architecture according to the file update content may specifically be performing update operations such as adding, deleting or modifying a file template and/or file element parameters of a certain structural level in the file inheritance architecture. The inheritance system structure of the updated content updating file according to the structure level can be specifically an updating operation of newly adding an expanded structure level, deleting an existing structure level, exchanging the sequence of the structure level and the like.
And S250, acquiring a file inheritance system structure of the target file to be generated.
S260, traversing from the bottom layer structure level of the file inheritance system structure, and sequentially searching each structure level of the file inheritance system structure.
S270, when the target associated file content of the target file to be generated exists in the current structural layer, determining the current structural layer as the target traversal structural layer.
The target associated document content, that is, the related content that can be used for generating the target document exists in a certain structural level of the document inheritance architecture, and may include related document templates and document element parameters.
In this embodiment of the present invention, optionally, the file inheritance order of the file inheritance architecture may be a bottom-up order. Therefore, the deeper the hierarchy of the document inheritance system structure is, the more detailed the corresponding document template and document element parameters are, and the more obvious the personalized characteristics are. Correspondingly, when the target traversal structural layer is determined, traversal can be started from the bottom structural layer of the file inheritance system structure, and whether the structural layer with the richest file template and file element parameters comprises the file template, the file element parameters and other target associated file contents required by generating the target file or not is searched. When the corresponding target associated file content is not found in the bottom structure layer of the file inheritance system structure, the traversal search can be continued to the upper layer of the file inheritance system structure until the target associated file content of the target file to be generated is found in the current structure layer, and the current structure layer is determined as the target traversal structure layer.
And S280, acquiring a target file template and target file element parameters of the target traversal structural layer.
And S290, generating the target file according to the target file template and the target file element parameters.
In order to more clearly express the technical solution provided by the embodiment of the present invention, the embodiment of the present invention specifically describes a specific operation flow of the file generating method by taking the second-hand house complex file as an example. In the current second-hand house field, as the second-hand house policy changes, the contract also changes frequently, so that the second-hand house contract is subject to the situation of adding new parameters at any time. Elements in the newly added contract template in the related technology cannot be realized on line, and the code needs to be changed for realization. And when the second-hand contract template is initially imported, the parameters of the second-hand contract template need to be selected. If the second-hand contract template content is long and the parameters are excessive, a lot of time is spent on configuring the template, and the operation complexity is high. Therefore, the problems of complicated newly-added parameters, complex configuration operation and the like exist in the current second-hand house contract document template.
Aiming at the characteristics and problems of the prior second-hand house contract document, the embodiment of the invention provides a inheritable configuration method based on the second-hand house contract document. The second-hand house contract document is required to be highly abstracted, and two categories of contract templates and contract elements are separated, wherein the contract elements can include, but are not limited to, customer information elements, house information elements, loan information elements and the like. And the duties are divided by two different classes, and finally, a complete second-hand house contract is formed together. In order to hierarchically distinguish two types of highly abstract contract templates and contract elements, the embodiment of the invention designs a file inheritance system structure for hierarchically distinguishing according to provinces, cities and districts, and enables a second-hand house contract generation system to meet the contract text difference problem caused by different requirement changes under the condition of not changing the original codes through an inheritance system of second-hand house contract files which is continuously refined by the file inheritance system structure distributed hierarchically.
Fig. 4 is a schematic structural diagram of a relationship between a contract template and a contract element template according to a second embodiment of the present invention. In one particular example. As shown in fig. 4, in the second-hand contract document, the underlying contract template may contain customer information, property information, escrow information, loan information, and the like (not all shown in fig. 4). It can be understood that although the house policies of different regions are generally different, the text contents of the client information and the house information are not greatly different, and the part of contract text can be shared and reused. But for the escrow information, the loan information and the like, different regions can formulate the featured contract content to form a new contract template. The embodiment of the invention supports the construction of a 'province-city-district-other' file inheritance architecture according to different policies of different regions, and adapts to different real estate policies of different regions by inheriting and updating contract text contents on the basis of the contract template.
Fig. 5 is a schematic flowchart of generating a contract document based on an inheritable document inheritance architecture according to a second embodiment of the present invention, and fig. 6 is a schematic flowchart of generating a contract document based on an inheritable document inheritance architecture according to a second embodiment of the present invention. In one particular example. As shown in fig. 5 and fig. 6, the inheritable file inheritance architecture can be primarily divided into province, city and district structures, and the file inheritance architecture can be further expanded downward according to the requirements, such as adding a hierarchical structure corresponding to a county-level region.
For second-hand house contract documents, loan policies corresponding to different provinces are often different, for example, the first payment proportion of the second set of houses in province A and province B is different, and in this case, different second-hand house contract documents can be formulated according to loan rules by taking province as granularity. And a province A saves every city, every district may not have difference requirements for contents of second-hand house contract documents, the city dimensional second-hand house contract documents can inherit province dimensional second-hand house contract documents, and the district dimensional second-hand house contract documents can directly inherit province dimensional second-hand house contract documents. With the further development of the second-hand house service, different house property policies possibly exist in each district in province A, the dimension of the district is inherited to the second-hand house contract document of the previous level, namely city dimension, and then a new contract template and/or contract elements are formed according to the contract text of the dimension characteristic part of the district configured according to the differentiated contract information of the dimension of the district.
Correspondingly, when the second-hand house contract document is displayed in the system financing, the contract template can select the contract template which is not empty in the bottommost structure in the document inheritance system structure, and the contract elements can read the contract element values in the bottommost structure in the document inheritance system structure. That is, if the contract is required to be displayed and printed in the second-hand house financing process, the corresponding contract template and the contract elements can be queried based on the file inheritance architecture configured by the second-hand house contract document. Specifically, the provincial and urban dimensions of the document inheritance system structure can be firstly inquired, the provincial and urban dimensions of the document inheritance system structure can be secondly inquired, and the provincial and urban dimensions of the document inheritance system structure can be finally inquired until the corresponding contract template and the parameter values of the contract elements are found for use. If the client in a certain region needs to transact second-hand house financing service, the client is bound with the province, city and county in the file inheritance system structure, and then a finally available second-hand house contract file can be generated by using a contract template and contract element parameters corresponding to the file inheritance system structure of the province, city and county.
In summary, when configuring the contract template, the contract text can be combined as needed by inheriting from the upper dimension layer by layer based on the file inheritance architecture. When the contract template is displayed, searching layer by layer from the dimension from the bottom to the upper layer based on the document inheritance system structure, and if the contract template and the contract elements are not configured in the dimension, continuously searching the upper layer for the same template and the contract elements. Therefore, when a new policy appears in the second-hand house field, a new contract template and contract elements can be updated according to the dimension based on the file inheritance system structure, and the 'plug-and-play' of the second-hand house contract file is realized.
Therefore, in the method, because the property policies of the regions are different, the difference of the second-hand house financing contracts is caused, the corresponding hierarchy template and the element parameter are set through the file inheritance system structure and fixed to form a set of corresponding contract templates, and through the configuration operation of the management end, a large amount of redundant codes and development are avoided, and the flexible configuration of the contract templates is realized. Meanwhile, according to a natural top-down structure of 'province-city-district-county', the regions of the same house property policy and financing contract can be realized without repeated setting, and the contract template of the father region is directly inherited to be used as a default contract template, so that the inheritable characteristic of the contract template is realized. If contracts with smaller dimensions are different in a city district, the contract template can be configured by expanding smaller hierarchy dimensions based on a file inheritance system structure, and the expandable characteristic of the contract template is realized. The file generation method provided by the embodiment of the invention supports dynamic addition of configuration dimension, does not need complicated development work, and can be used for carrying out template configuration on the dimension added by a user, thereby reducing the development cost of contract files, improving the generation efficiency of the contract files and having stronger expansibility and maintainability.
It should be noted that any permutation and combination between the technical features in the above embodiments also belong to the scope of the present invention.
EXAMPLE III
Fig. 7 is a schematic diagram of a file generating apparatus according to a third embodiment of the present invention, and as shown in fig. 7, the apparatus includes: a document inheritance architecture acquisition module 310, a target traversal structure layer determination module 320, a template element acquisition module 330, and a target document generation module 340, wherein:
a file inheritance system structure obtaining module 310, configured to obtain a file inheritance system structure of a target file to be generated;
a target traversal structure layer determining module 320, configured to determine, according to a file inheritance sequence of the file inheritance architecture, a target traversal structure layer of the target file to be generated;
a template element obtaining module 330, configured to obtain a target file template and a target file element parameter of the target traversal structure layer;
and the target file generating module 340 is configured to generate a target file according to the target file template and the target file element parameter.
According to the embodiment of the invention, the target traversal structural layer of the file inheritance system structure is determined according to the file inheritance sequence of the acquired file inheritance system structure of the target file to be generated, the target file template and the target file element parameters of the target traversal structural layer are further acquired, and the target file is generated according to the target file template and the target file element parameters, so that the problems of high generation cost, maintainability and reusability of the file template, low file generation efficiency and the like of the existing file generation method are solved, the file generation cost can be reduced, the maintainability and reusability of the file template are improved, and the file generation efficiency is further improved.
Optionally, the file generating apparatus may further include a file inheritance architecture generating module, configured to: determining the file difference content of the target file to be generated in the target area range; determining the structural hierarchy of the file inheritance system structure according to the target area range; determining differential file generation contents of each structural level in the file inheritance system structure according to the file differential contents; and determining the structural document template and the structural document element parameters of each structural hierarchy according to the generation content of the differential document so as to generate the document inheritance system structure.
Optionally, the target area range includes a provincial area, a city area, and a district area; the file inheritance architecture generation module is specifically configured to: taking a provincial region node as a first structural hierarchy of the file inheritance system structure; taking the node of the city level region as a second structure level of the file inheritance system structure; taking a region level region node as a third structural hierarchy of the file inheritance system structure; wherein the first structural level is at a higher level than the second structural level; the second structural level is at a higher level than the third structural level.
Optionally, the file inheritance architecture generating module is specifically configured to: determining the provincial file generation content of a first structural level in the file inheritance system structure according to the provincial file difference content of the provincial region; determining the generation content of the market-level file of the second structural level in the file inheritance system structure according to the market-level file difference content of the market-level area; determining the generation content of the zone-level file of the third structural hierarchy in the file inheritance system structure according to the zone-level file difference content of the zone-level area; the provincial level file generation content, the city level file generation content and the district level file generation content comprise file templates and file element parameters of corresponding levels.
Optionally, the file generating apparatus may further include a file inheritance architecture updating module, configured to: obtaining the architecture updating content of the file inheritance architecture; updating the file inheritance architecture according to the architecture updating content; wherein the architecture update content comprises file update content and/or structure level update content.
Optionally, the target traversal structure layer determining module 320 is specifically configured to: traversing from the bottom structure level of the file inheritance system structure, and sequentially searching each structure level of the file inheritance system structure; and when determining that the target associated file content of the target file to be generated exists in the current structural layer, determining the current structural layer as the target traversal structural layer.
Optionally, the target document includes a contract document of a target type.
The file generation device can execute the file generation method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to a file generation method provided in any embodiment of the present invention.
Since the file generation device described above is a device capable of executing the file generation method in the embodiment of the present invention, based on the file generation method described in the embodiment of the present invention, a person skilled in the art can understand a specific implementation manner of the file generation device in the embodiment and various variations thereof, and therefore, how the file generation device implements the file generation method in the embodiment of the present invention is not described in detail herein. The device used by those skilled in the art to implement the file generation method in the embodiments of the present invention is within the scope of the present application.
Example four
FIG. 8 illustrates a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 8, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as the file generation method.
In some embodiments, the file generation method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the file generation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the file generation method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.

Claims (10)

1. A file generation method, comprising:
acquiring a file inheritance system structure of a target file to be generated;
determining a target traversal structural layer of the target file to be generated according to the file inheritance sequence of the file inheritance system structure;
acquiring a target file template and target file element parameters of the target traversal structural layer;
and generating an object file according to the object file template and the element parameters of the object file.
2. The method according to claim 1, before the obtaining the file inheritance architecture of the target file to be generated, further comprising:
determining the file difference content of the target file to be generated in the target area range;
determining the structural hierarchy of the file inheritance architecture according to the target area range;
determining differential file generation contents of each structural level in the file inheritance system structure according to the file differential contents;
and determining the structural document template and the structural document element parameters of each structural hierarchy according to the generation content of the differential document so as to generate the document inheritance system structure.
3. The method of claim 2, wherein the target area range comprises a provincial area, a city area, and a district area; the determining the structural hierarchy of the file inheritance architecture according to the target area range comprises the following steps:
taking a provincial region node as a first structural hierarchy of the file inheritance system structure;
taking the nodes in the city region as a second structural hierarchy of the file inheritance system structure;
taking the region level area node as a third structural hierarchy of the file inheritance system structure;
wherein the first structural level is at a higher level than the second structural level; the second structural level is at a higher level than the third structural level.
4. The method of claim 3, wherein determining differential document generation content at each structural level in the document inheritance architecture according to the document differential content comprises:
determining the generation content of the provincial file of a first structural level in the file inheritance system structure according to the provincial file difference content of the provincial region;
determining the generation content of the market-level file of the second structural level in the file inheritance system structure according to the market-level file difference content of the market-level area;
determining the generation content of the zone-level file of the third structural hierarchy in the file inheritance system structure according to the zone-level file difference content of the zone-level area;
the provincial level file generation content, the city level file generation content and the district level file generation content comprise file templates and file element parameters of corresponding levels.
5. The method of claim 2, further comprising:
obtaining the architecture updating content of the file inheritance architecture;
updating the file inheritance architecture according to the updating content of the architecture;
wherein the architecture update content comprises file update content and/or structure level update content.
6. The method of claim 1, wherein the determining the target traversal structure layer of the target file to be generated according to the file inheritance order of the file inheritance architecture comprises:
traversing from the bottom structure level of the file inheritance system structure, and sequentially searching each structure level of the file inheritance system structure;
and when determining that the target associated file content of the target file to be generated exists in the current structural hierarchy, determining the current structural hierarchy as the target traversal structural hierarchy.
7. The method of any of claims 1-6, wherein the target document comprises a contract document of a target type.
8. A file generation apparatus, comprising:
the file inheritance system structure acquisition module is used for acquiring a file inheritance system structure of a target file to be generated;
the target traversal structure layer determining module is used for determining the target traversal structure layer of the target file to be generated according to the file inheritance sequence of the file inheritance system structure;
the template element acquisition module is used for acquiring a target file template and target file element parameters of the target traversal structural layer;
and the target file generation module is used for generating a target file according to the target file template and the target file element parameters.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the file generation method of any of claims 1-7.
10. A computer storage medium, characterized in that the computer readable storage medium stores computer instructions for causing a processor to implement the file generation method of any one of claims 1-7 when executed.
CN202211316456.XA 2022-10-26 2022-10-26 File generation method and device, electronic equipment and storage medium Pending CN115617757A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211316456.XA CN115617757A (en) 2022-10-26 2022-10-26 File generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211316456.XA CN115617757A (en) 2022-10-26 2022-10-26 File generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115617757A true CN115617757A (en) 2023-01-17

Family

ID=84864337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211316456.XA Pending CN115617757A (en) 2022-10-26 2022-10-26 File generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115617757A (en)

Similar Documents

Publication Publication Date Title
EP3163434A1 (en) Software element model-based universal software modelling method for constructing software model
EP3163436A1 (en) Visual software modeling method based on software meta-view for constructing software view
EP3163435A1 (en) Method for general modeling basing on system meta model to construct system model
CN115408546A (en) Time sequence data management method, device, equipment and storage medium
CN113778961B (en) Production management method, device and system for CIM model data
CN117170655A (en) Metadata processing method and device, data processing equipment and storage medium
CN115412401B (en) Method and device for training virtual network embedding model and virtual network embedding
CN115186738B (en) Model training method, device and storage medium
CN115543428A (en) Simulated data generation method and device based on strategy template
CN115617757A (en) File generation method and device, electronic equipment and storage medium
CN111737593A (en) Method, device, equipment and storage medium for acquiring cross-group communication relationship diagram
EP4216097A1 (en) Method, system, equipment and medium for modifying the layering layer information of finite element model unit
CN109670601B (en) Machine learning feature generation method and device, electronic device and storage medium
US20230316604A1 (en) Reuse of infographics
Shahsavari et al. Semantic Constraint and QoS-Aware Large-Scale Web Service Composition
CN115934101A (en) Interface document generation method, device, medium and electronic equipment
CN115935930A (en) Form configuration method, device, equipment and medium based on industrial neural network
Guo et al. Large-amount Blockchain Transaction Conflict Resolution Technology Based on Dependency Graph for Multi-property Assets
CN116757285A (en) Power grid knowledge reasoning method and device, electronic equipment and storage medium
CN115600988A (en) To-do task generation method, device, equipment and medium
CN115981657A (en) Code generation method and device, electronic equipment and readable medium
CN114491192A (en) Data visualization method, device, equipment and storage medium
CN117931176A (en) Business application generation method, device, platform and medium
CN116882005A (en) Analytical modeling method, device, equipment and medium for power generation engineering
CN115794061A (en) Method and device for configuring page

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