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

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

Info

Publication number
CN116702732A
CN116702732A CN202310632966.6A CN202310632966A CN116702732A CN 116702732 A CN116702732 A CN 116702732A CN 202310632966 A CN202310632966 A CN 202310632966A CN 116702732 A CN116702732 A CN 116702732A
Authority
CN
China
Prior art keywords
document
initial
bookmark
generating
page
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
CN202310632966.6A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310632966.6A priority Critical patent/CN116702732A/en
Publication of CN116702732A publication Critical patent/CN116702732A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9562Bookmark management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The disclosure provides a document generation method, a document generation device, an electronic device and a storage medium, which can be applied to the technical field of computers, the technical field of finance or other fields. The method comprises the following steps: receiving a document generation request, wherein the document generation request carries a document identifier; generating an initial document based on the document identification, wherein the initial document includes at least one bookmark; rendering and generating an initial document page and a document element control corresponding to at least one bookmark respectively on a browser interface based on the initial document; and in response to the typing operation for the document element control, writing input data included in the typing operation into the initial document by utilizing a bookmark corresponding to the document element control to obtain the target document.

Description

Document generation method, device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technology and financial technology, and more particularly, to a document generation method, apparatus, electronic device, and storage medium.
Background
With the development of information technology and the continuous upgrading of office mode requirements of various industries, paperless office has been gradually applied to a plurality of industrial fields by concepts.
On-line management of documents is one of the focus problems of paperless office work. Because of the characteristics of easy change, easy copying, easy transmission and the like of the electronic document information, the problems of low authenticity and integrity of the electronic document are easy to occur in the on-line management process.
Disclosure of Invention
In view of this, the present disclosure provides a document generation method, apparatus, electronic device, readable storage medium, and computer program product.
One aspect of the present disclosure provides a document generation method including: receiving a document generation request, wherein the document generation request carries a document identifier; generating an initial document based on the document identification, wherein the initial document comprises at least one bookmark; rendering and generating an initial document page and a document element control corresponding to each bookmark on a browser interface based on the initial document; and in response to the typing operation for the document element control, writing input data included in the typing operation into the initial document by utilizing a bookmark corresponding to the document element control so as to obtain a target document.
According to an embodiment of the present disclosure, the rendering and generating, on the browser interface, an initial document page and a document element control corresponding to each of the at least one bookmark based on the initial document includes: creating a tab page on a browser interface; rendering and generating the initial document page on the tag page based on the snapshot of the initial document; and generating a document element control corresponding to the bookmark on the initial document page based on the attribute information of the bookmark.
According to an embodiment of the present disclosure, the generating, on the initial document page, a document element control corresponding to the bookmark based on the attribute information of the bookmark includes: determining a position mapping relation between the initial document and the initial document page; generating an initial control corresponding to the bookmark on the initial document page based on bookmark position information included in the attribute information of the bookmark and the position mapping relation; and adjusting the initial control based on the shape information included in the attribute information of the bookmark to obtain the document element control.
According to an embodiment of the present disclosure, the rendering on the tabbed page to generate the initial document page based on the snapshot of the initial document includes: generating page elements based on the snapshot of the initial document; and rendering the page element on the tag page to obtain the initial document page.
According to an embodiment of the present disclosure, the generating an initial document based on the document identification includes: determining a target document template based on the document identification; and generating an instance based on the target document template to obtain the initial document.
According to an embodiment of the present disclosure, the above method further includes: responding to a template generation request, and generating an initial document template based on document data carried by the template generation request; and inserting a bookmark into each element field in at least one element field included in the initial document template to obtain the target document template.
According to an embodiment of the present disclosure, in response to a typing operation for the document element control, writing input data included in the typing operation into the initial document using a bookmark corresponding to the document element control to obtain a target document, including: determining a target element field based on an association relationship among the document element control, the bookmark and the element field in response to the key-in operation; and writing input data included in the typing operation into a target element field of the initial document to obtain the target document.
According to an embodiment of the present disclosure, the initial document further includes a stamp area; the method further comprises the following steps: generating an electronic seal based on the target document in response to the key-in ending event being triggered; and adding the electronic seal to a seal area of the target document.
According to an embodiment of the present disclosure, the generating an electronic seal based on the target document includes: generating a digital signature based on the target document; and generating the electronic seal based on the digital signature and a preset seal image.
Another aspect of the present disclosure provides a document generating apparatus including: the receiving module is used for receiving a document generation request, wherein the document generation request carries a document identifier; the first generation module is used for generating an initial document based on the document identification, wherein the initial document comprises at least one bookmark; the second generation module is used for rendering and generating an initial document page and a document element control corresponding to each bookmark on the browser interface based on the initial document; and the first processing module is used for responding to the typing operation of the document element control, and writing input data included in the typing operation into the initial document by utilizing a bookmark corresponding to the document element control so as to obtain a target document.
Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more instructions that, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, are configured to implement a method as described above.
Another aspect of the present disclosure provides a computer program product comprising computer executable instructions which, when executed, are adapted to implement the method as described above.
According to the embodiment of the disclosure, after receiving the document generation request, an initial document can be generated in the background and rendered into an initial document page on a browser, and then a user can enter data in a document element control mounted on the initial document page, and the data input through the typing operation can be synchronously written into the initial document through a bookmark to finally form a target document. By the technical means, in the process of generating the document, a mode of inputting document data in the background can be used for replacing a mode of directly editing the document by a user in the related art, and the direct contact of the user to the document file can be reduced, so that the problem of low authenticity and integrity of the electronic document in the related art can be at least partially overcome, and the convenience of document management and the reliability of the generated document are effectively improved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments thereof with reference to the accompanying drawings in which:
FIG. 1 schematically illustrates an exemplary system architecture to which document generation methods and apparatus may be applied, according to embodiments of the present disclosure.
FIG. 2 schematically illustrates a flow chart of a document generation method according to an embodiment of the present disclosure.
FIG. 3 schematically illustrates a schematic diagram of a document template according to an embodiment of the present disclosure.
FIG. 4 schematically illustrates a schematic view of an initial document page according to an embodiment of the present disclosure.
Fig. 5 schematically shows a block diagram of a document generating apparatus according to an embodiment of the present disclosure.
Fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement a document generation method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
With the development of information technology and the continuous upgrading of office mode requirements of various industries, paperless office has been gradually applied to a plurality of industrial fields by concepts.
On-line management of documents is one of the focus topics of paperless office work. Because of the characteristics of easy change, easy copying, easy transmission and the like of the electronic document information, the problems of low authenticity and integrity of the electronic document are easy to occur in the on-line management process.
For example, in an electronic document, a contract is an important medium for the contract presentation of each participant in a business, and the contract generation process, including contract draft, contract signing, contract sealing and the like, is an indispensable link for each business company or organization. In the process of online contract generation, the risk of tampering contract content exists, and potential safety hazards are buried in the mutual trust among all participants in business behaviors.
In view of the above, embodiments of the present disclosure provide a document generation method, apparatus, electronic device, and storage medium, which can effectively improve security of a document generation process, so as to at least partially overcome the problems in the related art. Specifically, the document generation method includes: receiving a document generation request, wherein the document generation request carries a document identifier; generating an initial document based on the document identification, wherein the initial document includes at least one bookmark; rendering and generating an initial document page and a document element control corresponding to at least one bookmark respectively on a browser interface based on the initial document; and in response to the typing operation for the document element control, writing input data included in the typing operation into the initial document by utilizing a bookmark corresponding to the document element control to obtain the target document.
It should be noted that, the document generating method and apparatus determined by the embodiments of the present disclosure may be used in the field of computer technology or the field of financial technology, and may also be used in any field other than the field of computer technology and the field of financial technology, and the application field of the document generating method and apparatus determined by the embodiments of the present disclosure is not limited.
In embodiments of the present disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc., of the data involved (including, but not limited to, user personal information) all comply with relevant legal regulations, are used for legal purposes, and do not violate well-known. In particular, necessary measures are taken for personal information of the user, illegal access to personal information data of the user is prevented, and personal information security, network security and national security of the user are maintained.
In embodiments of the present disclosure, the user's authorization or consent is obtained before the user's personal information is obtained or collected.
FIG. 1 schematically illustrates an exemplary system architecture to which document generation methods and apparatus may be applied, according to embodiments of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and an input device and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like. The input device may be, for example, a hardware device such as a mouse or a keyboard, or may be an application such as a virtual keyboard. Various browser client applications may be installed on the terminal apparatus 101.
The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and/or wireless communication links, and the like.
The server 105 may be a server providing various services, or may be various cloud servers, and is not limited herein.
It should be noted that the document generation method provided by the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the document generating apparatus provided by the embodiments of the present disclosure may be generally provided in the server 105. The document generation method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the document generating apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Alternatively, the document generating method provided by the embodiment of the present disclosure may be performed by the terminal apparatus 101, 102, or 103, or may be performed by another terminal apparatus other than the terminal apparatus 101, 102, or 103. Accordingly, the document generating apparatus provided by the embodiments of the present disclosure may also be provided in the terminal device 101, 102, or 103, or in another terminal device different from the terminal device 101, 102, or 103.
For example, the user may initiate the document generation request through any one of the terminal devices 101, 102, or 103 (e.g., terminal device 101, but not limited thereto). The terminal device 101 can generate an initial document in response to the request and render the generated initial document interface and at least one document element control on the browser interface based on the initial document. The terminal device 101 may collect input data entered by the user through the document element control and write the input data into the initial document to finally obtain the target document.
Still alternatively, the terminal devices 101, 102, 103 and the server 105 may perform part of the operations in the document generating method provided by the embodiments of the present disclosure, respectively, and accordingly, the terminal devices 101, 102, 103 and the server 105 may deploy part of the modules in the document generating apparatus provided by the embodiments of the present disclosure, respectively.
For example, the user may initiate the document generation request through any one of the terminal devices 101, 102, or 103 (e.g., terminal device 101, but not limited thereto). The terminal device 101 may transmit the document generation request to the server 105 through the network 104, and the server 105 generates an initial document based on the document identification. The snapshot of the initial document may be returned to the terminal device 101 via the network 104. The terminal device 101 can render the generated initial document page and the at least one document element control on the browser interface based on the snapshot of the initial document. The user performs a typing operation on the document element control through the terminal device 101, and the terminal device 101 may transmit input data included in the typing operation to the server 105 through the network 104, so that the server 105 writes the input data into the initial document to finally obtain the target document.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
FIG. 2 schematically illustrates a flow chart of a document generation method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S201 to S204.
In operation S201, a document generation request is received.
In operation S202, an initial document is generated based on the document identification.
In operation S203, an initial document page and a document element control corresponding to each of the at least one bookmark are rendered and generated on the browser interface based on the initial document.
In operation S204, in response to a typing operation for the document element control, input data included in the typing operation is written into the initial document using a bookmark corresponding to the document element control to obtain a target document.
According to an embodiment of the present disclosure, the document generation request may be a request generated based on an operation behavior of the user. The document generation request may include a request line, a request header, a request body, etc. The document identification carried by the document generation request may be a field in the request header. The document identification may be used to indicate a document template that needs to be used when generating the document.
According to embodiments of the present disclosure, the initial document may be one instance generated based on a document template.
According to embodiments of the present disclosure, bookmarks in an initial document may indicate what may be changed in the initial document. The bookmark may be selected for a particular portion of the document, and the content of the selected portion may be replaced by the bookmark.
According to embodiments of the present disclosure, the document element control may be an input box control. The user may begin a typing operation within an input box of a document element control by clicking on the document element control. Similarly, the user may end a typing operation within the input box of the document element control by clicking on a page area outside of the document element control, or clicking on another document element control.
According to the embodiment of the disclosure, the data input by the user through the typing operation in the input box of the document element control can be transmitted to a specific part of the initial document through the bookmark, so that the processing of the initial document is realized.
According to the embodiment of the disclosure, after the user finishes the typing operation of all document element controls, or after the user triggers a function for indicating the ending of the document operation, the content replacement of the initial document can be considered to be completed, and the target document is obtained. The user triggering a function indicating ending the document operation may include, for example, clicking a document save key, clicking a document exit key, etc.
According to the embodiment of the disclosure, after receiving the document generation request, an initial document can be generated in the background and rendered into an initial document page on a browser, and then a user can enter data in a document element control mounted on the initial document page, and the data input through the typing operation can be synchronously written into the initial document through a bookmark to finally form a target document. By the technical means, in the process of generating the document, a mode of inputting document data in the background can be used for replacing a mode of directly editing the document by a user in the related art, and the direct contact of the user to the document file can be reduced, so that the problem of low authenticity and integrity of the electronic document in the related art can be at least partially overcome, and the convenience of document management and the reliability of the generated document are effectively improved.
The method illustrated in fig. 2 is further described below with reference to fig. 3 and 4 in conjunction with the exemplary embodiment.
According to embodiments of the present disclosure, the document identification may indicate a document template required to generate the target document. Specifically, based on the document identification, generating the initial document may include the operations of:
Determining a target document template based on the document identification; and generating an instance based on the target document template to obtain an initial document.
According to embodiments of the present disclosure, the target document template may belong to a template library. The template library may include a plurality of document templates, and each document template may have corresponding identification information, which may be, for example, a name of the document template, or may be information indicating a function of the document template, which is not limited herein. Based on the document identification, the target document template is determined, namely the document identification is matched with the identification information of each of the plurality of document templates, and when a certain matching result is expressed as matching, the document template corresponding to the matching result is the target document template.
According to an embodiment of the present disclosure, in order to ensure that a document template is continuously available, generation of a target document may not be performed directly using the target document template, but instead, an instance of the target document template, that is, a copy of the target document template, may be selectively generated, and the copy may be used as an initial document.
FIG. 3 schematically illustrates a schematic diagram of a document template according to an embodiment of the present disclosure.
As shown in FIG. 3, document templates in the template library may be custom generated by a user through a text editing tool. Specifically, an initial document template can be generated based on document data carried by a template generation request in response to the template generation request; and inserting bookmarks at each element field of the at least one element field included in the initial document template, respectively, to obtain a target document template.
According to embodiments of the present disclosure, the document data carried by the template generation request may be represented as data entered by a user in a text editing tool, including the document title "fixed term contract", the document content "first party", "second party", "term first party" and the like. During the process of entering data by the user, the user can custom leave a partially blank area, such as a underlined area, which is represented as at least one element field.
According to an embodiment of the present disclosure, the text editing tool may be controlled to insert bookmarks at each of the at least one element field, respectively. Alternatively, bookmarks may be selectively inserted for the element fields based on user intent. For example, the text editing tool may be controlled not to insert bookmarks at element fields containing only line feed symbols, i.e., not to insert bookmarks at normal blank lines in the document. For another example, the text editing tool may be controlled to insert bookmarks at element fields containing underlined symbols.
According to the embodiment of the disclosure, in the generation process of the target document, the document is not directly opened in the terminal by using a text editing tool, but the generation of the target document is realized by adopting a mode of mapping the document into a browser page and then synchronizing the modification of the document in the browser page into the document.
According to an embodiment of the present disclosure, rendering the initial document page and the document element control corresponding to each of the at least one bookmark on the browser interface based on the initial document may include the operations of:
creating a tab page on a browser interface; rendering and generating an initial document page on the tag page based on the snapshot of the initial document; and for each bookmark, generating a document element control corresponding to the bookmark on the initial document page based on the attribute information of the bookmark.
According to embodiments of the present disclosure, a tabbed page may be created on a browser interface by invoking a tab creation function of a browser application. The tabbed page may be represented as a blank page.
According to embodiments of the present disclosure, a snapshot of an original document may be represented as a fully available copy of the original document that contains a still image of the original document at the point in time of the copy.
According to an embodiment of the present disclosure, the attribute information of the bookmark may include, for example, position information of the bookmark, shape size information of the bookmark, and the like.
According to an embodiment of the present disclosure, rendering the initial document page on the tabbed page based on the snapshot of the initial document may include the operations of:
generating page elements based on the snapshot of the initial document; and rendering the page elements on the tag page to obtain an initial document page.
According to embodiments of the present disclosure, a page element may be represented as a DOM tree. Specifically, an HTML/SVG/XHTML file may be generated based on a snapshot of the initial document, and these three files may be parsed to obtain a DOM tree.
Rendering page elements on a tabbed page, resulting in an initial document page, may be a process of building a Render tree, laying out a Render tree, and drawing a Render tree, in accordance with embodiments of the present disclosure. Page rendering may be implemented using a variety of existing methods, and is not limited in this regard.
According to an embodiment of the present disclosure, generating a document element control corresponding to a bookmark on an initial document page based on attribute information of the bookmark may include the following operations:
determining a position mapping relation between an initial document and an initial document page; generating an initial control corresponding to the bookmark on an initial document page based on bookmark position information and a position mapping relation included in the attribute information of the bookmark; and adjusting the initial control based on the shape information included in the attribute information of the bookmark to obtain the document element control.
For example, a coordinate system centered on a certain feature point of the initial document page may be established, a screenshot of the initial document may be obtained from a snapshot of the initial document, and the screenshot may be placed in the coordinate system to determine a positional mapping relationship between the initial document and the initial document page.
FIG. 4 schematically illustrates a schematic view of an initial document page according to an embodiment of the present disclosure.
As shown in FIG. 4, the initial document page may be generated in a tabbed page of the browser. The initial document page may have a document structure similar to the document template shown in FIG. 3, except that at the blank field of the document template with an underline, i.e., the bookmark, the initial document page may be loaded with input boxes, each of which may be represented as a document element control. The user may directly perform an input operation with respect to the input box to simulate the input experience of the user when using the text editing tool directly.
According to embodiments of the present disclosure, one or more function keys may also be included in the initial document page, such as a "save" key, a "save as" key, an "exit" key, and the like, without limitation.
According to an embodiment of the present disclosure, in response to a typing operation for a document element control, writing input data included in the typing operation to an initial document using a bookmark corresponding to the document element control to obtain a target document may include the operations of:
In response to the typing operation, determining a target element field based on an association relationship among the document element control, the bookmark and the element field; and writing input data included in the typing operation into a target element field of the initial document to obtain a target document.
According to the embodiment of the disclosure, when the bookmark is inserted, a mapping table between the bookmark and the element field can be established, and similarly, in the rendering process of the initial document page, a mapping table between the document element control and the bookmark can be established. Based on the two mapping tables, an association relationship between the document element control and the element field can be determined. When the user performs the typing operation, the target document element control related to the typing operation can be determined, and the target element field corresponding to the target document element control can be further based on the association relation.
According to the embodiment of the disclosure, when writing input data, a storage address of field contents of a target element field may be determined, and input data may be written into the target element field of the initial document based on the storage address.
According to the embodiment of the disclosure, after the user finishes the typing operation of all document element controls, or after the user triggers a function for indicating the ending of the document operation, the content replacement of the initial document can be considered to be completed, and the target document is obtained. The user triggering a function indicating ending the document operation may include, for example, clicking a document save key, clicking a document exit key, etc.
According to an embodiment of the present disclosure, as an alternative implementation manner, after the generation of the target document is completed, the electronic seal may also be used to manage the target document. Specifically, a seal area can be set in the document template, and correspondingly, the seal area can be included in the initial document and the target document. Generating an electronic seal based on the target document in response to the typing end event being triggered; and adding the electronic seal to the seal area of the target document.
According to an embodiment of the present disclosure, generating an electronic stamp based on a target document may include the operations of:
generating a digital signature based on the target document; and generating the electronic seal based on the digital signature and the preset seal image.
According to the embodiment of the disclosure, the digital signature of the target document and the digest calculation of the target document are performed, and the obtained digest value is the digital signature. As an alternative implementation manner, various encryption methods may be used to encrypt the digest value, and the obtained ciphertext is a digital signature. The encryption method used is not limited herein.
According to the embodiment of the disclosure, a copy of the preset seal image can be generated, a field is added to the copy, and a digital signature is written into the field, so that the generation of the electronic seal is completed. Alternatively, the digital signature may be written into an existing field of the copy to complete the generation of the electronic seal.
According to the embodiment of the disclosure, the electronic seal is added to the seal area of the target document, which may be to determine the storage address of the seal area of the target document, and then the electronic seal is written into the target document through the storage address.
According to the embodiment of the disclosure, the electronic seal can be added to facilitate verifying the authenticity of the target document. Specifically, when verifying the target document, the hash calculation can be performed on the portion, except for the electronic seal, of the target document, a hash value is output, the same operation as that performed when the digital signature is generated can be performed on the hash value, and the obtained value can be compared with the digital signature carried by the electronic seal. And comparing the target documents to be consistent, and obtaining a verification result indicating the reality of the target documents.
Fig. 5 schematically shows a block diagram of a document generating apparatus according to an embodiment of the present disclosure.
As shown in fig. 5, the document generating apparatus 500 includes a receiving module 510, a first generating module 520, a second generating module 530, and a first processing module 540.
The receiving module 510 is configured to receive a document generation request, where the document generation request carries a document identifier.
A first generation module 520 for generating an initial document based on the document identification, wherein the initial document includes at least one bookmark.
A second generating module 530 is configured to render and generate, on the browser interface, an initial document page and a document element control corresponding to each of the at least one bookmark based on the initial document.
The first processing module 540 is configured to, in response to a typing operation for a document element control, write input data included in the typing operation into an initial document using a bookmark corresponding to the document element control to obtain a target document.
According to the embodiment of the disclosure, after receiving the document generation request, an initial document can be generated in the background and rendered into an initial document page on a browser, and then a user can enter data in a document element control mounted on the initial document page, and the data input through the typing operation can be synchronously written into the initial document through a bookmark to finally form a target document. By the technical means, in the process of generating the document, a mode of inputting document data in the background can be used for replacing a mode of directly editing the document by a user in the related art, and the direct contact of the user to the document file can be reduced, so that the problem of low authenticity and integrity of the electronic document in the related art can be at least partially overcome, and the convenience of document management and the reliability of the generated document are effectively improved.
According to an embodiment of the present disclosure, the second generation module 530 includes a first generation unit, a second generation unit, and a third generation unit.
And the first generation unit is used for creating the tag page on the browser interface.
And the second generation unit is used for rendering and generating the initial document page on the label page based on the snapshot of the initial document.
And a third generation unit for generating a document element control corresponding to the bookmark on the initial document page based on the attribute information of the bookmark.
According to an embodiment of the present disclosure, the third generation unit includes a first generation subunit, a second generation subunit, and a third generation subunit.
And the first generation subunit is used for determining the position mapping relation between the initial document and the initial document page.
And the second generation subunit is used for generating an initial control corresponding to the bookmark on the initial document page based on the bookmark position information and the position mapping relation included in the attribute information of the bookmark.
And the third generation subunit is used for adjusting the initial control based on the shape information included in the attribute information of the bookmark to obtain the document element control.
According to an embodiment of the present disclosure, the second generation unit includes a fourth generation subunit and a fifth generation subunit.
And a fourth generation subunit, configured to generate a page element based on the snapshot of the initial document.
And a fifth generation subunit, configured to render the page element on the tag page to obtain an initial document page.
According to an embodiment of the present disclosure, the first generation module 520 includes a fourth generation unit and a fifth generation unit.
And a fourth generating unit for determining a target document template based on the document identification.
And a fifth generating unit for generating an instance based on the target document template to obtain an initial document.
According to an embodiment of the present disclosure, the document generating apparatus 500 further includes a third generating module and a second processing module.
And the third generation module is used for responding to the template generation request and generating an initial document template based on the document data carried by the template generation request.
And the second processing module is used for respectively inserting bookmarks at each element field in at least one element field included in the initial document template to obtain the target document template.
According to an embodiment of the present disclosure, the first processing module 540 includes a first processing unit and a second processing unit.
And the first processing unit is used for responding to the typing operation and determining a target element field based on the association relation among the document element control, the bookmark and the element field.
And the second processing unit is used for writing input data included in the typing operation into a target element field of the initial document to obtain the target document.
According to an embodiment of the present disclosure, the initial document further includes a stamp area.
According to an embodiment of the present disclosure, the document generating apparatus 500 further includes a fourth generating module and a third processing module.
And the fourth generation module is used for responding to the triggering of the typing ending event and generating the electronic seal based on the target document.
And the third processing module is used for adding the electronic seal to the seal area of the target document.
According to an embodiment of the present disclosure, the fourth generation module includes a sixth generation unit and a seventh generation unit.
And a sixth generation unit for generating a digital signature based on the target document.
And a seventh generating unit for generating the electronic seal based on the digital signature and the preset seal image.
Any number of modules, sub-modules, units, sub-units, or at least some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
For example, any of the receiving module 510, the first generating module 520, the second generating module 530, and the first processing module 540 may be combined in one module/unit/sub-unit, or any of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least some of the functionality of one or more of these modules/units/sub-units may be combined with at least some of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to embodiments of the present disclosure, at least one of the receiving module 510, the first generating module 520, the second generating module 530, and the first processing module 540 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or in hardware or firmware, such as any other reasonable manner of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the receiving module 510, the first generating module 520, the second generating module 530, and the first processing module 540 may be at least partially implemented as computer program modules, which when executed, may perform the respective functions.
Note that, in the embodiment of the present disclosure, the document generating apparatus portion corresponds to the document generating method portion in the embodiment of the present disclosure, and the description of the document generating apparatus portion specifically refers to the document generating method portion and is not described here again.
Fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement a document generation method according to an embodiment of the disclosure. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, a computer electronic device 600 according to an embodiment of the present disclosure includes a processor 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. The processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 601 may also include on-board memory for caching purposes. The processor 601 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flows according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or the RAM 603. Note that the program may be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the electronic device 600 may also include an input/output (I/O) interface 605, the input/output (I/O) interface 605 also being connected to the bus 604. The electronic device 600 may also include one or more of the following components connected to an input/output (I/O) interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to an input/output (I/O) interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: 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), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 602 and/or RAM 603 and/or one or more memories other than ROM 602 and RAM 603 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program comprising program code for performing the methods provided by the embodiments of the present disclosure, the program code for causing an electronic device to implement the document generation methods provided by the embodiments of the present disclosure when the computer program product is run on the electronic device.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and/or installed from the removable medium 611. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (13)

1. A document generation method, comprising:
receiving a document generation request, wherein the document generation request carries a document identifier;
generating an initial document based on the document identification, wherein the initial document comprises at least one bookmark;
rendering and generating an initial document page and a document element control corresponding to each bookmark on a browser interface based on the initial document; and
in response to a typing operation for the document element control, input data included in the typing operation is written into the initial document by utilizing a bookmark corresponding to the document element control to obtain a target document.
2. The method of claim 1, wherein the rendering, based on the initial document, on a browser interface generates an initial document page and a document element control corresponding to each of the at least one bookmark, comprises:
creating a tab page on a browser interface;
rendering and generating the initial document page on the tag page based on the snapshot of the initial document; and
for each bookmark, generating a document element control corresponding to the bookmark on the initial document page based on the attribute information of the bookmark.
3. The method of claim 2, wherein the generating a document element control corresponding to the bookmark on the initial document page based on the attribute information of the bookmark comprises:
determining a position mapping relation between the initial document and the initial document page;
generating an initial control corresponding to the bookmark on the initial document page based on bookmark position information and the position mapping relation included in the attribute information of the bookmark; and
and adjusting the initial control based on the shape information included in the attribute information of the bookmark to obtain the document element control.
4. The method of claim 2, wherein the rendering the initial document page on the tabbed page based on the snapshot of the initial document comprises:
generating page elements based on the snapshot of the initial document; and
rendering the page element on the tag page to obtain the initial document page.
5. The method of claim 1, wherein the generating an initial document based on the document identification comprises:
determining a target document template based on the document identification; and
and generating an instance based on the target document template to obtain the initial document.
6. The method of claim 5, further comprising:
responding to a template generation request, and generating an initial document template based on document data carried by the template generation request; and
and inserting bookmarks at each element field in at least one element field included in the initial document template to obtain the target document template.
7. The method of claim 6, wherein the writing, in response to a typing operation for the document element control, input data included in the typing operation to the initial document using a bookmark corresponding to the document element control to obtain a target document comprises:
Determining a target element field based on an association relationship among the document element control, the bookmark and the element field in response to the typing operation; and
and writing input data included in the typing operation into a target element field of the initial document to obtain the target document.
8. The method of claim 1, wherein the initial document further comprises a stamp area;
the method further comprises the steps of:
generating an electronic seal based on the target document in response to a typing end event being triggered; and
and adding the electronic seal to a seal area of the target document.
9. The method of claim 1, wherein the generating an electronic seal based on the target document comprises:
generating a digital signature based on the target document; and
and generating the electronic seal based on the digital signature and a preset seal image.
10. A document generating apparatus comprising:
the receiving module is used for receiving a document generation request, wherein the document generation request carries a document identifier;
the first generation module is used for generating an initial document based on the document identification, wherein the initial document comprises at least one bookmark;
The second generation module is used for rendering and generating an initial document page and document element controls corresponding to the at least one bookmark respectively on the browser interface based on the initial document; and
and the first processing module is used for responding to the typing operation of the document element control, and writing input data included in the typing operation into the initial document by utilizing a bookmark corresponding to the document element control so as to obtain a target document.
11. An electronic device, comprising:
one or more processors;
a memory for storing one or more instructions,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 9.
12. A computer readable storage medium having stored thereon executable instructions which when executed by a processor cause the processor to implement the method of any of claims 1 to 9.
13. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 9 when executed.
CN202310632966.6A 2023-05-31 2023-05-31 Document generation method, device, electronic equipment and storage medium Pending CN116702732A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310632966.6A CN116702732A (en) 2023-05-31 2023-05-31 Document generation method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310632966.6A CN116702732A (en) 2023-05-31 2023-05-31 Document generation method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116702732A true CN116702732A (en) 2023-09-05

Family

ID=87844387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310632966.6A Pending CN116702732A (en) 2023-05-31 2023-05-31 Document generation method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116702732A (en)

Similar Documents

Publication Publication Date Title
WO2019184138A1 (en) Bill information input method and apparatus, and computer device and storage medium
US8074167B2 (en) Cross domain presence of web user interface and logic
US20070174762A1 (en) Personal web page annotation system
US8671342B2 (en) Desired font rendering
US11616639B2 (en) Storing time-sensitive secrets in a blockchain network
JP2016511883A (en) Application programming interface for content curation
US10178248B2 (en) Computing device for generating a document by combining content data with form data
CN102016833A (en) Techniques to modify a document using a latent transfer surface
CN108073429B (en) Payment mode configuration method, device, equipment and storage medium
CN104704468A (en) Cross system installation of WEB applications
KR101312870B1 (en) Directed signature workflow
WO2020259141A1 (en) File processing method and apparatus, and computer device
US20110271184A1 (en) Client application and web page integration
CN107111649B (en) Uploading user and system data from a source location to a destination location
KR101908410B1 (en) Method for providing electronic book using page information and apparatus for the same
CN110070360B (en) Transaction request processing method, device, equipment and storage medium
US20090137202A1 (en) Information distribution system
CN111783119A (en) Form data security control method and device, electronic equipment and storage medium
US10803093B2 (en) Systems and methods for enabling a file management label to persist on a data file
CN116702732A (en) Document generation method, device, electronic equipment and storage medium
US20170244649A1 (en) Method of and a system for providing access to a file to a web resource
CN115859909B (en) Collaborative document annotation display method, collaborative document annotation display device, server and storage medium
CN114610305B (en) Invisible webpage resource development method and device, electronic equipment and medium
US20240086469A1 (en) Systems for Redaction of Documents in a Web-Based Collaborative Platform
CN113849218B (en) Software information merging method, device, computer equipment and 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