CN113779939A - Generation method and use method of document hot patch and document hot patch device - Google Patents

Generation method and use method of document hot patch and document hot patch device Download PDF

Info

Publication number
CN113779939A
CN113779939A CN202111083705.0A CN202111083705A CN113779939A CN 113779939 A CN113779939 A CN 113779939A CN 202111083705 A CN202111083705 A CN 202111083705A CN 113779939 A CN113779939 A CN 113779939A
Authority
CN
China
Prior art keywords
patch
document
content
client
server
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.)
Granted
Application number
CN202111083705.0A
Other languages
Chinese (zh)
Other versions
CN113779939B (en
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.)
Chengdu Haiguang Nuclear Power Technology Service Co ltd
Original Assignee
Chengdu Haiguang Nuclear Power Technology Service 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 Chengdu Haiguang Nuclear Power Technology Service Co ltd filed Critical Chengdu Haiguang Nuclear Power Technology Service Co ltd
Priority to CN202111083705.0A priority Critical patent/CN113779939B/en
Publication of CN113779939A publication Critical patent/CN113779939A/en
Application granted granted Critical
Publication of CN113779939B publication Critical patent/CN113779939B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • 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/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets

Abstract

The invention discloses a method for generating a document hot patch, a method for using the same and a document hot patch device, wherein the method for generating the document hot patch comprises the following steps: s1: loading the original intelligent document into a client, and judging whether a problem exists; if no problem exists, ending; if the problem exists, judging whether the site environment has a network or not; s2: if the network does not exist, confirming and discussing with a field preparation engineer, modifying the original intelligent document, and generating a client patch file; if the network exists, the remote preparation engineer confirms and discusses the network, modifies the original intelligent document, generates a server patch file and sends the server patch file to the client; s3: and the client updates the original intelligent document according to the client patch file or the server patch file. The invention can dynamically use the patch file and show the patch effect in real time under the conditions of not restarting the terminal, not restarting the application program and not stopping executing the running application.

Description

Generation method and use method of document hot patch and document hot patch device
Technical Field
The invention relates to the technical field of document processing, in particular to a method for generating a document hot patch, a method for using the same and a document hot patch device.
Background
At present, in the maintenance process of a nuclear power plant, a maintenance mode mainly based on papery management is mostly adopted, namely, an electronic version Word maintenance instruction/program document is printed out firstly, and the filling operation is manually carried out on site. When the maintenance program is operated on site, if the paper edition maintenance program is written with problems (such as working instruction error, program error, working instruction exceeding working boundary and the like), the maintenance work cannot be carried out, the current work needs to be stopped immediately, and the current work needs to be reported to a preparation engineer in time. When a professional preparation engineer exists on the site, the preparation engineer carries out site discussion and verification with the preparation engineer, and after the discussion is passed, the preparation engineer needs to carry out document modification on related instructions/programs on paper and carry out signature confirmation so as to continue maintenance work; if no preparation engineer exists on the site, the system needs to leave the site and return to an office to find the preparation engineer for confirmation, after the communication is finished, the preparation engineer needs to modify and sign documents, and if necessary, a superior supervisor needs to participate in signing, and then the system can return to the site to continue working. In this way, not only the flow is complicated and tedious, but also the construction period is delayed, and above all, after the field operation is completed, the modifications are required to be updated in the electronic version Word document, which not only increases the workload of the staff, but also may cause problems such as few updates or update errors. Furthermore, the log of the discussion process for the problem is not kept, and the discussion process cannot be reproduced if the maintenance problem occurs after the maintenance program is changed.
Disclosure of Invention
The invention aims to solve the technical problem that in the maintenance process of the existing nuclear power plant, a maintenance mode mainly based on papery management is mostly adopted, namely, an electronic version Word maintenance instruction/program document is printed out firstly, and the field manual filling operation is carried out; aiming at modification in a field paper version document, after field work is completed, the electronic version Word document needs to be synchronously updated, so that the workload of staff is increased, and the human problems of less update, error update and the like are possible to occur. The method aims to provide a method for generating a document hot patch, a method for using the same and a document hot patch device, and solves the problems in the background technology.
The invention is realized by the following technical scheme:
a method for generating a document hot patch comprises the following steps:
s1: loading the original intelligent document into a client, and judging whether the original intelligent document has a problem or not; if the original intelligent document has no problem, ending; if the original intelligent document has a problem, judging whether a network exists in the field environment;
s2: if the on-site environment does not have a network, confirming and discussing with an on-site preparation engineer, after the discussion confirmation, entering a client patch modification mode by the on-site preparation engineer to modify the original intelligent document to generate a client patch file, and storing modified content in the client patch file;
if the on-site environment has a network, the remote preparation engineer confirms and discusses the on-site environment, after the discussion confirmation, the remote preparation engineer enters a server patch modification mode to modify the original intelligent document to generate a server patch file, the modified content is stored in the server patch file, and then the server patch file is issued to the client;
s3: and the client updates the original intelligent document according to the client patch file or the server patch file to obtain an updated intelligent document.
Further, in step S1, if the original smart document has a problem, the method further includes determining whether the operation of the client on the original smart document belongs to the operation of simply adding the padding area; if the operation belongs to the operation of simply adding a filling value area, directly entering a client patch modification mode; if the operation does not belong to the simple new added filling value area, it is determined whether a network exists in the field environment, and the process proceeds to step S2.
The operation of adding the filling value area simply means that the element of the filling value of the user is lacked in the document, so that the user cannot fill the field record data on the terminal (client), the terminal is different from the paper version document, when the user uses the paper version document, the user can fill the data in the blank place of the document, and even if the underline or the blank area is not marked in the paper version document, the user can fill the data. The difference with the terminal is that the user can not fill in at any position of the terminal, and can only record data in specific position elements, and the elements contain unique ID values, thereby facilitating the statistics and analysis of field recorded data and subsequent data. Therefore, if such user's padding area elements are absent in the terminal document, the user can directly enter the client patch modification mode, and then add a new user input area at a specific location, such as: text boxes, digital boxes, time and date areas, signature areas, photographing areas, recording areas, video areas and the like, or adding null lines and null columns to tables.
When the operation of the terminal on the original intelligent document does not belong to the operation of simply adding the filling value area, at the moment, the user can not directly modify the original intelligent document and needs to ask for help to prepare an engineer for operation.
Further, in S2, if the on-site environment has a network, the confirmation and discussion with the remote preparation engineer specifically include: if the on-site environment has a network, the on-site confirmation and discussion are carried out by the intelligent document chat room and a remote preparation engineer, and the chat content is stored in a server-side database.
Further, in S2, if the on-site environment does not have a network, the on-site preparation engineer enters the client patch modification mode to modify the original smart document, specifically: and if the on-site environment does not have a network, the on-site preparation engineer enters a client patch modification mode to modify the content in the original intelligent document, wherein the modification operation specifically comprises a content adding operation, a content deleting operation, a content replacing operation and an N/A content operation.
Further, in S2, the remote preparation engineer enters a server-side patch modification mode to modify the original smart document, specifically:
the remote preparation engineer enters a server patch modification mode to modify the content in the original intelligent document, or the remote preparation engineer enters the server patch modification mode to modify the style in the original intelligent document;
and the remote preparation engineer enters a server patch modification mode to modify the content in the original intelligent document, wherein the remote preparation engineer specifically comprises hidden content operation, new content operation, content deletion operation, content replacement operation and N/A content operation.
Further, in S2, the field preparation engineer enters a client patch modification mode to modify the original smart document, and generate a client patch file, which specifically includes: judging whether a field preparation engineer has the authority to modify the intelligent document to create the client patch file, and if not, directly quitting; and if the client side has the authority, entering a client side patch file modification mode, modifying the original intelligent document and generating a client side patch file.
Further, in S2, the remote preparation engineer enters a server-side patch modification mode to modify the original smart document, and generate a server-side patch file, which specifically includes: judging whether a remote preparation engineer has the authority of modifying the intelligent document to create the server side patch file, if not, directly quitting; and if the intelligent document has the authority, entering a server side patch modification mode, modifying the original intelligent document to generate a server side patch file, and finally, issuing the server side patch file to the terminal.
The invention provides a method for generating a document hot patch, which comprises the following steps: and modifying the original intelligent document at the server side, wherein the modifying operation comprises operations of adding, replacing, deleting, hiding and N/A content of the document and special modification of the document format, the operations can not really modify the data in the original intelligent document, and new files are created to record corresponding operation content, and the files are patch files at the server side. And performing modification operation on the original intelligent document by the client, wherein the modification operation only comprises the operations of adding, replacing, deleting and N/A content of the document, and a client patch file is also generated. It is particularly noted that the operation on the original document content not only includes the operation on the text information, but also supports the operation on the multimedia (picture, video, audio) file, and the modified content after the operation is stored in the patch file. The generated patch files are all defined according to the specification of the document, so that normal presentation and interactive use can be carried out in the document hot patching device.
A method for using a document hot patch, comprising: obtaining a patch file on a client, wherein the patch file comprises a server patch file and a client patch file; analyzing the contents of the patch files, and loading the original intelligent document, the server side patch file and the client side patch file in sequence; and according to the analyzed patch file, performing patching operation on the document style and the content, and displaying the patched effect in real time on line, namely performing hot patching operation on the document.
The invention provides a method for using a document hot patch, which comprises the following steps: the method comprises the steps of obtaining a patch file (including a server side patch file and a client side patch file) on a terminal, analyzing the content of the patch file, combining the content with the content of an original intelligent document, and displaying the modification of the content of the patch file on the terminal in real time, wherein the presentation mode can consider factors in the aspects of content, color, position, size and the like according to the self needs of the terminal, and in addition, a newly added label on the original document can be stored in a work recording module if a value filling operation is carried out. When the intelligent document is upgraded, the original document and the patch file need to be merged, and a new upgraded intelligent document is also very convenient to generate.
A document hot patch generating device comprises an identity authentication module, a patch mode module, an operation module and a generating module;
the identity authentication module is used for verifying the identity and the authority of a patch operator, and if the identity and the authority of the patch operator do not have the authority, the patch operator directly exits; if the authority is provided, entering a patch modification mode;
the operation module is used for modifying the original intelligent document in the patch modification mode to obtain a modified style or modified content;
the patch mode module is used for storing the modified style or the modified content in a patch file;
and the generating module is used for generating or updating the patch file according to the content of the patch and the standard definition.
The document hot patch generating device is divided into two document hot patch generating devices, namely a terminal document hot patch generating device and a server document hot patch generating device:
for the terminal document hot patch generating device, if the operation of the user on the document belongs to the simple newly added filling value area operation, the identity authority verification of the user is not needed, and the operation can be directly executed. If the operation does not belong to the simple newly-added filling value area operation, the user does not have the authority to modify the document, and needs to carry out identity authority verification on field professional preparation engineers, wherein the verification modes comprise two modes: when the terminal is in an online mode, the terminal can directly request the server to verify the identity authority of the preparation engineer; when the terminal is in an off-line mode, the terminal stores the user off-line information in a local encryption mode in advance, wherein the user off-line information also comprises the identity authority data of all preparation engineers, so that the terminal can read the data information to perform identity authentication.
For the server-side document hot patch generating device, firstly, the server is directly requested to carry out identity authority verification on a remote preparation engineer, and the patch modification operation can be carried out only after the verification is passed.
A device for using a document hot patch comprises an acquisition module, an analysis module, a patching module and a version upgrading module;
the acquisition module is used for a client to acquire the latest patch file, wherein the latest patch file comprises a server side patch file and a client side patch file;
the analysis module is used for analyzing the latest patch file content to obtain an analyzed patch file;
the patching module is used for carrying out patching operation on the document style and the content according to the analyzed patch file, and presenting the patched effect in real time on line, namely the document hot patching operation;
and the edition upgrading module is used for merging the document patches and the original intelligent documents to generate new intelligent documents.
The device for the document hot patch is divided into two devices, namely a document hot patch generating device and a document hot patch using device:
the document hot patch generating device has all behavior functions for realizing the document hot patch generating method in the embodiment of the method, and the generating device comprises: the identity authentication module is used for verifying the identity and the authority of a patch operator; a patch mode module for converting the document mode into a patch operation mode; the operation module is used for performing addition, deletion, replacement, hiding and N/A content operation on the document; and the generating module is used for generating or updating the patch file according to the standard definition.
The document hot patch using device has all behavior functions for realizing the document hot patch using method in the above method embodiment, and the using device includes: the obtaining module is used for obtaining the patch file; the analysis module is used for analyzing the content of the patch file; the patching module is used for displaying the real-time presentation effect; and the upgrading module is used for combining the patch files and the original document to form a new intelligent document.
The invention provides a method for generating a document hot patch, a method for using the same and a document hot patch device, which can use a portable terminal such as a tablet personal computer and the like to carry out digital office work on a maintenance site, an intelligent document (a novel digital document format based on XML, with an extension name of & ltnsd & gt) is loaded on the terminal to display a maintenance program similar to a Word document format to carry out field operation, and when the content in the intelligent document is found to have problems, two methods are adopted: if the site has no network condition, namely the terminal can not surf the internet and is in an off-line mode, the site preparation engineer can be called for help, after the discussion is confirmed, the preparation engineer carries out authorized modification on the content of the intelligent document to generate a client patch file, the modified content is stored in the patch file, the original document is not modified, and the subsequent maintenance work can be continued; if a network situation exists in the field, that is, the terminal is connected to the network in an online mode, the terminal can perform on-site confirmation with a remote preparation engineer, can perform problem discussion in a manner similar to a chat room, and can also select more people to join in the discussion together, so that the discussion process can be recorded in the whole process, a basis is provided for the solution idea and process record of the subsequent problems or the problem description source, and after the discussion is finished, the preparation engineer can generate a server patch at the server, modify the content and store the content in the server, and send the modified content to the terminal, so that the subsequent maintenance work can be continued, as shown in fig. 1. When the terminal receives the two patch files, the running application does not need to be stopped, and the result of updating the intelligent document can be seen in real time under the condition of not restarting the terminal or the application program, so that the method is called a hot patch mode.
Compared with the prior art, the invention has the following advantages and beneficial effects:
1. the document hot patch generating method, the document hot patch using method and the document hot patch device can improve the working efficiency and reduce the back and forth movement of personnel in the field and the office.
2. The generation method, the use method and the document hot patch device of the document hot patch provided by the invention can dynamically use the patch file to see the final patch effect on real time under the conditions of not restarting a terminal, not restarting an application program and not stopping executing running application.
3. According to the document hot patch generation method, the document hot patch using method and the document hot patch device, the patch file is separated from the original intelligent document, so that the original document cannot be modified.
4. The method for generating the document hot patch, the using method and the document hot patch device provided by the invention can generate the server side patch in a terminal online mode, generate the client side patch in a terminal offline mode, and check the effect after the patch file is applied in real time.
5. The invention provides a generation method, a use method and a document hot patching device of a document, which are used for designing hidden content patching operation, ensuring that the content of an original document is not physically deleted, ensuring that the original document is not damaged and only displaying the content which is not hidden on a terminal.
6. The document hot patch generating method, the document hot patch using method and the document hot patch device provided by the invention support the chat room function during problem discussion, and can record each operation record for modifying the original intelligent document in detail, as well as operators, operation time, reasons and the like.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and that for those skilled in the art, other related drawings can be obtained from these drawings without inventive effort. In the drawings:
FIG. 1 is a flow diagram of the present invention based on a field solution when a document problem occurs.
Fig. 2 is a flowchart of a method for generating a server-side document hot patch according to an embodiment of the present invention.
Fig. 3 is a flowchart of a method for generating a terminal document hot patch according to an embodiment of the present invention.
FIG. 4 is a flowchart of a method for using a document hot patch according to an embodiment of the present invention.
Fig. 5 is a flowchart of a terminal document hot patch loading sequence according to an embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a document hot patch generating apparatus according to an embodiment of the present invention.
Fig. 7 is a schematic structural diagram of an apparatus for using a document hot patch according to an embodiment of the present invention.
Fig. 8 is a flowchart of a patch operation of a terminal document hot patch generating apparatus according to an embodiment of the present invention.
Fig. 9 is a flowchart of a specific operation of modifying based on the original document element patch of the third type in fig. 8 according to an embodiment of the present invention.
Fig. 10 is a flowchart of generating a patch record by a terminal document hot patch generating apparatus according to an embodiment of the present invention.
Fig. 11 is a flowchart of a patch operation of a server-side document hot patch generation apparatus according to an embodiment of the present invention.
Fig. 12 is a flowchart of a specific operation of modifying based on the original document element patch of the second type in fig. 11 according to an embodiment of the present invention.
Fig. 13 is a flowchart of a patch record generation process of a server-side document hot patch generation apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to examples and accompanying drawings, and the exemplary embodiments and descriptions thereof are only used for explaining the present invention and are not meant to limit the present invention.
The invention provides a generation method, a use method and a document hot patch device for solving the problems of writing of a field paper version maintenance program document (such as working instruction error, program error, working instruction exceeding working boundary and the like) in the maintenance process of a nuclear power plant, which causes that the maintenance work cannot be carried out, the current work needs to be stopped immediately and reported to a preparation engineer in time, if the maintenance field does not have the preparation engineer in the field, the work needs to return to an office for discussion, so that the back and forth movement not only wastes a lot of time in a long distance, but also consumes a lot of physical strength of personnel, wastes time and energy for cleaning the self and replacing equipment in the field, and after the discussion, the sign is confirmed by a plurality of people, the flow is complex and tedious, the whole link is finished, the time is consumed for a few hours, the time for a plurality of days is consumed, and the construction period is delayed, the field workers also cause emotional depression, the complaints are continuous, the work efficiency is seriously influenced, and the number of running back and forth is increased if a large number of problems exist in documents. After the method and the system are used, if the network condition exists on the site, the site staff do not need to rush to the office and confirm with the preparation engineer face to face, and only need to communicate and discuss with the preparation engineer on line through the terminal, and then send the server side patch modification file to the terminal, so that the follow-up maintenance work can be continued. The premise of using the invention is to convert the Word version maintenance program document into a structured intelligent document format (a novel digital document format based on XML, with the extension name of: nsd), and load the document on the terminal equipment with network function for on-site office work. The specific flow is shown in figure 1.
The invention solves another problem that aiming at the modification of the on-site paper version document, after the on-site work is finished, the electronic version Word document needs to be synchronously updated, thereby not only increasing the workload of the staff, but also possibly causing the human problems of few updates or update errors and the like. After the intelligent document processing method and the intelligent document processing device are used, only one-step edition updating operation is needed, the original document and the patch file can be combined to form a new intelligent document, and the human problems of few updates or update errors and the like can be avoided.
In order to facilitate understanding of the operations related to the document hot patch in the present invention, a method for generating the document hot patch, a method for using the document hot patch, and a document hot patch apparatus in the present invention are described in detail with reference to the following embodiments, which are specifically as follows:
example one
The embodiment of the present invention provides a method for generating a document hot patch at a server, that is, a document hot patch file is dynamically generated at the server, as shown in fig. 2, where the method includes:
firstly, whether an operator has the authority of modifying the document to create the server side patch file is judged, and if the operator does not have the authority, the operator directly exits. If the authority is provided, a server side patch modification mode is entered, and in the mode, all the adding, modifying, deleting and style operations of the document can be recorded in a server side patch file without directly modifying the original document.
There are two cases of modifying a document:
one is to modify only styles in the document for display of terminal specific styles. For example: and adding underlines to all the first-level headings (namely the hierarchical numbered paragraphs) of the terminal, changing the font color into red, changing the font name into Song font, and changing the font size into a 24-pixel format for display. Xml style patch file is updated by the modification of the style, and example code is as follows:
Figure BDA0003261709140000071
xml style patch files define a special display format for paragraph class block level elements in the document (including: paragraph < p > tags, unordered list < ul > tags, ordered list < ol > tags, and hierarchical numbered paragraph < h1> tags, < h2> tags, < h3> tags, < h4> tags, < h5> tags, four large class block level elements).
XML style files include only one node, namely < style >, which is a standard XML format specification file.
Multiple < item > elements can be defined in the < style > </style > tag, with the name attribute value corresponding to the paragraph class block level element name in the document, such as: p, ul, ol, h1, h2, h3, h4 and h 5.
The content in the < item > tag is a character string comprising various types of character styles, namely a modifier tag. The character string is formed by combining one or more of the following character styles, and the middle character style is used; "English letters are separated, and the description of character style is shown in the following table:
Figure BDA0003261709140000081
when the terminal receives and loads the style patch file, the style in the patch file is used for covering the original style.
Note: the modification of the document style only generates one style.xml server-side style patch file, a plurality of style.xml files cannot be generated, the style after being modified for many times is also only repeatedly modified, and the content in the style.xml patch file is also only repeatedly modified. The terminal will only receive one copy of the style.xml patch file, and if the style patch file is updated, the style.xml server-side style patch file on the terminal will be overwritten.
Secondly, the document content is modified, and the modification of the document content comprises the following steps: hidden content, new added content, deleted content, replaced content and N/A content. Xml patch file and media directory (storing multimedia files, i.e. pictures, audio and video files, with server _ patch _ as file name prefix) are updated by modifying the document content. The following describes these several document content modification operations in detail:
1. hiding content
The hide content operation uses a < hide > tag representation for hiding elements in the document. The hidden content operation aims to ensure that the document sent to the terminal is complete, and after the hidden document is hidden, the elements cannot be seen on the terminal, and only the elements which are not hidden can be displayed.
The hidden elements can only hide the paragraph class block level element, the row < tr > element in the table, < checklist > instruction list element, inline element, and < decl > highlight prompt element, and cannot hide the modifier tag (as shown above) and the cell < td > element in the table.
The following are the attributes of the < hide > tag:
Figure BDA0003261709140000091
note: xml server side patch file, and the label can only appear once, that is, only one < hide > node is supported in the patch file, so the id value is 0 and is fixed. All the element ids to be hidden are recorded in < hide > </hide >, the element ids are separated by spaces, and a format like sd100: sd200 is supported to hide all the continuous elements from sd100 (including the node) to sd200 (including the node).
For example: hiding three elements sd100, sd200, sd300, and all elements between sd600 to sd700, example code is as follows:
Figure BDA0003261709140000092
2. newly added content
The add content operation is represented using an < add > tag for adding a document element, such as: paragraphs, text, lists, tables, pictures, video, audio, QC checkpoints, device verification points, jump points, user input fields, etc.
The internal id of the newly added element is in the format of "sp 123", i.e., sp [0-9] +, where sp represents server patch. Xml in the working record module also uses the id association to store the field record data.
The following are the attributes of the < add > tag:
Figure BDA0003261709140000093
Figure BDA0003261709140000101
for example:
a new paragraph is added after the original document paragraph sd100, and example codes are as follows:
Figure BDA0003261709140000102
two new rows are added before row < tr id ═ sd200 > in the original document table, the example code is as follows:
Figure BDA0003261709140000103
note: when a new column is added to the original document table, a new cell needs to be added to the corresponding position of each row in the table.
3. Deleting content
The delete content operation is represented using a < delete/> tag, which is a self-closing tag, for deleting a document element.
The following are attributes of the < delete/> tag:
Figure BDA0003261709140000104
Figure BDA0003261709140000111
for example: deleting the original document paragraph sd100, example codes are as follows:
<delete id=“125”sdid=“sd100”by=“admin”datetime=“2021-03-11 11:06:08”reason=“xxx”
signature=“media/server_patch_pic.png”/>
4. replacing content
The replace content operation uses a < replace > tag representation for replacing block-level elements, inline elements, container elements in the document. The replacement element will have the same id as the original element.
< place > can be used for the following types of replacements:
content replacement and attribute alteration of paragraph class block-level elements or inline elements
Change of attribute of < table >, < tr >, < td >, < checklist >, < decl >, < table >
Interchange of paragraph class block level elements < p >, < ul >, < ol >, < h1>, < h2>, < h3>, < h4>, < h5> tags,
such as replacing the < p > tag with the < h1> tag
The following are the attributes of the < place > tag:
Figure BDA0003261709140000112
for example:
replacing the contents of the original document paragraph sd100, example codes are as follows:
Figure BDA0003261709140000113
Figure BDA0003261709140000121
the numeric input field < input id ═ sd200 ═ type ═ number'/> is modified to a text input field, with example codes as follows:
Figure BDA0003261709140000122
the replacement text passage sd300 is replaced by a middle from the left, and the content remains unchanged, and example codes are as follows:
Figure BDA0003261709140000123
changing the textual paragraph < p id ═ sd400 "> to the < h3> tag, the content remains unchanged, example codes are as follows:
Figure BDA0003261709140000124
change the textual table sd500 from framed to unframed and add a title, example codes are as follows:
Figure BDA0003261709140000125
note: the sdid in the < replace > tag must be consistent with the element id in the replacement content! The replaced element id is the same as the original document. No substitution of the document root element!
N/A content
The N/A content operation is represented using < na/> tags, which are self-enclosing tags that are used to set document elements (typically block-level elements and container elements) to currently not applicable. For the elements which are not suitable currently, the elements can be skipped to execute without reading, operating or filling on the terminal.
The following are attributes of the < na/> tag:
Figure BDA0003261709140000126
Figure BDA0003261709140000131
for example: the original document paragraph sd100 is set as not applicable, and example codes are as follows:
<na id=“200”sdid=“sd100”by=“admin”datetime=“2021-03-11 11:06:08”
reason=“xxx”signature=“media/server_patch_pic.png”/>
xml example code for a typical server side patch file server _ patch is as follows:
Figure BDA0003261709140000132
XML patch file includes only one node, namely < patch >, which is a file of a standard XML format specification.
A < hide > node may be defined in the < patch > </patch > tag, as well as a plurality of < add >, < delete >, < place >, < na > nodes.
Note: and the modification of the document content only generates a server _ patch. All the document content modifying operations are updated in the server side patch file, and the terminal only receives one copy of the server side patch file.
When all the document style or content modification operations at the server end are completed, that is, the contents of the style.xml, the server _ patch.xml and the media directory are generated, the server end patch modification mode is exited, and finally the documents and the directories can be issued to the terminal for updating.
Example two
The embodiment of the invention provides a method for generating a terminal document hot patch, namely, a document hot patch file is dynamically generated at a terminal, as shown in fig. 3, wherein the method comprises the following steps:
the terminal document modification operation does not comprise the modification of the document style and the hiding operation of the document content, only supports the operations of adding, replacing, deleting and N/A of the document content, and can be recorded in the client patch file, and the original document can not be directly modified.
Firstly, judging whether the operation of the terminal on the document belongs to the operation of a simple newly added filling value area, wherein the operation of the simply added filling value area refers to that elements of user filling values are lacked in the document, so that a user cannot fill in field recorded data on the terminal, the terminal is different from a paper version document, when the user uses the paper version document, the user can fill in data in blank places of the document, and even if underlines or blank areas are not explicitly marked in the paper version document, the user can fill in the blank places. The difference with the terminal is that the user can not fill in at any position of the terminal, and can only record data in specific position elements, and the elements contain unique ID values, thereby facilitating the statistics and analysis of field recorded data and subsequent data. Therefore, if such user's padding area elements are absent in the terminal document, the user can directly enter the client patch modification mode, and then add a new user input area at a specific location, such as: text boxes, digital boxes, time and date areas, signature areas, photographing areas, recording areas, video areas and the like, or adding null lines and null columns to tables. The two types of operations are document new content operations, namely, the < add > tag is used for representing, and the specific operation and content of the new content operation refer to a new content part in the server-side patch file document modification operation. Xml client patch files are generated, and all document operations are updated in the client patch files. And when the document operation is finished, exiting the client patch modification mode.
When the operation of the terminal on the document does not belong to the operation of simply adding the filling value area, at the moment, the user can not directly modify the document and needs to ask for help of a field professional preparation engineer to perform the operation. If the preparation engineer does not have the operation authority, the operation is directly exited. If the operation authority is provided, entering a client patch modification mode, wherein in the mode, a preparation engineer can only add content, replace content, delete content and N/A content to the document, and the specific operation and content of the operation and the content refer to the added, replaced, deleted and N/A content parts in the server patch file document modification operation.
For the terminal new content adding operation, namely < add > tag, the internal id of the newly added element adopts the format of "cp 123", namely cp [0-9] +, wherein cp represents client patch. Xml in the working record module also uses the id association to store the field record data.
Xml client patch files are also based on the same client _ patch. In particular, the terminal also generates a media directory (storing multimedia files prefixed by client _ patch _ as a file name). And when the preparation engineer completes the operation on the document, the client patch modification mode is exited. The user may continue with subsequent maintenance work.
XML patch file internal structure is basically consistent with server _ patch.xml, except there is no < hide > node, which is also a standard XML format specification file.
EXAMPLE III
The embodiment of the present invention provides a method for using a document hot patch, which is how to use a document hot patch file (including two types of a server side patch file and a client side patch file) at a terminal, as shown in fig. 4, the method includes:
the method comprises the following steps that a patch file is obtained, when the patch file of a server side is obtained by a terminal, two modes are provided, firstly, the server actively pushes the patch file to the terminal, and the terminal can immediately receive the latest patch file from the server side; secondly, the terminal periodically detects whether the latest patch file exists on the server, and if so, the latest patch file is downloaded from the server to the terminal for storage. When a terminal acquires a client patch file of the terminal, the patch file is only one at most, and the modification of the content of a terminal document can immediately update the patch file, so that the client patch file directly acquired is the latest content.
Analyzing the content of the patch file, when the terminal acquires the patch file, analyzing the patch file and the content, judging the validity of the patch file and the correctness of the patch label and the content, such as the condition of whether the name of the patch file is correct, whether the patch label is legal, whether repeated ID exists in the patch content and the like, analyzing the content in the style.xml of the server-side style patch file to be in a standard CSS format, otherwise, rendering the style cannot be performed. If all the files pass the verification, the patch file and other files are loaded according to the following flow sequence shown in fig. 5, which is specifically described as follows:
Figure BDA0003261709140000151
first, load original document xml file (main/sd/document xml) and show it with style file (main/style.xml) in original document, which is the presentation effect before loading any patch file
Figure BDA0003261709140000152
And then, a server side patch file server _ patch.xml file (modify/server _ patch.xml) is loaded, and the merging with the content of the server side patch file and the effect presentation are completed
Figure BDA0003261709140000153
Xml file (modify/client _ patch) is then loaded.xml), merging with client patch file content and effect presentation are completed
Figure BDA0003261709140000154
And finally, loading a server-side style patch file style.xml file (modify/style.xml) to finish the effect presentation of special styles on the terminal
Figure BDA0003261709140000155
At this point, after all files are loaded, the effect of merging and displaying all patch files, style files and original documents is achieved
Patching, which is divided into patching the document style and the document content respectively, and the specific description is as follows:
when patching is carried out on a document style, the style patch can be printed on the document only by converting the contents of the server-side style patch file style. For example, for the example in embodiment one, a section of style part code is intercepted, as follows:
< itemname ═ h1"> u; color: "# FFFF 0000"; fontsize: "24 px"; fontfamily, song body; [ item >
Only the following codes need to be correspondingly analyzed and converted:
Figure BDA0003261709140000161
in this way, the styles in the original document can be overlaid and rendered with the styles in the patch.
Xml conversion correspondence table of style patch file is as follows:
character pattern CSS style Description of the invention
fontsize:xxx font-size:xxx; Word size, unit px
fontfamily:xxx font-family:‘xxx’; Character font
color color:rgba(red,green,blue,alpha); Character color
bgcolor background-color:rgba(red,green,blue,alpha); Background color
u text-decoration:underline; Underlining
em font-style:italic; Italic body
strong font-weight:bold; Thickening
strike text-decoration:line-through; Deletion line
When the content of the document is patched, the content patch can be patched on the document only by analyzing nodes in the patch files of the server side and the client side one by one and dynamically adding related specific patch tag attributes into the document elements according to the patch tags. The attributes of the relevant specific patch tag added are as follows:
Figure BDA0003261709140000162
Figure BDA0003261709140000171
the specific operation is as follows:
Figure BDA0003261709140000172
newly added content
Aiming at an < add > tag in a patch file, finding a corresponding element in a document through an sdid attribute value, determining whether the content is newly added before or after the sdid element according to a before-after attribute, and finally inserting the new content (including the attribute) into a specified position in the document. For example, in the first embodiment, a new paragraph is added after the original document paragraph sd100:
Figure BDA0003261709140000173
the document presentation result according to the patch content is:
Figure BDA0003261709140000174
and as described above, the patching operation of the newly added content is realized. The newly added content can be distinguished by different colors, and the added content can be labeled with information such as personnel, reason, time and the like.
Figure BDA0003261709140000175
Deleting content
For a < delete > tag in a patch file, finding a corresponding element in a document through an sdid attribute value, and adding a del-true attribute and other patch tag attributes to the sdid element. For example, in the first embodiment, the original document paragraph sd100 is deleted:
<delete id=“125”sdid=“sd100”by=“admin”datetime=“2021-03-11 11:06:08”reason=“xxx”
signature=“media/server_patch_pic.png”/>
the document presentation result according to the patch content is:
<p id=“sd100”del=“true”from=“server”by=“admin”
datetime=“2021-03-11 11:06:08”reason=“xxx”
signature=“media/server_patch_pic.png”>xxx</p>
as described above, the delete content patching operation is implemented. The deleted contents may be indicated by a deletion line, and the deleted contents may be labeled with information such as a person, reason, time, and the like.
Figure BDA0003261709140000181
Replacing content
Aiming at a < replace > tag in a patch file, finding a corresponding element in a document through an sdid attribute value, replacing the whole element of the sdid element by using new content in patch content, and adding an rpl (true) attribute and other patch tag attributes into the replaced element. For example, in the first embodiment, the content of the original document paragraph sd100 is replaced by:
Figure BDA0003261709140000182
the document presentation result according to the patch content is:
<p id=“sd100”rpl=“true”from=“server”by=“admin”
datetime=“2021-03-11 11:06:08”reason=“xxx”s
signature is media/server _ patch _ pic. png > paragraph new content </p >
As described above, the replacement content patching operation is implemented. The replaced contents can be distinguished by different colors, and the replaced contents can be labeled with information such as personnel, reason, time and the like.
Figure BDA0003261709140000183
N/A content
Aiming at a < na > tag in a patch file, finding a corresponding element in a document through a sdid attribute value, and adding a na-true attribute and other patch tag attributes to the sdid element. For example, in the first embodiment, the original document paragraph sd100 is set as not applicable:
<na id=“200”sdid=“sd100”by=“admin”datetime=“2021-03-11 11:06:08”
reason=“xxx”signature=“media/server_patch_pic.png”/>
the document presentation result according to the patch content is:
<p id=“sd100”na=“true”from=“server”by=“admin”
datetime=“2021-03-11 11:06:08”reason=“xxx”
signature=“media/server_patch_pic.png”>xxx</p>
as described above, the N/A content patching operation is realized. The contents of the N/A can be represented by grey-bottom color, the terminal cannot operate the contents of the N/A, and the contents of the N/A can be labeled with information such as personnel, reason, time and the like.
Figure BDA0003261709140000184
Hiding content
Aiming at a < hide > tag in a patch file, finding a corresponding element in a document through an sdid attribute value, and adding a hide-true attribute and other patch tag attributes to the sdid element. For example, in the first embodiment, three elements sd100, sd200, and sd300 are hidden, and all the elements sd600 to sd700 are hidden:
Figure BDA0003261709140000185
Figure BDA0003261709140000191
the document presentation result according to the patch content is:
Figure BDA0003261709140000192
as described above, the hidden content patching operation is implemented. Hidden elements are not exposed in the document.
Because the method is a document hot patching mode, when the terminal receives the latest patch file, the content of the patch file can be immediately applied, the steps are executed, the patch content is combined immediately, and the latest document content and the presentation effect are displayed on the update interface.
And recording field data, for newly-added contents in the patch file, adding an ID form in which sp is a prefix and a number into the contents of the server, adding an ID form in which cp is a prefix and a number into the contents of the terminal, and recording the field data into a work record.
And upgrading the intelligent document, and after the field work is finished, replacing the patch file in the original nsd document modification module with a new patch file, namely updating the original nsd document. The original document and all patch files can be merged (i.e. removing redundant related specific patch tag attributes, modifying the ID with 'sp' and 'cp' as prefixes into the ID with the maximum value sequence of the document sequence with 'sd' as the prefix, and removing the deleted content) by only one step when the document is upgraded, thereby forming a new intelligent document.
Example four
The embodiment of the invention provides a device for generating a hot patch of a document, which is a general device in principle and is suitable for a server side and a terminal. As shown in fig. 6, it includes:
and the identity authentication module is used for verifying and acquiring the identity and the authority of the operator and whether the operator has unauthorized operation behavior in the operation process.
And the patch mode module is used for enabling the document to enter a patch modification mode if the identity authentication check is verified, so that the original document can be modified, but the modified content is stored in patch files (server side patch file style.xml, server _ patch.xml and client side patch file client _ patch.xml), and the content of the original document is still unchanged.
And the operation module is used for performing operation on the modification process of the document, such as modification on the document style, addition, modification, deletion and the like on the document content.
And the generation module is used for storing the process record (namely the patch content) of the operation as a unique patch file according to the standard specification definition, and the creation and modification of the multimedia file are included.
The device of the document hot patch generation device provided by the invention is a hardware device, and can be a server for a server side, and can be a PC (personal computer) or a tablet computer, a mobile phone and the like for a terminal. The modules in the device, namely the functions of the device are realized and controlled by software or APP and are installed in hardware equipment.
The beneficial effect of the document hot patch generation apparatus in this embodiment is similar to that of the relevant part in the document hot patch generation method, and reference may be made to the relevant description of the method embodiment section, which is not described herein again, and no limitation is made here.
In order to further understand the document hot patch generating device, the device is divided into a terminal document hot patch generating device and a server document hot patch generating device. The following two generation devices are further described in detail with reference to the schematic structural diagram of the generation device, and specifically as follows:
1. aiming at the terminal document hot patch generating device, if the operation of the user on the document belongs to the simple newly added filling value area operation, the user does not need to be authenticated, and the operation can be directly executed. If the operation does not belong to the simple newly-added filling value area operation, the user does not have the authority to modify the document, and needs to carry out identity authority verification on field professional preparation engineers, wherein the verification modes comprise two modes: when the terminal is in an online mode, the terminal can directly request the server to verify the identity authority of the preparation engineer; when the terminal is in an off-line mode, the terminal stores the user off-line information in a local encryption mode in advance, wherein the user off-line information also comprises the identity authority data of all preparation engineers, so that the terminal can read the data information to perform identity authentication.
The following further describes the specific implementation steps of the patch operation of the terminal document hot patch generation apparatus, as shown in fig. 8, which are specifically described as follows:
because the number of patch operations on the terminal is generally small and the patch operations are simple, an operation mode of patch "block elements" is adopted on the terminal, that is, the minimum unit of the patch operations is "block" and is not "text". The method has the advantages that the patch is modified in a targeted manner, one record is saved, errors are not prone to occurring, and the effect of the patch modification can be seen immediately. Of course, the operation of revoking the last patch record is supported during the operation.
Firstly, entering a client patch modification mode, and in the current mode, only performing patch modification operation on a document and not performing field data recording. In this mode, the interface may be presented in different ways, such as increasing the height of the top frame of the table, increasing a handle on the top of the table, or thickening the frame of the table, etc., in order to make it easier to clearly determine whether the table is clicked, not a cell or other table, because if a cell in the table is clicked, the device cannot determine whether the current operation object is the cell content or the table. In this mode, the right-click menu is also changed, for example, if any element is pressed for a long time, the element is deleted, and if an < input > element is pressed for a long time, the type of change is operated.
The content presented on the current interface is the display effect of combining the original document and the patch file (the server side and the client side patch files), so the interface elements are divided into three categories:
the attribute of the interface element contains from ═ server ", that is, the patch record from the server side
For such interface elements, the patch record element at the server side is used, and the client side cannot modify the patch record at the server side, so that the client side cannot operate.
The interface element attribute contains from ═ client ", i.e. the patch record from the own client
For such interface elements, patch records generated by the client are used, but only deletion operations can be performed on such elements in consideration of convenience of operation on the terminal. The following four types of patch labels are described below:
Figure BDA0003261709140000211
for newly added content<add>The label directly deletes the newly added content element in the interface element and then deletes the corresponding patch record in the client patch file<add>Node point
Figure BDA0003261709140000212
For deleting content<delete>Tags, find the same in the interface elementDeleting the element, removing all related specific patch tag attributes in the element, and then deleting the corresponding patch record in the client patch file<delete>Node point
Figure BDA0003261709140000213
For N/A content<na>And (3) labeling, namely finding the N/A element in the interface element, removing all related specific patch label attributes in the element, and then deleting the corresponding patch record in the client patch file<na>Node point
Figure BDA0003261709140000214
For alternative content<replace>And the label finds the replacing element in the interface element, replaces the replacing element by using the ID element corresponding to the original document, and deletes the corresponding patch record in the client patch file<replace>Node point
The interface element attribute contains neither from "server" nor from "client", i.e., the original document element
For such interface elements, the interface elements are elements in the original document and non-patch record elements, so that the operation record of saving the patch in the document can be modified, and the specific flow is shown in fig. 9 and is respectively described in detail below:
Figure BDA0003261709140000215
newly added content
When a new block-level element, container element, table empty row, table empty column are executed, i.e., patch < add > operation, the new element creates a new ID prefixed by "cp". Storing the < add > operation record into the patch file, and updating the interface.
When a new text, inline element is executed, it is essentially a modify operation on the element, i.e. a patch < place > operation. Storing the < place > operation record into the patch file, and updating the interface.
It should be noted that if content is newly added to the patch file after (or before) the original document sdid element, adding new content after (or before) the element again will prompt to be added repeatedly, and new content may be added after deleting the previously added content.
Figure BDA0003261709140000221
Deleting content
When a delete block level element, container element is performed, a patch < delete > operation. The < delete > operation record is stored in the patch file and the interface is updated.
When deleting a partial text, inline element is performed, it is essentially a modify operation on the element, i.e., a patch < place > operation. Storing the < place > operation record into the patch file, and updating the interface.
Figure BDA0003261709140000222
N/A content
When the N/a block level element, container element, is executed, the patch < na > operation. Storing < na > operation record in patch file, and updating interface.
Figure BDA0003261709140000223
Replacing content
When a replace block level element, inline element, container element is performed, the patch < place > operation. Storing the < place > operation record into the patch file, and updating the interface.
As described above, the whole patch operation process is: positioning block-level elements needing to be operated, double-clicking the block-level elements to enter an operation interface for patch modification, storing a patch modification record into a client patch file, and updating the interface according to the application method of the file hot patch in the third embodiment, so that the addition of one patch record is completed and the effect is presented in real time. And repeating the process until all the content is modified, namely adding all the patch records. The specific flow is shown in fig. 10.
And finally, when the patch operation is finished, exiting the client patch modification mode and continuing the subsequent field operation.
2. Aiming at a server side document hot patch generating device, firstly, a server is directly requested to carry out identity authority verification on a current user, and after the verification is passed, patch modification operation can be carried out.
The following further describes the specific implementation steps of the patch operation of the server-side document hot patch generation apparatus, as shown in fig. 11, which are specifically described as follows:
the server side can perform patching operation on the document styles and the document contents. The description is respectively given:
for the modification of the server side document style, because most styles are still displayed by style.xml styles in the original document, only individual styles are specially displayed on the terminal, the modification is limited to the styles of block level elements and partial container elements, and all elements capable of modifying the styles can be listed for the user-defined style operation, as shown in the following table:
wherein T/F in the table is represented as True/False.
Element(s) fontsize fontfamily color bgcolor u em strong strike
<p> Word size value Font name Colour values Colour values T/F T/F T/F T/F
<ul> Word size value Font name Colour values Colour values T/F T/F T/F T/F
<ol> Word size value Font name Colour values Colour values T/F T/F T/F T/F
<h1> Word size value Font name Colour values Colour values T/F T/F T/F T/F
<h2> Word size value Font name Colour values Colour values T/F T/F T/F T/F
<h3> Word size value Font name Colour values Colour values T/F T/F T/F T/F
<h4> Word size value Font name Colour values Colour values T/F T/F T/F T/F
<h5> Word size value Font name Colour values Colour values T/F T/F T/F T/F
<qc> Word size value Font name Colour values Colour values T/F T/F T/F T/F
<evalidate> Word size value Font name Colour values Colour values T/F T/F T/F T/F
<decl> Word size value Font name Colour values Colour values T/F T/F T/F T/F
The operation data of the patch for modifying the document content at the server side is more, and the operation steps are more complex, so that the operation mode of 'rich text editing' of the patch is adopted at the server side, namely the operation mode is similar to the revision function in a Word editor. Different from the patch operation of the client, the server does not adopt a mode of modifying one by one and storing the modified files instantly, the mode has an effect on a small amount of modification, but the display is very complicated for a large amount of modification, so that the modification of all the documents is completed at the server, then the patch file server _ patch.xml of the server is updated according to the modified content, and finally the interface is updated. Similarly, the operation of canceling and redoing the patch record is supported in the operation process.
Firstly, entering a server side patch modification mode, copying all elements on the current interface for patch modification operation, and ensuring the integrity of the elements of the original interface. The content presented on the current interface is the display effect of combining the original document and the server side patch file, so the interface elements are divided into two categories, and the client side patch file is not contained:
the attribute of the interface element contains from ═ server ", that is, the patch record from the server end of the interface element
For such interface elements, the patch record generated by the server itself may perform the following operations:
Figure BDA0003261709140000231
for the content having add ═ true (i.e. new content) and rpl ═ true (i.e. replacement content)) The elements of the attributes can directly modify the content in the interface, namely directly updating the records in the patch file. Or delete element operations.
Figure BDA0003261709140000232
Aiming at other elements (namely deleting content, N/A content and hidden content), only the operation of deleting the elements can be executed, namely directly deleting the corresponding nodes in the patch file
The interface element attribute does not contain from ═ server ", i.e. the original document element
For such interface elements, the interface elements are elements in the original document and non-patch record elements, so that the operation record of saving the patch in the document can be modified, and the specific flow is shown in fig. 12, which is described in detail below:
Figure BDA0003261709140000241
newly added content
When a new block level element, container element, table empty row, table empty column are executed, i.e., patch < add > operation, the new element creates a new ID prefixed by "sp". The same type of block-level element can be created directly by typing the enter key at the end of a block-level element segment. Adding the attribute of newadd ═ true "to the element on the interface indicates that the newly added content operation is just performed, and it is noted that the attribute of the newly added content in the patch record in the interface element is add ═ true".
When a new text, inline element is executed, it is essentially a modify operation on the element, i.e. a patch < place > operation. Adding a newrpl ═ true' attribute to the element on the interface indicates that the content replacement operation has just been performed, and it is noted that the attribute of the replacement content in the differentiated patch record in the interface element is rpl ═ true.
It should be noted that if content is newly added to the patch file after (or before) the sdid element of the original document, adding new content after (or before) the sdid element again will prompt to repeat adding, and the newly added content added to the interface can be directly modified, as described in the first case.
Figure BDA0003261709140000242
Deleting content
When a delete block level element, container element is performed, a patch < delete > operation. If all of the contents of an element are deleted, the operation is also considered a patch < delete > operation. Adding a newdel-value attribute to the element on the interface indicates that the delete content operation is just performed, and it is noted that the delete content in the differentiated patch record has a del-value attribute in the interface element.
When deleting a partial text, inline element is performed, it is essentially a modify operation on the element, i.e., a patch < place > operation. Adding a newrpl ═ true' attribute to the element on the interface indicates that the content replacement operation has just been performed, and it is noted that the attribute of the replacement content in the differentiated patch record in the interface element is rpl ═ true.
Figure BDA0003261709140000243
N/A content
When the N/a block level element, container element, is executed, the patch < na > operation. Adding a newna ═ true' attribute to the element on the interface indicates that the N/a content operation has just been performed, noting that the attribute of the N/a content in the patch record in the interface element is na ═ true.
Figure BDA0003261709140000244
Replacing content
When a replace block level element, inline element, container element is performed, the patch < place > operation. The original content information of the element in the original document can be displayed on the interface, and the comparison operation of a user is facilitated. Adding a newrpl ═ true' attribute to the element on the interface indicates that the content replacement operation has just been performed, and it is noted that the attribute of the replacement content in the differentiated patch record in the interface element is rpl ═ true.
Figure BDA0003261709140000245
Hiding content
When all elements except the table cell < td > tag, the embellishment tag are hidden, i.e., the patch < hide > operation is performed. The method can support single selection of elements needing to be hidden, continuous selection of elements needing to be hidden by pressing a shift key, and discontinuous multiple selection of elements needing to be hidden by pressing a ctrl key. Adding a new attribute of "true" to the element to be hidden on the interface indicates that the hidden content operation is just performed, and it is noted that the attribute of hidden content in the interface element in the patch record is "true".
The above patching operation needs to be noted that the patching operation cannot be executed on the interface patch record element (attribute contains from ═ server "), such as: hiding operations, modification operations, deletion operations, N/A operations, etc. cannot be performed on deleted or N/A elements, and modification operations, N/A operations, etc. cannot be performed on hidden elements.
Finally, when all the patch operations are finished, exiting the server-side patch modification mode, updating the records in the server-side patch file, or storing the patch modification records into the server-side patch file according to the newly added attributes (for example, storing the element with the newadd attribute into the patch record < add > tag, storing the element with the newdel attribute into the patch record < delete > tag, storing the element with the newna attribute into the patch record < na > tag, storing the element with the newrpl attribute into the patch record < replace > tag, and storing the element with the newhide attribute into the patch record < hide > tag, etc.), and then unifying an update interface according to the method for using the file hot patch in the third embodiment, thereby completing the final patch presentation effect.
As described above, the whole patch operation process is: and finishing all patch modification operations on the contents to be modified in the document, storing the patch modification records into a server side patch file, and finally merging the original document and the patch file to display a uniform updating interface. The specific flow is shown in fig. 13.
EXAMPLE five
An embodiment of the present invention provides an apparatus for using a document hot patch, which is generally applicable to a terminal, as shown in fig. 7, and includes:
and the acquisition module is used for the terminal to acquire the latest server side patch file and the client side patch file.
And the analysis module is used for analyzing the contents of the patch files and judging the legality.
And the patching module is used for carrying out patching operation on the document styles and the content and presenting the patched effect in real time, namely the document hot patching.
And the upgrading module is used for merging the patch files and the original document to form a new intelligent document, and the document is a brand-new document and is updated on the whole original document, so that the document does not contain any patch files.
The device for using the document hot patch is a hardware device, and can be a PC (personal computer) or a tablet personal computer, a mobile phone and the like. The modules in the device, namely the functions of the device are realized and controlled by software or APP and are installed in hardware equipment.
The beneficial effect of the device for using the document hot patch in the embodiment is similar to that of the relevant part in the method for using the document hot patch, and reference may be made to the relevant description of the method embodiment, which is not repeated herein, and no limitation is made here.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for generating a document hot patch is characterized by comprising the following steps:
s1: loading the original intelligent document into a client, and judging whether the original intelligent document has a problem or not; if the original intelligent document has no problem, ending; if the original intelligent document has a problem, judging whether a network exists in the field environment;
s2: if the on-site environment does not have a network, confirming and discussing with an on-site preparation engineer, after the discussion confirmation, entering a client patch modification mode by the on-site preparation engineer to modify the original intelligent document to generate a client patch file, and storing modified content in the client patch file;
if the on-site environment has a network, the remote preparation engineer confirms and discusses the on-site environment, after the discussion confirmation, the remote preparation engineer enters a server patch modification mode to modify the original intelligent document to generate a server patch file, the modified content is stored in the server patch file, and then the server patch file is issued to the client;
s3: and the client updates the original intelligent document according to the client patch file or the server patch file to obtain an updated intelligent document.
2. The method for generating a document hot patch according to claim 1, wherein in step S1, if there is a problem in the original smart document, the method further comprises determining whether the operation of the client on the original smart document belongs to the simple operation of adding a new padding area; if the operation belongs to the operation of simply adding a filling value area, directly entering a client patch modification mode; if the operation does not belong to the simple new added filling value area, it is determined whether a network exists in the field environment, and the process proceeds to step S2.
3. The method for generating a document hot patch according to claim 1, wherein in S2, if the on-site environment has a network, the on-site environment is confirmed and discussed with a remote preparation engineer, specifically: if the on-site environment has a network, the on-site confirmation and discussion are carried out by the intelligent document chat room and a remote preparation engineer, and the chat content is stored in a server-side database.
4. The method for generating a document hot patch according to claim 1, wherein in S2, if the on-site environment does not have a network, the on-site preparation engineer enters a client patch modification mode to perform a modification operation on the original smart document, specifically: and if the on-site environment does not have a network, the on-site preparation engineer enters a client patch modification mode to modify the content in the original intelligent document, wherein the modification operation specifically comprises a content adding operation, a content deleting operation, a content replacing operation and an N/A content operation.
5. The method for generating a document hot patch according to claim 1, wherein in S2, the remote preparation engineer enters a server-side patch modification mode to modify the original smart document, specifically:
the remote preparation engineer enters a server patch modification mode to modify the content in the original intelligent document, or the remote preparation engineer enters the server patch modification mode to modify the style in the original intelligent document;
and the remote preparation engineer enters a server patch modification mode to modify the content in the original intelligent document, wherein the remote preparation engineer specifically comprises hidden content operation, new content operation, content deletion operation, content replacement operation and N/A content operation.
6. The method as claimed in claim 1, wherein in S2, the field preparation engineer enters a client patch modification mode to modify the original smart document to generate a client patch file, which includes: judging whether a field preparation engineer has the authority to modify the intelligent document to create the client patch file, and if not, directly quitting; and if the client side has the authority, entering a client side patch file modification mode, modifying the original intelligent document and generating a client side patch file.
7. The method as claimed in claim 1, wherein in S2, the remote preparation engineer enters a server-side patch modification mode to modify the original smart document to generate a server-side patch file, which includes: judging whether a remote preparation engineer has the authority of modifying the intelligent document to create the server side patch file, if not, directly quitting; and if the intelligent document has the authority, entering a server side patch modification mode, modifying the original intelligent document to generate a server side patch file, and finally issuing the server side patch file to the terminal.
8. A method for using a document hot patch, comprising:
obtaining a patch file on a client, wherein the patch file comprises a server patch file and a client patch file; analyzing the contents of the patch files, and loading the original intelligent document, the server side patch file and the client side patch file in sequence; and according to the analyzed patch file, performing patching operation on the document style and the content, and displaying the patched effect in real time on line, namely performing hot patching operation on the document.
9. The device for generating the hot patch of the document is characterized by comprising an identity authentication module, a patch mode module, an operation module and a generation module;
the identity authentication module is used for verifying the identity and the authority of a patch operator, and if the identity and the authority of the patch operator do not have the authority, the patch operator directly exits; if the authority is provided, entering a patch modification mode;
the operation module is used for modifying the original intelligent document in the patch modification mode to obtain a modified style or modified content;
the patch mode module is used for storing the modified style or the modified content in a patch file;
and the generating module is used for generating or updating the patch file according to the content of the patch and the standard definition.
10. A device for using a document hot patch is characterized by comprising an acquisition module, an analysis module, a patching module and a version upgrading module;
the acquisition module is used for a client to acquire the latest patch file, wherein the latest patch file comprises a server side patch file and a client side patch file;
the analysis module is used for analyzing the latest patch file content to obtain an analyzed patch file;
the patching module is used for carrying out patching operation on the document style and the content according to the analyzed patch file, and presenting the patched effect in real time on line, namely the document hot patching operation;
and the edition upgrading module is used for merging the document patches and the original intelligent documents to generate new intelligent documents.
CN202111083705.0A 2021-09-14 2021-09-14 Document hot patch generation method, document hot patch application method and document hot patch Ding Zhuangzhi Active CN113779939B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111083705.0A CN113779939B (en) 2021-09-14 2021-09-14 Document hot patch generation method, document hot patch application method and document hot patch Ding Zhuangzhi

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111083705.0A CN113779939B (en) 2021-09-14 2021-09-14 Document hot patch generation method, document hot patch application method and document hot patch Ding Zhuangzhi

Publications (2)

Publication Number Publication Date
CN113779939A true CN113779939A (en) 2021-12-10
CN113779939B CN113779939B (en) 2024-02-27

Family

ID=78844354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111083705.0A Active CN113779939B (en) 2021-09-14 2021-09-14 Document hot patch generation method, document hot patch application method and document hot patch Ding Zhuangzhi

Country Status (1)

Country Link
CN (1) CN113779939B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6161218A (en) * 1996-01-16 2000-12-12 Sun Microsystems Inc. Software patch architecture
US7349905B1 (en) * 2001-09-12 2008-03-25 Everdream Corporation Local client database for remote support
US20090235161A1 (en) * 2008-03-15 2009-09-17 Microsoft Corporation Lossless Web-Based Editor For Complex Documents
CN101771706A (en) * 2010-02-08 2010-07-07 深圳市傲冠软件股份有限公司 Non-invasive network service terminal for realizing remote access through Internet
CN102118399A (en) * 2009-12-31 2011-07-06 深圳市傲冠软件股份有限公司 Noninvasive network service remote realization method and system
US20170262859A1 (en) * 2016-03-08 2017-09-14 HecTech, Inc. Method and system for providing it support, building and managing network infrastructures on demand
CN107315619A (en) * 2017-07-12 2017-11-03 北京理工大学 A kind of hot restorative procedure, mobile terminal and hot repair complex system for realizing patch safety
CN107346252A (en) * 2016-05-07 2017-11-14 腾讯科技(深圳)有限公司 Using update method and device
CN108805300A (en) * 2018-05-30 2018-11-13 上海理工大学 Numerically controlled machine remote live collaboration fault diagnosis and maintenance system
CN108874410A (en) * 2017-05-09 2018-11-23 中兴通讯股份有限公司 patch management method and device
CN109002320A (en) * 2018-08-20 2018-12-14 苏州思必驰信息科技有限公司 For the update method of software development kit, system, electronic equipment and storage medium
CN109358886A (en) * 2018-12-03 2019-02-19 南宁举医疗电子设备股份有限公司 A kind of high pressure generator remote upgrade control system and remote upgrade method
CN111399895A (en) * 2020-04-13 2020-07-10 网易(杭州)网络有限公司 Client updating method and device, electronic equipment and computer readable medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6161218A (en) * 1996-01-16 2000-12-12 Sun Microsystems Inc. Software patch architecture
US7349905B1 (en) * 2001-09-12 2008-03-25 Everdream Corporation Local client database for remote support
US20090235161A1 (en) * 2008-03-15 2009-09-17 Microsoft Corporation Lossless Web-Based Editor For Complex Documents
CN102118399A (en) * 2009-12-31 2011-07-06 深圳市傲冠软件股份有限公司 Noninvasive network service remote realization method and system
CN101771706A (en) * 2010-02-08 2010-07-07 深圳市傲冠软件股份有限公司 Non-invasive network service terminal for realizing remote access through Internet
US20170262859A1 (en) * 2016-03-08 2017-09-14 HecTech, Inc. Method and system for providing it support, building and managing network infrastructures on demand
CN107346252A (en) * 2016-05-07 2017-11-14 腾讯科技(深圳)有限公司 Using update method and device
CN108874410A (en) * 2017-05-09 2018-11-23 中兴通讯股份有限公司 patch management method and device
CN107315619A (en) * 2017-07-12 2017-11-03 北京理工大学 A kind of hot restorative procedure, mobile terminal and hot repair complex system for realizing patch safety
CN108805300A (en) * 2018-05-30 2018-11-13 上海理工大学 Numerically controlled machine remote live collaboration fault diagnosis and maintenance system
CN109002320A (en) * 2018-08-20 2018-12-14 苏州思必驰信息科技有限公司 For the update method of software development kit, system, electronic equipment and storage medium
CN109358886A (en) * 2018-12-03 2019-02-19 南宁举医疗电子设备股份有限公司 A kind of high pressure generator remote upgrade control system and remote upgrade method
CN111399895A (en) * 2020-04-13 2020-07-10 网易(杭州)网络有限公司 Client updating method and device, electronic equipment and computer readable medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
刘兴淮;温丛剑;成静;庄菲;: "医院信息系统工作站远程维护技术探究", 中国医疗设备, no. 08, pages 49 - 51 *
周冲;: "基于服务器/客户端的补丁管理系统设计与实现", 微计算机应用, no. 06, 15 June 2009 (2009-06-15) *
郝文江;: "安装系统软件安全补丁――保证系统安全性", 通信技术, no. 05, pages 59 - 61 *

Also Published As

Publication number Publication date
CN113779939B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
US11210456B2 (en) Method relating to preparation of a report
US8954480B2 (en) End-to-end interoperability and workflows from building architecture design to one or more simulations
US20060015839A1 (en) Development of software systems
CN105528418B (en) A kind of design documentation generation method and device
CN107807954B (en) Visual modeling multidimensional analysis system and method thereof
EP1965308A1 (en) Document processing system and method
CN110991157A (en) Engineering quality evaluation system design method based on electronic file credible technology
CN106775770A (en) The lookup method of query statement is built based on category information
CN103530407B (en) Method and device for generating rich text document
US20040049307A1 (en) Electronic work instruction object oriented system and method
CN101859303A (en) Metadata management method and management system
US20100169333A1 (en) Document processor
CN115857886A (en) Low code development platform for basic government affair application
US11526367B1 (en) Systems and methods for translation of a digital document to an equivalent interactive user interface
US8645816B1 (en) Customizing user documentation
KR101022716B1 (en) System for generating automatically electronic document and method thereof
CN113779939B (en) Document hot patch generation method, document hot patch application method and document hot patch Ding Zhuangzhi
CN1973284A (en) Document processing method and device
CN102193907A (en) Method and system for comparing manuscripts based on B/S (Browser/Server) structure
CN111639478B (en) Automatic data auditing method and system based on EXCEL document
CN115170055A (en) Knowledge engineering management platform and management method
CN114296779A (en) SPA-based code editing method and system
JP2007164503A (en) System production method, system and program, and data structure of definition information used in system production
US7730105B2 (en) Time sharing managing apparatus, document creating apparatus, document reading apparatus, time sharing managing method, document creating method, and document reading method
CN111459904B (en) TPM document automatic management system and method

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
GR01 Patent grant
GR01 Patent grant