CN111027289B - Online document saving method and related device - Google Patents

Online document saving method and related device Download PDF

Info

Publication number
CN111027289B
CN111027289B CN201911134559.2A CN201911134559A CN111027289B CN 111027289 B CN111027289 B CN 111027289B CN 201911134559 A CN201911134559 A CN 201911134559A CN 111027289 B CN111027289 B CN 111027289B
Authority
CN
China
Prior art keywords
document
document editing
parameter information
server
saving
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.)
Active
Application number
CN201911134559.2A
Other languages
Chinese (zh)
Other versions
CN111027289A (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.)
CVIC Software Engineering Co Ltd
Original Assignee
CVIC Software Engineering 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 CVIC Software Engineering Co Ltd filed Critical CVIC Software Engineering Co Ltd
Priority to CN201911134559.2A priority Critical patent/CN111027289B/en
Publication of CN111027289A publication Critical patent/CN111027289A/en
Application granted granted Critical
Publication of CN111027289B publication Critical patent/CN111027289B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The application discloses an online document preservation method, which comprises the following steps: the client acquires document parameter information of a document editing page from the server; writing the document parameter information into document editing data of the document editing page; when the document editing data of the document editing page is saved, the document editing data is sent to the server, so that the server can execute saving operation on the document editing data according to the document parameter information in the document editing data. Through directly acquiring the document parameter information and then writing the document parameter information into the document editing data, and finally sending the document parameter information to a server instead of transmitting the document parameter information through session, the problem of information disorder is avoided, and the reliability of online editing is improved. The application also discloses an online document storage device, a server and a computer readable storage medium, which have the beneficial effects.

Description

Online document saving method and related device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an online document saving method, an online document saving device, a server, and a computer readable storage medium.
Background
With the continuous development of the internet, online technology goes deep into various industries. The method comprises the step of performing document editing operation through an online editor of a network. The online document editing means that a user is not limited by regions, can log in a document system through a network, and performs related operations on the document. The document can be edited in real time as long as the network exists.
In the prior art, if an online editor is adopted to carry out document editing operation, document saving operation is not avoided. Specifically, the existing online document editor generally keeps the state of a saved document through session in a webpage technology, and finally obtains a saved path and a file name through session for saving. The session is a method for maintaining a Web server in a state. session allows any object to be maintained throughout the user session by storing the object in the memory of the Web server. However, since the document editing technology is subject to a browser, when a plurality of documents are processed at the same time, sessions between different documents may affect each other. That is, the session in the later opened document page may overlap the session in the earlier opened document page, and when saving the earlier opened document, the wrong information is used for saving, resulting in serious document saving problems.
Therefore, how to improve the problem of avoiding the occurrence of the disorder of the stored information is an important problem for those skilled in the art.
Disclosure of Invention
The purpose of the application is to provide an online document saving method, an online document saving device, a server and a computer readable storage medium, wherein document parameter information is directly obtained and then written into document editing data, and finally the document parameter information is sent to the server instead of transmission through session, so that the problem of information disorder is avoided, and the reliability of online editing is improved.
In order to solve the above technical problems, the present application provides an online document saving method, including:
the client acquires document parameter information of a document editing page from the server;
writing the document parameter information into document editing data of the document editing page;
when the document editing data of the document editing page is saved, the document editing data is sent to the server, so that the server can execute saving operation on the document editing data according to the document parameter information in the document editing data.
Optionally, the client obtains the document parameter information of the document editing page from the server, including:
the client acquires the document parameter information of the document editing page from the server through a request method.
Optionally, writing the document parameter information into the document editing data of the document editing page includes:
saving the value of the document parameter information to the document editing page;
the values of the document parameter information are assigned to hidden fields of forms of the document editing data in the document editing page.
Optionally, when saving the document editing data of the document editing page, sending the document editing data to the server, so that the server performs a saving operation on the document editing data according to the document parameter information in the document editing data, including:
when the document editing data of the document editing page is saved, the document editing data is sent to the server;
the server acquires the document parameter information from the form of the document editing data;
and executing a saving operation on the document editing data according to the document parameter information.
The application also provides an online document saving device, comprising:
the parameter acquisition module is used for acquiring document parameter information of the document editing page from the server;
the parameter storage module is used for writing the document parameter information into document editing data of the document editing page;
and the document saving module is used for sending the document editing data to the server when saving the document editing data of the document editing page so that the server can execute saving operation on the document editing data according to the document parameter information in the document editing data.
Optionally, the parameter obtaining module is specifically configured to obtain, from the server, the document parameter information of the document editing page by using a request method.
Optionally, the parameter storage module includes:
a parameter assignment unit, configured to save a value of the document parameter information to the document editing page;
and a form assignment unit configured to assign, in the document editing page, the value of the document parameter information to a hidden field of a form of the document editing data.
Optionally, the document saving module includes:
a data transmitting unit configured to transmit the document editing data to the server when saving the document editing data of the document editing page;
a form obtaining unit, configured to obtain, by the server, the document parameter information from a form of the document editing data;
and the document saving unit is used for executing saving operation on the document editing data according to the document parameter information.
The application also provides a server comprising:
a memory for storing a computer program;
a processor for implementing the steps of the online document saving method as described above when executing the computer program.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the online document saving method as described above.
The online document saving method provided by the application comprises the following steps: the client acquires document parameter information of a document editing page from the server; writing the document parameter information into document editing data of the document editing page; when the document editing data of the document editing page is saved, the document editing data is sent to the server, so that the server can execute saving operation on the document editing data according to the document parameter information in the document editing data.
By acquiring the document parameter information of the document editing page from the server and writing the document parameter information into the document editing data of the document editing page, the document parameter information can be simultaneously submitted to the server when the document editing data is submitted, namely, the document editing data is sent to the server when the document editing data is saved, at the moment, the server acquires the document editing data for editing the document and the document parameter information for saving the document at the same time, and can execute saving operation on the document editing data according to the document parameter information instead of acquiring the document parameter information from the session, thereby avoiding the problem of session disorder caused by multiple-opening of the document and ensuring the data reliability of an online document system.
The application further provides an online document storage device, a server and a computer readable storage medium, which have the above advantages and are not described herein.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
FIG. 1 is a flowchart of an online document saving method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an online document saving device according to an embodiment of the present application.
Detailed Description
The core of the application is to provide an online document saving method, an online document saving device, a server and a computer readable storage medium, wherein document parameter information is directly obtained and then written into document editing data, and finally the document parameter information is sent to the server instead of transmission through session, so that the problem of information disorder is avoided, and the reliability of online editing is improved.
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
In the prior art, if an online editor is adopted to carry out document editing operation, document saving operation is not avoided. Specifically, the existing online document editor generally keeps the state of a saved document through session in a webpage technology, and finally obtains a saved path and a file name through session for saving. The session is a method for maintaining a Web server in a state. session allows any object to be maintained throughout the user session by storing the object in the memory of the Web server. However, since the document editing technology is subject to a browser, when a plurality of documents are processed at the same time, sessions between different documents may affect each other. That is, the session in the later opened document page may overlap the session in the earlier opened document page, and when saving the earlier opened document, the wrong information is used for saving, resulting in serious document saving problems.
Therefore, the application provides an online document saving method, by acquiring the document parameter information of the document editing page from the server, and writing the document parameter information into the document editing data of the document editing page, so that the document parameter information can be simultaneously submitted to the server when the document editing data is submitted, namely, the document editing data is sent to the server when the document editing data is saved, at the moment, the server acquires the document editing data for editing the document and the document parameter information for saving the document at the same time, and can execute saving operation on the document editing data according to the document parameter information instead of acquiring the document parameter information from the session, thereby avoiding the problem of session disorder caused by multiple-opening of the document, and ensuring the data reliability of an online document system.
Referring to fig. 1, fig. 1 is a flowchart of an online document saving method according to an embodiment of the present application.
In this embodiment, the method may include:
s101, a client acquires document parameter information of a document editing page from a server;
the step aims at the client side to acquire the document parameter information of the document being edited in the document editing page from the server. The document parameter information is mainly used for storing documents, including but not limited to a file name, a document identifier, a current post identifier and a flow context ID.
In the prior art, the document parameter information is generally saved in the session of the page, when the save operation is clicked, the parameters are obtained from the session, and finally the document editing data in the document editing page is saved according to the parameters. However, in the prior art, when a plurality of document editing pages are opened, the parameter values in the session are covered by the document parameters which are opened later, so that whether the parameters acquired during clicking and saving are correct document parameters cannot be determined, further, the data saving is failed, and the reliability of online document editing is affected.
Therefore, in order to avoid acquiring the document parameter information from the session, the present embodiment acquires the document parameter information of the document editing page directly from the server in this step. Rather than saving the document parameter information to the session.
The method for obtaining the document parameter information from the server can be that the document parameter information is directly requested to the server through a request method, and then the server returns the document parameter information according to the request.
Thus, optionally, the step may further comprise:
the client acquires the document parameter information of the document editing page from the server through a request method.
In addition, any information acquisition method provided in the prior art may be adopted in this step to acquire the document parameter information from the server, which is not particularly limited herein.
In addition, the time for acquiring the document parameter information in this step may be that the document parameter information is acquired directly when the document editing page is opened, or the document parameter information is acquired within a preset time in the process of document editing. Further, in order to cope with the document parameter information updated constantly, it may be set to acquire the document parameter information once at preset time intervals.
S102, writing the document parameter information into document editing data of a document editing page;
on the basis of S101, this step aims at writing the document parameter information into the document editing data of the document editing page. The document editing data is data which is transmitted to a server when the document is stored, and comprises document content and data for modifying the document. It can be seen that whatever way of saving is performed, document editing data needs to be sent to the server when saving the document. Therefore, the document parameter information is written into the document editing data in the step, so that the document parameter information can be directly sent to the server when the document is stored, and the server is prevented from acquiring the document parameter information from the session. The reliability in storage is ensured.
The method for writing the document parameter information into the document editing data may be writing the document parameter information into a form, or directly assigning the document parameter information to a request method, or any method for transmitting data to a server provided in the prior art may be adopted, which is not limited herein.
In addition, this step may be performed when a document is saved, may be performed during editing of the document, or may be performed when document parameter information changes.
Optionally, the step may include:
step 1, saving the value of the document parameter information into a document editing page;
step 2, assigning the value of the document parameter information to the hidden field of the form of the document editing data in the document editing page.
In the alternative scheme, the document parameter information is mainly written into the hidden field of the form of the document editing data, and when the data is sent to the server, the data in the form is directly sent. Wherein the hidden field is invisible to the user in the page, and the purpose of inserting the hidden field in the form is to collect or send information to facilitate use by the program handling the form. When the browser clicks the send button to send the form, the information of the hidden field is also sent to the server together.
S103, when the document editing data of the document editing page is saved, the document editing data is sent to the server, so that the server performs saving operation on the document editing data according to the document parameter information in the document editing data.
On the basis of S102, this step aims at transmitting document editing data to the server. Obviously, the document editing data transmitted at this time includes the content of the document editing data and the document parameter information. Then, when the server receives the document editing data, the server can directly acquire the document parameter information, and further perform a save operation according to the document parameter information, instead of acquiring the document parameter information from the session.
Specifically, the step may include:
step 1, when document editing data of a document editing page is saved, the document editing data is sent to a server;
step 2, the server acquires document parameter information from a form of the document editing data;
and step 3, executing a saving operation on the document editing data according to the document parameter information.
In summary, in this embodiment, by acquiring the document parameter information of the document editing page from the server, and writing the document parameter information into the document editing data of the document editing page, the document parameter information can be simultaneously submitted to the server when the document editing data is submitted, that is, when the document editing data is saved, the document editing data is sent to the server, at this time, the server acquires the document editing data for editing the document and the document parameter information for saving the document, and then the saving operation can be performed on the document editing data according to the document parameter information instead of acquiring the document parameter information from the session, thereby avoiding the problem of session disorder caused by multiple documents and ensuring the data reliability of the online document system.
An online document saving method provided in the present application is further described by the following another embodiment.
In this embodiment, the method may include:
when a document editing page is opened, acquiring storage parameter information of the document page from a server;
saving the saved parameter information into the memory of the local browser, namely saving the saved parameter information into the JSP;
when the document page is saved, saving the saving parameter information in a list of the document editing page, and submitting the document page to a server so that the server can save the document page according to the saving parameter information in the document page.
For example, when the embodiment is specifically applied to an actual page operation, the method may include:
and step 1, a request-based method is added in an Action, and when the Action jumps to an online editing page of an office document, a request transfer parameter is used.
Code example:
and 2, acquiring a value in the request in the contract online editing page and storing the value in the page.
Code example:
and step 3, placing the saved value into a hidden field in the form, and submitting the hidden field in the form together when clicking the saved value in the office document editor.
Code example:
and step 4, jumping to an onlineav.jsp for storing operation after submitting, and modifying the method for acquiring the parameters into the method for acquiring the parameters by using the getFormField method of FileSaver.
The parameter of the getFormField () method is the name attribute value of the hidden field in the Form in which the pageOfficeTrl tag is located.
Code example:
it can be seen that, in this embodiment, by acquiring the document parameter information of the document editing page from the server, and writing the document parameter information into the document editing data of the document editing page, the document parameter information can be simultaneously submitted to the server when submitting the document editing data, that is, when saving the document editing data, the document editing data is sent to the server, at this time, the server acquires the document editing data for editing the document and the document parameter information for saving the document, so that the saving operation can be performed on the document editing data according to the document parameter information instead of acquiring the document parameter information from the session, thereby avoiding the problem of session disorder caused by multiple documents and ensuring the data reliability of the online document system.
An online document saving apparatus provided in an embodiment of the present application is described below, and an online document saving apparatus described below and an online document saving method described above may be referred to correspondingly.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an online document saving device according to an embodiment of the present application.
In this embodiment, the apparatus may include:
a parameter obtaining module 100, configured to obtain document parameter information of a document editing page from a server;
a parameter saving module 200, configured to write the document parameter information into the document editing data of the document editing page;
the document saving module 300 is used for sending the document editing data to the server when saving the document editing data of the document editing page, so that the server can execute saving operation on the document editing data according to the document parameter information in the document editing data.
Optionally, the parameter obtaining module 100 is specifically configured to obtain, by a request method, document parameter information of a document editing page from a server.
Optionally, the parameter storage module 200 may include:
the parameter assignment unit is used for saving the value of the document parameter information into the document editing page;
and a form assignment unit for assigning the value of the document parameter information to the hidden field of the form of the document editing data in the document editing page.
Optionally, the document saving module 300 may include:
a data transmitting unit for transmitting the document editing data to the server when saving the document editing data of the document editing page;
a form acquisition unit for the server to acquire the document parameter information from the form of the document editing data;
and the document saving unit is used for executing saving operation on the document editing data according to the document parameter information.
The embodiment of the application also provides a server, which comprises:
a memory for storing a computer program;
a processor for implementing the steps of the online document saving method as described in the above embodiments when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the online document saving method as described in the above embodiments.
The computer readable storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above describes in detail an online document saving method, an online document saving apparatus, a server, and a computer-readable storage medium provided by the present application. Specific examples are set forth herein to illustrate the principles and embodiments of the present application, and the description of the examples above is only intended to assist in understanding the methods of the present application and their core ideas. It should be noted that it would be obvious to those skilled in the art that various improvements and modifications can be made to the present application without departing from the principles of the present application, and such improvements and modifications fall within the scope of the claims of the present application.

Claims (8)

1. An online document saving method, comprising:
the client acquires document parameter information of a document editing page from the server;
writing the document parameter information into document editing data of the document editing page;
when saving the document editing data of the document editing page, transmitting the document editing data to the server so that the server can execute saving operation on the document editing data according to the document parameter information in the document editing data;
writing the document parameter information into the document editing data of the document editing page comprises the following steps:
saving the value of the document parameter information to the document editing page;
the values of the document parameter information are assigned to hidden fields of forms of the document editing data in the document editing page.
2. The online document saving method of claim 1, wherein the client obtains document parameter information of the document editing page from the server, comprising:
the client acquires the document parameter information of the document editing page from the server through a request method.
3. The online document saving method according to claim 1, wherein when saving document editing data of the document editing page, transmitting the document editing data to the server so that the server performs a saving operation on the document editing data according to document parameter information in the document editing data, comprising:
when the document editing data of the document editing page is saved, the document editing data is sent to the server;
the server acquires the document parameter information from the form of the document editing data;
and executing a saving operation on the document editing data according to the document parameter information.
4. An online document saving apparatus, comprising:
the parameter acquisition module is used for acquiring document parameter information of the document editing page from the server;
the parameter storage module is used for writing the document parameter information into document editing data of the document editing page;
a document saving module, configured to send, when saving document editing data of the document editing page, the document editing data to the server, so that the server performs a saving operation on the document editing data according to document parameter information in the document editing data;
wherein, the parameter saving module comprises:
a parameter assignment unit, configured to save a value of the document parameter information to the document editing page;
and a form assignment unit configured to assign, in the document editing page, the value of the document parameter information to a hidden field of a form of the document editing data.
5. The online document saving apparatus according to claim 4, wherein the parameter acquiring module is specifically configured to acquire the document parameter information of the document editing page from the server by a request method.
6. The online document saving apparatus according to claim 4, wherein the document saving module comprises:
a data transmitting unit configured to transmit the document editing data to the server when saving the document editing data of the document editing page;
a form obtaining unit, configured to obtain, by the server, the document parameter information from a form of the document editing data;
and the document saving unit is used for executing saving operation on the document editing data according to the document parameter information.
7. A server, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the online document saving method according to any one of claims 1 to 3 when executing the computer program.
8. A computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the online document saving method according to any one of claims 1 to 3.
CN201911134559.2A 2019-11-19 2019-11-19 Online document saving method and related device Active CN111027289B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911134559.2A CN111027289B (en) 2019-11-19 2019-11-19 Online document saving method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911134559.2A CN111027289B (en) 2019-11-19 2019-11-19 Online document saving method and related device

Publications (2)

Publication Number Publication Date
CN111027289A CN111027289A (en) 2020-04-17
CN111027289B true CN111027289B (en) 2024-03-01

Family

ID=70200619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911134559.2A Active CN111027289B (en) 2019-11-19 2019-11-19 Online document saving method and related device

Country Status (1)

Country Link
CN (1) CN111027289B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601627A (en) * 2013-11-01 2015-05-06 北大方正集团有限公司 Server, terminal, and file online processing method and system
CN110196971A (en) * 2019-04-23 2019-09-03 平安科技(深圳)有限公司 Online document edit methods, device, terminal device and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601627A (en) * 2013-11-01 2015-05-06 北大方正集团有限公司 Server, terminal, and file online processing method and system
CN110196971A (en) * 2019-04-23 2019-09-03 平安科技(深圳)有限公司 Online document edit methods, device, terminal device and storage medium

Also Published As

Publication number Publication date
CN111027289A (en) 2020-04-17

Similar Documents

Publication Publication Date Title
CN100591078C (en) A website buffering method and device
US10887201B2 (en) Method for automatically monitoring end-to-end end user performance and apparatus for performing the method
US8219687B2 (en) Implementing browser based hypertext transfer protocol session storage
US7657591B2 (en) Dispatching client requests to appropriate server-side methods
ES2483792T3 (en) Method and system to perform an early search for specific HTTP requests for a web application user
EP3251323B1 (en) Authentication mechanism for domain redirection of a representational state transfer (rest)-compliant client
JP2010128877A (en) Web system and method of collecting processing record
CN104426862A (en) Method, system, and browser realizing cross-domain request login
CN107508720A (en) A kind of automated testing method and device
CN105072123A (en) Single sign on log-out method and system under cluster environment
US10733044B2 (en) Use of cache for content validation and error remediation
CN112800309A (en) Crawler system based on HTTP proxy and implementation method thereof
CN106034141B (en) Message treatment method, resource acquiring method, server and terminal device
CN1249608C (en) System and method of mediating web page
CN110943876B (en) URL state detection method, device, equipment and system
CN104253835B (en) User behavior data acquisition method and its system
CN111027289B (en) Online document saving method and related device
CN105227514A (en) Based on document transmission processing method and the browser of browser
CN105450771A (en) Information push and information push optimization methods, servers and systems
CN103580951B (en) Output comparative approach, test migration householder method and the system of multiple information systems
CN105306602A (en) Processing method, processing device and server for hypertext transfer protocol request
CN107404515A (en) The processing method and processing device of asynchronous http request
CN102918527B (en) Investigation method and system for web application hosting
CN107483294B (en) Method and device for monitoring network request
CN103034711A (en) Form recognition method and device

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