CN112001159A - Document generation method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN112001159A
CN112001159A CN202010859944.XA CN202010859944A CN112001159A CN 112001159 A CN112001159 A CN 112001159A CN 202010859944 A CN202010859944 A CN 202010859944A CN 112001159 A CN112001159 A CN 112001159A
Authority
CN
China
Prior art keywords
document
elements
replacement
label
processing
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
CN202010859944.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.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City Technology 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 Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202010859944.XA priority Critical patent/CN112001159A/en
Publication of CN112001159A publication Critical patent/CN112001159A/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
    • 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)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Technology Law (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention relates to the technical field of data processing, and is applied to a smart government scene, so that the construction of a smart city is promoted. A document generation method comprising: receiving a document generation instruction; determining a target template according to the template identification carried by the document generation instruction; replacing elements in the target template according to variables carried by the document generation instruction to obtain a replacement document; and according to the preset label of the replacement document, performing corresponding processing on the replacement document to generate a target document, wherein the processing comprises display processing, hiding processing and logic judgment processing. The invention also provides a document generation device, an electronic device and a storage medium. The invention can improve the generation efficiency of the document. Further, the present application relates to blockchain techniques, and the target document can be stored in a blockchain.

Description

Document generation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a document generation method and apparatus, an electronic device, and a storage medium.
Background
At present, because the structure of the judicial literature is fixed, the generation of the judicial literature can be realized by fixing the literature template of the content and replacing possibly changed words, such as case numbers, case bases and the like, by using text labels at specified positions. However, in practice, it is found that the basic information part of three types of people displayed on the document template has fixed content and personnel information labels, but if there is no information of three types of people, the content is redundant and needs to be deleted after the generation of the judicial document, so that the document template of the judicial document is inconvenient to use, and the document generation efficiency is not high.
Therefore, how to improve the document generation efficiency is an urgent technical problem to be solved.
Disclosure of Invention
In view of the above, it is desirable to provide a document generation method, apparatus, electronic device, and storage medium, which can improve the document generation efficiency.
A first aspect of the present invention provides a document generation method, including:
receiving a document generation instruction;
determining a target template according to the template identification carried by the document generation instruction;
replacing elements in the target template according to variables carried by the document generation instruction to obtain a replacement document;
and according to the preset label of the replacement document, performing corresponding processing on the replacement document to generate a target document, wherein the processing comprises display processing, hiding processing and logic judgment processing.
In a possible implementation manner, the preset tag includes a first range tag, and the performing corresponding processing on the replacement document according to the preset tag of the replacement document to generate the target document includes:
acquiring a first range label in the replacement document;
judging whether null value elements exist in all elements of the first range label;
if all elements of the first range label have null value elements, hiding all character contents of the first range label, acquiring the target document, and finishing the logic judgment processing; or
And if no null value elements exist in all the elements of the first range label, displaying all the text contents of the first range label in the replacement document to obtain the target document, and finishing the logic judgment processing.
In a possible implementation manner, the preset tag includes a second range tag, and the performing corresponding processing on the replacement document according to the preset tag of the replacement document to generate the target document includes:
acquiring a second range label in the replacement document;
judging whether all elements of the second range label are null value elements or not;
if all elements of the second range label are null value elements, hiding all the text contents of the second range label, obtaining the target document, and finishing the logic judgment processing; or
And if all elements of the second range label are not null value elements, displaying all the text contents of the second range label in the replacement document to obtain the target document, and finishing the logic judgment processing.
In a possible implementation manner, the preset tag includes a hidden tag, and the performing corresponding processing on the replacement document according to the preset tag of the replacement document to generate the target document includes:
acquiring a hidden label in the replacement document;
and hiding all the character contents in the hidden label to obtain the target document, and finishing the hiding processing.
In a possible implementation manner, the preset tag includes a display tag, and the performing corresponding processing on the replacement document according to the preset tag of the replacement document to generate the target document includes:
acquiring a display label in the replacement document;
judging whether the display elements in the display labels are null value elements or not aiming at each display label;
and if the display elements in the display label are not null elements, replacing all contents in the display label with the text contents corresponding to the display elements to obtain the target document, and finishing the display processing.
In one possible implementation manner, the document generation method further includes:
if the display elements in the display label are null value elements, generating prompt information;
and sending the prompt information to a preset terminal device.
In a possible implementation manner, the replacing elements in the target template according to the variable carried by the document generation instruction, and obtaining a replacement document includes:
for each variable, determining a replacement element corresponding to the name of the variable from all elements of the target template;
replacing the replacement element with the value of the variable.
A second aspect of the present invention provides a document generating apparatus comprising:
the receiving module is used for receiving a document generation instruction;
the determining module is used for determining a target template according to the template identification carried by the document generating instruction;
the replacing module is used for replacing elements in the target template according to the variables carried by the document generating instruction to obtain a replaced document;
and the processing module is used for carrying out corresponding processing on the replacement document according to the preset label of the replacement document to generate a target document, wherein the processing comprises display processing, hiding processing and logic judgment processing.
A third aspect of the invention provides an electronic device comprising a processor and a memory, the processor being configured to implement the document generation method when executing a computer program stored in the memory.
A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the document generation method.
By the technical scheme, elements (such as the character content to be replaced) of the document template can be replaced according to the preset label in the document template, the specified character content can be displayed, the specified character content is hidden, extra manual processing is not needed, and the document generation efficiency is improved.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of a document generation method disclosed in the present invention.
FIG. 2 is a functional block diagram of a preferred embodiment of a document creation apparatus according to the present disclosure.
FIG. 3 is a schematic structural diagram of an electronic device implementing a document generation method according to a preferred embodiment of the invention.
Detailed Description
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 derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
The document generation method of the embodiment of the invention is applied to electronic equipment, and can also be applied to a hardware environment formed by the electronic equipment and a server connected with the electronic equipment through a network, and the server and the electronic equipment execute together. Networks include, but are not limited to: a wide area network, a metropolitan area network, or a local area network.
A server may refer to a computer system that provides services to other devices (e.g., electronic devices) in a network. A personal computer may also be called a server if it can externally provide a File Transfer Protocol (FTP) service. In a narrow sense, a server refers to a high-performance computer, which can provide services to the outside through a network, and compared with a common personal computer, the server has higher requirements on stability, security, performance and the like, and therefore, hardware such as a CPU, a chipset, a memory, a disk system, a network and the like is different from that of the common personal computer.
The electronic device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware thereof includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like. The electronic device may also include a network device and/or a user device. The network device includes, but is not limited to, a single network device, a server group consisting of a plurality of network devices, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of hosts or network devices, wherein the Cloud Computing is one of distributed Computing, and is a super virtual computer consisting of a group of loosely coupled computers. The user device includes, but is not limited to, any electronic product that can interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device, for example, a personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), or the like.
Referring to fig. 1, fig. 1 is a flowchart illustrating a document generation method according to a preferred embodiment of the present invention. The order of the steps in the flowchart may be changed, and some steps may be omitted. The execution subject of the document generation method may be an electronic device.
And S11, receiving a document generation instruction.
The documents can be documents with fixed structures, such as legal documents of case handling litigation cases and non-litigation cases, such as courtroom, inspection courtyard, public security department, prison and the like, legal documents of case parties, lawyers and law firm self-books or generation documents with legal effectiveness or legal significance. The documents can be made in batches by means of fixed document templates.
In the embodiment of the invention, a document generation instruction input by a user can be received, and the document generation instruction can be triggered by a specified button.
As an optional implementation manner, before the receiving the document generation instruction, the method further includes:
receiving an editing instruction aiming at the document template;
and outputting the document template to be edited indicated by the editing instruction.
In this optional implementation, a designated document template may be modified, where the document template to be edited may be the designated document template, and the document template to be modified may be selected, and after the system receives a corresponding editing instruction, the system outputs the designated document template, so that the user edits and modifies the document template.
As an optional implementation manner, after outputting the document template to be edited, which is indicated by the editing instruction, the method further includes:
receiving an uploading instruction aiming at the document template to be edited;
and replacing the document template to be edited in the server with the document template carried by the uploading instruction.
In this optional embodiment, after outputting the document template to be edited indicated by the editing instruction, the user may edit the document template to be edited, and may upload the edited document template to the server at any time to replace the previous document template.
And S12, determining a target template according to the template identification carried by the document generation instruction.
In the embodiment of the invention, a unique template identifier can be allocated to each document template, the association between the template identifier and the document template is established in advance and stored in the database, and after a document generation instruction is received, the database can be queried according to the template identifier carried by the document generation instruction, so that the document template with the template identifier, namely the target template, is determined.
And S13, replacing the elements in the target template according to the variables carried by the document generation instruction to obtain a replaced document.
Specifically, the replacing elements in the target template according to the variable carried by the document generation instruction to obtain a replaced document includes:
for each variable, determining a replacement element corresponding to the name of the variable from all elements of the target template;
replacing the replacement element with the value of the variable.
In this alternative embodiment, the elements refer to the text content marked by the label in the target template that needs text replacement, such as [ + notifier + ], and the variable specifies the value of these elements, such as specifying that the notifier is "zhang" wherein the name of the variable is the notifier and the value of the variable is zhang, the element "notifier" in the label can be replaced by "zhang".
And S14, performing corresponding processing on the replacement document according to the preset label of the replacement document to generate a target document, wherein the processing comprises display processing, hiding processing and logic judgment processing.
The preset label comprises a display label, a hidden label, a first range label and a second range label. The show tag may be [ + ], the hide tag may be [ - ], the first range tag may be { - }, and the second range tag may be { + + }.
Specifically, the preset tag includes a display tag, and the corresponding processing is performed on the replacement document according to the preset tag of the replacement document, and generating the target document includes:
acquiring a display label in the replacement document;
judging whether the display elements in the display labels are null value elements or not aiming at each display label;
and if the display elements in the display label are not null elements, replacing all contents in the display label with the text contents corresponding to the display elements to obtain the target document, and finishing the display processing.
In this alternative embodiment, a presentation label, "[ +. + ]" label may be used, marking elements that need replacement and need presentation, such as "[ + original name + ] in the target template, which becomes" [ + sheet three + ] in the replacement document. When a target document is generated, all contents in the display label need to be replaced by the text contents corresponding to the display elements, namely, the values of variables with names of original names are displayed, and the [ + original names + ] "in the template corresponds to the [ + three + ]" in the replacement document and corresponds to the three pages "in the template document.
As an optional implementation manner, the document generation method further includes:
if the display elements in the display label are null value elements, generating prompt information;
and sending the prompt information to a preset terminal device.
In this alternative embodiment, if the presentation element in the presentation label is a null element, i.e., "+", a prompt message may be generated, such as: and sending the prompt information to preset terminal equipment to prompt a user to supplement corresponding information.
Specifically, the preset tag includes a hidden tag, and the corresponding processing is performed on the replacement document according to the preset tag of the replacement document, and generating the target document includes:
acquiring a hidden label in the replacement document;
and hiding all the character contents in the hidden label to obtain the target document, and finishing the hiding processing.
In this alternative embodiment, a hidden tag, "[ - ]" tag may be used, marking elements that need to be replaced but not displayed, such as [ -advertized name- ]; when the target document is generated, the text content included in the hidden label needs to be hidden.
Specifically, the preset tag includes a first range tag, and the corresponding processing is performed on the replacement document according to the preset tag of the replacement document, and generating the target document includes:
acquiring a first range label in the replacement document;
judging whether null value elements exist in all elements of the first range label;
if all elements of the first range label have null value elements, hiding all character contents of the first range label, acquiring the target document, and finishing the logic judgment processing; or
And if no null value elements exist in all the elements of the first range label, displaying all the text contents of the first range label in the replacement document to obtain the target document, and finishing the logic judgment processing.
In this alternative embodiment, a first scope tag, "{ - }" tag may be used, marking a piece of text, such as "{ -committing litigation attorneys: [ + litigation agent name + ], contact means: [ + litigation representative contact mode + ]. - }, if one of the element "litigation attorney name" and "litigation attorney contact mode" is empty, that is, the element is a null value, then the text is not displayed. Alternatively, if there is no null element in the elements "litigation agent name" and "litigation agent association method" (for example, neither the value of "litigation agent name" nor the value of "litigation agent association method" is null), the piece of text content is displayed.
Specifically, the preset tag includes a second range tag, and the corresponding processing is performed on the replacement document according to the preset tag of the replacement document, and generating the target document includes:
acquiring a second range label in the replacement document;
judging whether all elements of the second range label are null value elements or not;
if all elements of the second range label are null value elements, hiding all the text contents of the second range label, obtaining the target document, and finishing the logic judgment processing; or
And if all elements of the second range label are not null value elements, displaying all the text contents of the second range label in the replacement document to obtain the target document, and finishing the logic judgment processing.
In this alternative embodiment, a second range label "{ +.. + }" may be used to mark a text that is determined to be presented based on the value of the element inside, such as "{ + committing litigation attorneys: [ + litigation agent name + ], contact means: [ + litigation representative contact mode + ]. Characters in the terms of + } "," { +. + -. + } "are judged according to the values of the elements" litigation agent name "and" litigation agent association manner ", and if the values of the" litigation agent name "and the" litigation agent association manner "are both null, the segment of characters is not displayed. Or if the values of the name of the litigation agent and the contact mode of the litigation agent are not both null, the text is displayed.
It is emphasized that the target document may also be stored in a node of a block chain in order to further ensure privacy and security of the target document.
In the method flow described in fig. 1, elements (for example, text contents to be replaced) of the document template can be replaced according to the preset tags in the document template, and the specified text contents can be displayed and hidden without additional manual processing, so that the document generation efficiency is improved.
FIG. 2 is a functional block diagram of a preferred embodiment of a document creation apparatus according to the present disclosure.
Referring to fig. 2, the document generating apparatus 20 is implemented in an electronic device. The document generating means 20 may comprise a plurality of functional modules consisting of program code segments. The program code of the various program segments in the document generation apparatus 20 may be stored in a memory and executed by at least one processor to perform some or all of the steps of the document generation method described in fig. 1.
In this embodiment, the document generation apparatus 20 may be divided into a plurality of functional modules according to the functions performed by the document generation apparatus. The functional module may include: a receiving module 201, a determining module 202, a replacing module 203 and a processing module 204. The module referred to herein is a series of computer program segments capable of being executed by at least one processor and capable of performing a fixed function and is stored in memory.
The receiving module 201 is configured to receive a document generation instruction.
The documents can be documents with fixed structures, such as legal documents of case handling litigation cases and non-litigation cases, such as courtroom, inspection courtyard, public security department, prison and the like, legal documents of case parties, lawyers and law firm self-books or generation documents with legal effectiveness or legal significance. The documents can be made in batches by means of fixed document templates.
In the embodiment of the invention, a document generation instruction input by a user can be received, and the document generation instruction can be triggered by a specified button.
And the determining module 202 is configured to determine the target template according to the template identifier carried by the document generation instruction.
In the embodiment of the invention, a unique template identifier can be allocated to each document template, the association between the template identifier and the document template is established in advance and stored in the database, and after a document generation instruction is received, the database can be queried according to the template identifier carried by the document generation instruction, so that the document template with the template identifier, namely the target template, is determined.
And the replacing module 203 is used for replacing elements in the target template according to the variables carried by the document generating instruction to obtain a replaced document.
And the processing module 204 is configured to perform corresponding processing on the replacement document according to the preset tag of the replacement document, so as to generate a target document, where the processing includes display processing, hiding processing, and logic judgment processing.
The preset label comprises a display label, a hidden label, a first range label and a second range label. The show tag may be [ + ], the hide tag may be [ - ], the first range tag may be { - }, and the second range tag may be { + + }.
As an optional implementation manner, the preset tag includes a hidden tag, and the processing module 204 performs corresponding processing on the replacement document according to the preset tag of the replacement document, where a manner of generating the target document specifically is:
acquiring a hidden label in the replacement document;
and hiding all the character contents in the hidden label to obtain the target document, and finishing the hiding processing.
In this alternative embodiment, a hidden tag, "[ - ]" tag may be used, marking elements that need to be replaced but not displayed, such as [ -advertized name- ]; when the target document is generated, the text content included in the hidden label needs to be hidden.
As an optional implementation manner, the preset tag includes a first range tag, and the processing module 204 performs corresponding processing on the replacement document according to the preset tag of the replacement document, where a manner of generating the target document specifically is:
acquiring a first range label in the replacement document;
judging whether null value elements exist in all elements of the first range label;
if all elements of the first range label have null value elements, hiding all character contents of the first range label, acquiring the target document, and finishing the logic judgment processing; or
And if no null value elements exist in all the elements of the first range label, displaying all the text contents of the first range label in the replacement document to obtain the target document, and finishing the logic judgment processing.
In this alternative embodiment, a first scope tag, "{ - }" tag may be used, marking a piece of text, such as "{ -committing litigation attorneys: [ + litigation agent name + ], contact means: [ + litigation representative contact mode + ]. - }, if one of the element "litigation attorney name" and "litigation attorney contact mode" is empty, that is, the element is a null value, then the text is not displayed. Alternatively, if there is no null element in the elements "litigation agent name" and "litigation agent association method" (for example, neither the value of "litigation agent name" nor the value of "litigation agent association method" is null), the piece of text content is displayed.
As an optional implementation manner, the preset tag includes a second range tag, and the processing module 204 performs corresponding processing on the replacement document according to the preset tag of the replacement document, where a manner of generating the target document specifically is:
acquiring a second range label in the replacement document;
judging whether all elements of the second range label are null value elements or not;
if all elements of the second range label are null value elements, hiding all the text contents of the second range label, obtaining the target document, and finishing the logic judgment processing; or
And if all elements of the second range label are not null value elements, displaying all the text contents of the second range label in the replacement document to obtain the target document, and finishing the logic judgment processing.
In this alternative embodiment, a second range label "{ +.. + }" may be used to mark a text that is determined to be presented based on the value of the element inside, such as "{ + committing litigation attorneys: [ + litigation agent name + ], contact means: [ + litigation representative contact mode + ]. Characters in the terms of + } "," { +. + -. + } "are judged according to the values of the elements" litigation agent name "and" litigation agent association manner ", and if the values of the" litigation agent name "and the" litigation agent association manner "are both null, the segment of characters is not displayed. Or if the values of the name of the litigation agent and the contact mode of the litigation agent are not both null, the text is displayed.
As an optional implementation manner, the preset tag includes a display tag, and the processing module 204 performs corresponding processing on the replacement document according to the preset tag of the replacement document, where the manner of generating the target document specifically is:
acquiring a display label in the replacement document;
judging whether the display elements in the display labels are null value elements or not aiming at each display label;
and if the display elements in the display label are not null elements, replacing all contents in the display label with the text contents corresponding to the display elements to obtain the target document, and finishing the display processing.
In this alternative embodiment, a presentation label, "[ +. + ]" label may be used, marking elements that need replacement and need presentation, such as "[ + original name + ] in the target template, which becomes" [ + sheet three + ] in the replacement document. When a target document is generated, all contents in the display label need to be replaced by the text contents corresponding to the display elements, namely, the values of variables with names of original names are displayed, and the [ + original names + ] "in the template corresponds to the [ + three + ]" in the replacement document and corresponds to the three pages "in the template document.
As an optional implementation, the document generating apparatus 20 may further include:
the generating module is used for generating prompt information if the display elements in the display label are null value elements;
and the sending module is used for sending the prompt information to preset terminal equipment.
In this alternative embodiment, if the presentation element in the presentation label is a null element, i.e., "+", a prompt message may be generated, such as: and sending the prompt information to preset terminal equipment to prompt a user to supplement corresponding information.
As an optional implementation manner, the replacing module 203 replaces elements in the target template according to variables carried by the document generation instruction, and the manner of obtaining a replacement document specifically includes:
for each variable, determining a replacement element corresponding to the name of the variable from all elements of the target template;
replacing the replacement element with the value of the variable.
In this alternative embodiment, the elements refer to the text content marked by the label in the target template that needs text replacement, such as [ + notifier + ], and the variable specifies the value of these elements, such as specifying that the notifier is "zhang" wherein the name of the variable is the notifier and the value of the variable is zhang, the element "notifier" in the label can be replaced by "zhang".
As an optional implementation manner, the receiving module 201 is further configured to receive an editing instruction for a document template;
the document generating apparatus 20 may further include:
and the output module is used for outputting the document template to be edited indicated by the editing instruction.
In this optional implementation, a designated document template may be modified, where the document template to be edited may be the designated document template, and the document template to be modified may be selected, and after the system receives a corresponding editing instruction, the system outputs the designated document template, so that the user edits and modifies the document template.
As an optional implementation, the method further comprises:
the receiving module 201 is further configured to receive an upload instruction for the document template to be edited after the output module outputs the document template to be edited, where the upload instruction is indicated by the edit instruction;
the replacing module 203 is further configured to replace the document template to be edited in the server with the document template carried by the upload instruction.
In this optional embodiment, after outputting the document template to be edited indicated by the editing instruction, the user may edit the document template to be edited, and may upload the edited document template to the server at any time to replace the previous document template.
In the document generating apparatus 20 illustrated in fig. 2, elements (for example, the text to be replaced) of the document template can be replaced according to the preset tags in the document template, and the specified text can be displayed and hidden without additional human processing, thereby improving the document generating efficiency.
It is emphasized that the target document may also be stored in a node of a block chain in order to further ensure privacy and security of the target document.
As shown in fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to a preferred embodiment of the document generation method of the present invention. The electronic device 3 comprises a memory 31, at least one processor 32, a computer program 33 stored in the memory 31 and executable on the at least one processor 32, and at least one communication bus 34.
Those skilled in the art will appreciate that the schematic diagram shown in fig. 3 is merely an example of the electronic device 3, and does not constitute a limitation of the electronic device 3, and may include more or less components than those shown, or combine some components, or different components, for example, the electronic device 3 may further include an input/output device, a network access device, and the like.
The electronic device 3 may also include, but is not limited to, any electronic product that can interact with a user through a keyboard, a mouse, a remote controller, a touch panel, or a voice control device, for example, a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), a game console, an Internet Protocol Television (IPTV), a smart wearable device, and the like. The Network where the electronic device 3 is located includes, but is not limited to, the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
The at least one Processor 32 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a transistor logic device, a discrete hardware component, etc. The processor 32 may be a microprocessor or the processor 32 may be any conventional processor or the like, and the processor 32 is a control center of the electronic device 3 and connects various parts of the whole electronic device 3 by various interfaces and lines.
The memory 31 may be used to store the computer program 33 and/or the module/unit, and the processor 32 may implement various functions of the electronic device 3 by running or executing the computer program and/or the module/unit stored in the memory 31 and calling data stored in the memory 31. The memory 31 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the electronic device 3, and the like. In addition, the memory 31 may include volatile and non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one disk storage device, a Flash memory device, and so forth.
With reference to fig. 1, the memory 31 of the electronic device 3 stores a plurality of instructions to implement a document generation method, and the processor 32 executes the plurality of instructions to implement:
receiving a document generation instruction;
determining a target template according to the template identification carried by the document generation instruction;
replacing elements in the target template according to variables carried by the document generation instruction to obtain a replacement document;
and according to the preset label of the replacement document, performing corresponding processing on the replacement document to generate a target document, wherein the processing comprises display processing, hiding processing and logic judgment processing.
Specifically, the processor 32 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the instruction, which is not described herein again.
In the electronic device 3 depicted in fig. 3, elements (for example, text contents to be replaced) of the document template can be replaced according to the preset tags in the document template, and the specified text contents can be displayed and hidden without additional manual processing, so that the document generation efficiency is improved.
The integrated modules/units of the electronic device 3 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program code may be in source code form, object code form, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), etc.
Further, the computer usable storage medium 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, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A document generation method, comprising:
receiving a document generation instruction;
determining a target template according to the template identification carried by the document generation instruction;
replacing elements in the target template according to variables carried by the document generation instruction to obtain a replacement document;
and according to the preset label of the replacement document, performing corresponding processing on the replacement document to generate a target document, wherein the processing comprises display processing, hiding processing and logic judgment processing.
2. The document generation method according to claim 1, wherein the preset tag includes a first range tag, and the performing corresponding processing on the replacement document according to the preset tag of the replacement document to generate the target document includes:
acquiring a first range label in the replacement document;
judging whether null value elements exist in all elements of the first range label;
if all elements of the first range label have null value elements, hiding all character contents of the first range label, acquiring the target document, and finishing the logic judgment processing; or
And if no null value elements exist in all the elements of the first range label, displaying all the text contents of the first range label in the replacement document to obtain the target document, and finishing the logic judgment processing.
3. The document generation method according to claim 1, wherein the preset tag includes a second range tag, and the performing corresponding processing on the replacement document according to the preset tag of the replacement document to generate the target document includes:
acquiring a second range label in the replacement document;
judging whether all elements of the second range label are null value elements or not;
if all elements of the second range label are null value elements, hiding all the text contents of the second range label, obtaining the target document, and finishing the logic judgment processing; or
And if all elements of the second range label are not null value elements, displaying all the text contents of the second range label in the replacement document to obtain the target document, and finishing the logic judgment processing.
4. The document generation method according to claim 1, wherein the preset tag comprises a hidden tag, and the processing of the replacement document according to the preset tag of the replacement document to generate the target document comprises:
acquiring a hidden label in the replacement document;
and deleting the content in the hidden label, obtaining the target document, and finishing the hiding processing.
5. The document generation method according to claim 1, wherein the preset tag comprises a presentation tag, and the processing of the replacement document according to the preset tag of the replacement document to generate the target document comprises:
acquiring a display label in the replacement document;
judging whether the display elements in the display labels are null value elements or not aiming at each display label;
and if the display elements in the display label are not null elements, replacing all contents in the display label with the text contents corresponding to the display elements to obtain the target document, and finishing the display processing.
6. The document generation method according to claim 5, further comprising:
if the display elements in the display label are null value elements, generating prompt information;
and sending the prompt information to a preset terminal device.
7. The document generation method according to any one of claims 1 to 6, wherein the replacing elements in the target template according to the variables carried by the document generation instruction to obtain a replaced document comprises:
for each variable, determining a replacement element corresponding to the name of the variable from all elements of the target template;
replacing the replacement element with the value of the variable.
8. A document generation apparatus, comprising:
the receiving module is used for receiving a document generation instruction;
the determining module is used for determining a target template according to the template identification carried by the document generating instruction;
the replacing module is used for replacing elements in the target template according to the variables carried by the document generating instruction to obtain a replaced document;
and the processing module is used for carrying out corresponding processing on the replacement document according to the preset label of the replacement document to generate a target document, wherein the processing comprises display processing, hiding processing and logic judgment processing.
9. An electronic device, comprising a processor and a memory, the processor being configured to execute a computer program stored in the memory to implement the document generation method of any one of claims 1 to 7.
10. A computer-readable storage medium storing at least one instruction which, when executed by a processor, implements a document generation method as recited in any one of claims 1-7.
CN202010859944.XA 2020-08-24 2020-08-24 Document generation method and device, electronic equipment and storage medium Pending CN112001159A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010859944.XA CN112001159A (en) 2020-08-24 2020-08-24 Document generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010859944.XA CN112001159A (en) 2020-08-24 2020-08-24 Document generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112001159A true CN112001159A (en) 2020-11-27

Family

ID=73471379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010859944.XA Pending CN112001159A (en) 2020-08-24 2020-08-24 Document generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112001159A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415986A (en) * 2021-10-11 2022-04-29 浪潮软件股份有限公司 Document template customizing and printing method, device and computer readable medium
CN114519157A (en) * 2022-01-07 2022-05-20 北京金堤科技有限公司 Target detail page display method and device
CN114546937A (en) * 2022-01-10 2022-05-27 普瑞纯证医疗科技(苏州)有限公司 Intelligent document editing management system, method, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009299A (en) * 2017-12-28 2018-05-08 北京市律典通科技有限公司 Law tries method and device for business processing
CN109815471A (en) * 2019-01-04 2019-05-28 深圳壹账通智能科技有限公司 Contract text generation method, device, computer equipment and storage medium
CN110837564A (en) * 2019-09-25 2020-02-25 中央民族大学 Construction method of knowledge graph of multilingual criminal judgment books
CN111145051A (en) * 2019-11-26 2020-05-12 方正璞华软件(武汉)股份有限公司 Method and device for generating arbitration electronic document
WO2020114373A1 (en) * 2018-12-07 2020-06-11 北京国双科技有限公司 Method and apparatus for realizing element recognition in judicial document
CN111291533A (en) * 2020-01-22 2020-06-16 文思海辉智科科技有限公司 Sentence segment to be displayed display method and device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009299A (en) * 2017-12-28 2018-05-08 北京市律典通科技有限公司 Law tries method and device for business processing
WO2020114373A1 (en) * 2018-12-07 2020-06-11 北京国双科技有限公司 Method and apparatus for realizing element recognition in judicial document
CN109815471A (en) * 2019-01-04 2019-05-28 深圳壹账通智能科技有限公司 Contract text generation method, device, computer equipment and storage medium
CN110837564A (en) * 2019-09-25 2020-02-25 中央民族大学 Construction method of knowledge graph of multilingual criminal judgment books
CN111145051A (en) * 2019-11-26 2020-05-12 方正璞华软件(武汉)股份有限公司 Method and device for generating arbitration electronic document
CN111291533A (en) * 2020-01-22 2020-06-16 文思海辉智科科技有限公司 Sentence segment to be displayed display method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王玉薇;: "人工智能司法应用的方法论难题及其破解", 法律方法, no. 01 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415986A (en) * 2021-10-11 2022-04-29 浪潮软件股份有限公司 Document template customizing and printing method, device and computer readable medium
CN114519157A (en) * 2022-01-07 2022-05-20 北京金堤科技有限公司 Target detail page display method and device
CN114546937A (en) * 2022-01-10 2022-05-27 普瑞纯证医疗科技(苏州)有限公司 Intelligent document editing management system, method, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108292231B (en) Method and system for generating applications from data
CN112001159A (en) Document generation method and device, electronic equipment and storage medium
CN112183091A (en) Question and answer pair generation method and device, electronic equipment and readable storage medium
CN111639284A (en) Webpage labeling method and device, electronic equipment and medium
CN111797430A (en) Data verification method, device, server and storage medium
CN111858835B (en) Enterprise relation display method and related equipment
CN111797351A (en) Page data management method and device, electronic equipment and medium
CN111897818A (en) Data storage method and device, electronic equipment and storage medium
US20170011483A1 (en) System and method for electronic signature creation and application
CN114818000B (en) Privacy protection set confusion intersection method, system and related equipment
CN111880752B (en) Seal printing method and device, electronic equipment and storage medium
CN111881209A (en) Data synchronization method and device for heterogeneous database, electronic equipment and medium
CN113141369B (en) Artificial intelligence-based firewall policy management method and related equipment
Latham et al. The library as partner in university data curation: A case study in collaboration
CN112001158A (en) Document generation method and device, computer equipment and computer readable storage medium
CN111680483A (en) Document template updating method and device, electronic equipment and medium
CN111125301B (en) Text method and apparatus, electronic device, and computer-readable storage medium
CN109949090B (en) Client recommendation method and device, electronic equipment and medium
US20180004723A1 (en) Dynamic web document creation
CN111933241A (en) Medical data analysis method, medical data analysis device, electronic device, and storage medium
CN114096980A (en) Information pushing method and device, electronic equipment and storage medium
CN114692204A (en) Data query method, device, equipment and storage medium
KR101697061B1 (en) Cloud-based creative work registration system
CN111857883B (en) Page data checking method and device, electronic equipment and storage medium
CN115510822A (en) Document editing method and device, computer equipment and readable storage medium

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