CN-122021586-A - Table data processing method, apparatus, terminal device and storage medium
Abstract
The embodiment of the disclosure provides a table data processing method, a device, a terminal device and a storage medium, wherein the method comprises the steps of responding to receiving a data generation instruction aiming at a first cell in a first view, creating a first task based on a task state machine of a front end, generating a fragment of first data at a rear end based on a task identifier in the first task and information of the first cell, and streaming the fragment of the first data to the front end based on the rear end; the method comprises the steps of storing fragments of first data and identifiers of the fragments at the front end, wherein the identifiers of the fragments are used for indicating the generation sequence of the fragments of the first data, responding to the fact that a first unit cell is in a window, cutting the first fragment from the stored fragments of the first data based on preset rendering frequency and identifiers of the fragments, and outputting the first fragment in real-time increment according to preset data units in the first unit cell. And the display effect of the generated content is improved in the table, and the use experience of the user is improved.
Inventors
- Li Xupan
Assignees
- 北京飞书科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260414
Claims (12)
- 1. A method of table data processing, comprising: Responsive to receiving a data generation instruction for a first cell in the first view, creating a first task based on a task state machine of the front end, the first task including a task identification and information of the first cell; Generating a segment of first data at the back end based on the task identifier and the information of the first cell, wherein the first data is to be displayed by the first cell; streaming the segments of the first data to the front end based on the back end, and storing the segments of the first data and the identifiers of the segments at the front end, wherein the identifiers of the segments are used for indicating the generation order of the segments of the first data; Responding to the first cell in the window, and cutting a first segment in the stored segments of the first data based on a preset rendering frequency and the identification of the segments; and outputting the first fragment in the first unit according to the real-time increment of the preset data unit.
- 2. The method of claim 1, wherein the generating, at the backend, a segment of first data based on the task identification and the information of the first cell comprises: Adding the first task into a task processing queue of the rear end, and marking the task state of the first task as a state to be processed; When the first task is started to be processed, generating a segment of the first data at the back end based on the task identification and the information of the first cell, and marking the task state as a processing state.
- 3. The method of claim 1, wherein the storing, at the front end, the fragment of the first data and the identification of the fragment comprises: when the fragments of the first data are full fragments, responding to the received fragments of the first data pushed by the back end and the identifiers of the fragments, and replacing the old fragments of the first data with the new fragments of the first data in a cache based on the generation sequence corresponding to the identifiers of the fragments; And when the segment of the first data is an increment segment, storing the segment of the first data and the identification of the segment in the cache at the front end.
- 4. The method of claim 1, wherein when the segment of the first data is a full-size segment, clipping the first segment from the stored segments of the first data based on a preset rendering frequency and an identification of the segment, comprises: obtaining the position of a segment currently required to be rendered; determining a rendering interval duration and a fragment length at each rendering time based on the rendering frequency; Based on the segment location, the rendering interval duration, and the segment length, the first segment is cropped from among segments of the stored first data.
- 5. The method of claim 1, wherein clipping the first segment from the stored segments of the first data based on the preset rendering frequency and the identification of the segment, when the segment is an incremental segment, comprises: Acquiring a first identifier of a segment currently required to be rendered; determining whether a first identifier exists in the identifiers of the stored fragments; responding to the first identifier in the identifiers of the stored fragments, and based on the rendering frequency, cutting the first fragment in the fragments of the first data corresponding to the first identifier; and responding to the fact that the first identifier does not exist in the identifiers of the stored fragments, and cutting the first fragments in the fragments of the first data corresponding to the first identifiers based on the rendering frequency after waiting for the front end to store the fragments of the first data corresponding to the first identifiers.
- 6. The method of claim 1, further comprising: based on a task state machine, acquiring a task state of a first task pushed by a back end; And deleting the segment of the first data related to the first task when the task state is completed.
- 7. The method of claim 1, further comprising: in response to receiving a data generation instruction for a first cell again in the first view, creating a second task based on a task state machine of the front end, the task identification of the second task being different from the task identification of the first task; Deleting the segment of the first data corresponding to the first task, stopping receiving the segment of the first data corresponding to the first task transmitted by the back end, and receiving the segment corresponding to the second task transmitted by the back end.
- 8. The method of claim 1, wherein the generating an instruction in response to receiving data for a first cell in a first view comprises: Displaying a first view, wherein the first view is a view of a first table, the first view comprises a plurality of cells, and each cell comprises a corresponding data generation control; And generating a trigger instruction of the control in response to receiving data corresponding to a first cell in the plurality of cells.
- 9. The table data processing device comprises a creation module, a generation module, a transmission module, a storage module, a clipping module and an output module, wherein: the creation module is used for responding to the received data generation instruction for the first cell in the first view, creating a first task based on a task state machine of the front end, wherein the first task comprises a task identification and information of the first cell; The generating module is used for generating a segment of first data at the rear end based on the task identifier and the information of the first cell, wherein the first data is to be displayed by the first cell; The transmission module is configured to stream a segment of the first data to a front end based on the back end; The storage module is used for storing the fragments of the first data and the identifiers of the fragments at the front end, and the identifiers of the fragments are used for indicating the generation sequence of the fragments of the first data; the clipping module is used for responding to the first unit cell in the window, and clipping a first fragment in the stored fragments of the first data based on the preset rendering frequency and the identification of the fragments; The output module is used for outputting the first segment in the first unit cell according to the real-time increment of the preset data unit.
- 10. A terminal device includes a processor and a memory; The memory stores computer-executable instructions; The processor executing computer-executable instructions stored in the memory, causing the processor to perform the tabular data processing method as claimed in any one of claims 1-8.
- 11. A computer readable storage medium having stored therein computer executable instructions which, when executed by a processor, implement the tabular data processing method as claimed in any one of claims 1 to 8.
- 12. A computer program product comprising a computer program which, when executed by a processor, implements the tabular data processing method as claimed in any one of claims 1 to 8.
Description
Table data processing method, apparatus, terminal device and storage medium Technical Field The embodiment of the disclosure relates to the technical field of chart display, in particular to a table data processing method, a device, terminal equipment and a storage medium. Background The cells in the chart may require artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) to determine the content in the cells. For example, text in English based on AI translation needs to be filled in cells. However, the user cannot acquire the content related to the cell timely, so that the content display efficiency is low. Disclosure of Invention The embodiment of the disclosure provides a table data processing method, a device, a terminal device and a storage medium, which are used for solving the technical problem that in the prior art, a user cannot acquire content related to cells in time, so that the efficiency of content display is low. In a first aspect, an embodiment of the present disclosure provides a table data processing method, including: In response to receiving a data generation instruction for a first cell in the first view, creating a first task based on a task state machine of the front end, the first task including a task identification and information of the first cell; generating a segment of first data at the back end based on the task identification and the information of the first cell, wherein the first data is to be displayed by the first cell; streaming the segments of the first data to the front end based on the back end, and storing the segments of the first data and the identifiers of the segments at the front end, the identifiers of the segments being used to indicate the order of generation of the segments of the first data; responding to the first unit lattice in the window, and cutting a first segment in the stored segments of the first data based on the preset rendering frequency and the identification of the segments; and outputting the first fragment in the first unit cell according to the real-time increment of the preset data unit. In a second aspect, an embodiment of the present disclosure provides a table data processing apparatus, including a creation module, a generation module, a transmission module, a storage module, a clipping module, and an output module, where: the creation module is used for responding to the received data generation instruction for the first cell in the first view, creating a first task based on a task state machine of the front end, wherein the first task comprises a task identification and information of the first cell; The generating module is used for generating fragments of first data at the rear end based on the task identification and the information of the first cell, wherein the first data is to-be-displayed data of the first cell; The transmission module is used for streaming the fragments of the first data to the front end based on the back end; the storage module is used for storing the fragments of the first data and the identifiers of the fragments at the front end, wherein the identifiers of the fragments are used for indicating the generation sequence of the fragments of the first data; the clipping module is used for responding to the first unit cell in the window, and clipping the first fragment in the stored fragments of the first data based on the preset rendering frequency and the identification of the fragments; the output module is used for outputting the first fragment in the first unit cell according to the real-time increment of the preset data unit. In a third aspect, the present disclosure provides a terminal device comprising a processor and a memory; The memory stores computer-executable instructions; The processor executes computer-executable instructions stored in the memory to cause the at least one processor to perform the tabular data processing methods as described above in the first aspect and various possible references to the first aspect. In a fourth aspect, the present disclosure provides a computer readable storage medium having stored therein computer executable instructions which, when executed by a processor, implement the above first aspect and various form data processing methods as may be referred to in the first aspect. In a fifth aspect, the present disclosure provides a computer program product comprising a computer program which, when executed by a processor, implements the above first aspect and the various possible form data processing methods of the first aspect. The embodiment of the disclosure provides a table data processing method, a device, a terminal device and a storage medium, wherein in response to receiving a data generation instruction for a first cell in a first view, the terminal device creates a first task based on a task state machine of a front end, the first task comprises task identification and information of the first cell, generates a fragment of first data at a rear end based on th