A document table processing method, device, equipment and medium

The database identification is obtained through interaction between the client and the server and the database table is created, which solves the problem of poor table functionality in existing documents, realizes the correlation between database tables and documents, and enhances the functionality and data management capabilities of tables.

CN114154469BActive Publication Date: 2024-12-31BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111459218.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-02
Publication Date
2024-12-31
Estimated Expiration
2041-12-02

AI Technical Summary

Technical Problem

The tables in existing documents are poor in functionality, making it difficult to directly access database tables, and users cannot flexibly associate documents with databases, resulting in insufficient data management capabilities.

Method used

Through the interaction between the client and the server, obtain the database identity and create database tables, realize the association between the database tables and documents, and enhance the functionality of the tables.

Benefits of technology

It realizes direct access to database tables, enhances the functionality of tables, has structured storage, SQL query and data operation capabilities, and improves document data management capabilities and user editing flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114154469B_ABST
    Figure CN114154469B_ABST
Patent Text Reader

Abstract

The disclosed embodiments relate to a method, apparatus, device and medium for processing a table of a document, wherein the method applied to a client comprises: in response to a user's table creation operation for a current document, obtaining table information of a database table to be created, and initiating a table creation request to a server for creating a database table in the current document; in response to a database identifier associated with the current document returned by the server for the table creation request, creating a database table in the current document based on the database identifier and the table information. The disclosed embodiments can directly access a database table in a document through interaction between a client and a server, and the database table is related to the database associated with the current document, which helps to enhance the functionality of the table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a document table processing method, device, equipment and medium. Background Art

[0002] For most text-editable documents in the prior art, users can not only input text but also draw tables, such as drawing a table with N rows and M columns according to needs. However, the table is only used for simple input and display of data and has poor functionality. Summary of the invention

[0003] In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a document table processing method, device, equipment and medium.

[0004] An embodiment of the present disclosure provides a method for processing a table of a document, which is applied to a client and includes: in response to a table creation operation of a user on a current document, obtaining table information of a database table to be created, and initiating a table creation request to a server for creating a database table in the current document; in response to a database identifier associated with the current document returned by the server in response to the table creation request, creating a database table in the current document based on the database identifier and the table information.

[0005] Optionally, the step of creating a database table in the current document based on the database identifier and the table information includes: initiating a table identifier acquisition request to a server based on the database identifier and the table information; in response to a table identifier returned by the server in response to the table identifier acquisition request, associating the table identifier and the database identifier in a data structure corresponding to the current document, and rendering and displaying the database table on the current document based on the table information.

[0006] Optionally, in response to a user's table creation operation on the current document, the steps of obtaining table information of a database table to be created, and initiating a table creation request to create a database table in the current document to a server include: responding to the user's table creation operation on the current document through a first document processing end, obtaining table information of the database table to be created, and requesting the first database table processing end to obtain a database identifier associated with the current document; initiating a table creation request to create a database table in the current document to a second database table processing end through the first database table processing end, so as to obtain a database identifier associated with the current document returned by the second database table processing end in response to the table creation request.

[0007] Optionally, the step of initiating a table identifier acquisition request to the server based on the database identifier and the table information includes: based on the database identifier and the table information, initiating a table identifier acquisition request to the second database table processing end through the first database table processing end to obtain the table identifier returned by the second database table processing end.

[0008] Optionally, the step of associating and storing the table identifier and the database identifier in the data structure corresponding to the current document includes: responding, by the first document processing end, to the table identifier sent by the first database table processing end, associating the table identifier and the database identifier, and sending the association result to the second document processing end, so that the second document processing end stores the association result in the data structure corresponding to the current document.

[0009] Optionally, the step of rendering and displaying a database table on the current document based on the table information includes: rendering a database table based on the table information and the database identifier by a first database table processing end, and displaying the rendered database table on the interface of the current document by a first document processing end.

[0010] The disclosed embodiment also provides a document table processing method, which is applied to a server, and includes: in response to a table creation request initiated by a client to create a database table in a current document, obtaining a database identifier associated with the current document; returning the database identifier to the client, so that the client creates a database table in the current document based on the database identifier and table information of the database table to be created; wherein the table information is obtained by the client based on a table creation operation performed by a user on the current document.

[0011] Optionally, the step of obtaining a database identifier associated with the current document includes: querying whether the current document is associated with an existing database; if so, using the identifier of the existing database as the database identifier associated with the current document; if not, creating a new database, and using the identifier of the new database as the database identifier associated with the current document.

[0012] Optionally, the method also includes: in response to a table identifier acquisition request initiated by the client based on the database identifier and the table information, returning the table identifier to the client, so that the client associates the table identifier and the database identifier and stores them in the data structure corresponding to the current document, and renders and displays the database table on the current document based on the table information.

[0013] Optionally, in response to a table creation request initiated by a client to create a database table in the current document, the step of obtaining a database identifier associated with the current document includes: obtaining, by a second database table processing end, a database identifier associated with the current document in response to a table creation request initiated by a first database table processing end to create a database table in the current document; and returning the database identifier to the client includes: returning the database identifier to the first database table front end through the second database table processing end.

[0014] Optionally, in response to a table identifier acquisition request initiated by the client based on the database identifier and the table information, the step of returning the table identifier to the client includes: receiving, through the second database table processing end, a table identifier acquisition request initiated by the first database table processing end based on the database identifier and the table information, and returning the table identifier corresponding to the table identifier acquisition request to the first database table processing end, so that the first database table processing end returns the table identifier to the first document processing end.

[0015] Optionally, the method further includes: receiving, through the second document processing end, an association result of the table identifier and the database identifier sent by the first document processing end, and storing the association result in a data structure corresponding to the current document.

[0016] The disclosed embodiment also provides a document table processing device, which is applied to a client and includes: a client response module, which is used to respond to a user's table creation operation on the current document, obtain table information of a database table to be created, and initiate a table creation request to a server to create a database table in the current document; a client table creation module, which is used to respond to a database identifier associated with the current document returned by the server in response to the table creation request, and create a database table in the current document based on the database identifier and the table information.

[0017] The disclosed embodiment also provides a document table processing device, which is applied to a server, and includes: a server response module, which is used to respond to a table creation request initiated by a client to create a database table in a current document, and obtain a database identifier associated with the current document; a server table creation module, which is used to return the database identifier to the client, so that the client creates a database table in the current document based on the database identifier and table information of the database table to be created; wherein the table information is obtained by the client based on a table creation operation performed by a user on the current document.

[0018] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the document table processing method provided by the embodiment of the present disclosure.

[0019] The embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the table processing method of the document provided by the embodiment of the present disclosure.

[0020] In the above technical solution provided by the embodiment of the present disclosure, the client can respond to the user's table creation operation for the current document, obtain the table information of the database table to be created, and initiate a table creation request to the server to create the database table in the current document; the server can return the database identifier associated with the current document to the client in response to the table creation request, and the client can further create a database table in the current document based on the database identifier and the table information. The above method can directly access the database table in the document through the interaction between the client and the server, and the database table is related to the database associated with the current document, which helps to enhance the functionality of the table.

[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0024] Figure 1 A flowchart of a table processing method for a document applied to a client provided in an embodiment of the present disclosure;

[0025] Figure 2 A flowchart of a table processing method for a document applied to a server provided in an embodiment of the present disclosure;

[0026] Figure 3 An interactive flow chart of a document table processing method provided by an embodiment of the present disclosure;

[0027] Figure 4 An interactive flow chart of another document table processing method provided by an embodiment of the present disclosure;

[0028] Figure 5 A schematic diagram of the structure of a table processing device for a document applied to a client provided by an embodiment of the present disclosure;

[0029] Figure 6 A schematic diagram of the structure of a table processing device for a document applied to a server provided in an embodiment of the present disclosure;

[0030] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0032] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0033] In documents that users can edit in text, such as Word documents and most online collaborative documents, it is difficult to directly access database tables. Only simple data tables can be inserted locally. However, such tables have a single function and are only used to enter and display data in cells. They do not have the capabilities of tables in the database, such as database functions such as structured storage, SQL query and data operation of database tables, and the data management capabilities of the documents are poor. On the other hand, users are also unable to directly and flexibly associate documents with database tables. They can only export data from the database to form documents, which is not only cumbersome but also less flexible. In addition, the document formats formed by exporting table data from the database are restricted, making it difficult to meet the flexible editing requirements of users who want to edit paragraph text in the document and insert tables in other locations in the document, and the richness of the document functions is correspondingly poor. In order to improve or partially improve at least one of the above problems, the embodiments of the present disclosure provide a document table processing method, device, equipment and medium. The documents in the embodiments of the present disclosure can be, for example, Word documents or online collaborative documents, which are described in detail below:

[0034] First, the embodiment of the present disclosure provides a document table processing method from the perspective of the client. The method can be applied to the client, and the client can be implemented by software and / or hardware, such as a computer, a mobile phone, or other user terminal device. Figure 1 A flowchart of a table processing method for a document applied to a client provided by an embodiment of the present disclosure is shown as follows: Figure 1 As shown, the method mainly includes the following steps S102 to S104:

[0035] Step S102 , in response to the user's table creation operation on the current document, obtain table information of the database table to be created, and initiate a table creation request to create the database table in the current document to the server.

[0036] It is understandable that the user can perform a table creation operation on the current document through a preset table creation component. The table creation operation indicates the table information of the table to be created. The table information includes but is not limited to setting the table format to M rows and N columns (M and N are both positive integers), or may also include the view display form of the table to be created, etc. The present embodiment of the disclosure does not limit the table creation operation. The client can obtain the table information based on the table creation operation, and initiate a table creation request to the server. It should be noted that the present embodiment of the disclosure does not limit the order between obtaining the table information and sending the table creation request.

[0037] In addition, in actual applications, when the client receives a table creation operation from the user for the current document, it can create a database table placeholder locally and display a loading state, and then request the server to obtain a database identifier, wherein the request to obtain a database identifier can be regarded as the above-mentioned table creation request to create a database table in the current document.

[0038] Step S104, in response to the database identifier associated with the current document returned by the server in response to the table creation request, a database table is created in the current document based on the database identifier and the table information. The database identifier may also be referred to as database table mark information or database token mark.

[0039] In actual applications, the server records the association between the document and the database. After the client obtains the database identifier associated with the current document returned by the server, it can create a database table so that the database table is rendered and displayed on the current document. At the same time, the database table is also associated with the database corresponding to the database identifier. Specifically, the database table is the table under the database associated with the current document. When rendering and displaying the database table, the client can call the interface of the database table front end to request to mount the database table. After receiving the mount request, the database table front end can pull the table information of the database table and load it. After pulling the table information, the database table front end can render the entire database component and mount the database table, so that the database table is displayed on the current document.

[0040] It should be noted that the embodiments of the present disclosure will not create a table on the document directly based on the table information in a traditional manner, but through interaction between the client and the server. Only after the server returns the database identifier associated with the current document, will a table be further created in the current document based on the database identifier and the table information. The table is directly related to the database and is essentially a database table.

[0041] The above method can directly access (or embed) a database table in a document through the interaction between the client and the server. The database table is related to the database associated with the current document, which helps to further enable the table accessed in the document to have database-related functions, effectively enhancing the functionality of the table. For example, the accessed database table has database functions such as structured storage, SQL query and data operation, and also makes the document have stronger data management capabilities. In addition, users can also directly access database tables in documents such as word documents, online collaborative documents, etc. according to their own needs through the above method. In addition, users can also flexibly edit other content in the document, such as text editing and chart insertion in areas outside the database table, which is more flexible than users directly exporting tables from the database.

[0042] When the client creates a database table in the current document based on the database identifier and table information, it can refer to the following steps (1) to (2):

[0043] (1) Initiate a table identification acquisition request to the server based on the database identification and table information. In some embodiments, the client can construct a table data structure based on the database identification and table information, and the table data structure is related to both the table information (the user's table creation operation) and the database associated with the current document; then initiate a table identification acquisition request to the server based on the constructed table data structure. In other words, initiate a table identification acquisition request corresponding to the table data structure to the server or initiate a table identification acquisition request carrying the table data structure to the server. Only after receiving the table identification of the database table to be created returned by the server can the creation of the database table be confirmed. Alternatively, the client can directly send a request body of the table data structure to the server (equivalent to sending a table identification acquisition request), and the server can directly construct the corresponding database table based on the table data structure and return the table identification of the database table to the client, so that the client can update the document data and mount the database table based on the table identification.

[0044] (2) In response to the table identifier returned by the server in response to the table identifier acquisition request, the table identifier and the database identifier are associated and stored in a data structure corresponding to the current document, and the database table is rendered and displayed on the current document based on the table information.

[0045] The table identifier is the table identifier (also called TableID) under the database associated with the current document. The server can return the corresponding table identifier for the table identifier acquisition request. In some embodiments, after obtaining the table identifier, the client can associate the table identifier and the database identifier and store them in the data structure corresponding to the current document. This step is to update the data structure corresponding to the current document. The data structure records the data contained in the document. The table identifier and the database identifier are associated and updated to the document data structure, which can realize data synchronization of document access to the database table. In addition, by rendering and displaying the database table on the current document based on the table information, the database table can be intuitively displayed on the interface of the current document.

[0046] In other embodiments, the client may also directly carry the database identifier and table information in the initiated table identifier acquisition request, so that the server (such as a database table backend) can build and store the database table based on the table information and the database identifier, so that the client can subsequently directly obtain the database table information from the server and render and display it. The above overall process can be regarded as creating a database table in the current document based on the database identifier and table information.

[0047] In addition, the embodiment of the present disclosure provides a document table processing method from the perspective of the server. The method can be applied to the server, and the server can be implemented by software and / or hardware, such as a server, Figure 2 The present invention provides a flowchart of a table processing method for a document applied to a server provided in an embodiment of the present invention. The method mainly includes the following steps S202 to S204:

[0048] Step S202: in response to a table creation request initiated by the client to create a database table in the current document, a database identifier associated with the current document is obtained.

[0049] Step S204, returning the database identifier to the client, so that the client creates a database table in the current document based on the database identifier and the table information of the database table to be created; wherein the table information is obtained by the client based on the user's table creation operation for the current document.

[0050] For the relevant contents of the above method, please refer to the relevant description of the table processing method for the document on the client side, which will not be repeated here. Through the interaction between the client and the server, the database table can be directly accessed in the document. The database table is related to the database associated with the current document, which helps to further enable the table accessed in the document to have database-related functions, effectively enhancing the functionality of the table.

[0051] In addition, in some embodiments, the server can obtain a table data structure (built based on a database identifier and table information) through the client, build and store the database table to be created based on the table data structure, and then the client can pull the database table from the server and render and mount it. The above overall process can also be regarded as the client creating a database table.

[0052] When the server obtains the database identifier associated with the current document, it can query whether the current document is associated with an existing database; if so, the identifier of the existing database is used as the database identifier associated with the current document; if not, a new database is created and the identifier of the new database is used as the database identifier associated with the current document.

[0053] In some implementations, each document can be associated with at most one database, but the database can have multiple tables. In other words, each document can access multiple database tables, and the multiple database tables all correspond to the same database, which is the database associated with the current document. The table identifiers of different database tables accessed in the current document are different, but the associated database identifiers are the same. Based on the above, when the client initiates a table creation request to the server to create a database table in the current document, the server will first search for the database associated with the current document (in other words, query the association between the document and the database). If found, the database identifier is returned to the client. If not found, it means that the current document does not have a database associated with it. At this time, a new database can be created for the current document and the identifier of the newly created database is returned to the client.

[0054] Furthermore, the method further includes: in response to a table identifier acquisition request initiated by the client based on the database identifier and the table information, returning the table identifier to the client, so that the client associates the table identifier and the database identifier and stores them in the data structure corresponding to the current document, and renders and displays the database table in the current document based on the table information. In actual applications, the client can first associate the table identifier and the database identifier, and store the association result in the data structure corresponding to the current document through the server, and the client can directly display the database table on the document interface based on the table information.

[0055] For ease of understanding, the present disclosure also provides a document table processing method, which illustrates the interaction process between the client and the server. Figure 3 The interactive flow chart of a document table processing method shown in the figure, the main steps of the interaction between the two are described as follows:

[0056] S301: The client obtains table information of a database table to be created based on the table creation operation in response to a table creation operation by a user on a current document.

[0057] S302: The client initiates a table creation request to the server to create a database table in the current document.

[0058] S303: The server queries whether the current document is associated with an existing database. If so, the identifier of the existing database is used as the database identifier associated with the current document; if not, a new database is created and the identifier of the new database is used as the database identifier associated with the current document.

[0059] S304: The server returns the database identifier associated with the current document to the client.

[0060] S305: The client constructs a table data structure based on the database identifier and the table information.

[0061] S306: The client initiates a request to the server to obtain a table identifier corresponding to the table data structure.

[0062] S307: The server obtains the table identifier corresponding to the table data structure. In some implementations, the server can obtain the request to store the table data structure and construct a corresponding database table based on the table identifier corresponding to the table data structure, and set the table identifier corresponding to the database table.

[0063] S308: The server returns a table identifier to the client.

[0064] S310: The client associates the table identifier and the database identifier and stores them in a data structure corresponding to the current document, and renders and displays the database table on the current document based on the table information.

[0065] The specific implementation methods and technical effects of the above steps can also refer to the above related contents, which will not be repeated here. Figure 3 This is only an example of application and should not be considered as a limitation. Figure 3 More or fewer steps enable the client and server to interact to access the database table of the document.

[0066] For ease of understanding, the disclosed embodiment further provides a specific implementation of a document table processing method. In this example, the client is divided into a document front end (also referred to as a first document processing end) and a database table front end (also referred to as a first database table processing end), and the database table front end may also be referred to as a database front end (or a first database processing end). Among them, the document front end may be a document application, and the database table front end may be a database table application component; the server is further divided into a document back end (also referred to as a second document processing end) and a database table back end (also referred to as a second database table processing end), and the database table back end may also be referred to as a database back end (or a second database processing end); among them, the document back end may be a document processing program, and the database table back end may be a database table processing program. In some implementations, the database table back end stores the association relationship between each document and the database and the information of each database, such as data structure information and all relevant information of the database. The database table back end may provide database data support (referred to as database information) for the database table front end, and may also store database tables corresponding to table creation operations based on users. The database table front end can render the database table based on the table information corresponding to the table creation operation and the database information (or directly render the database table based on the information of the constructed database table provided by the database table back end), and interact with the document front end through the database table front end, so that the document front end can finally mount and display the database table, so as to achieve the effect of accessing (embedding) the database table to the document. In addition, through the interaction between the document front end and the document back end, the document back end can also update the database identifier and the table identifier and store them in the document data, or make the document back end record and store the document data associated with the database table. For ease of understanding, in some specific implementations, the various roles are described below:

[0067] (I) From the client's perspective, the core operations of the document front end and the database table front end are explained:

[0068] The document front end is used to respond to the user's table creation operation for the current document, and request the database table front end to obtain the database identifier associated with the current document;

[0069] The database table front end is used to initiate a table creation request to the database table back end to create a database table in the current document, so as to obtain the database identifier associated with the current document returned by the database table back end in response to the table creation request; the database table front end is also used to obtain the table information of the database table to be created based on the table creation operation, and to render the database table on the current document based on the database identifier and the table information;

[0070] The database table front end is also used to initiate a table identifier acquisition request to the database table back end based on the database identifier and table information, so as to obtain the table identifier returned by the database table back end, and return the table identifier to the document front end;

[0071] The document front end is used to display the rendered database table on the interface of the current document, and is also used to associate the table identifier with the database identifier, and send the association result to the document back end so that the document back end stores the association result in the data structure corresponding to the current document.

[0072] Based on the above, for ease of understanding, the following uses different expressions to describe the interaction between the client and the server, focusing on the following key steps A to D performed by the client:

[0073] Key step A: In response to the user's table creation operation for the current document, the table information of the database table to be created is obtained, and a table creation request for creating the database table in the current document is initiated to the server. The steps may be performed as follows:

[0074] Responding to the user's table creation operation for the current document through the first document processing end (i.e., the document front end), obtaining table information of the database table to be created, and requesting the first database table processing end (i.e., the database table front end) to obtain a database identifier associated with the current document;

[0075] A table creation request for creating a database table in the current document is initiated from the first database table processing end to the second database table processing end (ie, the database table backend) to obtain a database identifier associated with the current document returned by the second database table processing end for the table creation request.

[0076] Key step B: Initiate a table identifier acquisition request to the server based on the database identifier and table information. This can be performed as follows:

[0077] Based on the database identifier and the table information, a table identifier acquisition request is initiated to the second database table processing end through the first database table processing end to obtain the table identifier returned by the second database table processing end. In some embodiments, as in the implementation of step A above, after the first database table processing end obtains the database identifier returned by the second database table processing end, it can further request the second database table processing end to obtain the table identifier based on the database identifier and the table information.

[0078] Key step C: The step of associating the table identifier and the database identifier and storing them in the data structure corresponding to the current document can be performed as follows:

[0079] The first document processing end responds to the table identifier sent by the first database table processing end, associates the table identifier with the database identifier, and sends the association result to the second document processing end, so that the second document processing end stores the association result in the data structure corresponding to the current document. In some embodiments, as in the implementation of step B above, after the first database table processing end obtains the table identifier, it can send the table identifier to the first document processing end, and the first document processing end can then associate the table identifier with the database identifier and send it to the second document processing end, and the second document processing end updates the data structure of the current document.

[0080] Key step D: Rendering and displaying the database table on the current document based on the table information can be performed as follows:

[0081] The first database table processing end performs database table rendering based on the table information and the database identifier, and the first document processing end displays the rendered database table on the interface of the current document. The first database table processing end can render the database table to be created when the table information and the database identifier are known, and the first document processing end displays the rendered database table.

[0082] The above are only specific examples and should not be considered as limitations. In addition, the above A to D are only identifications of different steps and should not be considered as limitations of the order or importance.

[0083] (II) From the perspective of the server, the document backend and the database table backend are explained:

[0084] The database table backend is used to obtain the database identifier associated with the current document in response to the table creation request sent by the database table frontend, and return the database identifier to the database table frontend, so that the database table frontend creates a database table in the current document based on the database identifier and table information, and returns the database identifier to the document frontend.

[0085] The database table backend is also used to receive a table identifier acquisition request initiated by the database table frontend based on the database identifier and table information, and return the table identifier corresponding to the table identifier acquisition request to the database table frontend, so that the database table frontend returns the table identifier to the document frontend.

[0086] The document backend is used to receive the association result of the table identifier and the database identifier sent by the document frontend, and store the association result in the data structure corresponding to the current document.

[0087] Based on the above, for ease of understanding, the following uses different expressions to describe the interaction between the client and the server, focusing on the following key steps E to H performed by the server:

[0088] Key step E: In response to a table creation request initiated by the client to create a database table in the current document, the step of obtaining a database identifier associated with the current document may be performed as follows:

[0089] The second database table processing end (database table back end) responds to the table creation request for creating a database table in the current document initiated by the first database table processing end (database table front end), and obtains the database identifier associated with the current document. That is, the database table front end sends the table creation request to the database table back end, and the database table back end obtains the database identifier associated with the current document.

[0090] Key step F: Returning the database identifier to the client can be performed as follows.

[0091] The database identifier is returned to the first database table front end by the second database table processing end. In some embodiments, as in the implementation of step E above, the second database table processing end obtains the database identifier and can return it to the first database table front end.

[0092] Key step G: In response to the table identifier acquisition request initiated by the client based on the database identifier and table information, the step of returning the table identifier to the client can be performed as follows:

[0093] The second database table processing end receives a table identifier acquisition request initiated by the first database table processing end based on the database identifier and the table information, and returns the table identifier corresponding to the table identifier acquisition request to the first database table processing end, so that the first database table processing end returns the table identifier to the first document processing end. In some embodiments, as in the implementation of step F above, the first database table processing end obtains the database identifier and the table information, and then can further obtain the table identifier through the second database table processing end, so as to return the table identifier to the first document processing end.

[0094] Key step H: The above method further includes: receiving, through the second document processing end, the association result of the table identifier and the database identifier sent by the first document processing end, and storing the association result in the data structure corresponding to the current document. In some embodiments, as in the implementation of step G above, the first document processing end obtains the table identifier through the first database table processing end, and then associates the table identifier with the database identifier, and sends the association result to the second document processing end, so that the second document processing end stores the association result in the data structure corresponding to the current document.

[0095] The above are only specific examples and should not be considered as limitations. In addition, the above E to H are only identifications of different steps and should not be considered as limitations of the order or importance.

[0096] Based on the foregoing, the present disclosure provides the following embodiments: Figure 4 The interactive flow chart of another document table processing method illustrates the interactive steps of the document front end, the database table front end, the document back end and the database table back end, specifically:

[0097] S1, the document front end responds to the user's table creation operation, creates a database table placeholder locally, and displays a loading status.

[0098] S2, the document front end requests the database table front end to obtain the database identifier, where the database identifier can also be called database table mark information.

[0099] S3, the database table front end requests the database table back end to create a database table.

[0100] S4, the database table backend queries the association between the current document and the database to obtain the database identifier.

[0101] S5, the database table backend returns the database identifier to the database table frontend.

[0102] S6, the database table front end builds a table data structure based on the database identifier and the table information corresponding to the table creation operation.

[0103] S7, the database table front end sends a request body corresponding to the table data structure to the database table back end. In some implementation examples, the database table front end can request the constructed request body to the database table back end through a short link to request a table identifier (the ID of the new table corresponding to the table creation operation).

[0104] S8, the database table backend returns the created table identifier, i.e., the ID of the table in the database associated with the current document, to the database table frontend. In some embodiments, after receiving the request body, the database table backend can directly construct a database table corresponding to the table data structure, assign a table identifier to the database table, and return the table identifier to the database table frontend.

[0105] S9, the database table front end returns the database identifier and table identifier to the document front end.

[0106] S10, the document front end associates and stores the database identifier and the table identifier in the document back end, and updates the document structure data.

[0107] S11, the document backend returns an Ack message (ie, a confirmation message) to the document frontend.

[0108] S12, the document front end calls the database interface to request to mount the database table. Specifically, after waiting for the document back end to execute S11, the document front end calls the database front end interface to request to mount the database table.

[0109] S13, the database table front end requests the database table back end for data information of the database table; after receiving the mount request, the database table front end may attempt to pull the data information of the current database table and load it. In some embodiments, the database table back end may establish and store the data information of the database table to be created in the database associated with the current document based on the table data structure.

[0110] S14, the database table backend returns data information to the database table frontend.

[0111] S15, the database table front end renders the database table. Specifically, it can also be understood as rendering the entire database component.

[0112] S16, the database table is displayed on the document front end. This step can also be understood as the current document mounting the database table, and the database table is successfully embedded in the current document.

[0113] The above method exemplifies the interaction process between the document front end, the database table front end, the document back end and the database table back end. It should be noted that: Figure 4 This is just a simple example to illustrate the main interaction steps and should not be considered as a limitation. Figure 4 The steps shown in the figure can be implemented with more or fewer steps.

[0114] Through the table processing method of the above-mentioned document provided by the embodiment of the present disclosure, the document can be directly connected to the database table, which is related to the database associated with the current document, which helps to further make the table connected in the document have database-related functions, effectively enhancing the functionality of the table. For example, access to the database table can structured storage, SQL query and operation data and other database functions, and also make the document have stronger data management capabilities. In addition, users can also directly access database tables in documents such as word documents and online collaborative documents according to their own needs through the above method. In addition, users can also flexibly edit other content in the document, such as text editing and chart insertion in areas outside the database table, which is more flexible than users directly exporting tables from the database. In addition, the embodiment of the present disclosure can also be better applied to online collaborative documents. After the database table is connected to the online collaborative document, it is convenient for multiple people to edit the database table of the online collaborative document. Through the interaction between the client and the server, the data information of the database table can be saved in the background database, which also greatly improves the convenience.

[0115] Corresponding to the aforementioned document table processing method, the present disclosure provides a document table processing device, which is applied to a client, see Figure 5 The schematic diagram of the structure of a table processing device for a document applied to a client is shown. The device can be implemented by software and / or hardware and can generally be integrated in an electronic device that can be used as a client (such as a mobile phone, a computer, etc.), including:

[0116] The client response module 502 is used to respond to the user's table creation operation on the current document, obtain the table information of the database table to be created, and initiate a table creation request to the server to create the database table in the current document;

[0117] The client table creation module 504 is used to create a database table in the current document based on the database identifier and the table information in response to the database identifier associated with the current document returned by the server in response to the table creation request.

[0118] Through the interaction between the client and the server, the above device can directly access a database table in the document. The database table is related to the database associated with the current document, which helps to further enable the table accessed in the document to have database-related functions, effectively enhancing the functionality of the table.

[0119] In some embodiments, the client table creation module is specifically used to: initiate a table identifier acquisition request to the server based on the database identifier and the table information; in response to the table identifier returned by the server in response to the table identifier acquisition request, associate the table identifier and the database identifier with each other and store them in the data structure corresponding to the current document, and render and display the database table on the current document based on the table information.

[0120] In some embodiments, the client response module is specifically used to: respond to the user's table creation operation on the current document through the first document processing end, obtain the table information of the database table to be created, and request the first database table processing end to obtain the database identifier associated with the current document; initiate a table creation request to create a database table in the current document to the second database table processing end through the first database table processing end, so as to obtain the database identifier associated with the current document returned by the second database table processing end for the table creation request.

[0121] In some implementations, the client table creation module is specifically used to: based on the database identifier and the table information, initiate a table identifier acquisition request to the second database table processing end through the first database table processing end to obtain the table identifier returned by the second database table processing end.

[0122] In some embodiments, the client table creation module is specifically used to: respond to the table identifier sent by the first database table processing end through the first document processing end, associate the table identifier with the database identifier, and send the association result to the second document processing end, so that the second document processing end stores the association result in the data structure corresponding to the current document.

[0123] In some embodiments, the client table creation module is specifically used to: render the database table based on the table information and the database identifier through the first database table processing end, and display the rendered database table on the interface of the current document through the first document processing end.

[0124] The table processing device for the document applied to the client provided by the embodiment of the present disclosure can execute the table processing method for the document applied to the client provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0125] Corresponding to the aforementioned document table processing method, the present disclosure provides a document table processing device, which is applied to the server, see Figure 6The structure diagram of a table processing device for a document applied to a server is shown. The device can be implemented by software and / or hardware and can generally be integrated in an electronic device that can be used as a server (such as a server), including:

[0126] The server response module 602 is used to respond to the table creation request initiated by the client to create a database table in the current document, and obtain the database identifier associated with the current document;

[0127] The server-side table creation module 604 is used to return the database identifier to the client so that the client can create a database table in the current document based on the database identifier and the table information of the database table to be created; wherein the table information is obtained by the client based on the user's table creation operation for the current document.

[0128] Through the interaction between the client and the server, the above device can directly access a database table in the document. The database table is related to the database associated with the current document, which helps to further enable the table accessed in the document to have database-related functions, effectively enhancing the functionality of the table.

[0129] In some implementations, the server response module 602 is specifically used to: query whether the current document is associated with an existing database; if so, use the identifier of the existing database as the database identifier associated with the current document; if not, create a new database, and use the identifier of the new database as the database identifier associated with the current document.

[0130] In some embodiments, the device also includes a server-side identification returning module, which is used to return a table identification to the client in response to a table identification acquisition request initiated by the client based on the database identification and the table information, so that the client associates the table identification and the database identification and stores them in the data structure corresponding to the current document, and renders and displays the database table on the current document based on the table information.

[0131] In some embodiments, the server-side response module is specifically used to: respond to a table creation request initiated by the first database table processing end to create a database table in the current document through the second database table processing end, and obtain a database identifier associated with the current document; the server-side table creation module is specifically used to: return the database identifier to the first database table front end through the second database table processing end.

[0132] In some embodiments, the server-side identification return module is specifically used to: receive, through the second database table processing end, a table identification acquisition request initiated by the first database table processing end based on the database identification and the table information, and return the table identification corresponding to the table identification acquisition request to the first database table processing end, so that the first database table processing end returns the table identification to the first document processing end.

[0133] In some embodiments, the device further includes: an association storage module, configured to receive, via a second document processing end, an association result of the table identifier and the database identifier sent by the first document processing end, and store the association result in a data structure corresponding to the current document.

[0134] The table processing device for the document applied to the server provided by the embodiment of the present disclosure can execute the table processing method for the document applied to the server provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0135] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device embodiment can refer to the corresponding process in the method embodiment, and will not be repeated here.

[0136] The disclosed embodiment provides an electronic device, the electronic device comprising: a processor; a memory for storing instructions executable by the processor; the processor, for reading the executable instructions from the memory, and executing the instructions to implement any of the above-mentioned document table processing methods applied to the client, or to implement any of the above-mentioned document table processing methods applied to the server. That is, the electronic device can be implemented as a client or a server.

[0137] Figure 7 The structure diagram of an electronic device provided by the embodiment of the present disclosure is shown in FIG. Figure 7 As shown, the electronic device 700 includes one or more processors 701 and a memory 702 .

[0138] The processor 701 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 700 to perform desired functions.

[0139] The memory 702 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 701 may run the program instructions to implement the table processing method of the document of the embodiment of the present disclosure described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.

[0140] In one example, the electronic device 700 may further include: an input device 703 and an output device 704, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0141] In addition, the input device 703 may also include, for example, a keyboard, a mouse, and the like.

[0142] The output device 704 can output various information to the outside, including the determined distance information, direction information, etc. The output device 704 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0143] Of course, to simplify, Figure 7 Only some of the components related to the present disclosure in the electronic device 700 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 700 may also include any other appropriate components.

[0144] In addition to the above methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the document table processing method provided by the embodiments of the present disclosure.

[0145] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0146] In addition, the embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the document table processing method provided by the embodiment of the present disclosure.

[0147] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0148] The embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which implements the document table processing method in the embodiment of the present disclosure when the computer program / instruction is executed by a processor.

[0149] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0150] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A document table processing method, characterized in that: The method is applied to a client and includes: Responding to the user's table creation operation for the current document through the first document processing end, obtaining table information of the database table to be created, and requesting the first database table processing end to obtain a database identifier associated with the current document; Initiating a table creation request to create a database table in the current document to a second database table processing end through the first database table processing end, so as to obtain a database identifier associated with the current document returned by the second database table processing end in response to the table creation request; In response to the database identifier associated with the current document returned by the server in response to the table creation request, a database table is created in the current document based on the database identifier and the table information.

2. The method according to claim 1, characterized in that The step of creating a database table in the current document based on the database identifier and the table information comprises: Initiate a table identifier acquisition request to the server based on the database identifier and the table information; In response to the table identifier returned by the server in response to the table identifier acquisition request, the table identifier and the database identifier are associated and stored in a data structure corresponding to the current document, and the database table is rendered and displayed on the current document based on the table information.

3. The method according to claim 2, characterized in that The step of initiating a table identifier acquisition request to the server based on the database identifier and the table information includes: Based on the database identifier and the table information, a table identifier acquisition request is initiated to the second database table processing end through the first database table processing end to acquire the table identifier returned by the second database table processing end.

4. The method according to claim 2, characterized in that: The step of associating and storing the table identifier and the database identifier in a data structure corresponding to the current document comprises: The first document processing end responds to the table identifier sent by the first database table processing end, associates the table identifier with the database identifier, and sends the association result to the second document processing end, so that the second document processing end stores the association result in the data structure corresponding to the current document.

5. The method according to claim 2, characterized in that: The step of rendering and displaying a database table on the current document based on the table information includes: The first database table processing end performs database table rendering based on the table information and the database identifier, and the first document processing end displays the rendered database table on the interface of the current document.

6. A document table processing method, characterized in that: The method is applied to the server, and includes: In response to a table creation request initiated by a client to create a database table in a current document, obtaining a database identifier associated with the current document; The database identifier is returned to the client, so that the client creates a database table in the current document based on the database identifier and table information of the database table to be created; wherein the table information is obtained by the client based on a table creation operation performed by a user on the current document.

7. The method according to claim 6, characterized in that The step of obtaining a database identifier associated with the current document comprises: Query whether the current document is associated with an existing database; If yes, using the identifier of the existing database as the database identifier associated with the current document; If not, a new database is created, and the identifier of the new database is used as the database identifier associated with the current document.

8. The method according to claim 6, characterized in that The method further comprises: In response to a table identifier acquisition request initiated by the client based on the database identifier and the table information, the table identifier is returned to the client, so that the client associates the table identifier and the database identifier and stores them in a data structure corresponding to the current document, and renders and displays the database table on the current document based on the table information.

9. The method according to claim 6, characterized in that In response to a table creation request initiated by a client to create a database table in a current document, the step of acquiring a database identifier associated with the current document includes: Responding to a table creation request initiated by the first database table processing end to create a database table in the current document through the second database table processing end, the database identifier associated with the current document is acquired; The step of returning the database identifier to the client comprises: The database identifier is returned to the first database table front end through the second database table processing end.

10. The method according to claim 8, characterized in that In response to a table identifier acquisition request initiated by the client based on the database identifier and the table information, the step of returning the table identifier to the client comprises: The second database table processing end receives a table identifier acquisition request initiated by the first database table processing end based on the database identifier and the table information, and returns the table identifier corresponding to the table identifier acquisition request to the first database table processing end, so that the first database table processing end returns the table identifier to the first document processing end.

11. The method according to claim 8, characterized in that The method further comprises: The association result between the table identifier and the database identifier sent by the first document processing end is received through the second document processing end, and the association result is stored in the data structure corresponding to the current document.

12. A document table processing device, characterized in that: The device is applied to a client and includes: The client response module is used to respond to the user's table creation operation for the current document through the first document processing end, obtain the table information of the database table to be created, and request the first database table processing end to obtain the database identifier associated with the current document; initiate a table creation request to create a database table in the current document to the second database table processing end through the first database table processing end, so as to obtain the database identifier associated with the current document returned by the second database table processing end in response to the table creation request; The client table creation module is used to respond to the database identifier associated with the current document returned by the server in response to the table creation request, and create a database table in the current document based on the database identifier and the table information.

13. A document table processing device, characterized in that: The device is applied to a server, and includes: The server-side response module is used to respond to a table creation request initiated by the client to create a database table in the current document, and obtain a database identifier associated with the current document; The server-side table creation module is used to return the database identifier to the client so that the client creates a database table in the current document based on the database identifier and the table information of the database table to be created; wherein the table information is obtained by the client based on the user's table creation operation on the current document.

14. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the document table processing method described in any one of claims 1 to 5, or to implement the document table processing method described in any one of claims 6 to 11.

15. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the document table processing method described in any one of claims 1 to 5, or execute the document table processing method described in any one of claims 6 to 11.