Document table processing method, device, equipment, and medium

The integration of database tables into documents through client-service side interaction enhances data management and editing flexibility by providing structured storage and SQL query capabilities, addressing the limitations of existing document processing technologies.

JP2024541656AActive Publication Date: 2024-11-08BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024532943
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-12-02
Filing Date
2022-11-28
Publication Date
2024-11-08
Estimated Expiration
2042-11-28

AI Technical Summary

Technical Problem

Existing document processing technologies, such as in Word documents and online collaborative documents, lack the ability to directly integrate database tables with database functionality, limiting data management capabilities and flexibility in editing and presentation.

Method used

A method and apparatus that enable the integration of database tables into documents by interacting between a client and a service side, using database identifiers and table information to create and render database tables within the document, providing structured storage and SQL query capabilities.

Benefits of technology

Enables flexible integration of database tables with structured storage and SQL query capabilities, enhancing data management and editing flexibility in documents, allowing users to directly import and edit database tables without the limitations of exporting data from databases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024541656000001_ABST
    Figure 2024541656000001_ABST
Patent Text Reader

Abstract

An embodiment of the present disclosure relates to a method, apparatus, device, and medium for processing tables in a document, in which a method applied to a client includes the steps of obtaining table information of a database table to be created in response to a table creation operation by a user on a current document, and issuing a table creation request to a service side to create a database table in the current document, and creating a database table in the current document based on the database identifier and the table information in response to a database identifier associated with the current document returned by the service side in response to the table creation request.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] [CROSS REFERENCE TO RELATED APPLICATIONS] This application claims priority from a Chinese application having application number 202111459218.X and filing date of December 2, 2021, the disclosure of which is hereby incorporated by reference in its entirety into this application.

[0002] [Technical field] The present disclosure relates to the field of data processing technology, and more particularly to a method, apparatus, device and medium for processing tables in a document. [Background technology]

[0003] Many text-editable documents in the prior art allow users to not only enter text, but also to create tables, e.g., a table with N rows and M columns as needed, which is used only for simple data entry and presentation. Summary of the Invention [Means for solving the problem]

[0004] An embodiment of the present disclosure provides a table processing method for a document applied to a client, the method including the steps of: in response to a table creation operation by a user on a current document, obtaining table information of a database table to be created and issuing a table creation request to a service side to create a database table in the current document; and in response to a database identifier associated with the current document returned by the service side 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] In some embodiments, the step of creating a database table in the current document based on the database identifier and the table information includes the steps of: issuing a table identifier acquisition request to a service side based on the database identifier and the table information; and, in response to the table identifier returned by the service side in response to the table identifier acquisition request, associating the table identifier with the database identifier and storing it in a data structure corresponding to the current document, and rendering and presenting the database table in the current document based on the table information. In some embodiments, the step of acquiring table information of a database table to be created in response to a table creation operation by a user on the current document and issuing a table creation request to a service side to create a database table in the current document includes the steps of acquiring table information of a database table to be created via a first document processing side in response to a table creation operation by a user on the current document, requesting the first database table processing side to acquire a database identifier associated with the current document, and issuing a table creation request to a second database table processing side via the first database table processing side to create a database table in the current document, and acquiring a database identifier associated with the current document returned from the second database table processing side in response to the table creation request.

[0006] In some embodiments, the step of issuing a table identifier acquisition request to the service side based on the database identifier and the table information includes a step of issuing a table identifier acquisition request to a second database table processing side via a first database table processing side based on the database identifier and the table information, and acquiring a table identifier returned from the second database table processing side.

[0007] In some embodiments, the step of associating the table identifier with the database identifier and storing it in a data structure corresponding to the current document includes the step of associating the table identifier with the database identifier via a first document processing side in response to a table identifier transmitted from a first database table processing side, transmitting the association result to a second document processing side, and causing the second document processing side to store the association result in a data structure corresponding to the current document.

[0008] In some embodiments, the step of rendering and presenting a database table in the current document based on the table information includes the step of rendering a database table based on the table information and the database identifier via a first database table processing side and presenting the rendered database table in an interface of the current document via a first document processing side.

[0009] An embodiment of the present disclosure further provides a table processing method for a document applied to a service side, the method including: in response to a table creation request issued by a client to create a database table in a current document, obtaining a database identifier associated with the current document; and returning the database identifier to the client to allow the client to create 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 on the current document by a user.

[0010] In some embodiments, obtaining a database identifier associated with the current document includes querying whether the current document is associated with an existing database, and if YES (the current document is associated with an existing database), setting the identifier of the existing database as the database identifier associated with the current document, and if NO (the current document is not associated with an existing database), creating a new database and setting the identifier of the new database as the database identifier associated with the current document.

[0011] In some embodiments, the method further includes, in response to a table identifier request issued by the client based on the database identifier and the table information, returning a table identifier to the client, causing the client to associate and store the table identifier with the database identifier in a data structure corresponding to the current document, and rendering and presenting a database table in the current document based on the table information.

[0012] In some embodiments, obtaining a database identifier associated with the current document in response to a table creation request issued by a client to create a database table in the current document includes obtaining a database identifier associated with the current document via a second database table processing side in response to a table creation request issued by a first database table processing side to create a database table in the current document, and returning the database identifier to the client includes returning the database identifier to a first database table front end via the second database table processing side.

[0013] In some embodiments, the step of returning a table identifier to the client in response to a table identifier acquisition request issued by the client based on the database identifier and the table information includes a step of receiving a table identifier acquisition request issued by a first database table processing side based on the database identifier and the table information via a second database table processing side, returning a table identifier corresponding to the table identifier acquisition request to the first database table processing side, and having the first database table processing side return the table identifier to the first document processing side.

[0014] In some embodiments, the method further includes receiving an association result between the table identifier and the database identifier transmitted from the first document processing side via the second document processing side, and storing the association result in a data structure corresponding to the current document.

[0015] In some embodiments, the client includes a first document processing side and a first database table processing side, and the service side includes a second document processing side and a second database table processing side.

[0016] In some embodiments, the table information includes at least one of information for formatting a table or a presentation format for a view.

[0017] In some embodiments, the database tables that are created have database functionality including at least one of structured storage for data and Structured Query Language (SQL) queries or operations.

[0018] An embodiment of the present disclosure further provides a table processing device for a document applied to a client, the device including: a client response module for obtaining table information of a database table to be created in response to a table creation operation by a user on a current document, and issuing a table creation request to a service side to create a database table in the current document; and a client table creation module for creating a database table in the current document based on a database identifier associated with the current document returned by the service side in response to the table creation request.

[0019] An embodiment of the present disclosure further provides a document table processing device, which includes: a service-side response module applied to a service side for obtaining a database identifier associated with a current document in response to a table creation request issued by a client to create a database table in the current document; and a service-side table creation module for returning the database identifier to the client and causing the client to create a database table in the current document based on the database identifier and table information of the database table to be created, where the table information is obtained by the client based on a table creation operation by a user on the current document.

[0020] An embodiment of the present disclosure further provides an electronic device, the electronic device including a processor and a memory for storing instructions executable by the processor, the processor being used to read the executable instructions from the memory and execute the executable instructions to realize a table processing method for a document according to an embodiment of the present disclosure.

[0021] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored for performing the method for processing tables of a document according to an embodiment of the present disclosure.

[0022] An embodiment of the present disclosure further provides a computer program comprising instructions that, when executed by a processor, cause the processor to perform a method for processing tables of a document according to an embodiment of the present disclosure.

[0023] It should be understood that the contents described in this section are not intended to identify gist or key features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become more readily apparent from the following specification. [Brief description of the drawings]

[0024] The drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification serve to explain the principles of the present disclosure.

[0025] In order to more clearly describe the technical solutions in the embodiments or prior art of the present disclosure, the following briefly introduces drawings necessary for describing the embodiments or prior art, and obviously, those skilled in the art can also obtain other drawings based on these drawings without paying creative labor. [Figure 1] 1 is a schematic flowchart of a table processing method for a document applied to a client according to an embodiment of the present disclosure. [Diagram 2] 1 is a schematic flowchart of a table processing method for a document applied to a service side according to an embodiment of the present disclosure; [Diagram 3] 1 is an interaction flowchart of a method for processing a table in a document according to an embodiment of the present disclosure. [Figure 4] 13 is an interaction flowchart of another document table processing method according to an embodiment of the present disclosure. [Diagram 5] FIG. 2 is a structural schematic diagram of a document table processing device applied to a client according to an embodiment of the present disclosure; [Figure 6]FIG. 2 is a structural schematic diagram of a document table processing device applied to the service side according to an embodiment of the present disclosure; [Figure 7] FIG. 1 is a structural schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0026] In order to make the above objectives, features and advantages of the present disclosure more clearly understandable, the present disclosure will be further described below. It should be noted that, unless inconsistent, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0027] In order to make the present disclosure fully understandable, many specific details are described in the following description, but the present disclosure may be implemented in other ways different from the ways described herein. Apparently, the embodiments in the specification are only some embodiments of the present disclosure, but not all embodiments.

[0028] In user-editable documents such as Word documents and many online collaborative documents, it is almost impossible to directly introduce a database table, and only a simple data table can be inserted locally. However, such a table function is single and can only be used to input data into cells and present them, but does not have the capabilities of a database-based table, and does not have database functions such as structured storage of data by a database table and operation with SQL queries, and the data management ability for documents is relatively poor. Meanwhile, users cannot directly flexibly associate documents with database tables, and can only export data from a database to form documents, which is not only cumbersome but also relatively poor in flexibility. In addition, the document format formed by exporting table data from a database has limitations, making it difficult to meet the flexible editing demand of users who want to edit paragraph characters in a document and insert tables in other places in the document, and accordingly the richness of document functions is relatively poor. In order to improve or partially improve at least one of the above problems, the embodiments of the present disclosure provide a method, device, equipment, and medium for processing tables in a document, and the document in the embodiments of the present disclosure may be, for example, a Word document or an online collaborative document, which will be described in detail below.

[0029] First, an embodiment of the present disclosure provides a document table processing method applicable to a client from a client's perspective. The client may be realized by at least one of software and hardware, and may be a user device such as a computer, a mobile phone, etc. FIG. 1 is a schematic flowchart of a document table processing method applicable to a client according to an embodiment of the present disclosure. As shown in FIG. 1, the method mainly includes steps S102 to S104 as follows.

[0030] Step S102: In response to a table creation operation by the user for the current document, table information of the database table to be created is obtained, and a table creation request for creating a database table in the current document is issued to the service side.

[0031] As can be seen, a user can perform a table creation operation to indicate table information of a table to be created through a table creation component that is preset in a current document. The table information includes, but is not limited to, information for setting a format of a table, such as information for setting a table to have M rows and N columns (M and N are both positive integers), or may include a presentation format of a view of a table to be created. The embodiment of the present disclosure does not limit the table creation operation. A client can obtain table information based on the table creation operation and issue a table creation request to a service side. It should be noted that the embodiment of the present disclosure does not limit the context between obtaining table information and sending a table creation request.

[0032] In addition, in practical applications, when a user performs a table creation operation on a current document, the client can locally create a placeholder for a database table, display the loading status, and then request the service side to obtain a database identifier, where the request to obtain a database identifier can be regarded as a table creation request for creating a database table in the current document.

[0033] Step S104: In response to the database identifier associated with the current document returned from the service side for the table creation request, create a database table in the current document based on the database identifier and table information. The database identifier is also called database table flag information or database token flag.

[0034] In practical application, the service side records the association relationship between the document and the database. After the client obtains the database identifier associated with the current document returned by the service side, the client can realize the creation of a database table, and the database table can be rendered and displayed in the current document. Meanwhile, the database table is also related to the database corresponding to the database identifier. Specifically, the database table is a table in the database associated with the current document. When the client renders and displays the database table, the client can call the interface of the database table front end to request the mounting of the database table. After receiving the mounting request, the database table front end can pull and load the table information of the database table. 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 can be displayed in the current document.

[0035] It should be noted that the embodiment of the present disclosure does not directly create a table in the document based on the table information as in the conventional method, but through the interaction between the client and the service side, the service side only returns a database identifier associated with the current document, and further creates a table in the current document based on the database identifier and the table information, which is directly related to the database and is essentially a database table.

[0036] The above method can directly introduce (or incorporate) a database table related to a database associated with a current document in a document through the interaction between the client and the service side. This contributes to providing the table introduced in the document with further database-related functions, effectively reinforcing the functionality of the table. For example, the introduced database table has database functions such as structured storage of data, SQL query and operation, and provides the document with stronger data management capabilities. In addition, the user can also directly introduce database tables according to his / her own needs in documents such as Word documents and online collaborative documents through the above method. In addition, the user can flexibly edit other contents in the document, such as text editing and graph insertion in areas other than the database table. This is more flexible than when the user directly exports a table from the database.

[0037] When the client creates a database table in the current document based on the database identifier and the table information, the client may refer to and achieve the following steps (1)-(2).

[0038] (1) Issue a table identifier acquisition request to the service side based on the database identifier and table information. In some embodiments, the client can build a table data structure related to the table information (user's table creation operation) and also related to the database associated with the current document based on the database identifier and table information, and then issue a table identifier acquisition request to the service side based on the built table data structure, that is, issue a table identifier acquisition request corresponding to the table data structure to the service side, or issue a table identifier acquisition request with the table data structure attached to the service side, and only receive the table identifier of the database table to be created returned from the service side, and then confirm the creation of the database table. Or, the client can directly send a request body for the table data structure (corresponding to sending a table identifier acquisition request) to the service side, and the service side can directly build the corresponding database table based on the table data structure and return the table identifier 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 identifier.

[0039] (2) In response to a table identifier returned from the service side in response to a request to obtain a table identifier, 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 presented in the current document based on the table information.

[0040] The table identifier is a table identifier (also called Table ID) in a database associated with the current document. In response to a request to obtain a table identifier, the service side can return the corresponding table identifier. In some embodiments, after obtaining the table identifier, the client can associate the table identifier with the database identifier and store it in a data structure corresponding to the current document. This step is to update a data structure corresponding to the current document in which data contained in the document is recorded. By associating the table identifier with the database identifier and updating it in the document data structure, data synchronization of the database table introduced into the document can be realized. In addition, by rendering and presenting the database table in the current document based on the table information, the database table can be intuitively presented in the interface of the current document.

[0041] In some other embodiments, the client may include the database identifier and the table information in the issued table identifier acquisition request, and build and store the database table based on the table information and the database identifier via the service side (e.g., database table backend), so that the client can then directly obtain the database table information from the service side for rendering presentation. The whole process above may be regarded as creating a database table in the current document based on the database identifier and the table information.

[0042] Moreover, the embodiment of the present disclosure provides a document table processing method applied to the service side from the viewpoint of the service side. The service side may be realized by at least one of software and hardware, and may be, for example, a server. FIG. 2 is a schematic flowchart of the document table processing method applied to the service side according to the embodiment of the present disclosure, and the method mainly includes the following steps S202 to S204.

[0043] Step S202: In response to a create table request issued by a client to create a database table in the current document, obtain a database identifier associated with the current document.

[0044] Step S204: Return the database identifier to the client, and allow the client to create a database table in the current document according to the database identifier and table information of the database table to be created, where the table information is obtained by the client according to a table creation operation by the user for the current document.

[0045] The relevant content of the above method can be referred to the relevant description of the client's document table processing method, and will not be described further here. Through the interaction between the client and the service side, the database table related to the database associated with the current document can be directly introduced in the document, which contributes to further endowing the table introduced in the document with database-related functions, and effectively reinforces the functionality of the table.

[0046] In some embodiments, the service side may also obtain a table data structure (constructed based on the database identifier and table information) via the client, and construct and store the database table to be created based on the table data structure. The client may then pull the database table from the service side for rendering and mounting. The entire process above may also be considered as creating a client database table.

[0047] When the service gets the database identifier associated with the current document, it can ask if the current document is associated with an existing database. If YES, it takes the identifier of the existing database as the database identifier associated with the current document. If NO, it creates a new database and takes the identifier of the new database as the database identifier associated with the current document.

[0048] In some embodiments, each document may be associated with at most one database, which may have multiple tables. That is, each document may introduce multiple database tables, all of which correspond to the same database associated with the current document. The table identifiers of the different database tables introduced in the current document are different, but the associated database identifiers are all the same. Then, after the client issues a table creation request to the service side to create a database table in the current document, the service side first searches for the database associated with the current document (i.e., queries the association relationship between the document and the database). If successful, the service side returns the identifier of this database to the client; if not, it indicates that there is currently no database associated with the current document, but may also create a new database in the current document and return the identifier of the newly created database to the client.

[0049] Furthermore, the method further includes: in response to a table identifier acquisition request issued by the client according to the database identifier and the table information, returning the table identifier to the client, allowing the client to associate the table identifier with the database identifier and store it in a data structure corresponding to the current document, and render and present the database table in the current document according to the table information. In practical application, the client may first associate the table identifier with the database identifier, and store and record the associated result in a data structure corresponding to the current document via the service side. The client may directly present the database table in the document interface according to the table information.

[0050] For ease of understanding, the embodiment of the present disclosure further provides a document table processing method, which shows the process of interaction between the client and the service side. Specifically, refer to the interaction flowchart of the document table processing method shown in Figure 3, and the main steps of both interactions are as follows:

[0051] S301: In response to a table creation operation by a user for a current document, a client obtains table information of a database table to be created based on the table creation operation.

[0052] S302: The client issues a table creation request to the service side to create a database table in the current document.

[0053] S303: The service side queries whether the current document is associated with an existing database. If YES, the identifier of the existing database is taken as the database identifier associated with the current document. If NO, create a new database and take the identifier of the new database as the database identifier associated with the current document.

[0054] S304: The service side returns to the client a database identifier associated with the current document.

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

[0056] S306: The client issues a table identifier acquisition request corresponding to the table data structure to the service side.

[0057] S307: The service side obtains a table identifier corresponding to the table data structure. In some embodiments, the service side itself may store the table data structure according to the table identifier obtaining request corresponding to the table data structure, build a corresponding database table, and set a table identifier corresponding to the database table.

[0058] S308: The service side returns the table identifier to the client.

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

[0060] The specific implementation manner and achievable technical effects of the above steps can also refer to the above related content, and will not be further described here. It should be noted that Fig. 3 is only an application example and should not be regarded as a limitation. In actual application, more or less steps than Fig. 3 can be adopted to perform the interaction between the client and the service side to realize the introduction of the database table into the document.

[0061] For ease of understanding, the embodiment of the present disclosure further provides a specific embodiment of the document table processing method. In this example, the client is divided into a document front end (also referred to as a first document processing side) and a database table front end (also referred to as a first database table processing side). The database table front end is also abbreviated to a database front end (or a first database processing side). The document front end may be a document application program, and the database table front end may be a database table application component. The service side is also further divided into a document back end (also referred to as a second document processing side) and a database table back end (also referred to as a second database table processing side), and the database table back end is abbreviated to a database back end (or a second database processing side). 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 embodiments, the database table back end stores the associated relationship between each document and a database and information about each database, and this information may be all associated information of the database, such as data structure information. The database table backend may provide database data support (abbreviated as database information) for the database table frontend, and may store database tables corresponding to user-based table creation operations. The database table frontend may render database tables according to table information and database information corresponding to table creation operations (or directly render database tables according to pre-built database table information provided by the database table backend), communicate with the document frontend through the database table frontend, and finally mount and display the database table in the document frontend, thereby achieving the effect that the database table is introduced (embedded) into the document.The document front end and the document back end can also communicate with each other to allow the document back end to update and store the database identifier and table identifier in the document data, or to record and store the document data associated with the database table. For ease of understanding, the following describes different roles in several specific embodiments.

[0062] (1) From a client perspective, this paper describes the core operations of the document front-end and the database table front-end.

[0063] the Document Front End is used to request from the Database Table Front End, in response to a user creating a table on the current document, a database identifier associated with the current document; the Database Table Front End is used to issue a create table request to the Database Table Back End to create a database table in the current document, and obtain a database identifier associated with the current document returned from the Database Table Back End in response to the create table request; the Database Table Front End is further used to obtain table information of the database table to be created based on the create table operation, and render the database table in the current document based on the database identifier and the table information; The database table front end is further used to issue a table identifier retrieval request to the database table back end based on the database identifier and the table information, retrieve a table identifier returned from the database table back end, and return the table identifier to the document front end; The document front end is used to present the rendered database tables in the interface of the current document, and is further used to associate table identifiers with database identifiers, send the association results to the document back end, and have the document back end store the association results in a data structure corresponding to the current document.

[0064] Based on the above, for ease of understanding, the following adopts different representation methods to describe the interaction between the client and the service side, and focuses on the following key steps A to D performed by the client:

[0065] Important step A: In response to a user's table creation operation for the current document, the step of obtaining table information of the database table to be created and issuing a table creation request to the service side to create a database table in the current document can be performed by referring to the following method.

[0066] Responding to a table creation operation for the current document by a user via a first document processing side (i.e., a document front end), obtaining table information of a database table to be created, and requesting a first database table processing side (i.e., a database table front end) to obtain a database identifier associated with the current document; A table creation request for creating a database table in the current document is issued to a second database table processing side (i.e., a database table backend) via the first database table processing side, and a database identifier associated with the current document is obtained, which is returned from the second database table processing side in response to the table creation request.

[0067] Important step B: issuing a table identifier acquisition request to the service side based on the database identifier and table information may be performed by referring to the following method.

[0068] Based on the database identifier and the table information, a table identifier acquisition request is issued to the second database table processing side via the first database table processing side, and a table identifier returned from the second database table processing side is acquired. In some embodiments, in implementing the above step A, when the first database table processing side acquires the database identifier returned from the second database table processing side, it can further request the second database table processing side to acquire a table identifier based on the database identifier and the table information.

[0069] Key step C: Associating and storing the table identifier and database identifier in a data structure corresponding to the current document may be performed with reference to the following scheme.

[0070] In response to the table identifier transmitted by the first database table processing side via the first document processing side, the table identifier is associated with the database identifier, and the associated result is transmitted to the second document processing side, causing the second document processing side to store the associated result in a data structure corresponding to the current document. In some embodiments, in implementing step B above, when the first database table processing side obtains the table identifier, the first document processing side can transmit the table identifier to the first document processing side. The first document processing side can further associate the table identifier with the database identifier and transmit it to the second document processing side, causing the second document processing side to update the data structure of the current document.

[0071] Important step D: rendering and presenting the database table in the current document based on the table information may be performed with reference to the following scheme.

[0072] Rendering the database table based on the table information and the database identifier through a first database table processing side, and presenting the rendered database table in the interface of the current document through a first document processing side. When the table information and the database identifier are known, the first database table processing side can render the database table to be created and display the database table rendered by the first document processing side.

[0073] The above are merely specific examples and should not be considered as limitations. Note that A to D above are merely identifiers of different steps and should not be considered as limitations on the order or importance.

[0074] (2) From the service side perspective, we will discuss the document backend and the database table backend.

[0075] The database table back end is used to obtain a database identifier associated with the current document in response to a table creation request sent from the database table front end, return the database identifier to the database table front end, and cause the database table front end to create a database table in the current document based on the database identifier and the table information, and return the database identifier to the document front end.

[0076] The database table back end is further used to receive a table identifier retrieval request issued by the database table front end based on the database identifier and table information, return a table identifier corresponding to the table identifier retrieval request to the database table front end, and have the database table front end return the table identifier to the document front end.

[0077] The document back end is used to receive the association results between the table identifiers and the database identifiers sent by the document front end, and to store the association results in a data structure corresponding to the current document.

[0078] Based on the above, for ease of understanding, the following adopts different representation methods to describe the interaction between the client and the service side, and focuses on the following key steps E~H performed by the service side:

[0079] Key Step E: In response to a create table request issued by a client to create a database table in a current document, the step of obtaining a database identifier associated with the current document may be performed with reference to the following scheme:

[0080] In response to a create table request issued by a first database table processing side (database table front end) to create a database table in the current document, a database identifier associated with the current document is obtained via a second database table processing side (database table back end), i.e., the database table front end sends a create table request to the database table back end, and the database table back end obtains a database identifier associated with the current document.

[0081] Key Step F: Returning the database identifier to the client may be performed with reference to the following scheme.

[0082] Return the database identifier to the first database table front end via the second database table processing side. In some embodiments, in implementing step E above, the second database table processing side, upon obtaining the database identifier, can return it to the first database table front end.

[0083] Important step G: the step of returning a table identifier to a client in response to a table identifier acquisition request issued by the client based on the database identifier and table information may be performed with reference to the following scheme.

[0084] receive a table identifier acquisition request issued by the first database table processing side based on the database identifier and table information via the second database table processing side, return a table identifier corresponding to the table identifier acquisition request to the first database table processing side, and have the first database table processing side return the table identifier to the first document processing side. In some embodiments, in implementing step F above, the first database table processing side can obtain the database identifier and the table information, and further obtain the table identifier via the second database table processing side, thereby returning the table identifier to the first document processing side.

[0085] Important step H: receiving the association result between the table identifier and the database identifier sent by the first document processing side via the second document processing side, and storing the association result in a data structure corresponding to the current document. In some embodiments, in implementing the above step G, when the first document processing side obtains the table identifier via the first database table processing side, it further associates the table identifier with the database identifier and sends the association result to the second document processing side, thereby enabling the second document processing side to store the association result in a data structure corresponding to the current document.

[0086] The above are merely specific examples and should not be considered as limitations. Note that E to H above are merely identifiers of different steps and should not be considered as limitations on the order or importance.

[0087] Based on the foregoing, an embodiment of the present disclosure provides an interaction flowchart of another document table processing method as shown in FIG. 4, which shows interaction steps between a document front end, a database table front end, a document back end and a database table back end, including S1 to S16.

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

[0089] S2, the document front end requests the database table front end to obtain a database identifier, also called database table flag information.

[0090] S3, the Database Table Frontend, asks the Database Table Backend to create the database table.

[0091] S4: The database table backend queries the association relationship between the current document and the database to obtain a database identifier.

[0092] S5. The database table backend returns a database identifier to the database table frontend.

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

[0094] S7, the Database Table Front End sends a request body corresponding to the table data structure to the Database Table Back End. In some embodiments, the Database Table Front End may request the request body constructed via the short link to the Database Table Back End to obtain a table identifier (ID of the new table corresponding to the create table operation).

[0095] S8, the Database Table Backend returns to the Database Table Frontend the created table identifier, i.e., the ID of the table in the database associated with the current document. In some embodiments, upon receiving the request, the Database Table Backend can directly build 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.

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

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

[0098] S11: The document back end returns an Ack message (ie, a confirmation message) to the document front end.

[0099] S12, the document front end calls the database interface to request mounting of the database table. Specifically, the document front end waits for the document back end to execute S11, and then calls the interface of the database front end to request mounting of the database table.

[0100] S13, the database table front end may request the database table data information from the database table back end, and the database table front end may pull and load the data information of the current database table after receiving the mount request. In some embodiments, the database table front end may create 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 via the database table back end.

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

[0102] S15, Database Table Frontend, renders database tables. More specifically, it can be understood as rendering the entire database component.

[0103] S16: The document front end presents the database table. This step is sufficient to understand that the current document mounts the database table and the database table is successfully incorporated into the current document.

[0104] The above method exemplarily illustrates the interaction flow 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 FIG. 4 is only a simple example illustrating the main interaction steps, and should not be considered as a limitation. In actual applications, more or fewer steps than those shown in FIG. 4 may be adopted for implementation.

[0105] The document table processing method according to the embodiment of the present disclosure allows the document to directly introduce a database table related to the database associated with the current document. This contributes to providing the table introduced in the document with further database-related functions, and effectively reinforces the functionality of the table. For example, the introduction into the database table enables database functions such as structured storage of data, SQL query and operation, and provides the document with stronger data management capabilities. In addition, the user can directly introduce a database table into a document, such as a Word document or an online collaborative document, according to his or her own needs through the above method. In addition, the user can flexibly edit other contents in the document, such as text editing and graph insertion in areas other than the database table. This is more flexible than the user directly exporting a table from the database. In addition, the embodiment of the present disclosure can be relatively well applied to an online collaborative document, and after the database table is introduced into the online collaborative document, it is easy for multiple users to edit the database table of the online collaborative document. All data information of the database table can be stored in a background database through the interaction between the client and the service side, which is extremely convenient.

[0106] Corresponding to the above-mentioned document table processing method, the embodiment of the present disclosure provides a document table processing device applied to a client. Referring to the structural schematic diagram of the document table processing device applied to a client shown in Figure 5, this device may be realized by software and / or hardware, and may be integrated into electronic devices (such as mobile phones, computers, etc.) that can be generally used as clients; a client response module 502 for obtaining table information of a database table to be created in response to a table creation operation by a user for the current document, and issuing a table creation request to the service side for creating the database table in the current document; and a client table creation module 504 for creating a database table in the current document based on the database identifier and the table information in response to a database identifier associated with the current document returned from the service side in response to a table creation request.

[0107] The above device can directly introduce into the document a database table related to the database associated with the current document through the interaction between the client and the service side, which contributes to further endowing the table introduced into the document with database-related functions, effectively reinforcing the functionality of the table.

[0108] In some embodiments, the client table creation module is specifically used for issuing a table identifier acquisition request to a service side based on the database identifier and the table information, and in response to a table identifier returned by the service side in response to the table identifier acquisition request, associating the table identifier with the database identifier and storing it in a data structure corresponding to the current document, and rendering and presenting a database table in the current document based on the table information.

[0109] In some embodiments, the client response module is specifically used to, in response to a table creation operation by a user on a current document, obtain table information of a database table to be created via a first document processing side and request the first database table processing side to obtain a database identifier associated with the current document, and to issue a table creation request to a second database table processing side via the first database table processing side to create a database table in the current document, and obtain a database identifier associated with the current document that is returned from the second database table processing side in response to the table creation request.

[0110] In some embodiments, the client table creation module is specifically used to issue a table identifier acquisition request to a second database table processing side via a first database table processing side based on the database identifier and the table information, and acquire a table identifier returned from the second database table processing side.

[0111] In some embodiments, the client table creation module is specifically used to associate the table identifier with the database identifier via the first document processing side in response to a table identifier sent from a first database table processing side, send the association result to a second document processing side, and cause the second document processing side to store the association result in a data structure corresponding to the current document.

[0112] In some embodiments, the client table creation module is specifically used to render a database table based on the table information and the database identifier via a first database table processing side, and to present the rendered database table in the interface of the current document via a first document processing side.

[0113] In some embodiments, the table information includes at least one of information for formatting a table or a presentation format for a view.

[0114] In some embodiments, the database tables that are created have database functionality that includes at least one of structured storage for data and SQL queries or operations.

[0115] The document table processing device applied to the above-mentioned client according to an embodiment of the present disclosure can execute a document table processing method applied to the above-mentioned client according to any embodiment of the present disclosure, and has functional modules corresponding to the execution method and beneficial effects.

[0116] Corresponding to the above-mentioned document table processing method, the embodiment of the present disclosure provides a document table processing device applied to the service side. Referring to the structural schematic diagram of the document table processing device applied to the service side shown in Figure 6, this device can be realized by software and / or hardware, and can be generally integrated into an electronic device (e.g., a server) available as the service side; a service side response module 602 for obtaining a database identifier associated with the current document in response to a create table request issued by a client to create a database table in the current document; and a service-side table creation module 604 for returning the database identifier to the client and causing the client to create a database table in the current document based on the database identifier and table information of the database table to be created, where the table information is obtained by the client based on a table creation operation by a user for the current document.

[0117] The above apparatus can directly introduce a database table related to the database associated with the current document into the document through the interaction between the client and the service side, which contributes to further endowing the table introduced into the document with database-related functions, and effectively enhances the functionality of the table.

[0118] In some embodiments, the service side response module 602 is specifically used to inquire whether the current document is associated with an existing database, and if YES, set the identifier of the existing database as the database identifier associated with the current document, and if NO, create a new database and set the identifier of the new database as the database identifier associated with the current document.

[0119] In some embodiments, the apparatus further includes a service-side identifier return module for, in response to a table identifier obtainment request issued by the client based on the database identifier and the table information, returning a table identifier to the client, causing the client to associate and store the table identifier with the database identifier in a data structure corresponding to the current document, and rendering and presenting a database table in the current document based on the table information.

[0120] In some embodiments, the service-side response module is specifically used to obtain a database identifier associated with the current document via a second database table processing side in response to a table creation request issued by a first database table processing side to create a database table in the current document, and the service-side table creation module is specifically used to return the database identifier to the first database table front end via the second database table processing side.

[0121] In some embodiments, the service side identifier response module is specifically used to receive a table identifier acquisition request issued by the first database table processing side via the second database table processing side based on the database identifier and the table information, return a table identifier corresponding to the table identifier acquisition request to the first database table processing side, and have the first database table processing side return the table identifier to the first document processing side.

[0122] In some embodiments, the apparatus further includes an association storage module for receiving an association result between the table identifier and the database identifier transmitted from the first document processing side via the second document processing side, and storing the association result in a data structure corresponding to the current document.

[0123] A document table processing device applied to the service side according to an embodiment of the present disclosure can execute a document table processing method applied to the service side according to any embodiment of the present disclosure, and has a functional module corresponding to the execution method and beneficial effects.

[0124] As will be apparent to those skilled in the art, for convenience and conciseness of description, the specific operation processes of the above-described apparatus embodiments may be referred to the corresponding processes in the method embodiments, and will not be further described here.

[0125] An embodiment of the present disclosure provides an electronic device. The electronic device includes a processor and a memory for storing processor-executable instructions, and the processor is used to read the executable instructions from the memory and execute the instructions to realize any one of the document table processing methods applied to the client, or to realize any one of the document table processing methods applied to the service side. That is, the electronic device may be realized as a client or as a service side.

[0126] 7 is a structural schematic diagram of an electronic device according to an embodiment of the present disclosure. As shown in FIG. 7, an electronic device 700 includes one or more processors 701 and a memory 702.

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

[0128] The memory 702 may include one or more computer program products. The computer program products may include various types of computer readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or high-speed cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. The computer readable storage medium may store one or more computer program instructions. The processor 701 may execute the program instructions to realize the table processing method of a document according to the embodiments of the present disclosure described above and / or other desired functions. The computer readable storage medium may further store various contents, such as, for example, an input signal, a signal component, a noise component, etc.

[0129] In one example, the electronic device 700 may further include an input device 703 and an output device 704. These components may be coupled together via a bus system and / or other type of connection mechanism (not shown).

[0130] The input device 703 may further include, for example, a keyboard and a mouse.

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

[0132] Of course, for simplicity, Fig. 7 shows only a portion of the components of the electronic device 700 according to the present disclosure, such as buses, input / output interfaces, etc. In addition, the electronic device 700 may further include any other suitable components depending on the specific application.

[0133] In addition to the methods and apparatus described above, embodiments of the present disclosure may also be a computer program product that includes computer program instructions that, when executed by a processor, cause the processor to perform a method for processing tables of a document according to embodiments of the present disclosure.

[0134] The computer program product may be written with program code for carrying out the operations of the embodiments of the present disclosure in one or any combination of various programming languages, including object-oriented programming languages ​​such as Java and C++, and general procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, as a separate software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0135] It should be noted that the embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, cause the processor to perform a method for processing tables in a document according to the embodiments of the present disclosure.

[0136] A computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include an electrical connection having 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.

[0137] An embodiment of the present disclosure further provides a computer program product including computer programs / instructions, which, when executed by a processor, implement the method for processing tables in a document in an embodiment of the present disclosure.

[0138] It should be explained that in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that any such actual relationship or sequence exists between those entities or operations. And the terms "comprise", "include", "includes" or any other variants thereof are intended to cover a non-exclusive "comprise", whereby a process, method, article or device that includes a set of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent in such process, method, article or device. In the absence of further limitations, an element limited by the phrase "including a..." does not exclude the presence of other identical elements in the process, method, article or device that includes said element.

[0139] The above are merely specific embodiments of the present disclosure that enable those skilled in the art to understand or realize the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined in this specification can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not limited to these embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. 1. A method for processing tables in a document applied to a client, comprising: In response to a table creation operation by a user for a current document, acquiring table information of a database table to be created, and issuing a table creation request to a service side for creating a database table in the current document; The method for processing a table in a document includes a step in which the service side creates a database table in the current document based on the database identifier and the table information in response to a database identifier associated with the current document returned in response to the table creation request.

2. creating a database table in the current document based on the database identifier and the table information, issuing a table identifier acquisition request to a service side based on the database identifier and the table information; The table processing method of claim 1, further comprising a step of: in response to the table identifier returned by the service side in response to the table identifier acquisition request, associating the table identifier with the database identifier and storing them in a data structure corresponding to the current document, and rendering and presenting a database table in the current document based on the table information.

3. a step of acquiring table information of a database table to be created in response to a table creation operation by a user for a current document, and issuing a table creation request to a service side for creating a database table in the current document, In response to a table creation operation by a user for a current document, acquiring table information of a database table to be created via a first document processing side, and requesting the first database table processing side to acquire a database identifier associated with the current document; The table processing method of claim 1, further comprising the steps of: issuing a table creation request to a second database table processing side via the first database table processing side to create a database table in the current document; and obtaining a database identifier associated with the current document returned from the second database table processing side in response to the table creation request.

4. The step of issuing a table identifier acquisition request to a service side based on the database identifier and the table information includes: The table processing method according to claim 2, further comprising a step of issuing a table identifier acquisition request to a second database table processing side via a first database table processing side based on the database identifier and the table information, and acquiring a table identifier returned from the second database table processing side.

5. storing the table identifier and the database identifier in an association in a data structure corresponding to the current document, 3. The table processing method of claim 2, further comprising the step of: in response to a table identifier transmitted from a first database table processing side, associating the table identifier with the database identifier via a first document processing side, transmitting the association result to a second document processing side, and causing the second document processing side to store the association result in a data structure corresponding to the current document.

6. Rendering and presenting a database table in the current document based on the table information, 3. The table processing method of claim 2, further comprising the steps of: rendering a database table based on the table information and the database identifier via a first database table processing side; and presenting the rendered database table in an interface of the current document via a first document processing side.

7. A method for processing a table of a document applied to a service side, comprising: In response to a create table request issued by a client to create a database table in a current document, obtaining a database identifier associated with the current document; and returning the database identifier to the client and having the client create a database table in the current document based on the database identifier and table information of the database table to be created, the table information being obtained by the client based on a table creation operation performed by a user on the current document.

8. 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 the current document is associated with an existing database, setting an identifier of the existing database as a database identifier associated with the current document; 8. The method of claim 7, further comprising the step of: if the current document is not associated with an existing database, creating a new database and making an identifier of the new database the database identifier associated with the current document.

9. 8. The table processing method of claim 7, further comprising the step of: in response to a table identifier request issued by the client based on the database identifier and the table information, returning a table identifier to the client, causing the client to associate the table identifier with the database identifier and store it in a data structure corresponding to the current document, and rendering and presenting a database table in the current document based on the table information.

10. In response to a create table request issued by a client to create a database table in a current document, obtaining a database identifier associated with the current document, in response to a table creation request issued by a first database table processing side to create a database table in a current document, obtaining a database identifier associated with the current document via a second database table processing side; The step of returning the database identifier to the client comprises:

8. The method of claim 7, further comprising the step of returning said database identifier to a first database table front end via said second database table processing side.

11. The step of returning a table identifier to the client in response to a table identifier acquisition request issued by the client based on the database identifier and the table information includes:

10. A table processing method as described in claim 9, further comprising a step of receiving a table identifier acquisition request issued by a first database table processing side based on the database identifier and the table information via a second database table processing side, returning a table identifier corresponding to the table identifier acquisition request to the first database table processing side, and having the first database table processing side return the table identifier to the first document processing side.

12. The table processing method of claim 9, further comprising the step of receiving an association result between the table identifier and the database identifier transmitted from a first document processing side via a second document processing side, and storing the association result in a data structure corresponding to the current document.

13. the client includes a first document processing side and a first database table processing side; The table processing method according to any one of claims 1 to 12, wherein the service side includes a second document processing side and a second database table processing side.

14. A method for processing a table according to any preceding claim, wherein the table information includes at least one of information for formatting a table or a presentation format for a view.

15. The method of any one of claims 1 to 12, wherein the database table created has database functionality including at least one of structured storage of data and querying or manipulation in a structured query language.

16. A table processing device for a document applied to a client, comprising: a client response module for obtaining table information of a database table to be created in response to a table creation operation by a user for a current document, and issuing a table creation request to a service side for creating a database table in the current document; a client table creation module for creating a database table in the current document based on a database identifier and the table information in response to a database identifier associated with the current document returned by the service side in response to the table creation request.

17. A document table processing device applied to a service side, a service-side response module for obtaining a database identifier associated with the current document in response to a create table request issued by a client to create a database table in the current document; A document table processing device including: a service-side table creation module that returns the database identifier to the client and causes the client to create a database table in the current document based on the database identifier and table information of the database table to be created, the table information being obtained by the client based on a table creation operation performed by a user on the current document.

18. An electronic device, A processor; a memory for storing instructions executable by said processor; The processor is adapted to read the executable instructions from the memory and execute the executable instructions to implement the method for processing a table of a document according to any one of claims 1 to 12.

19. A computer readable storage medium having stored thereon a computer program for executing the method for processing tables of a document according to any one of claims 1 to 12.

20. A computer program comprising: A computer program comprising instructions which, when executed by a processor, cause the processor to perform a method for processing tables of a document according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Webpage table customization method and device

    CN113095053A

  • Data base table system

    JP1995044577A

  • Integrated database data editing system

    US7797276B1