CN109558575B - Online form editing method, online form editing device, computer equipment and storage medium - Google Patents

Online form editing method, online form editing device, computer equipment and storage medium Download PDF

Info

Publication number
CN109558575B
CN109558575B CN201811250255.8A CN201811250255A CN109558575B CN 109558575 B CN109558575 B CN 109558575B CN 201811250255 A CN201811250255 A CN 201811250255A CN 109558575 B CN109558575 B CN 109558575B
Authority
CN
China
Prior art keywords
data
user
form editing
client
editing page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811250255.8A
Other languages
Chinese (zh)
Other versions
CN109558575A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811250255.8A priority Critical patent/CN109558575B/en
Publication of CN109558575A publication Critical patent/CN109558575A/en
Application granted granted Critical
Publication of CN109558575B publication Critical patent/CN109558575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an online form editing method, a device, computer equipment and a storage medium, wherein the method comprises the following steps: if a login request sent by a client is received, carrying out identity verification on a user according to user identification information contained in the login request, and acquiring a user group to which the user belongs according to an identity verification result; transmitting a form editing page corresponding to the user group to a client; receiving data in a form editing page at a first preset time interval, and storing the data in a storage platform, wherein the storage platform is used for storing data edited by a user; receiving a data submitting request sent by a client, and acquiring data submitting identification information contained in the data submitting request; and storing the data in the form editing page into a database corresponding to the data submitting identification information, wherein the database is used for storing the data submitted by the user. The technical scheme of the invention solves the problems of poor compatibility of the electronic form and low efficiency of extracting the data in the electronic form.

Description

Online form editing method, online form editing device, computer equipment and storage medium
Technical Field
The present invention relates to the field of information processing, and in particular, to an online form editing method, an online form editing device, a computer device, and a storage medium.
Background
Spreadsheets are tools that are often used in everyday offices. The currently mainstream spreadsheet tools on the market include Excel from Microsoft corporation, WPS from Jinshan corporation, libreoffice from open source, and the like. Each spreadsheet tool provider greatly promotes its own spreadsheet products and fosters a respective relatively fixed population of users due to competing needs. Because of the lack of unified industry standards, different electronic form products cannot be completely compatible, and problems are brought to users.
For example, within an enterprise, individuals may use different spreadsheet tools due to different usage habits. This makes it impossible to normally display these elements when accessing the shared spreadsheet, such as when referencing a mathematical formula, and when referencing objects such as pictures, links, files, etc. Meanwhile, when each department in the enterprise submits the electronic form data, the electronic form data is sent in a form of mail attachment or submitted in a form of directly transmitting the document, and when the data is summarized, the superior departments need to sort different electronic form documents one by one and then extract the data, so that the efficiency of the sorting and counting process of the data is low.
Disclosure of Invention
The embodiment of the invention provides an online form editing method, an online form editing device, computer equipment and a storage medium, which are used for solving the problems of poor compatibility of an electronic form and low efficiency of extracting data in the electronic form.
An online form editing method, comprising:
if a login request sent by a client is received, carrying out identity verification on the user according to user identification information contained in the login request, and acquiring a user group to which the user belongs according to an identity verification result;
transmitting a form editing page corresponding to the user group to the client;
receiving data in the form editing page at a first preset time interval, and storing the data in a storage platform, wherein the storage platform is used for storing data edited by a user;
receiving a data submission request sent by the client, and acquiring data submission identification information contained in the data submission request;
and saving the data in the form editing page to a database corresponding to the data submitting identification information, wherein the database is used for storing the data submitted by the user.
An online form editing apparatus comprising:
The login verification module is used for carrying out identity verification on the user according to user identification information contained in the login request if the login request sent by the client is received, and obtaining a user group to which the user belongs according to an identity verification result;
the page sending module is used for sending the form editing page corresponding to the user group to the client;
the automatic storage module is used for receiving the data in the form editing page at a first preset time interval and storing the data in the form editing page to a storage platform, wherein the storage platform is used for storing the data edited by a user;
the submitting verification module is used for receiving a data submitting request sent by the client and acquiring data submitting identification information contained in the data submitting request;
the data submitting module is used for storing the data in the form editing page into a database corresponding to the data submitting identification information, wherein the database is used for storing the data submitted by the user.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above-described online form editing method when the computer program is executed.
A computer readable storage medium storing a computer program which when executed by a processor implements the steps of the online form editing method described above.
The online form editing method, the online form editing device, the computer equipment and the storage medium provide a unified online form editing page for a user, and avoid the compatibility problem caused by the user editing by using different local electronic form tools; the content edited by the user is stored in the storage platform at preset time intervals, so that the function of real-time online automatic storage is realized, and accidental loss of data is prevented; the identity of the logged-in user is verified, and a form editing page is provided for users of different user groups; and receiving a data submitting request sent by the client, classifying the data submitted by the user according to preset identification information in the data submitting request, and respectively storing the data into a corresponding database, so that the data submitted by the user of a specific user group can be automatically extracted conveniently, the time for summarizing the data in different electronic forms is reduced, and the data processing efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an application environment of an online form editing method according to an embodiment of the invention;
FIG. 2 is a flow chart of an online form editing method in an embodiment of the invention;
FIG. 3 is a flow chart of exporting user-edited data in one embodiment of the invention;
FIG. 4 is a flowchart illustrating steps performed by a recording user according to an embodiment of the present invention;
FIG. 5 is a flowchart of the steps of recording user operations via a temporary array in accordance with one embodiment of the present invention;
FIG. 6 is a flowchart of step S5 in an online form editing method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of an online form editing apparatus in accordance with an embodiment of the present invention;
FIG. 8 is a schematic diagram of a computer device in accordance with an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The online form editing method provided by the application can be applied to an application environment as shown in fig. 1, wherein a server side is computer equipment for providing online form editing service, and the server side can be a server or a server cluster; the client is computer terminal equipment used by a user for editing an online form, and comprises, but is not limited to, a browser, a mobile phone APP and the like; the storage platform is a storage space for storing contents edited by the online form of the user, and comprises computer equipment for providing the storage space, a cloud storage platform and the like; the database is used for storing data submitted after the online editing of the user is completed; the client and the server, and the server and the storage platform are connected through a network, and the network can be a limited network or a wireless network. The online form editing method provided by the embodiment of the invention is applied to the server.
In one embodiment, as shown in fig. 2, an online form editing method is provided, and the specific implementation flow of the online form editing method includes the following steps:
s1: if a login request sent by a client is received, authenticating the user according to user identification information contained in the login request, and acquiring a user group to which the user belongs according to an authentication result.
The user can log in the server with the identity of the registered user or the identity of the anonymous user, and use the online form editing service. When a user logs in with the identity of a registered user, a user name and a login password are required to be provided; when a user logs in with the identity of an anonymous user, the user name and login password need not be provided.
The server may divide the users into different user groups, for example, the users may be divided into a user group of registered users and a user group of anonymous users, and provide different online form editing services for the users of different user groups, for example, the registered users may use a custom form template function, while the anonymous users may not use a custom form template function, and so on.
The server is provided with a user database, and the user database can be local to the server or connected with the server through a network. The user database is used for verifying the identity of the login user. In particular, the user databases include, but are not limited to, various relational or non-relational databases, such as MS-SQL, oracle, mySQL, sybase, DB2, redis, mongodDB, hbase, and the like.
The user database stores user identification information and user groups to which the users belong. The user identification information is an identification of the user identity, for example, may be a user id (identification) number. The user id number of the registered user has a corresponding record in the user database, and the anonymous user has no corresponding record. The user groups include registered user groups, anonymous user groups, and other preset user-defined groups. Specifically, the user database mainly includes a user information table for storing basic information of registered users. The user information table includes fields but is not limited to: user id number, user name, login password, user group, job number, name, gender, department to which the user belongs, and so forth.
Specifically, taking an example that a user initiates a login request to a server through a browser, the user opens a login page of the server, and if the user belongs to a registered user, a user name and a login password are input; if the user belongs to a non-registered user, skipping can be performed according to the prompt of the login page. The server receives a login request sent by the client and checks user identification information in the login request, and if the user is registered, the user identification information is a user name and a login password; if the user is not registered, the user identification information is null. The server side takes the user identification information as a query condition, and obtains the group number of the user group where the user is located from the user database. If the service end operating environment is Java, the service end can access the user database through JDBC. JDBC (Java DataBase Connectivity, java database connection) is a Java API for executing SQL statements that can provide uniform access to a variety of relational databases, consisting of a set of classes and interfaces written in the Java language. JDBC provides a benchmark from which higher level tools and interfaces can be built to enable database developers to write database applications. The interface program written by the database developer through the JDBC can be suitable for different databases, and the interface program is not required to be written for the different databases, so that the development efficiency is greatly improved.
S2: and sending the form editing page corresponding to the user group to the client.
The form editing page is a Web page provided by the server side for the client side to edit the online form, and comprises an HTML file, a CSS file and a JS script. Wherein, the HTML representation HyperText Markup Language is a hypertext markup language, which can be used to create a standard markup language for web pages, and the HTML runs on a browser and is parsed by the browser; CSS stands for Cascading Style Sheets, cascading style sheets, a computer language used to represent file styles such as HTML or XML (extensible markup language). The CSS not only can statically modify the webpage, but also can dynamically format each element of the webpage in cooperation with various scripting languages; the JS represents JavaScript, javaScript an interpreted scripting language, a dynamic, weak, prototype-based language, with built-in support types. The interpreter of the JS is called as a JavaScript engine, is a part of a browser, is a script language widely used for clients, is applied to an HTML webpage, and adds a dynamic function to the HTML webpage.
The form editing page is deployed under different file directories of the server. For example, the server side allocates a registered user table editing page directory for the registered user group, and the registered user table editing page directory further includes an HTML file directory, a CSS file directory, and a JS script directory. The HTML file directory, the CSS file directory and the JS script directory respectively store HTML files, CSS files and JS scripts. It can be appreciated that the server side allocates an anonymous user table edit page directory to the anonymous user group, and the anonymous user table edit page directory also includes an HTML file, a CSS file, and a JS script.
The form edit pages each implement different functions: the HTML file is mainly used for displaying page contents, the CSS file is mainly used for laying out the contents in the HTML, and the JS script is mainly used for realizing a data dynamic interaction function. The HTML file and the CSS file are mainly responsible for page display of online form editing, the JS script is also called a client script, the JS script is downloaded and executed by a client from a server, and the JS script is responsible for local data processing of the client and data interaction function with the server, wherein the client mainly comprises a browser. The JS script directory may include several JS scripts, and different JS scripts may implement different functions, or several JS scripts may be combined to implement a certain function.
For example, the operations related to the file, including operations of creating, deleting, copying, renaming, etc. the table may be implemented by creating a table JS script, deleting a table JS script, taking charge of the table JS script, and renaming the table JS script, respectively. Taking a newly built online form as an example, the specific process of creating the form is as follows: when a user clicks a new form button in an HTML page, a new form event in a new form JS script is triggered, and after the server receives the new form event, a form template selection interface is called for the user to select and the user waits for making the next action; after the user selects a form template, the server side will call the HTML file selected by the user for the user to edit, thereby completing the process of creating a new form. The form templates include, but are not limited to, a work schedule, a check-in form, a performance statistics form, a work daily report, an address book, and the like.
Different user groups can have different form edit page directories and can use different online form edit functions. For example, the table-editing directory of the registered user group is different from the table-editing directory of the anonymous user group; also users who register groups of users, enterprise users' table edit directories differ from that of individual users, etc.
The server side is provided with a form editing page and also comprises a server side script. The server script is relatively to the client script, is deployed at the server and runs at the server, and is mainly responsible for data interaction between the server and the server back end. The server back-end includes, but is not limited to, databases, storage platforms, other servers, and the like. Common server scripts include PHP, JSP, ASP, etc. Wherein PHP is PHP Hypertext Preprocessor, is a universal open source script language, and is mainly applicable to the field of Web development; the JSP is named Java Server Pages, and is a dynamic webpage technical standard advocated by Sun Microsystems, inc. and participated by a plurality of companies; ASP Active Server Pages, a server-side scripting environment developed by MicroSoft corporation, can be used to create dynamic interactive web pages and build powerful web applications.
After the server side performs identity verification on the login user, different form editing pages are sent to the client side according to the user group where the user is located.
Specifically, the server script obtains a corresponding table editing page directory according to the group number of the user group, and sends a page skip message to the browser, so that the browser downloads the HTML file, the CSS file and the JS script from the corresponding table editing page directory, and the table editing page corresponding to the user group is sent to the client.
S3: and receiving the data in the form editing page at a first preset time interval, and storing the data in a storage platform, wherein the storage platform is used for storing the data edited by the user.
The first preset time interval may be a time interval that is set by a user in a user-defined manner through a setting function in a form editing page, and may also be a default time interval in a client script. The setting function in the form editing page can provide front-end data acquisition by an HTML file, for example, the user can perform user-defined setting in a form mode; and the server script provides data interaction, for example, the user-defined set time interval value is saved to the server. The value of the first preset time interval may be set in units of minutes, hours, etc., and the first preset time interval is set to 5 minutes by default.
The data in the form edit page is data input by the user at the time of online form editing, including data input by the user in all forms of the HTML page. All forms in the HTML page correspond to form numbers, and when a user inputs data in the form, the server side can acquire the content input by the user according to the form numbers.
The storage platform is used for storing data input by a user when online editing is performed. The storage platform provides computer equipment, cloud storage platform and the like for providing storage space. The storage platform may provide FTP, HTTP, or HTTPs services to the server. The server forwards the received data in the form editing page to the storage platform so as to automatically save the data edited by the user.
Specifically, taking a preset time interval of 5 minutes as an example, the client script acquires data in all cells in the current form editing page every 5 minutes, and the data is sent to the server in the form of JSON format. And the server script receives the JSON data sent by the client and stores the JSON data in the storage platform. Wherein all cells contain a unique identification number, e.g. "1-1" represents the cell of the first row and column. JSON (JavaScript Object Notation, JS object profile) is a lightweight data exchange format. The JSON file is stored in ASCII encoding mode, is independent of the operating system, can be quickly read or generated by a computer program, and is a popular data exchange format. The JSON data after an online form is converted can be expressed as:
In the above JSON data, "1-1" through "1-6" represent the values of the first column through the sixth column in the first row of the form edit page, where a "1-6" cell in turn includes a number of sub-cells.
The server saves the data in the form editing page to the storage platform, records the identification number of each cell and the value in each cell, and can restore the data according to the data when the data of the form is restored.
S4: and receiving a data submitting request sent by the client and acquiring data submitting identification information contained in the data submitting request.
The user can directly submit the online edited content to the server to realize online data submission. The online data submission function may be applied to data collection and aggregation within an enterprise, or other similar application environment. For example, the enterprise subordinate department uses the unified specification online form provided by the server and submits directly to the server to collect data by the superordinate department.
The data submission request is a data request submitted by a client through a form in an HTML page. The data submission request includes data edited online by the user and data submission identification information. The data submitting identification information is an identification of data edited by a user online, and the data submitting identification information can be an id number, for example, a column name of a certain column or a row name of a certain row in an online table.
Specifically, the user edits the online form at the client, each cell in the online form corresponds to a form, each form has a form id number with a unique identifier, the form id number is composed of a row number and a column number, and the position and the value inside of one cell can be uniquely determined according to the row number and the column number. When a user clicks a submit button in an HTML page, the client script sends form data to a server, wherein the form data comprises data edited online by the user and a row name or a column name of an online form; form data is submitted to the server side by the corresponding form through a post () method. The server receives a data submitting request sent by the client and acquires data in the form. The server groups the data in the online form according to the rows or columns to obtain an array containing a plurality of rows or columns of data.
S5: and storing the data in the form editing page into a database corresponding to the data submitting identification information, wherein the database is used for storing the data submitted by the user.
The database is used for storing data submitted by users, realizing collection and summarization of the user data, and providing services for various applications, and is called an application database. The application database is connected with the server through a network. The application databases include, but are not limited to, various relational or non-relational databases, such as MS-SQL, oracle, mySQL, sybase, DB2, redis, mongodDB, hbase, and the like. The number of application databases can be preset according to application requirements, and the number of the application databases is at least one. The application database mainly comprises a document information table which is used for storing data submitted by a user and related information. The fields in the document information table include, but are not limited to: user id number, creation time or modification time of user submitted data, row or column names in an online form, etc.
The server side submits identification information according to the data, selects a corresponding table name or a corresponding library name in the application database, and stores the data in the table editing page into the corresponding database.
For example, if the data in the table editing page is a work performance annual report of all employees of a certain department, wherein the rows in the table represent the data of each employee, the columns in the table represent 12 months, and each cell in the table represents the monthly work performance, the server may divide the table into 4 arrays according to the months, each array represents the work performance of all employees of the department in the quarter, and store the 4 arrays into the department quarter work performance table of the application database; the server may divide the table into a plurality of groups according to employee names, each group representing data of the annual work performance of the employee, and store the annual work performance of the employee in an annual work performance table of the application database.
Specifically, if the service-side operating environment is Java and the data submission identifying information is a table name in the application database or a library name of the application database, the service-side script may insert the data in the table editing page into the corresponding application database or the corresponding data table through JDBC.
In the embodiment, the online form editing method provides a unified online form editing page for the user, so that the compatibility problem caused by the user editing by using different local electronic form tools is avoided; the content edited by the user is stored in the storage platform at preset time intervals, so that the function of real-time online automatic storage is realized, and accidental loss of data is prevented; the identity of the logged-in user is verified, and a form editing page is provided for users of different user groups; and receiving a data submitting request sent by the client, classifying the data submitted by the user according to preset identification information in the data submitting request, and respectively storing the data into a corresponding database, so that the data submitted by the user of a specific user group can be automatically extracted conveniently, the time for summarizing the data in different electronic forms is reduced, and the data processing efficiency is improved.
Further, in an embodiment, as shown in fig. 3, after step S5, that is, after saving the data in the form editing page in the database corresponding to the data submission identification information, the online form editing method further includes the following steps:
s6: and receiving a data export request sent by the client, and acquiring the file type and storage position information in the data export request.
The data export request is request information sent to the server when the user needs to export the content edited by the online form to a local or other network storage location. The data export request includes the exported file type and the storage location of the exported file. File types include spreadsheet file types, such as xls, xlsx, etc.; tag file types such as html, xml, etc., text file types such as txt, etc. The storage locations of the exported files mainly include client local and network storage locations, which are represented in the form of file storage paths.
Specifically, clicking the export button in the HTML page by the user may trigger the client to send a data export request, that is, trigger the client script that implements the export function to send information to the server, where the server may obtain the file type to be exported and the location information to be stored from the form.
S7: and acquiring a coding mode corresponding to the file type, and converting the data in the form editing page into a file data stream matched with the coding mode.
The file data stream refers to a data storage mode of the file at the server. The data in the form editing page adopts a Unicode coding mode, namely, the data input by a user is temporarily stored and displayed in a Unicode coding mode at a client in the process of editing the form by the user. Unicode (Unicode ) is an industry standard in the field of computer science, including character sets, coding schemes, and the like. Unicode is generated to solve the limitations of traditional character coding schemes, and sets a uniform and unique binary code for each character in each language so as to meet the requirements of cross-language and cross-platform text conversion and processing.
The data in different file types adopts different coding modes. For example, text files with txt as a suffix are mostly encoded by ASCII. Among them, ASCII (American Standard Code for Information Interchange ) is a set of computer coding systems based on latin alphabets, mainly used for displaying modern english and other western languages.
Taking the derived file type xls as an example, the server side calls and executes the corresponding server side script according to different file types, thereby realizing the conversion of the data in the form editing page into the corresponding coding mode. Specifically, the server script may convert the data in the form editing page by using the POI, and convert the content in each form into a cell of the sheet page in the Excel table, so as to obtain the file data stream. The POI is called Apache POI, which is a free open-source cross-platform Java API written in Java, and can be used for reading and writing documents in formats of Excel, word, powerPoint, visio and the like in Microsoft Office.
S8: the file data stream is saved to a storage location specified by the storage location information.
On the server, client scripts for saving the file data stream to the local client and to the network storage location are deployed under different JS script directories respectively. Specifically, the server side calls a corresponding client side script according to the storage position appointed by the storage position information, and sends the client side script to the client side for execution, so that the file data stream is saved to the storage position appointed by the storage position information.
In this embodiment, the server receives a data export request sent by the client, obtains a file type and a storage location in the data export request, converts data in a form editing page into a corresponding file data stream, and stores the file data stream in a storage location designated by storage location information, so as to provide a function of exporting the data to a local storage location and a network storage location of the client for a user, support multiple file types, and facilitate perfecting an online form editing function.
Further, in an embodiment, as shown in fig. 4, after step S2 and before step S4, after the form editing page corresponding to the user group is sent to the client, and before the data submission request sent by the client is received and the data submission identification information contained in the data submission request is acquired, the online form editing method further includes the steps of:
s9: marking the data in the form editing page as a basic form, and storing the basic form as the first element of the preset array into the preset array.
The preset array is used for backing off or reworking the operation steps in the table editing process. The change condition of the data in the form editing page is stored in preset data within a certain time interval, the operation steps of a user in the form editing process are recorded, and when the operation steps in the form editing process are required to be retracted or reworked, the quick retraction or the reworking is realized through the data recorded by the preset array.
The preset array is a temporary storage space allocated by the server for each user, and the size of the preset array may be different according to the group to which the user belongs, for example, the preset array of registered users is larger than that of anonymous users. The size of the preset array is determined by the sum of the number of bytes that all cells in the single table can receive user input. For example, if the table includes 26 rows and columns, the number of table cells is 676; each cell can receive 512 bytes of bytes input by a user, so that the occupied space size of all cells of the whole table is 338 Mbytes when the cells are filled, and the size of the preset array can be an integer multiple of 338 Mbytes.
Specifically, taking an example that the maximum occupied storage space of a single table is 338 mbytes, the server side sends the client side script under the JS script directory to the client side for execution, allocates the size of the preset array to the user to be 1014 mbytes, and stores the data in the table editing page as the first element of the preset array to the preset array.
S10: and taking the data acquired from the table editing page as current data at a second preset time interval, and storing the difference set between the current data and the basic table into a preset array.
The second preset time interval is a time interval set by default in the JS script. Preferably, the second preset time interval is 1 second.
The difference set of the current data and the base table is a difference set of the data in all cells in the current table edit page and the data in all cells in the base table. For example, if there are 676 cells in the base table, wherein there are 20 cells for the user to input data, and the user increases 10 cells of data in the subsequent editing process, the difference between the current data and the base table is the data in the 10 cells that the user subsequently increases; if the user deletes the data of 5 cells in the subsequent editing process, the difference set between the current data and the basic table is the data of 5 cells which are deleted by the user.
Specifically, the server sends the client script under the JS script directory to the client for execution, if the second preset time interval is 1 second, the client firstly acquires the data in all the cells in the current table editing page every 1 second, then calculates the difference set between the current data and the basic table, and sequentially adds the difference set into the preset array.
In this embodiment, the data in the table editing page is marked as the basic table, and the difference set between the data in the table editing page and the basic table obtained at the second preset time interval is saved, so that the steps operated by the user in the editing process are recorded.
Further, in an embodiment, as shown in fig. 5, after step S9 and before step S4, namely, marking the data in the form editing page as a base form, and saving the base form as the first element of the preset array to the preset array, and before receiving the data submission request sent by the client and acquiring the data submission identification information included in the data submission request, the online form editing method further includes the following steps:
s11: a temporary array is established and the base table is saved to the temporary array as the first element of the temporary array.
The temporary array is used for storing intermediate values in the calculation process, and is destroyed after the calculation process is completed, so that the memory space is released. The size of the temporary array may be set to an integer multiple of the sum of the bytes occupied by the data in all cells in a single table.
Specifically, a temporary array space is allocated for the user, and the base table is saved to the temporary array as the first element of the temporary array.
S12: and at a second preset time interval, saving the data acquired from the table editing page as current data to a temporary array, and saving a difference set between the current data and a previous element adjacent to the element where the current data is in the temporary array to the preset array.
The second preset time interval is a time interval set by default in the JS script. Preferably, the second preset time interval is 1 second.
For example, if the second preset time interval is 1 second, after the 1 st second, the client first obtains the data in all cells in the current table editing page, and adds the data as the current data into the temporary array to become the second element of the temporary array; then a difference set between the second element and the first element is calculated and added to the preset array. After the 2 nd second, the client acquires the data in all the cells in the current form editing page again, and adds the data as the current data into the temporary array to become the third element of the temporary array; then a difference set between the third element and the second element is calculated and added to the preset array. And by analogy, at a second preset time interval, saving the data acquired from the table editing page as current data to a temporary array, and saving a difference set between the current data and a previous element adjacent to the element where the current data is in the temporary array to the preset array.
Specifically, the server sends the client script under the JS script directory to the client for execution, if the second preset time interval is 1 second, the client firstly acquires the data in all the cells in the current form editing page and adds the data into the temporary array every 1 second, then calculates the difference set between the current data and the previous element adjacent to the element where the current data is located in the temporary array, and sequentially adds the difference set into the preset array.
In this embodiment, by establishing intermediate variables calculated by the temporary array cache, a difference set of data in a table editing page in adjacent time intervals is saved, so that steps operated by a user in an editing process are recorded, and functions of rollback and redo of the user editing steps are realized. Meanwhile, the change of the difference set of the data in the table editing page in the adjacent time interval is smaller than that of the current data and the basic table, so that the storage space of the preset array is saved.
Further, in an embodiment, as shown in fig. 6, for step S5, the step of saving the data in the form editing page to the database corresponding to the data submission identification information may specifically include the following steps:
S51: and carrying out validity check on the data in the table editing page according to the preset data type.
The preset data type is a type definition made on the data input by the user in the form editing page. The preset data types comprise character type, integer type, boolean type, date format type, custom type and the like.
The validity check includes a check of the data type, such as whether the data in the form editing page is of character type, integer type, boolean type, date format type, etc.; the validity check may also include an application layer logic check on the data in the form editing page, for example, to check whether there is an abnormality in employee performance data submitted by the client, which obviously does not conform to the actual situation.
The client script and the server script can both realize the validity check of the data line in the form editing page. Specifically, taking a server script as an example, the server firstly obtains data in a form editing page, including employee enrollment date, for example, and the server script compares the preset date format type with the employee enrollment date and performs further operations according to the result.
S52: if the data in the form editing page is inconsistent with the preset data type, sending a data submission failure message to the client.
The data commit failure message is used to inform the client of the cause of the data commit failure, such as data format inconsistencies, data out-of-range, and the like. The data commit failure message may be sent to the client by way of a display error code, or by way of a simple text description. For example, 404 errors, 501 errors, etc. commonly encountered in browsing web pages.
Specifically, if the data in the form editing page is inconsistent with the preset data type, the server side script or the client side script may send the rank number of the cell inconsistent with the preset data type to the client side, and prompt for the correct data type.
S53: if the data in the form editing page is consistent with the preset data type, the data in the form editing page is stored in a database corresponding to the data submitting identification information.
If the data in the form editing page is consistent with the preset data type, the server side script or the client side script can store the data in the form editing page into a database corresponding to the data submitting identification information by calling an application layer interface of the database.
In this embodiment, the validity check is performed on the data in the form editing page through the server script or the client script, which mainly includes checking the data type, and storing the data or rejecting the submitting request of the client according to the result of the validity check, so as to screen the data submitted by the client, thereby guaranteeing the validity of the data submitted by the client and further perfecting the function of the online form editing service.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
In one embodiment, an online form editing apparatus is provided, which corresponds to the online form editing method in the above embodiment one by one. As shown in fig. 7, the online form editing apparatus includes a login authentication module 71, a page transmission module 72, an automatic save module 73, a submit authentication module 74, and a data submit module 75. The functional modules are described in detail as follows:
the login verification module 71 is configured to, if a login request sent by the client is received, perform identity verification on a user according to user identification information included in the login request, and obtain a user group to which the user belongs according to a result of the identity verification;
a page transmitting module 72, configured to transmit a form editing page corresponding to the user group to the client;
an automatic saving module 73, configured to receive data in the form editing page at a first preset time interval, and save the data to a storage platform, where the storage platform is configured to store data edited by a user;
A submission validation module 74, configured to receive a data submission request sent by a client, and obtain data submission identification information included in the data submission request;
the data submitting module 75 is configured to save the data in the form editing page to a database corresponding to the data submitting identification information, where the database is configured to store the data submitted by the user.
Further, the online form editing apparatus further includes:
the receiving export request module is used for receiving a data export request sent by a client and acquiring file type and storage position information in the data export request;
the data conversion module is used for acquiring the coding mode corresponding to the file type and converting the data in the form editing page into a file data stream matched with the coding mode;
and the data export module is used for storing the file data stream to a storage position designated by the storage position information.
Further, the online form editing apparatus further includes:
the basic form marking module is used for marking the data in the form editing page as a basic form and storing the basic form as a first element of a preset array into the preset array;
the first difference set calculation module is used for taking the data acquired from the table editing page as current data at a second preset time interval, and storing the difference set of the current data and the basic table into a preset array.
Further, the online form editing apparatus further includes:
the temporary data establishing module is used for establishing a temporary array and storing the basic form as a first element of the temporary array into the temporary array;
and the second difference set calculation module is used for saving the data acquired from the table editing page as current data to the temporary array at a second preset time interval, and saving the difference set between the current data and the previous element adjacent to the element where the current data is positioned in the temporary array to the preset array.
Further, the data submitting module 75 includes:
the validity checking sub-module is used for checking the validity of the data in the table editing page according to the preset data type;
the submission failure warning sub-module is used for sending a data submission failure message to the client if the data in the form editing page is inconsistent with the preset data type;
and the data submitting sub-module is used for storing the data in the form editing page into a database corresponding to the data submitting identification information if the data in the form editing page is consistent with the preset data type.
For specific limitations on the online form editing apparatus, reference may be made to the above limitations on the online form editing method, and no further description is given here. The various modules in the online form editing apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 8. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an online form editing method.
In one embodiment, a computer device is provided that includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the steps of the online form editing method of the above embodiment, such as steps S1 to S5 shown in fig. 2. Alternatively, the processor when executing the computer program implements the functions of the modules/units of the online form editing apparatus in the above embodiment, such as the functions of the modules 71 to 75 shown in fig. 7. In order to avoid repetition, a description thereof is omitted.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, where the computer program when executed by a processor implements the method for online form editing in the above method embodiment, or where the computer program when executed by a processor implements the functions of each module/unit in the online form editing device in the above device embodiment. In order to avoid repetition, a description thereof is omitted.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (10)

1. An online form editing method, comprising:
if a login request sent by a client is received, carrying out identity verification on the user according to user identification information contained in the login request, and acquiring a user group to which the user belongs according to an identity verification result;
Transmitting a form editing page corresponding to the user group to the client, and providing online form editing service corresponding to the user group for the client;
receiving data in the form editing page from a client at a first preset time interval, and storing the data in the form editing page to a storage platform, wherein the storage platform is used for storing the data edited by a user in the form editing page of the client;
receiving a data submission request sent by the client, and acquiring data submission identification information contained in the data submission request;
and saving the data in the form editing page to a database corresponding to the data submitting identification information, wherein the database is used for storing the data submitted by the user.
2. The online form editing method of claim 1, wherein after the saving of the data in the form editing page into the database corresponding to the data submission identifying information, the online form editing method further comprises:
receiving a data export request sent by the client, and acquiring file type and storage position information in the data export request;
acquiring a coding mode corresponding to the file type, and converting the data in the form editing page into a file data stream matched with the coding mode;
And saving the file data stream to a storage position designated by the storage position information.
3. The online form editing method of claim 1, wherein after the form editing page corresponding to the user group is transmitted to the client, and before the receiving the data commit request transmitted by the client and acquiring the data commit identification information contained in the data commit request, the online form editing method further comprises:
marking the data in the table editing page as a basic table, and storing the basic table as a first element of a preset array to the preset array;
and taking the data acquired from the table editing page as current data at a second preset time interval, and storing the difference set between the current data and the basic table into the preset array.
4. The online form editing method of claim 3, wherein the marking the data in the form editing page as a base form and saving the base form as a first element of a preset array to the preset array, and before the receiving the data submission request sent by the client and acquiring the data submission identification information included in the data submission request, the online form editing method further comprises:
Establishing a temporary array, and storing the basic table as a first element of the temporary array to the temporary array;
and at the second preset time interval, saving the data acquired from the table editing page as the current data to the temporary array, and saving a difference set between the current data and a previous element adjacent to the element where the current data is in the temporary array to the preset array.
5. The online form editing method of claim 1, wherein the saving of the data in the form editing page into the database corresponding to the data submission identification information comprises:
according to the preset data type, carrying out validity check on the data in the form editing page;
if the data in the form editing page is inconsistent with the preset data type, sending a data submission failure message to the client;
if the data in the form editing page is consistent with the preset data type, the data in the form editing page is stored in a database corresponding to the data submitting identification information.
6. An online form editing apparatus, comprising:
The login verification module is used for carrying out identity verification on the user according to user identification information contained in the login request if the login request sent by the client is received, and obtaining a user group to which the user belongs according to an identity verification result;
the page sending module is used for sending a form editing page corresponding to the user group to the client and providing online form editing service corresponding to the user group for the client;
the automatic storage module is used for receiving the data in the form editing page at a first preset time interval and storing the data in the form editing page to a storage platform, wherein the storage platform is used for storing the data edited by a user;
the submitting verification module is used for receiving a data submitting request sent by the client and acquiring data submitting identification information contained in the data submitting request;
the data submitting module is used for storing the data in the form editing page into a database corresponding to the data submitting identification information, wherein the database is used for storing the data submitted by the user.
7. The online form editing apparatus of claim 6, wherein the online form editing apparatus further comprises:
The receiving export request module is used for receiving a data export request sent by the client and acquiring file types and storage position information in the data export request;
the data conversion module is used for converting the data in the form editing page into a file data stream according to the file type;
and the data export module is used for storing the file data stream to a storage position appointed by the storage position information.
8. The online form editing apparatus of claim 6, wherein the online form editing apparatus further comprises:
the basic form marking module is used for marking the data in the form editing page as a basic form and storing the basic form as a first element of a preset array into the preset array;
and the difference set calculation module is used for taking the data acquired from the table editing page as current data at a second preset time interval, and storing the difference set of the current data and the basic table into the preset array.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the online form editing method of any of claims 1 to 5 when the computer program is executed.
10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the steps of the online form editing method of any of claims 1 to 5.
CN201811250255.8A 2018-10-25 2018-10-25 Online form editing method, online form editing device, computer equipment and storage medium Active CN109558575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811250255.8A CN109558575B (en) 2018-10-25 2018-10-25 Online form editing method, online form editing device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811250255.8A CN109558575B (en) 2018-10-25 2018-10-25 Online form editing method, online form editing device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109558575A CN109558575A (en) 2019-04-02
CN109558575B true CN109558575B (en) 2024-03-29

Family

ID=65865250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811250255.8A Active CN109558575B (en) 2018-10-25 2018-10-25 Online form editing method, online form editing device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109558575B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110196971A (en) * 2019-04-23 2019-09-03 平安科技(深圳)有限公司 Online document edit methods, device, terminal device and storage medium
CN110119502A (en) * 2019-05-13 2019-08-13 江西金格科技股份有限公司 A method of dynamic table single domain is realized based on OFD document
CN110162373B (en) * 2019-05-28 2022-07-19 创新先进技术有限公司 Method and device for displaying chart in webpage
CN110213367B (en) * 2019-05-31 2023-11-28 北京字节跳动网络技术有限公司 Interactive information notification method, device, equipment and computer readable storage medium
CN112416329A (en) * 2019-08-23 2021-02-26 上海幻电信息科技有限公司 Data editing method and device and storage medium
CN110704573B (en) * 2019-09-04 2023-12-22 平安科技(深圳)有限公司 Catalog storage method, catalog storage device, computer equipment and storage medium
CN110795651A (en) * 2019-09-26 2020-02-14 北京淇瑀信息科技有限公司 Method and device for saving front-end data and electronic equipment
CN111339087A (en) * 2020-02-20 2020-06-26 重庆锐云科技有限公司 Method for automatically exporting real estate marketing data monitoring result report as Excel file
CN111460776B (en) * 2020-03-12 2024-03-15 浪潮通用软件有限公司 Method and device for online designing contract form and generating contract text
CN111639118A (en) * 2020-05-29 2020-09-08 金现代信息产业股份有限公司 Dynamic generation method and system for test report of power equipment
CN112733503A (en) * 2021-01-22 2021-04-30 浪潮卓数大数据产业发展有限公司 Method for generating EXCEL based on HTML table of POI
CN113850067B (en) * 2021-11-30 2022-03-15 天津联想协同科技有限公司 Information collection method and device based on online editing, network disk and storage medium
CN115328363B (en) * 2022-08-12 2023-11-03 深圳乐播科技有限公司 File processing method, electronic equipment and related products
CN115169302B (en) * 2022-09-08 2022-12-09 天津联想协同科技有限公司 Data collection method and device based on online form document and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588350A (en) * 2008-05-19 2009-11-25 北京亿企通信息技术有限公司 Method and system for realizing file sharing
CN102193933A (en) * 2010-03-10 2011-09-21 北大方正集团有限公司 Method and system for webpage editing
CN102521407A (en) * 2011-12-28 2012-06-27 谢勇 Method for document collaboration among users
CN103077185A (en) * 2012-12-18 2013-05-01 厦门雅迅网络股份有限公司 Object-based user-defined information-expanding method
CN104090850A (en) * 2014-06-24 2014-10-08 上海铀尼信息科技有限公司 Online table system and data management method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588350A (en) * 2008-05-19 2009-11-25 北京亿企通信息技术有限公司 Method and system for realizing file sharing
CN102193933A (en) * 2010-03-10 2011-09-21 北大方正集团有限公司 Method and system for webpage editing
CN102521407A (en) * 2011-12-28 2012-06-27 谢勇 Method for document collaboration among users
CN103077185A (en) * 2012-12-18 2013-05-01 厦门雅迅网络股份有限公司 Object-based user-defined information-expanding method
CN104090850A (en) * 2014-06-24 2014-10-08 上海铀尼信息科技有限公司 Online table system and data management method thereof

Also Published As

Publication number Publication date
CN109558575A (en) 2019-04-02

Similar Documents

Publication Publication Date Title
CN109558575B (en) Online form editing method, online form editing device, computer equipment and storage medium
CN108874926B (en) Mass data query method, device, computer equipment and storage medium
CN110196971A (en) Online document edit methods, device, terminal device and storage medium
US20160342501A1 (en) Accelerating Automated Testing
CN111177302B (en) Service bill processing method, device, computer equipment and storage medium
US11792257B2 (en) Form engine
CN109635300B (en) Data verification method and device
WO2022126983A1 (en) Electronic report file export method, apparatus and device, and storage medium
CN112861496A (en) Report generation display method and device, computer equipment and readable storage medium
CN107220274B (en) Visual data interface market realization method
CN110704521A (en) Interface data access method and system
CN109241384B (en) Scientific research information visualization method and device
CN109240692A (en) A kind of method for building up and system of the web database exploitation based on common template
CN111125598A (en) Intelligent data query method, device, equipment and storage medium
CN105224544A (en) A kind of data editing method of database and device
CN112286934A (en) Database table importing method, device, equipment and medium
CN109685668B (en) Order batch processing method, device, computer equipment and storage medium
CN114722119A (en) Data synchronization method and system
CN115391439B (en) Document data export method, device, electronic equipment and storage medium
CN111367982B (en) Method, device, computer equipment and storage medium for importing TRRIGA basic data
CN107392560A (en) A kind of Excel list datas issue acquisition method and system based on internet
CN112667733A (en) Data warehouse data importing method and system
CN114357943A (en) Universal efficient Excel reading processing method, tool, medium and equipment
CN110362630B (en) Data management method, device, equipment and computer readable storage medium
CN112000692B (en) Page query feedback method and device, computer equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant