CN111027289A - Online document storage method and related device - Google Patents

Online document storage method and related device Download PDF

Info

Publication number
CN111027289A
CN111027289A CN201911134559.2A CN201911134559A CN111027289A CN 111027289 A CN111027289 A CN 111027289A CN 201911134559 A CN201911134559 A CN 201911134559A CN 111027289 A CN111027289 A CN 111027289A
Authority
CN
China
Prior art keywords
document
document editing
parameter information
server
editing data
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
CN201911134559.2A
Other languages
Chinese (zh)
Other versions
CN111027289B (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

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The application discloses an online document storage method, which comprises the following steps: the method comprises the steps that a client side obtains document parameter information of a document editing page from a server; writing the document parameter information into document editing data of the document editing page; and when the document editing data of the document editing page is stored, sending the document editing data to the server so that the server can store the document editing data according to the document parameter information in the document editing data. By directly acquiring the document parameter information, writing the document parameter information into the document editing data and finally sending the document editing data to the server instead of transmitting the document parameter information through session, the problem of information confusion 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 storage method and related device
Technical Field
The present application relates to the field of computer technologies, and in particular, to an online document saving method, an online document saving apparatus, a server, and a computer-readable storage medium.
Background
With the continuous development of the internet, online technologies go deep into various industries. Including performing document editing operations through online editors over 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 method realizes that the document can be edited in real time as long as a network exists.
In the prior art, if an online editor is adopted for document editing operation, document saving operation cannot be avoided. Specifically, the existing online document editor generally maintains the state of the saved document through a session in a web technology, and finally obtains a saving path and a file name through the session to save the saved document. Wherein session is a method for a Web server to maintain 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 the browser, sessions between different documents may affect each other when a plurality of documents are processed simultaneously. That is, a session in a later opened document page may cover a session in an earlier opened document page, and when an earlier opened document is saved, the wrong information is used for saving, which results in a serious document saving problem.
Therefore, how to improve the problem of avoiding the confusion of the saved information is a key issue of attention of those skilled in the art.
Disclosure of Invention
The application aims to provide an online document storage method, an online document storage 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 editing data is sent to the server instead of being transmitted through session, so that the problem of information confusion is avoided, and the reliability of online editing is improved.
In order to solve the above technical problem, the present application provides an online document storage method, including:
the method comprises the steps that a client side obtains document parameter information of a document editing page from a server;
writing the document parameter information into document editing data of the document editing page;
and when the document editing data of the document editing page is stored, sending the document editing data to the server so that the server can store the document editing data according to the document parameter information in the document editing data.
Optionally, the obtaining, by the client, the document parameter information of the document editing page from the server includes:
and the client acquires the document parameter information of the document editing page from the server by a request method.
Optionally, writing the document parameter information into the document editing data of the document editing page, including:
saving the value of the document parameter information to the document editing page;
assigning a value of the document parameter information to a hidden field of a form 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 stored, sending the document editing data to the server;
the server acquires the document parameter information from the form of the document editing data;
and executing storage operation on the document editing data according to the document parameter information.
The present application further provides an online document storage device, including:
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 the document editing data of the document editing page;
and the document storage module is used for sending the document editing data to the server when the document editing data of the document editing page is stored, so that the server can execute storage 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 the document parameter information of the document editing page from the server by a request method.
Optionally, the parameter saving module includes:
the parameter assignment unit is used for storing the value of the document parameter information into the document editing page;
and the form assignment unit is used for assigning the value of the document parameter information to a hidden field of a form of the document editing data in the document editing page.
Optionally, the document saving module includes:
a data transmission unit configured to transmit document editing data of the document editing page to the server when the document editing data is saved;
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 storage unit is used for executing storage operation on the document editing data according to the document parameter information.
The present application further 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 application provides an online document storage method, which comprises the following steps: the method comprises the steps that a client side obtains document parameter information of a document editing page from a server; writing the document parameter information into document editing data of the document editing page; and when the document editing data of the document editing page is stored, sending the document editing data to the server so that the server can store the document editing data according to the document parameter information in the document editing data.
The document parameter information of the document editing page is acquired from the server, and then the document parameter information is written 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 stored, at the moment, the server simultaneously acquires the document editing data for editing the document and the document parameter information for storing the document, so that the storage operation can be executed on the document editing data according to the document parameter information instead of acquiring the document parameter information from the session, the problem of session disorder caused by multiple documents is further avoided, and the data reliability of an online document system is ensured.
The present application further provides an online document storage device, a server, and a computer-readable storage medium, which have the above beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of an online document saving method provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of an online document storage device according to an embodiment of the present application.
Detailed Description
The core of the application is to provide an online document storage method, an online document storage 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 editing data is sent to the server instead of being transmitted through session, so that the problem of information confusion is avoided, and the reliability of online editing is improved.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in 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 obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the prior art, if an online editor is adopted for document editing operation, document saving operation cannot be avoided. Specifically, the existing online document editor generally performs state maintenance on the saved document through session in the web technology, and finally obtains and saves the path and the file name through the session. Wherein session is a method for a Web server to maintain 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 the browser, sessions between different documents may affect each other when a plurality of documents are processed simultaneously. That is, a session in a later opened document page may cover a session in an earlier opened document page, and when an earlier opened document is saved, the wrong information is used for saving, which results in a serious document saving problem.
Therefore, the application provides an online document storage method, which obtains the document parameter information of the document editing page from a server, and then writes the document parameter information into the document editing data of the document editing page, so that the document parameter information can be submitted to the server at the same time when the document editing data is submitted, that is, the document editing data is sent to the server when the document editing data is stored, at the moment, the server simultaneously obtains the document editing data for editing the document and the document parameter information for storing the document, and can execute storage operation on the document editing data according to the document parameter information instead of obtaining the document parameter information from the session, thereby avoiding the problem of session disorder caused by multiple documents 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 method comprises the steps that a client acquires document parameter information of a document being edited in a document editing page from a server. The document parameter information is mainly used for saving documents, and includes, but is not limited to, "file name", "document identification", "current position identification", and "process context ID".
In the prior art, the document parameter information is generally stored in a session of a page, when a storage operation is clicked, the parameters are obtained from the session, and finally, document editing data in the document editing page is stored according to the parameters. However, in the prior art, when a plurality of document editing pages are opened, parameter values in the session are covered by subsequently opened document parameters, so that the parameters acquired during click saving cannot determine whether the parameters are correct document parameters, and further, data saving fails, and 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 may be directly requesting the document parameter information from the server by a request method, and then the server returns the document parameter information according to the request.
Therefore, optionally, this step may further include:
and the client acquires the document parameter information of the document editing page from the server by a request method.
In addition, this step may also adopt any information obtaining method provided in the prior art to obtain the document parameter information from the server, which is not specifically limited herein.
In addition, the time for acquiring the document parameter information in this step may be directly acquiring the document parameter information when the document editing page is opened, or may be acquiring the document parameter information within a preset time in the document editing process. Further, in order to cope with the document parameter information which is updated constantly, the document parameter information may be set to be acquired once every preset time interval.
S102, writing the document parameter information into the document editing data of the document editing page;
on the basis of S101, the present step is intended to write the document parameter information in the document editing data of the document editing page. The document editing data is data sent to the server when the document is saved, and includes document content and data for modifying the document. It can be seen that no matter what way of saving is performed, the document editing data needs to be sent to the server when saving the document. Therefore, in the step, the document parameter information is written into the document editing data, so that the document parameter information can be directly sent to the server when the document is saved, 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, directly assigning a value to the request method, or sending data to the server by any method provided in the prior art, which is not limited herein.
In addition, the step can be executed when the document is saved, or can be executed in the process of editing the document, or can be executed when the parameter information of the document changes.
Optionally, this step may include:
step 1, saving the value of the document parameter information into a document editing page;
and step 2, assigning the value of the document parameter information to a hidden field of a form of the document editing data in the document editing page.
Therefore, 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. The hidden field is invisible to a user in a page, and the hidden field is inserted into the form to collect or send information so as to be used by a program for processing 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 saving the document editing data of the document editing page, sending the document editing data to the server so that the server executes 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 is intended to transmit 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 document parameter information can be directly obtained, and then the saving operation is executed according to the document parameter information, instead of obtaining the document parameter information from the session.
Specifically, the step may include:
step 1, when saving the document editing data of the document editing page, sending the document editing data to a server;
step 2, the server acquires document parameter information from a form of the document editing data;
and 3, performing storage operation on the document editing data according to the document parameter information.
In summary, in the embodiment, the document parameter information of the document editing page is acquired from the server, and then the document parameter information is written 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, that is, the document editing data is sent to the server when the document editing data is saved, at this time, the server simultaneously acquires the document editing data for editing the document and the document parameter information for saving the document, and can perform a 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 a problem of session disorder caused by multiple documents, and ensuring data reliability of an online document system.
An online document saving method provided by the present application is further described by another embodiment below.
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 a memory of the local browser, namely saving the saved parameter information into JSP;
when the document page is stored, the storage parameter information is stored in a list of the document editing page, and the document page is submitted to the server, so that the server can store the document page according to the storage parameter information in the document page.
For example, when the embodiment is applied to an actual page operation, the method may include:
step 1, adding a request, setAttribute (' XXX ', ') method in the Action, and using the request to transfer parameters when the Action jumps to an on-line editing page of the office document.
Code example:
Figure BDA0002279232230000081
and 2, acquiring the value in the request on the contract online editing page and storing the value in the page.
Code example:
Figure BDA0002279232230000082
and 3, putting the saved values into the hidden fields in the form, and submitting the hidden fields in the form together when clicking and saving in the office document editor.
Code example:
Figure BDA0002279232230000083
Figure BDA0002279232230000091
and 4, jumping to onlineSeve after submission to store, and modifying the parameter acquisition method into the getFormField acquisition method of FileSaver.
The parameter of the getFormField () method is po, the name attribute value of the hidden field in the Form where the pageOfficeCtrl tag is located.
Code example:
Figure BDA0002279232230000092
it can be seen that, in the embodiment, the document parameter information of the document editing page is acquired from the server, and then the document parameter information is written 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, that is, when the document editing data is stored, the document editing data is sent to the server, at this time, the server simultaneously acquires the document editing data for editing the document and the document parameter information for storing the document, and can perform a storage 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 documents, and ensuring the data reliability of the online document system.
In the following, an online document saving device provided by an embodiment of the present application is introduced, and an online document saving device described below and an online document saving method described above may be referred to in correspondence.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an online document storage device according to an embodiment of the present disclosure.
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;
the parameter saving module 200 is configured to write the document parameter information into the document editing data of the document editing page;
the document saving module 300 is configured to, when saving the document editing data of the document editing page, send 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.
Optionally, the parameter obtaining module 100 is specifically configured to obtain the document parameter information of the document editing page from the server by a request method.
Optionally, the parameter saving module 200 may include:
the parameter assignment unit is used for storing the value of the document parameter information into a document editing page;
and the form assignment unit is used 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 transmission unit configured to transmit document editing data to a server when the document editing data of the document editing page is saved;
the form acquiring unit is used for acquiring document parameter information from a form of the document editing data by the server;
and the document saving unit is used for performing saving operation on the document editing data according to the document parameter information.
An embodiment of the present application further provides a server, including:
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 embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the online document saving method according to the above embodiment are implemented.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
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 components and steps have been described above generally in terms of their functionality in order to clearly illustrate this 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 implementation. 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. A software module may reside 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 detailed description is provided for an online document storage method, an online document storage apparatus, a server, and a computer-readable storage medium provided by the present application. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. An online document saving method, comprising:
the method comprises the steps that a client side obtains document parameter information of a document editing page from a server;
writing the document parameter information into document editing data of the document editing page;
and when the document editing data of the document editing page is stored, sending the document editing data to the server so that the server can store the document editing data according to the document parameter information in the document editing data.
2. The online document saving method according to claim 1, wherein the step of acquiring the document parameter information of the document editing page from the server by the client comprises:
and the client acquires the document parameter information of the document editing page from the server by a request method.
3. The online document saving method according to claim 1, wherein 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;
assigning a value of the document parameter information to a hidden field of a form of the document editing data in the document editing page.
4. The online document saving method according to claim 1, wherein when saving 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 document parameter information in the document editing data, comprises:
when the document editing data of the document editing page is stored, sending the document editing data to the server;
the server acquires the document parameter information from the form of the document editing data;
and executing storage operation on the document editing data according to the document parameter information.
5. 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 the document editing data of the document editing page;
and the document storage module is used for sending the document editing data to the server when the document editing data of the document editing page is stored, so that the server can execute storage operation on the document editing data according to the document parameter information in the document editing data.
6. The online document storage device according to claim 5, wherein the parameter obtaining module is specifically configured to obtain the document parameter information of the document editing page from the server by a request method.
7. The online document saving device according to claim 5, wherein the parameter saving module comprises:
the parameter assignment unit is used for storing the value of the document parameter information into the document editing page;
and the form assignment unit is used for assigning the value of the document parameter information to a hidden field of a form of the document editing data in the document editing page.
8. The online document saving device according to claim 5, wherein the document saving module comprises:
a data transmission unit configured to transmit document editing data of the document editing page to the server when the document editing data is saved;
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 storage unit is used for executing storage operation on the document editing data according to the document parameter information.
9. A server, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the online document saving method as claimed in any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the online document saving method according to any one of claims 1 to 4.
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 true CN111027289A (en) 2020-04-17
CN111027289B 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
CN111027289B (en) 2024-03-01

Similar Documents

Publication Publication Date Title
US20200036799A1 (en) System and method for main page identification in web decoding
US10887201B2 (en) Method for automatically monitoring end-to-end end user performance and apparatus for performing the method
CN110198328B (en) Client identification method and device, computer equipment and storage medium
US10673912B2 (en) Join feature restoration to online meeting
US7881304B2 (en) Using distributed aspects to reorder online application workflows
JP2010128877A (en) Web system and method of collecting processing record
US8103607B2 (en) System comprising a proxy server including a rules engine, a remote application server, and an aspect server for executing aspect services remotely
CN112597356B (en) Model training method, personalized data recommendation method, device and electronic equipment
US11250080B2 (en) Method, apparatus, storage medium and electronic device for establishing question and answer system
CN1126040C (en) Tool for selecting and printing network page
CN103684823A (en) Weblog recording method, network access path determining method and related devices
JPWO2014156825A1 (en) Log output control device, method and program
CN114095575A (en) Data processing method and device
CN112804317A (en) Method and device for uploading pictures of mobile terminal
CN111027289A (en) Online document storage method and related device
US10735357B1 (en) Cross-platform messaging system
CN110704777A (en) Method and system for implementing gray scale publishing
CN107483294B (en) Method and device for monitoring network request
US8180854B2 (en) Aspect services
CN114491210A (en) Data acquisition method and device based on web crawler
CN104679786B (en) Form processing method and device
CN112667933A (en) Data processing method and device, electronic equipment and computer storage medium
CN112306967A (en) File uploading method and device and computer readable storage medium
CN106570044B (en) Method and device for analyzing webpage codes
CN104063488A (en) Semi-automatic learning type form feature extraction 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