Key unit synchronization method and related equipment for structured documents
By providing synchronization pages on the user interface and using web communication tools, automatic synchronization modification of structured documents is realized, solving the time-consuming problem of manual comparison and synchronization in the existing technology, and improving the efficiency and accuracy of data synchronization.
Patent Information
- Application Number
- CN202110978062.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-24
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2041-08-24
AI Technical Summary
In the prior art, the modification of structured documents requires manual comparison and synchronization, which makes them time-consuming and cumbersome.
Provides a synchronization method for key units of structured documents. By providing a synchronization page on the user interface, the document parsing engine is used to convert the structured document into a web page format file, and cross-regional data synchronization is achieved through web communication tools.
It realizes the automatic synchronization modification of structured documents, avoids the tedious process of manual comparison, and improves the efficiency and accuracy of data synchronization.
Smart Images

Figure CN113901130B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data synchronization, and in particular to a key unit synchronization method of a structured document and related equipment. Background Art
[0002] The Internet is developing faster and faster, and online business systems are gradually maturing. In order to facilitate user management and operation, structured documents (such as contract documents, etc.) are usually uploaded to the business system, and when a structured document is needed, it is downloaded from the business system. When the relevant part of the structured document needs to be modified according to the modification of the content in the database of the business system, it is usually manually compared and modified, which is time-consuming and cumbersome. Summary of the invention
[0003] In view of this, the purpose of the present disclosure is to provide a key unit synchronization method and related equipment for a structured document, which can automatically and synchronously modify the relevant parts of the structured document according to the modification of the content in the database of the business system.
[0004] Based on the above objectives, the present disclosure provides a key unit synchronization method for a structured document, comprising:
[0005] providing a synchronization page including a first area and a second area on a user interface;
[0006] Displaying a form including a plurality of key fields in the first area, wherein the content in each of the key fields is extracted from a database of a business system using an identifier of the structured document and an identifier of the key field;
[0007] In response to detecting a predetermined operation of the user on the user interface, based on a plurality of bookmark attributes maintained in advance according to the plurality of key fields, converting the structured document into a webpage format file including the plurality of bookmark attributes through a document parsing engine, and displaying the webpage format file in the second area;
[0008] In response to monitoring, through the webpage multithreading tool, a first event triggered by a user modifying a first content of a first key field among the multiple key fields in the first area, sending, through the first webpage communication tool, a first identifier of the first key field and the modified first content to a second webpage communication tool;
[0009] A message including the received first identifier and the modified first content is returned to a pre-specified event handler through the second web page communication tool, so that the event handler determines the first bookmark attribute corresponding to the first identifier among the multiple bookmark attributes, and modifies the second content in the first bookmark attribute in the second area according to the modified first content.
[0010] Based on the same inventive concept, the present disclosure also provides a key unit synchronization device for a structured document, comprising:
[0011] A page providing module, used for providing a synchronization page including a first area and a second area on a user interface;
[0012] A form display module, configured to display a form including a plurality of key fields in the first area, wherein the content in each of the key fields is extracted from a database of a business system using an identifier of the structured document and an identifier of the key field;
[0013] A document conversion and display module, configured to: in response to detecting a predetermined operation of a user on the user interface, based on a plurality of bookmark attributes maintained in advance according to the plurality of key fields, convert the structured document into a web page format file including the plurality of bookmark attributes through a document parsing engine, and display the web page format file in the second area;
[0014] A first sending module is used to: in response to monitoring a first event triggered by a user modifying a first content of a first key field among the multiple key fields in the first area through a webpage multithreading tool, send a first identifier of the first key field and the modified first content to a second webpage communication tool through a first webpage communication tool;
[0015] A first synchronous modification module is used to return a message including the received first identifier and the modified first content to a pre-specified event handler through the second web page communication tool, so that the event handler determines a first bookmark attribute corresponding to the first identifier among the multiple bookmark attributes, and modifies the second content in the first bookmark attribute in the second area according to the modified first content.
[0016] Based on the same inventive concept, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method described in any one of the above when executing the computer program.
[0017] Based on the same inventive concept, the present disclosure further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to enable a computer to execute any of the above methods.
[0018] According to an embodiment of the present disclosure, when a user modifies the content in the database of a business system on the user interface, the relevant parts of the structured document can be automatically modified synchronously, thereby avoiding time-consuming and tedious manual comparison and modification, making data synchronization more efficient and accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 A flowchart of a key unit synchronization method for a structured document according to an embodiment of the present disclosure;
[0021] Figure 2 A schematic diagram of synchronously modifying the contents of a contract document according to an embodiment of the present disclosure;
[0022] Figure 3 A schematic diagram of maintaining bookmark attributes according to an embodiment of the present disclosure;
[0023] Figure 4 A schematic diagram of the structure of a key unit synchronization device for a structured document according to an embodiment of the present disclosure;
[0024] Figure 5 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0026] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0027] For ease of understanding, the terms used in this disclosure are explained below:
[0028] OpenOffice: OpenOffice is a cross-platform office software suite that can run on Windows, Linux, MacOS X (X11), and Solaris operating systems. It is compatible with all major office software suites.
[0029] Web Workers: Web Workers are JavaScript running in the background. By using Web Workers, a web application can run a script operation in a background thread independent of the main thread. The advantage of this is that time-consuming processing tasks can be performed in independent threads, allowing the main thread (usually the UI thread) not to be blocked / slowed down.
[0030] JavaScript: referred to as "JS", is a lightweight, interpreted or just-in-time compiled programming language with function priority. Although it is famous as a scripting language for developing web pages, it is also used in many non-browser environments. JavaScript is a dynamic scripting language based on prototype programming and multiple paradigms, and supports object-oriented, imperative, declarative, and functional programming paradigms.
[0031] Web: World Wide Web, which is a global, dynamically interactive, cross-platform distributed graphic information system based on hypertext and HTTP. It is a network service built on the Internet. It provides a graphical, easy-to-access and intuitive interface for viewers to find and browse information on the Internet. The documents and hyperlinks organize the information nodes on the Internet into an interconnected network structure.
[0032] HTTP: Hypertext Transfer Protocol is a simple request-response protocol that usually runs on top of TCP. It specifies what messages a client may send to a server and what responses it may get.
[0033] TCP: Transmission Control Protocol is a connection-oriented, reliable, byte stream-based transport layer communication protocol.
[0034] HTML: Hyper Text Markup Language. HTML is a markup language that includes a series of tags. Through these tags, the document format on the Internet can be unified, and scattered Internet resources can be connected into a logical whole. HTML text is a descriptive text composed of HTML commands. HTML commands can describe text, graphics, animations, sounds, tables, links, etc.
[0035] postMessage: PostMessage is a common tool in Windows API (application programming interface) used to put a message into the message queue.
[0036] Onmessage: PostMessage is a tool in Windows API (application programming interface) for receiving messages.
[0037] The embodiments of the present disclosure provide a method for synchronizing key units of a structured document. First, a structured document synchronization page is provided, wherein the first area includes a plurality of forms, and the second area receives uploaded structured documents and converts the structured documents into files in a web page format. The files in the web page format contain a plurality of bookmarks. When the form content in the first area is modified, the first web page communication tool is called to transmit the modified content, and then the modified content is received through the second web page communication tool. After receiving the modified content, the bookmark corresponding to the second area is modified through an event handler. Through the web page communication tool and the event handler, the user can operate on one side and make modifications on the other side at the same time, without downloading documents and repeatedly uploading documents. By sharing online documents, cross-platform document online processing is performed. In business work, the application effect is significant and office efficiency is improved.
[0038] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
[0039] First, one or more embodiments of the present disclosure provide a key unit synchronization method for a structured document. Figure 1 , the method comprises the following steps:
[0040] Step S101: providing a synchronization page including a first area and a second area on a user interface.
[0041] In the embodiment of the present disclosure, a synchronization page is provided on the user interface, including a first area and a second area.
[0042] Step S102, displaying a form including multiple key fields in the first area, wherein the content in each of the key fields is extracted from a database of the business system using an identifier of the structured document and an identifier of the key field. For example, the multiple key fields may include structured key fields used to create the structured document according to the needs of the business system.
[0043] Step S103, in response to detecting a predetermined operation of the user on the user interface, based on a plurality of bookmark attributes maintained in advance according to the plurality of key fields, converting the structured document into a web page format file including the plurality of bookmark attributes through a document parsing engine, and displaying the web page format file in the second area.
[0044] In the present disclosure, Figure 3 As shown, the user can maintain the bookmark attribute in advance according to the key field of the structured document, and the bookmark attribute name is consistent with the key field name of the form in the first area. The second area of the synchronization page can receive the uploaded structured document, convert the structured document into a web page format file including the maintained bookmark attribute through the document parsing engine, store the web page format file in the server, and display the web page format file in the second area.
[0045] The user can maintain the bookmark attributes according to the key fields of the structured document in advance, which can ensure the uniqueness of the bookmark attribute name and the association between the bookmark attribute and the key fields of the form in the first area, providing a basis for document synchronization and ensuring the accuracy of document synchronization. The document conversion is performed using the existing document conversion engine, and a web page format file can be directly generated without manual conversion.
[0046] Specifically, as an optional manner, the document parsing engine may be a cross-platform document parsing engine OpenOffice, and the web page format file includes a hypertext markup language HTML format file.
[0047] After obtaining the structured document through the document parsing engine, it can be converted directly without the user having to consider the specific steps and format of the conversion, saving the user's time and being convenient and quick.
[0048] OpenOffice document parsing engine contains many tools, such as word processing like Word, making simple graphics, powerful chart functions, web page editing, mathematical symbols that are difficult to handle in MS Office, etc. It supports XML, Microsoft doc, Excel, ppt file formats, etc. It has integrated pdf output function.
[0049] Step S104, in response to a first event triggered by a user modifying a first content of a first key field among the multiple key fields in the first area monitored by the web multi-threaded tool, sending a first identifier of the first key field and the modified first content to a second web communication tool through the first web communication tool.
[0050] Specifically, as an optional method, the web page multithreading tool is Web Workers. The first web page communication tool is postMessage, and the second web page communication tool is onmessage. postMessage and onmessage are tools of HTML5, which are used to solve cross-page communication. postMessage is the sender, and onmessage is the receiver.
[0051] In the disclosed embodiment, Web Workers are used to provide a method for scripts on Web front-end web pages to run in a background process. Once it is created, Web Workers can send messages through the postMessage tool, and the other side can use the onmessage tool to receive messages. The Web Workers process can process tasks without affecting the user interface. When a user modifies the key fields in the first area of the synchronization page, Web Workers can directly monitor the user's modifications to certain key fields. For example, when the structured document is a contract document, the key fields are the name of the goods, the amount of the goods, the name of the contract, and the amount of the contract. Then the first identifier of the first key field and the modified content are sent to the onmessage tool through the postMessage tool. Among them, the first identifier is the name of the key field, such as contract_name, contract_price, etc. The onmessage tool receives the message, and after successful reception, the data synchronization operation can be performed. Through the web communication tool, data can be transmitted across regions, and the data of the first region can be sent to the second region, providing a basis for data synchronization.
[0052] Step S105, returning a message including the received first identifier and the modified first content to a pre-specified event handler through the second web page communication tool, so that the event handler determines the first bookmark attribute corresponding to the first identifier among the multiple bookmark attributes, and modifies the second content in the first bookmark attribute in the second area according to the modified first content.
[0053] In the disclosed embodiment, the onmessage tool receives a message of a first identifier and a modified first content, and returns the message to a pre-set event handler. The event handler can determine a second identifier corresponding to the first identifier through the received message, where the second identifier is contract_name, contract_price, etc., find the corresponding first bookmark attribute according to the second identifier, and then modify the corresponding content of the first bookmark attribute according to the received message of the modified content.
[0054] Optionally, the method also includes the following steps: in response to a second event triggered by a user modifying a third content of a second bookmark attribute among the multiple bookmark attributes in the second area monitored by the web multi-threaded tool, sending a second identifier of the second bookmark attribute and the modified third content to the second web communication tool through the first web communication tool; returning a message including the received second identifier and the modified third content to the event handler through the second web communication tool, so that the event handler determines a second key field among the multiple key fields corresponding to the second identifier, and modifies the fourth content in the second key field in the first area according to the modified third content.
[0055] When the user modifies the key fields of the second area of the synchronization page, Web Workers can directly monitor the user's modification of certain key fields, and then send the bookmark attribute name and the modified content of the second key field to the onmessage tool through the postMessage tool. The onmessage tool receives the message, and after successful reception, the onmessage tool receives the message of the second identifier and the modified third content, and returns the message to the pre-set event handler, which can determine the first identifier corresponding to the second identifier through the received message, find the first key field according to the first identifier, and then modify the content of the first key field according to the received message of the modified content.
[0056] The following takes the synchronization of contract document content as an example. Figure 2 The key unit synchronization method of the structured document disclosed in the present invention is described.
[0057] The user modifies the contract name field in the first area of the provided synchronization page to an order contract. Web Workers monitor the modification of the contract name field and send contract_name and the order contract to the onmessage tool through the postMessage tool. The onmessage tool returns the received contract_name and order contract messages to a pre-specified event handler, so that the event handler determines the first bookmark attribute named contract_name and modifies the content of the first bookmark attribute named contract_name in the second area to an order contract.
[0058] You only need to modify the key fields in the first area to automatically synchronize and modify the same key fields in the second area, realizing cross-regional message transmission and synchronization, avoiding time-consuming and tedious manual comparison and modification, and making data synchronization more efficient and accurate.
[0059] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a key unit synchronization device for a structured document.
[0060] refer to Figure 4 , the key unit synchronization device of the structured document may include:
[0061] A page providing module 401 is used to provide a synchronization page including a first area and a second area on a user interface;
[0062] A form display module 402, configured to display a form including a plurality of key fields in the first area, wherein the content in each of the key fields is extracted from a database of a business system using an identifier of the structured document and an identifier of the key field;
[0063] The document conversion and display module 403 is used to: in response to detecting a predetermined operation of the user on the user interface, based on a plurality of bookmark attributes maintained in advance according to the plurality of key fields, convert the structured document into a webpage format file including the plurality of bookmark attributes through a document parsing engine, and display the webpage format file in the second area;
[0064] The first sending module 404 is configured to: in response to monitoring through the webpage multithreading tool a first event triggered by a user modifying a first content of a first key field among the multiple key fields in the first area, send a first identifier of the first key field and the modified first content to a second webpage communication tool through the first webpage communication tool;
[0065] The first synchronization modification module 405 is used to return a message including the received first identifier and the modified first content to a pre-specified event handler through the second web page communication tool, so that the event handler determines the first bookmark attribute corresponding to the first identifier among the multiple bookmark attributes, and modifies the second content in the first bookmark attribute in the second area according to the modified first content.
[0066] Optionally, the key unit synchronization device of the structured document may further include:
[0067] a second sending module, configured to: in response to monitoring by the webpage multithreading tool a second event triggered by a user modifying a third content of a second bookmark attribute among the plurality of bookmark attributes in the second area, send a second identifier of the second bookmark attribute and the modified third content to the second webpage communication tool through the first webpage communication tool;
[0068] The second synchronization modification module is used to return a message including the received second identifier and the modified third content to the event handler through the second web page communication tool, so that the event handler determines the second key field corresponding to the second identifier among the multiple key fields, and modifies the fourth content in the second key field in the first area according to the modified third content.
[0069] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0070] The device of the above embodiment is used to implement the ranking method of the corresponding autonomous domain system in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0071] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the ranking method of the autonomous domain system described in any of the above embodiments is implemented.
[0072] Figure 5The schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown. The electronic device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040 and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030 and the communication interface 1040 are connected to each other in communication within the device through the bus 1050.
[0073] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., to execute relevant programs to implement the embodiments of the present disclosure.
[0074] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the embodiments of the present disclosure are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0075] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0076] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0077] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0078] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present disclosure, and does not necessarily include all the components shown in the figure.
[0079] The electronic device of the above embodiment is used to implement the key unit synchronization method of the structured document corresponding to any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0080] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the key unit synchronization method of the structured document as described in any of the above embodiments.
[0081] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0082] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the key unit synchronization method of the structured document as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0083] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.
[0084] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present disclosure difficult to understand, the known power / ground connections to the integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that the embodiments of the present disclosure can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0085] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0086] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A key unit synchronization method for a structured document, comprising: providing a synchronization page including a first area and a second area on a user interface; Displaying a form including a plurality of key fields in the first area, wherein the content in each of the key fields is extracted from a database of a business system using an identifier of the structured document and an identifier of the key field; In response to detecting a predetermined operation of the user on the user interface, based on a plurality of bookmark attributes maintained in advance according to the plurality of key fields, converting the structured document into a webpage format file including the plurality of bookmark attributes through a document parsing engine, and displaying the webpage format file in the second area; In response to monitoring, through the webpage multithreading tool, a first event triggered by a user modifying a first content of a first key field among the multiple key fields in the first area, sending, through the first webpage communication tool, a first identifier of the first key field and the modified first content to a second webpage communication tool; A message including the received first identifier and the modified first content is returned to a pre-specified event handler through the second web page communication tool, so that the event handler determines the first bookmark attribute corresponding to the first identifier among the multiple bookmark attributes, and modifies the second content in the first bookmark attribute in the second area according to the modified first content.
2. The method according to claim 1, further comprising: In response to monitoring, by the webpage multithreading tool, a second event triggered by a user modifying a third content of a second bookmark attribute among the plurality of bookmark attributes in the second area, sending, by the first webpage communication tool, a second identifier of the second bookmark attribute and the modified third content to the second webpage communication tool; A message including the received second identifier and the modified third content is returned to the event handler through the second web page communication tool, so that the event handler determines the second key field corresponding to the second identifier among the multiple key fields, and modifies the fourth content in the second key field in the first area according to the modified third content.
3. The method according to claim 1 or 2, wherein: The document parsing engine includes a cross-platform document parsing engine OpenOffice, and the web page format file includes a hypertext markup language HTML format file.
4. The method according to claim 1 or 2, wherein: The web page multithreading tool includes Web Workers.
5. The method according to claim 4, wherein: The first web page communication tool includes postMessage, and the second web page communication tool includes onmessage.
6. The method according to claim 1 or 2, wherein: The multiple key fields include structured key fields used to create the structured document according to requirements of the business system.
7. A key unit synchronization device for a structured document, comprising: A page providing module, used for providing a synchronization page including a first area and a second area on a user interface; A form display module, configured to display a form including a plurality of key fields in the first area, wherein the content in each of the key fields is extracted from a database of a business system using an identifier of the structured document and an identifier of the key field; A document conversion and display module, configured to: in response to detecting a predetermined operation of a user on the user interface, based on a plurality of bookmark attributes maintained in advance according to the plurality of key fields, convert the structured document into a web page format file including the plurality of bookmark attributes through a document parsing engine, and display the web page format file in the second area; A first sending module is used to: in response to monitoring a first event triggered by a user modifying a first content of a first key field among the multiple key fields in the first area through a webpage multithreading tool, send a first identifier of the first key field and the modified first content to a second webpage communication tool through a first webpage communication tool; A first synchronous modification module is used to return a message including the received first identifier and the modified first content to a pre-specified event handler through the second web page communication tool, so that the event handler determines a first bookmark attribute corresponding to the first identifier among the multiple bookmark attributes, and modifies the second content in the first bookmark attribute in the second area according to the modified first content.
8. The apparatus according to claim 7, further comprising: a second sending module, configured to: in response to monitoring by the webpage multithreading tool a second event triggered by a user modifying a third content of a second bookmark attribute among the plurality of bookmark attributes in the second area, send a second identifier of the second bookmark attribute and the modified third content to the second webpage communication tool through the first webpage communication tool; The second synchronization modification module is used to return a message including the received second identifier and the modified third content to the event handler through the second web page communication tool, so that the event handler determines the second key field corresponding to the second identifier among the multiple key fields, and modifies the fourth content in the second key field in the first area according to the modified third content.
9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method according to any one of claims 1 to 6 when executing the computer program. 10 . A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method according to claim 1 .
Citation Information
Patent Citations
A method and apparatus for full-text retrieval of document databases
CN102262640A
Data synchronization method and device, equipment and medium
CN110837535A