Document table processing methods, apparatus, devices, and media
The integration of database tables into documents through client-service interaction addresses the limitations of existing systems, providing enhanced functionality and flexible editing capabilities.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2026-03-16
AI Technical Summary
Existing document editing systems lack the ability to seamlessly integrate database tables with rich functionality, such as structured storage and SQL queries, and users face limitations when trying to flexibly associate documents with database tables, leading to poor data management and inflexible data export.
A method and device 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 documents, providing enhanced functionality like structured storage and SQL operations.
Enables documents to incorporate database tables with advanced features, allowing flexible editing and improved data management, enhancing the capabilities of tables in documents like Word and online collaborative documents.
Smart Images

Figure 0007830647000001 
Figure 0007830647000002 
Figure 0007830647000003
Abstract
Description
Technical Field
[0001] [Cross-reference to Related Applications] This application claims priority based on a Chinese application with an application number of 202111459218.X and a filing date of December 2, 2021, and the disclosure content of the Chinese application is incorporated herein in its entirety by reference.
[0002] [Technical Field] This disclosure relates to the field of data processing technologies, and particularly to a method, apparatus, device, and medium for processing tables in documents.
Background Art
[0003] In many text-editable documents in the prior art, users can not only input characters but also create tables. For example, a table with N rows and M columns can be created as needed, and this table is only used for simple input and presentation of data.
Summary of the Invention
Means for Solving the Problems
[0004] Embodiments of this disclosure provide a method for processing tables in documents applied to a client. The method includes: in response to a table creation operation on the current document by the user, obtaining table information of a database table to be created, and issuing a table creation request to create a database table in the current document to the service side; and in response to a database identifier associated with the current document returned by the service side for 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 step of issuing a request to the service to obtain a table identifier based on the database identifier and the table information, and in response to the table identifier returned by the service to the request to obtain a table identifier, associating the table identifier and the database identifier and storing them 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 obtaining table information of the database table to be created and issuing a request to the service to create a database table in the current document in response to a table creation operation by a user for the current document includes the step of obtaining table information of the database table to be created via a first document processing side in response to a table creation operation by a user for the current document, requesting the first database table processing side to obtain a database identifier associated with the current document, and issuing a request to the second database table processing side via the first database table processing side to create a database table in the current document, and obtaining the database identifier associated with the current document returned by the second database table processing side in response to the request to create a database table.
[0006] In some embodiments, the step of issuing a request to the service side to obtain a table identifier based on the database identifier and the table information includes the step of issuing a request to obtain a table identifier to a second database table processing side via a first database table processing side, based on the database identifier and the table information, and obtaining the 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, in response to a table identifier sent from a first database table processing side, associating the table identifier with the database identifier via a first document processing side, sending 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 rendering the 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 the interface of the current document via a first document processing side.
[0009] Embodiments of the present disclosure further provide a method for processing documents tables applicable to a service, the method comprising the steps of: 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; and returning 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 table information of the database table to be created, the table information being obtained by the client based on a table creation operation on the current document by a user.
[0010] In some embodiments, the step of obtaining the database identifier associated with the current document includes the steps of 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 the steps of responding to a request to retrieve a table identifier 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 the database table in the current document based on the table information.
[0012] In some embodiments, the step of 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 the step of 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 the step of returning the database identifier to the client includes the step of returning the database identifier to the first database table frontend 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 retrieval request issued by the client based on the database identifier and the table information includes receiving a table identifier retrieval request issued by the first database table processing side based on the database identifier and the table information via the second database table processing side, returning the table identifier corresponding to the table identifier retrieval request to the first database table processing side, and causing the first database table processing side to return the table identifier to the first document processing side.
[0014] In some embodiments, the method further includes the step of receiving the 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 the following: information for setting the table format or the format in which the view is presented.
[0017] In some embodiments, the database tables created have database functionality that includes structured storage for data and at least one of SQL (Structured Query Language) queries or operations.
[0018] Embodiments of the present disclosure further provide a document table processing device applicable to a client, the device including a client response module for obtaining table information of a database table to be created and issuing a table creation request to a service to create a database table in the current document in response to a table creation operation by a user for the current document, and a client table creation module 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 by the service to the table creation request.
[0019] Embodiments of the present disclosure further provide a document table processing device, which is applied to the service side and, in response to a table creation request issued by a client to create a database table in the current document, includes a service-side response module for obtaining a database identifier associated with 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, wherein the table information is obtained by the client based on a table creation operation on the current document by a user.
[0020] Embodiments of the present disclosure further provide electronic equipment comprising a processor and a memory for storing instructions executable by the processor, wherein the processor is used to read the executable instructions from the memory and execute the executable instructions to implement a document table processing method according to embodiments of the present disclosure.
[0021] Embodiments of the present disclosure further provide a computer-readable storage medium storing a computer program for performing a document table processing method according to embodiments of the present disclosure.
[0022] Embodiments of the present disclosure further provide a computer program, which, when executed by a processor, includes instructions for causing the processor to execute the method for processing a document table according to the embodiments of the present disclosure.
[0023] It should be understood that the content described in this part is not intended to identify the gist 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 easier to understand from the following description.
Brief Description of the Drawings
[0024] The drawings herein are incorporated into the specification and form a part of the specification, showing embodiments that conform to the present disclosure, and are used to interpret the principles of the present disclosure together with the specification.
[0025] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following briefly introduces the drawings necessary for the description of the embodiments or the prior art. Obviously, those skilled in the art can also obtain other drawings based on these drawings without creative labor. [Figure 1] It is a schematic flowchart of a method for processing a document table applied to a client according to an embodiment of the present disclosure. [Figure 2] It is a schematic flowchart of a method for processing a document table applied to the service side according to an embodiment of the present disclosure. [Figure 3] It is an interaction flowchart of a method for processing a document table according to an embodiment of the present disclosure. [Figure 4] It is an interaction flowchart of a method for processing a document table of other documents according to an embodiment of the present disclosure. [Figure 5] It is a schematic structural diagram of a device for processing a document table applied to a client according to an embodiment of the present disclosure. [Figure 6]This is a schematic diagram of the structure of a document table processing device applied to the service side according to an embodiment of the present disclosure. [Figure 7] This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. [Modes for carrying out the invention]
[0026] To better understand the above-mentioned objectives, features, and benefits of this disclosure, the following further describes the approach of this disclosure. To the extent that they do not contradict each other, the embodiments and features of this disclosure can be combined with each other.
[0027] Many specific details are described below to facilitate a full understanding of this disclosure, but this disclosure may be implemented in ways other than those described herein. Clearly, the examples in this specification represent only a selection of, and not all, of, the examples of this disclosure.
[0028] For example, in user-editable documents such as Word documents and many online collaborative documents, directly implementing database tables is almost impossible, and only simple local data tables can be inserted. However, such table functionality is limited and used only for entering and presenting data in cells, and does not possess the capabilities of database tables. For example, it lacks the database functions available to database tables, such as structured storage for data and manipulation with SQL queries, resulting in relatively poor data management capabilities for documents. On the other hand, users cannot flexibly associate documents directly with database tables; they can only create documents by exporting data from the database, which is not only cumbersome but also relatively inflexible. Furthermore, the document format formed by exporting table data from a database has limitations, making it difficult to satisfy the flexible editing needs of users who want to edit paragraph text in a document while also inserting tables elsewhere in the document, and consequently, the richness of document functionality is also relatively poor. To improve or partially improve at least one of the above problems, embodiments of this disclosure provide methods, apparatus, devices and media for processing documents into tables, the documents in embodiments of this disclosure may be, for example, Word documents or online collaborative documents, and the following will be described in detail.
[0029] First, the embodiments of this disclosure provide a document table processing method applicable to a client, from the client's perspective. The client may be implemented in at least one of software or hardware, and may be a user device such as a computer or mobile phone. Figure 1 is a schematic flowchart of the document table processing method applicable to a client according to the embodiments of this disclosure, and as shown in Figure 1, this method mainly includes the following steps S102 to S104.
[0030] Step S102: In response to a user's table creation operation for the current document, retrieve the table information for the database table to be created and issue a table creation request to the service to create the database table for the current document.
[0031] To make it clear, a user can perform a table creation operation that specifies the table information for the table to be created, via a pre-configured table creation component in the current document. The table information includes, but is not limited to, information for setting the table format, such as information for setting the table to M rows and N columns (where M and N are both positive integers), or it may also include the presentation format of the view of the table to be created. The embodiments of this disclosure do not limit the table creation operation. A client can retrieve the table information based on the table creation operation and issue a table creation request to the service. It should be noted that the embodiments of this disclosure do not limit the sequence of events between retrieving the table information and sending the table creation request.
[0032] Furthermore, in practical applications, when a client receives a table creation operation from a user for the current document, it can locally create a placeholder for the database table, display the loading status, and then request the service to retrieve the database identifier. Here, the request to retrieve the database identifier may be considered as a table creation request to create the database table in the current document mentioned above.
[0033] Step S104: In response to the table creation request from the service side, the database table is created in the current document based on the database identifier and table information, in response to the database identifier associated with the current document. The database identifier is also called database table flag information or database token flag.
[0034] In practical applications, the service records the relationship between documents and databases. The client retrieves the database identifier associated with the current document returned by the service, then creates a database table, which is then rendered and displayed in the current document. This database table is also associated with the database corresponding to this database identifier. Specifically, this database table is a table in the database associated with the current document. When rendering and displaying the database table, the client can call the database table frontend interface to request the mounting of the database table. After receiving the mount request, the database table frontend can pull and load the table information of the database table. After pulling the table information, the database table frontend renders the entire database component and mounts the database table, thereby displaying it in the current document.
[0035] It should be noted that the embodiments of this disclosure do not directly create tables in a document based on table information, as in conventional methods. Instead, through interaction between the client and the service, the service returns only the database identifier associated with the current document, and then further creates a table in the current document based on the database identifier and table information. This table is directly related to the database and is essentially a database table.
[0036] The above method allows for the direct introduction (or integration) of database tables related to the database associated with the current document into a document through interaction between the client and the service provider. This contributes to giving the tables introduced into the document more database-related functionality, effectively enhancing the table's capabilities. For example, the introduced database tables will have possible database functions such as structured storage for data, SQL queries and operations, and will give the document stronger data management capabilities. Furthermore, users can also use this method to directly introduce database tables into documents such as Word documents and online collaborative documents according to their own needs. Users can also flexibly edit other content within the document, for example, by editing text and inserting graphs in areas other than the database tables. This offers greater flexibility compared to users directly exporting tables from the database.
[0037] When a client creates a database table in the current document based on a database identifier and table information, they may refer to the following steps (1) and (2).
[0038] (1) A request to obtain a table identifier is issued to the service based on the database identifier and table information. In some embodiments, the client can construct a table data structure based on the database identifier and table information that relates to the table information (the user's table creation operation) and also to the database associated with the current document, and then issue a request to obtain a table identifier to the service based on the constructed table data structure, that is, issue a request to obtain a table identifier corresponding to the table data structure to the service, or issue a request to obtain a table identifier with the table data structure attached to it to the service, and can confirm the creation of the database table only by receiving the table identifier of the database table to be created returned from the service. Alternatively, the client can directly send a request for the table data structure (equivalent to sending a request to obtain a table identifier) to the service, and the service can directly construct the corresponding database table based on the table data structure so that the client updates the document data and mounts the database table based on the table identifier, and return the table identifier of the database table to the client.
[0039] (2) In response to a table identifier retrieval request from the service side, the system associates the table identifier with the database identifier and stores it in the data structure corresponding to the current document, and renders and presents the database table in the current document based on the table information.
[0040] This table identifier is the table identifier (also called Table ID) in the database associated with the current document. The service can return the corresponding table identifier in response to a table identifier retrieval request. In some embodiments, after retrieving the table identifier, the client can associate the table identifier with the database identifier and store it in the data structure corresponding to the current document. This step involves updating the data structure corresponding to the current document, which records the data contained in the document. By associating the table identifier with the database identifier and updating the document data structure, data synchronization of the database tables introduced into the document can be achieved. Furthermore, by rendering and presenting the database tables in the current document based on the table information, the database tables can be presented intuitively in the interface of the current document.
[0041] In some other embodiments, the client may include the database identifier and table information in the issued table identifier retrieval request, and the service side (e.g., database table backend) may construct and store the database table based on the table information and database identifier, so that the client can subsequently retrieve the database table information directly from the service side and render it. The entire process described above may be considered as creating a database table in the current document based on the database identifier and table information.
[0042] Furthermore, embodiments of this disclosure provide a method for processing document tables applied to a service side, from the perspective of the service side. The service side may be implemented by at least one of software or hardware, for example, a server. Figure 2 is a schematic flowchart of the method for processing document tables applied to a service side according to embodiments of this disclosure, and this method mainly includes the following steps S202 to S204.
[0043] Step S202: In response to a table creation request issued by the client to create a database table in the current document, retrieve the database identifier associated with the current document.
[0044] Step S204: The database identifier is returned to the client, and the client is instructed to create a database table in the current document based on the database identifier and the table information of the database table to be created. Here, the table information is obtained by the client based on the user's table creation operation in the current document.
[0045] The details of the above method can be found in the description of the document table processing method performed by the client as mentioned above, and will not be explained further here. Through interaction between the client and the service side, the document can be directly introduced into the database table associated with the current document. This contributes to giving the tables introduced in the document further database-related functions and effectively enhances the functionality of the tables.
[0046] Furthermore, in some embodiments, the service may obtain a table data structure (built on a 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 and perform rendering and mounting. The entire process described above may also be considered as creating a client database table.
[0047] When the service retrieves the database identifier associated with the current document, it can query whether the current document is associated with an existing database. If yes, the identifier of the existing database will be used as the database identifier associated with the current document. If no, a new database will be created, and the identifier of the new database will be used 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 contain multiple tables. That is, each document may introduce multiple database tables corresponding to the same database associated with the current document. The table identifiers of the different database tables introduced in the current document may be different, but the associated database identifiers are all the same. Then, after the client issues a table creation request to the service to create a database table in the current document, the service first searches for the database associated with the current document (i.e., queries the relationship between the document and the database). If found, the identifier of this database is returned to the client; if not found, it indicates that the database associated with the current document does not currently exist, in which case a new database may be created for the current document, and the identifier of the newly created database is returned to the client.
[0049] Furthermore, the above method further includes, in response to a request for retrieving a table identifier issued by the client based on the database identifier and table information, returning the table identifier to the client, causing the client to associate the table identifier with the database identifier and store it in the data structure corresponding to the current document, and causing the current document to render and present the database table based on the table information. In practical applications, the client may first associate the table identifier with the database identifier and store and record the associated result in the data structure corresponding to the current document via the service side. The client may also directly present the database table in the document interface based on the table information.
[0050] For ease of understanding, the embodiments of this disclosure further provide a document table processing method illustrating the process of interaction between the client and the service provider. Specifically, one can refer to the interaction flowchart of the document table processing method shown in Figure 3, where the main steps of the interaction between both parties are as follows:
[0051] S301: In response to a user's table creation operation on the current document, the client retrieves table information for the database table to be created based on the table creation operation.
[0052] S302: The client issues a table creation request to the service to create a database table in the current document.
[0053] S303: The service queries whether the current document is associated with an existing database. If YES, the identifier of the existing database is used as the database identifier associated with the current document. If NO, a new database is created, and the identifier of the new database is used as the database identifier associated with the current document.
[0054] S304: The service returns to the client the database identifier associated with the current document.
[0055] S305: The client constructs a table data structure based on the database identifier and table information.
[0056] S306: The client issues a request to the service to retrieve a table identifier corresponding to the table data structure.
[0057] S307: The service obtains a table identifier corresponding to the table data structure. In some embodiments, the service itself may store the table data structure based on the request to obtain a table identifier corresponding to the table data structure, construct the corresponding database table, and set the table identifier corresponding to this database table.
[0058] S308: The service returns a table identifier to the client.
[0059] S310: The client associates table identifiers with database identifiers and stores them in a data structure corresponding to the current document, and renders and presents database tables in the current document based on the table information.
[0060] The specific implementation methods and achievable technical effects of the above steps can be found in the related content mentioned above and will not be explained further here. It should be noted that Figure 3 is only one example of an application and should not be considered a limitation. In actual applications, the introduction of database tables into documents can be achieved by employing more or fewer steps than those shown in Figure 3 in the interaction between the client and the service side.
[0061] For ease of understanding, embodiments of this disclosure further provide specific embodiments of a method for processing documents into tables. In these embodiments, the client is divided into a document front-end (also referred to as the first document processing side) and a database table front-end (also referred to as the first database table processing side). The database table front-end is also abbreviated as the database front-end (or first database processing side). The document front-end is 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 the second document processing side) and a database table back-end (also referred to as the second database table processing side), and the database table back-end is abbreviated as the database back-end (or second database processing side). The document back-end is 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 relationships between each document and a database, and information about each database, which may be all related information of the database, such as data structure information. The database table backend may provide the database table frontend with database data support (abbreviated as database information) and may store database tables corresponding to user-based table creation operations. The database table frontend can render database tables based on the table information and database information corresponding to table creation operations (or directly render database tables based on the information of pre-built database tables provided by the database table backend), interact with the document frontend via the database table frontend, and ultimately mount and display the database tables in the document frontend, achieving the effect of introducing (embedding) the database tables into the document.Furthermore, through interaction between the document frontend and the document backend, it is possible to update and store database identifiers and table identifiers in the document data in the document backend, or to record and store document data associated with database tables in the document backend. For easier understanding, the following describes various roles in several specific embodiments.
[0062] (1) From the client's perspective, we will describe the core operations of the document front-end and the database table front-end.
[0063] The document frontend is used to request the database table frontend to retrieve the database identifier associated with the current document in response to a table creation operation performed by the user on the current document. The database table frontend is used to issue a table creation request to the database table backend to create a database table in the current document, and to retrieve the database identifier associated with the current document, which is returned from the database table backend in response to the table creation request. The database table frontend is further used to retrieve the table information of the database table to be created based on the table creation operation, and to render the database table in the current document based on the database identifier and table information. The database table front-end further issues a table identifier retrieval request to the database table back-end based on the database identifier and table information, retrieves the table identifier returned from the database table back-end, and uses it to return the table identifier to the document front-end. The document frontend is used to present rendered database tables within the current document interface, associate table identifiers with database identifiers, and send the associated results to the document backend, which then stores those results in the data structure corresponding to the current document.
[0064] Based on the above, and for the sake of clarity, the following describes the interaction between the client and the service using different notations, focusing on the following important steps A to D that the client performs.
[0065] The important step A: In response to a user's table creation operation for the current document, the step of obtaining the table information for the database table to be created and issuing a table creation request to the service to create the database table for the current document should be performed by referring to the following method.
[0066] The first document processing side (i.e., the document frontend) responds to a user's table creation operation for the current document, retrieves the table information of the database table to be created, and requests the first database table processing side (i.e., the database table frontend) to retrieve the database identifier associated with the current document. A table creation request is issued to the second database table processing side (i.e., the database table backend) via the first database table processing side to create a database table for the current document, and the database identifier associated with the current document is returned from the second database table processing side in response to the table creation request.
[0067] The important step B: The step of issuing a request to the service to retrieve the table identifier based on the database identifier and table information should be performed by referring to the following method.
[0068] Based on the database identifier and table information, the first database table processing side issues a request to obtain the table identifier to the second database table processing side, and obtains the table identifier returned by the second database table processing side. In some embodiments, when the first database table processing side obtains the database identifier returned by the second database table processing side in the implementation of step A above, it can further request the second database table processing side to obtain the table identifier based on the database identifier and table information.
[0069] The important step C: associating the table identifier with the database identifier and storing it in the data structure corresponding to the current document can be performed by referring to the following method.
[0070] In response to a table identifier sent by the first database table processing side via the first document processing side, the first document processing side associates the table identifier with a database identifier and sends the association result to the second document processing side, causing the second document processing side to store the association result in the data structure corresponding to the current document. In some embodiments, in implementing step B above, the first database table processing side may, upon obtaining a table identifier, send the table identifier to the first document processing side. The first document processing side may further associate the table identifier with a database identifier and send it to the second document processing side, allowing the second document processing side to update the data structure of the current document.
[0071] The important step D: rendering and presenting database tables in the current document based on table information can be performed by referring to the following method.
[0072] The first database table processing side renders the database table based on the table information and database identifier, and the first document processing side presents the rendered database table in the interface of the current document. The first database table processing side can render the database table to be created if the table information and database identifier are known, and can display the database table rendered by the first document processing side.
[0073] The above are merely specific examples and should not be considered limitations. Furthermore, A through D above are merely identifiers for different steps and should not be considered limitations on their order or importance.
[0074] (ii) From the service provider's perspective, we will discuss the document backend and the database table backend.
[0075] The database table backend retrieves the database identifier associated with the current document in response to a table creation request sent from the database table frontend, returns the database identifier to the database table frontend, and causes the database table frontend to create a database table in the current document based on the database identifier and table information, and then returns the database identifier to the document frontend.
[0076] The database table backend is further used to receive table identifier retrieval requests issued by the database table frontend based on the database identifier and table information, return the table identifier corresponding to the table identifier retrieval request to the database table frontend, and cause the database table frontend to return the table identifier to the document frontend.
[0077] The document backend receives the association results between table identifiers and database identifiers sent by the document frontend and is used to store these association results in the data structure corresponding to the current document.
[0078] Based on the above, and for the sake of clarity, the following describes the interaction between the client and the service using different representations, focusing on the following important steps E to H that the service performs.
[0079] The important step E: In response to a table creation request issued by the client to create a database table in the current document, the step of obtaining the database identifier associated with the current document may be performed by referring to the following method.
[0080] In response to a table creation request issued by the first database table processing side (database table frontend) to create a database table in the current document, the database identifier associated with the current document is obtained via the second database table processing side (database table backend). That is, the database table frontend sends a table creation request to the database table backend, and the database table backend obtains the database identifier associated with the current document.
[0081] The important step F: returning the database identifier to the client should be performed by referring to the following method.
[0082] The database identifier is returned to the first database table frontend via the second database table processing side. In some embodiments, in the implementation of step E above, the second database table processing side may, upon obtaining the database identifier, return it to the first database table frontend.
[0083] The important step G: In response to a request to retrieve a table identifier issued by the client based on the database identifier and table information, the step of returning the table identifier to the client may be performed by referring to the following method.
[0084] The second database table processing side receives a table identifier retrieval request issued by the first database table processing side based on the database identifier and table information, returns the table identifier corresponding to the table identifier retrieval request to the first database table processing side, and causes the first database table processing side to return the table identifier to the first document processing side. In some embodiments, in realizing step F above, the first database table processing side can retrieve the database identifier and table information, and then retrieve 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: The second document processing side receives 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 stores the association result in the data structure corresponding to the current document. In some embodiments, in realizing step G above, the first document processing side, upon obtaining the table identifier via the first database table processing side, further associates the table identifier with the database identifier and sends the association result to the second document processing side, thereby causing the second document processing side to store the association result in the data structure corresponding to the current document.
[0086] The above are merely specific examples and should not be considered limitations. Furthermore, E through H above are merely identifiers for different steps and should not be considered limitations on their order or importance.
[0087] Based on the foregoing, an embodiment of the present disclosure provides an interaction flowchart of the other document table processing method shown in Figure 4, illustrating the interaction steps between the document front-end, database table front-end, document back-end and database table back-end, including S1 to S16.
[0088] S1, the document frontend, in response to a user's table creation operation, creates a local placeholder for the database table and displays the loading status.
[0089] S2, the document frontend, requests the database table frontend to retrieve the database identifier, also known as database table flag information.
[0090] S3, the database table frontend requests the database table backend to create the database table.
[0091] In S4, the database table backend queries the current document for its relationship to the database and retrieves the database identifier.
[0092] In S5, the database table backend returns the database identifier to the database table frontend.
[0093] S6, the database table frontend, constructs the table data structure based on the database identifier and table information corresponding to the table creation operation.
[0094] S7, the database table frontend sends a request to the database table backend that corresponds to the table data structure. In some embodiments, the database table frontend may request the database table backend to retrieve the table identifier (the ID of the new table corresponding to the table creation operation) via a short link.
[0095] S8, the database table backend returns the table identifier created in the database table frontend, i.e., the ID of the table in the database associated with the current document. In some embodiments, upon receiving the above request, the database table backend can directly construct a database table corresponding to the table data structure, assign a table identifier to this database table, and return this table identifier to the database table frontend.
[0096] S9, the database table frontend returns the database identifier and table identifier to the document frontend.
[0097] In S10, the document frontend associates database identifiers with table identifiers, stores this information in the document backend, and updates the document structure data.
[0098] S11, the document backend returns an Ack message (i.e., a confirmation message) to the document frontend.
[0099] In S12, the document frontend calls the database interface to request the mounting of the database tables. Specifically, the document frontend waits for the document backend to execute S11, after which it calls the database frontend interface to request the mounting of the database tables.
[0100] S13, the database table frontend may request database table data information from the database table backend, and after receiving the mount request, the database table frontend may pull and load the current database table data information. In some embodiments, the database table backend may create and store the data information for the database table to be created in the database associated with the current document based on the table data structure.
[0101] S14, the database table backend returns data information to the database table frontend.
[0102] S15, the database table frontend, renders the database tables. Specifically, it can be understood as rendering the entire database component.
[0103] S16, the document frontend presents the database tables. This step should be understood as the current document mounting the database tables and the database tables being successfully incorporated into the current document.
[0104] The above method exemplifies the flow of interaction between the document front-end, the database table front-end, and the document back-end and database table back-end. It should be noted that Figure 4 is merely a simplified example illustrating the main interaction steps and should not be considered a limitation. Actual applications may employ more or fewer steps than those shown in Figure 4.
[0105] The document table processing method according to the embodiments of this disclosure allows a document to directly incorporate database tables related to the database associated with the current document. This contributes to giving tables incorporated in the document more database-related functionality, effectively enhancing the functionality of the tables. For example, incorporating database tables enables database functions such as structured storage, SQL queries and operations on the data, and gives the document stronger data management capabilities. Furthermore, the above method allows users to directly incorporate database tables in documents such as Word documents and online collaborative documents according to their own needs. Users can also flexibly edit other content in the document, for example, by editing text and inserting graphs in areas other than the database tables. This offers greater flexibility compared to users directly exporting tables from the database. Moreover, the embodiments of this disclosure can be applied relatively well to online collaborative documents, and after incorporating database tables into the online collaborative document, it facilitates editing of the database tables in the online collaborative document by multiple users. All database table data information can be stored in a background database through interaction between the client and the service side, resulting in extremely high convenience.
[0106] Corresponding to the document table processing method described above, an embodiment of the present disclosure provides a document table processing device applicable to a client. Referring to the schematic diagram of the structure of the client-applicable document table processing device shown in Figure 5, this device is implemented in software and / or hardware and may be integrated into an electronic device that can generally be used as a client (e.g., a mobile phone, a computer, etc.). A client response module 502 that, in response to a user's table creation operation for the current document, retrieves table information for the database table to be created and issues a table creation request to the service to create the database table for the current document, The system includes a client table creation module 504 for creating a database table in the current document based on the database identifier and table information, in response to a table creation request from the service side and a database identifier associated with the current document.
[0107] The above device can be directly deployed in a document to a database table related to the database associated with the current document, through interaction between the client and the service provider. This contributes to giving the tables deployed in the document further database-related functionality, effectively enhancing the functionality of the tables.
[0108] In some embodiments, the client table creation module is specifically used to issue a request to the service side to obtain a table identifier 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 request, to associate the table identifier with the database identifier and store it in a data structure corresponding to the current document, and to render and present the database table in the current document based on the table information.
[0109] In some embodiments, the client response module is used to respond to a user's table creation operation for the current document by obtaining table information for the database table to be created via a first document processing side and requesting the first database table processing side to obtain the database identifier associated with the current document, and by 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 the 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 obtain a table identifier from the second database table processing side via the first database table processing side, based on the database identifier and the table information.
[0111] In some embodiments, the client table creation module is specifically used to associate a table identifier sent from a first database table processing side with a database identifier via a first document processing side, and to send the association result to a second document processing side so that the second document processing side can 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 the following: information for setting the table format or a view presentation format.
[0114] In some embodiments, the database tables created have database functionality that includes structured storage for data and at least one of SQL queries or operations.
[0115] A document table processing device applied to the client according to an embodiment of the present disclosure can perform a document table processing method applied to the client according to any embodiment of the present disclosure, and includes a functional module and beneficial effects corresponding to the execution method.
[0116] Corresponding to the document table processing method described above, the embodiments of this disclosure provide a document table processing device applicable to the service side. Referring to the schematic diagram of the structure of the document table processing device applicable to the service side shown in Figure 6, this device is implemented in software and / or hardware and may generally be integrated into electronic equipment (e.g., a server) available as a service side. A service-side response module 602 for obtaining the database identifier associated with the current document in response to a table creation request issued by the client to create a database table in the current document, The system includes a service-side table creation module 604 that returns a database identifier to the client and causes the client to create a database table in the current document based on the database identifier and the table information of the database table to be created, where the table information is obtained by the client based on a table creation operation performed by the user on the current document.
[0117] The above device allows for the direct introduction of database tables related to the database associated with the current document into a document through interaction between the client and the service provider. This contributes to further enhancing the database-related functionality of the tables introduced into the document, effectively reinforcing the table's capabilities.
[0118] In some embodiments, the service-side response module 602 is specifically used to query whether the current document is associated with an existing database, and if YES, to set the identifier of the existing database as the database identifier associated with the current document, and if NO, to 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 device further includes a service-side identifier response module for responding to a table identifier retrieval 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 the 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 frontend via the second database table processing side.
[0121] In some embodiments, the service-side identifier response module is used to receive a table identifier retrieval request issued by the first database table processing side based on the database identifier and the table information via the second database table processing side, return the table identifier corresponding to the table identifier retrieval request to the first database table processing side, and cause the first database table processing side to return the table identifier to the first document processing side.
[0122] In some embodiments, the apparatus further includes an association storage module for receiving the association result between the table identifier and the database identifier transmitted from the first document processing side via the second document processing side, and for 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 perform a document table processing method applied to the service side according to any embodiment of the present disclosure, and comprises a functional module corresponding to the execution method and beneficial effects.
[0124] As will be obvious to those skilled in the art, for the sake of convenience and brevity of description, the specific operating processes of the embodiments of the apparatus described above can be found by referring to the corresponding processes in the embodiments of the method, and will not be described further here.
[0125] Embodiments of this disclosure provide an electronic device. The electronic device includes a processor and memory for storing processor-executable instructions, the processor being used to read executable instructions from memory, execute the instructions to implement a table processing method for any one document applied to the client, or to implement a table processing method for any one document applied to the service side. That is, the electronic device may be implemented as a client or as a service side.
[0126] Figure 7 is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. As shown in Figure 7, the electronic device 700 comprises one or more processors 701 and memory 702.
[0127] The processor 701 may be a central processing unit (CPU) or another type of processing unit having data processing capability and / or instruction execution capability, and may control other components in the electronic device 700 to perform a desired function.
[0128] Memory 702 may include one or more computer program products. The computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or high-speed cache memory (cache). Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored in the computer-readable storage media. The processor 701 may execute program instructions to implement the document table processing method and / or other desired functions according to the embodiments of this disclosure described above. The computer-readable storage media may further store various contents, such as input signals, signal components, and noise components.
[0129] In one example, the electronic device 700 may further include an input device 703 and an output device 704. These components are connected to each other via a bus system and / or other forms of connection mechanisms (not shown).
[0130] Furthermore, this input device 703 may include, for example, a keyboard or a mouse.
[0131] This output device 704 may output various information to the outside, including determined distance information, direction information, etc. This output device 704 may include, for example, a display, a speaker, a printer, and a communication network and remote output devices connected thereto.
[0132] Of course, for the sake of simplification, Figure 7 shows only a portion of the components relating to this disclosure in the electronic device 700, and components such as buses and input / output interfaces are omitted. In addition, depending on the specific application, the electronic device 700 may further include any other appropriate components.
[0133] In addition to the methods and apparatus described above, embodiments of this disclosure may also include computer program products that include computer program instructions. When the computer program instructions are executed by a processor, the processor is instructed to execute the document table processing method according to embodiments of this disclosure.
[0134] Computer program products can be created to produce program code for performing the operations of the embodiments of this disclosure using one or any combination of various programming languages. The programming languages include object-oriented programming languages such as Java® and C++, and general procedural programming languages such as, for example, the "C" language or similar programming languages. The program code may run entirely on a user computer, partially on a user computer, as a single standalone software package, partially on a user computer, partially on a remote computer, or entirely on a remote computer or server.
[0135] The embodiments of this disclosure may also be computer-readable storage media on which computer program instructions are stored. When the computer program instructions are executed by the processor, the processor is instructed to execute the document table processing method according to the embodiments of this disclosure.
[0136] Computer-readable storage media may employ any combination of one or more readable media. The readable media may be readable signal media or readable storage media. Readable storage media may include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any combination thereof. More specific examples of readable storage media (non-exclusive list) include electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0137] Embodiments of this disclosure further provide a computer program product including a computer program / instruction. When this computer program / instruction is executed by a processor, the document table processing method of the embodiment of this disclosure is realized.
[0138] It should be noted that, in this specification, relational terms such as “first” and “second” are used solely to distinguish one entity or operation from another, and do not necessarily require or imply any actual relationship or order between these entities or operations. Furthermore, the terms “include,” “incorporate,” or any other variations thereof are intended to cover the non-exclusive “include,” thereby meaning that a process, method, article, or apparatus containing a set of elements includes not only those elements but also other elements not explicitly listed, or further elements specific to such a process, method, article, or apparatus. Unless otherwise specified, an element limited by the document “includes one…” does not preclude the existence of other identical elements in the process, method, article, or apparatus containing said element.
[0139] The above are merely specific embodiments of the Disclosure that enable those skilled in the art to understand or implement the Disclosure. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the Disclosure. Therefore, the Disclosure is not limited to these embodiments described herein, but rather conforms to the broadest extent that the principles and novel features disclosed herein are consistent.
Claims
1. A method for processing documents into tables that are applied to a client, The steps include: responding to a user's operation to create a table in the current document, obtaining table information for the database table to be created, and issuing a table creation request to the service to create the database table in the current document; A method for processing a document table, comprising the step of 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 in response to the table creation request.
2. The step of creating a database table in the current document based on the database identifier and the table information is: The steps include issuing a request to the service to obtain a table identifier based on the database identifier and the table information, The table processing method according to claim 1, comprising the steps of: responding to a table identifier returned by the service in response to a request to obtain a table identifier, 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.
3. The step of obtaining table information for the database table to be created in response to a user's table creation operation for the current document, and issuing a table creation request to the service to create the database table for the current document, is: The process involves, in response to a user's operation to create a table for the current document, obtaining table information for the database table to be created via a first document processing side, and requesting the first database table processing side to obtain the database identifier associated with the current document, The table processing method according to claim 1, 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 that is returned from the second database table processing side in response to the table creation request.
4. The step of issuing a request to the service side to obtain a table identifier based on the database identifier and the table information is: The table processing method according to claim 2, comprising the step of issuing a request to obtain a table identifier to a second database table processing side via a first database table processing side based on the database identifier and the table information, and obtaining a table identifier returned from the second database table processing side.
5. The step of associating the table identifier and the database identifier and storing them in the data structure corresponding to the current document is: The table processing method according to claim 2, comprising the steps of: in response to a table identifier sent from a first database table processing side, associating the table identifier with the database identifier via a first document processing side, sending 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. The step of rendering and presenting the database table in the current document based on the table information is: The table processing method according to claim 2, 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 the interface of the current document via a first document processing side.
7. A method for processing documents into tables, which is applied to the service side. In response to a table creation request issued by a client to create a database table in the current document, the steps include obtaining a database identifier associated with the current document, A method for processing a document table, comprising the steps of: 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 the 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.
8. The step of obtaining the database identifier associated with the current document is: A step of querying whether the current document is associated with an existing database, If the current document is associated with an existing database, the steps are to set the identifier of the existing database to the database identifier associated with the current document, The table processing method according to claim 7, further comprising the steps of: if the current document is not associated with an existing database, create a new database and set the identifier of the new database to the database identifier associated with the current document.
9. The table processing method according to claim 7, further comprising the steps of responding to a request to obtain a table identifier 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 table creation request issued by a client to create a database table in the current document, the step of obtaining a database identifier associated with the current document is: The process includes the step of 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, The step of returning the database identifier to the client is: The table processing method according to claim 7, further comprising the step of returning the database identifier to the first database table processing side via the second database table processing side.
11. The step of returning a table identifier to the client in response to a request to retrieve a table identifier issued by the client based on the database identifier and the table information is: The table processing method according to claim 9, comprising the steps of: receiving a table identifier acquisition request issued by the first database table processing side based on the database identifier and the table information via the second database table processing side; returning the table identifier corresponding to the table identifier acquisition request to the first database table processing side; and causing the first database table processing side to return the table identifier to the first document processing side.
12. The table processing method according to claim 9, further comprising the steps of receiving the 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.
13. The aforementioned 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. The table processing method according to any one of claims 1 to 12, wherein the table information includes at least one of information for setting the table format or a view presentation format.
15. The table processing method according to any one of claims 1 to 12, wherein the created database table has database functionality that includes at least one of structured storage for data and queries or operations using a structured query language.
16. A document table processing device applied to a client, A client response module that, in response to a user's operation to create a table in the current document, retrieves table information for the database table to be created and issues a table creation request to the service to create the database table in the current document, A document table processing device, comprising a client table creation module 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 by the service in response to the table creation request.
17. A document table processing device applied to the service side, A service-side response module for obtaining a database identifier associated with the current document in response to a table creation request issued by the client to create a database table in the current document, A document table processing device, comprising 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 the 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.
18. It is an electronic device, Processor and The processor includes a memory for storing instructions that can be executed by the processor, The processor is an electronic device used to read the executable instructions from the memory and execute the executable instructions to realize the document table processing method described in any one of claims 1 to 12.
19. A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the document table processing method described in any one of claims 1 to 12.
20. It is a computer program, A computer program that, when executed by a processor, includes instructions causing the processor to perform the document table processing method described in 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