Method and device for generating personalized table of computing platform

By parsing and translating the structured style description data of the client code on the backend server, generating and storing personalized table files, the problem of low report generation efficiency in the computing platform is solved, and personalized tables are automated, secure and complete.

CN121766282AActive Publication Date: 2026-03-31QIJIAYOUDAO NETWORK TECH (BEIJING) CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-05
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing computing platforms suffer from a disconnect between calculation results and presentation format when generating personalized reports. This results in reports lacking formatting and visual optimization, leading to low efficiency, data security risks, and an inability to uniformly display personalized reports within the platform, resulting in a poor user experience.

Method used

By receiving table generation requests from the client's code execution environment on the backend server, parsing the structured style description data, calling the personalized file generation engine to perform style translation, data filling, and structure translation, generating personalized table files, and storing them in a secure file storage system, a unified access service is provided.

Benefits of technology

It automates and improves the efficiency of personalized table generation in computing platforms, ensures the integrity of table style, data and structure, avoids human error, and provides unified storage and access within a secure system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121766282A_ABST
    Figure CN121766282A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for generating a personalized table of a computing platform, and the method comprises the steps: receiving a table generation request from a client code execution environment in the computing platform, the table generation request carrying structured style description data; analyzing the structured style description data, wherein the structured style description data at least comprises definitions of one or more worksheets, cell data contents in the worksheets, one or more style definition sets, a mapping relation for associating the cell data with the style definition sets, and one or more structure definition sets; calling a personalized file generation engine to translate the structured style description data; the translated spreadsheet object is serialized into a personalized form file, and the personalized form file is stored in a security file storage system of a computing platform; in response to an access request from the user front end, the personalized table file is retrieved from the secure file storage system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of software development technology, and in particular to a method and apparatus for generating personalized tables on a computing platform, used to bridge the computational logic of customer-defined code with the platform's backend report generation service. Background Technology

[0002] In modern computing platforms, especially in multi-tenant, sandboxed execution environments, providing users with flexible and efficient data processing and result presentation capabilities is crucial. Users typically need to run custom code on the platform to complete complex business logic calculations; however, existing technologies exhibit a significant gap between the output and presentation of computational tasks. Platforms often focus only on the correctness of the computation results, neglecting their presentation format, resulting in reports lacking necessary formatting and visual optimization. Currently, computing platforms typically restrict the execution of client code to a sandbox environment, and their output is often limited to plain text, standard logs, or basic two-dimensional data structures such as CSV files or unstyled XLSX files.

[0003] In professional fields such as finance, auditing, and project management, business reports not only require accurate data but also rich formatting information for correct interpretation by business personnel. This formatting information includes structural information such as multi-level headers and group headings, which require cell merging. It also includes emphatic information such as special fonts, background colors, and border styles for specific data. Currently, users are forced to adopt an inefficient two-step workflow: first, exporting raw data from the computing platform, and then manually adjusting the formatting locally using tools like Excel. This fragmented workflow is not only inefficient and prone to errors but also causes the generated personalized files to deviate from the platform's unified storage and access control system, posing data security risks. Furthermore, the platform cannot uniformly display these final personalized reports within its system, resulting in a poor user experience. While some existing report generation tools and libraries can provide some formatting capabilities, they typically require client code to directly manipulate specific spreadsheet libraries, which is often impractical in sandboxed environments and does not comply with the platform's security policies. Summary of the Invention

[0004] This specification provides a method and apparatus for generating personalized tables on a computing platform to solve at least one of the technical problems mentioned above.

[0005] According to a first aspect of the present invention, a method for generating personalized tables for a computing platform is provided, applied to a backend server of the computing platform, the method comprising: Receive a table generation request from the client code execution environment in the computing platform, the table generation request carrying structured style description data; Parse the structured style description data, wherein the structured style description data includes at least: the definition of one or more worksheets, the cell data content in the worksheets, one or more style definition sets, the mapping relationship that associates the cell data with the style definition sets, and one or more structure definition sets; The personalized file generation engine is invoked to translate the structured style description data. The translation process includes style translation, data filling, and structure translation. The translated spreadsheet object is serialized into a personalized spreadsheet file, and the personalized spreadsheet file is stored in the secure file storage system of the computing platform; In response to an access request from the user's front end, the personalized form file is retrieved from the secure file storage system, and corresponding services are provided.

[0006] In some optional implementations, the client code execution environment is a sandboxed execution environment; the structured style description data is generated by the client code by calling the personalized reporting SDK provided by the computing platform.

[0007] In some alternative implementations, the sandboxed execution environment is a Docker container, and the structured style description data is in JSON format.

[0008] In some optional implementations, the style definition set is used to describe at least one style attribute among font, color, border, and alignment; the structure definition set is used to describe at least one structural attribute among cell merging rules, custom column width, and frozen window.

[0009] In some alternative implementations, the personalized file generation engine is implemented based on the Apache POI or OpenXML library.

[0010] In some alternative implementations, the style translation includes: Iterate through the set of style definitions and create specific style objects in the target spreadsheet library; Establish a mapping cache from style identifiers in the style definition set to specific style objects to reuse style objects; The data filling includes: Iterate through the cell data and create the corresponding cells; Based on the mapping relationship, the corresponding specific style object is retrieved from the mapping cache and applied to the cell.

[0011] In some alternative implementations, the structural translation includes: The structure definition set is traversed, and the application programming interface of the target spreadsheet library is called to perform the corresponding structure operation, which includes performing cell merging operation or setting column width operation.

[0012] In some alternative implementations, after storing the personalized spreadsheet file in the secure file storage system of the computing platform, the method further includes: Write a record to the metadata database, the record being associated with the file identifier, tenant identifier, task identifier, and storage path of the personalized table file; Prior to responding to an access request from the user's front end, the method also includes: Perform permission verification on the access request, including verifying the user's login credentials to confirm the user's identity and the identifier of the tenant to which they belong; The file access service queries the metadata database to obtain the tenant identifier corresponding to the personalized table file, and compares it with the tenant identifier of the currently logged-in user. If the comparison does not match, access is denied.

[0013] In some alternative implementations, when providing the corresponding service, the following is also included: The online preview converter is invoked to instantly convert the personalized form file into an HTML5 or PDF format readable by a browser, and then returned to the user's front end for display.

[0014] According to a second aspect of the present invention, an apparatus for generating personalized tables for a computing platform is provided, applied to a backend server of the computing platform, the apparatus comprising: The description receiving module is used to receive a table generation request from the client code execution environment in the computing platform, wherein the table generation request carries structured style description data; The data parsing module is used to parse the structured style description data, wherein the structured style description data includes at least: the definition of one or more worksheets, the cell data content in the worksheets, one or more style definition sets, the mapping relationship that associates the cell data with the style definition sets, and one or more structure definition sets; The document generation engine module is used to call the personalized document generation engine to translate the structured style description data. The translation process includes style translation, data filling and structure translation. A secure storage module is used to serialize the translated spreadsheet object into a personalized spreadsheet file and store the personalized spreadsheet file in the secure file storage system of the computing platform; An integrated access service module is used to respond to access requests from the user's front end, retrieve the personalized form file from the secure file storage system, and provide corresponding services.

[0015] The technical solution of this application embodiment has the following beneficial effects: 1. The technical solution of this application receives a table generation request from the client code execution environment on the backend server and parses the structured style description data carried therein. This enables the integration of client code calculation logic and backend report generation service. This design can replace the traditional fragmented workflow that requires exporting raw data first and then manually processing the format. It merges the two previously separate steps into an automated end-to-end process, thereby improving the efficiency and automation of report generation and avoiding errors that may be introduced by manual operation.

[0016] 2. The technical solution of this application calls a personalized file generation engine to perform unified translation processing on the structured style description data. This process covers three stages: style translation, data filling, and structure translation. This integrated translation mechanism can ensure accurate conversion between the abstract "formatting intent" and the specific table file. It can not only accurately realize complex formatting requirements such as cell merging and custom styles, but also avoid inconsistencies between multiple processing stages through the unified scheduling of the engine, ensuring the integrity and correctness of the final generated table in terms of style, data, and structure.

[0017] 3. In the technical solution of this application, by uniformly storing the generated personalized table files in a secure file storage system with tenant isolation policy, and constructing an access verification mechanism based on metadata query and comparison, the entire process of generating, storing and accessing personalized reports can be under the control of the computing platform's security system. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating the method for generating personalized tables on a computing platform as provided in this application embodiment; Figure 2 A schematic diagram of the structure of a device for generating personalized tables on a computing platform, provided in an embodiment of this application; Figure 3 For Figure 2 The generation device in this paper is a complete flowchart of the method for generating personalized tables on the computing platform provided by the technical solution of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of one or more embodiments of this specification.

[0021] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another.

[0022] This application provides a method and apparatus for generating personalized tables for a computing platform, applied to the backend server of the computing platform (the concept of the backend server will be explained after the content of step 110 is described below). The following section will first refer to the appendix... Figure 1 The technical solution of this application is described in detail, such as... Figure 1 As shown, Figure 1 A flowchart of a method for generating personalized tables for a computing platform provided in this application embodiment is included, the method comprising the following steps: Step 102: Receive a table generation request from the client code execution environment in the computing platform, the table generation request carrying structured style description data.

[0023] In the embodiments of this specification, the computing platform can refer to a computing system that supports a multi-tenant, sandboxed execution environment, such as a cloud computing platform or a big data analytics platform. The client code execution environment can refer to an isolated environment provided by the platform for running client-defined business code. After the client code completes its business logic execution, it sends a table generation request to the platform's backend server. The carrier of this table generation request is structured style description data, which is a structured expression of the client code's formatting intent for the final table. This data can include the original data and the definition information of the table style and structure. As mentioned in the background section, since sandboxed environments typically do not allow direct manipulation of table files and lack relevant heavy-duty libraries, client code does not need to and cannot directly manipulate table files. In this solution, the formatting intent is encapsulated into structured description data through a dedicated interface provided by the platform and sent to the backend server along with the request via a secure internal communication channel.

[0024] For example, after a client runs Python code in the sandbox to calculate quarterly financial data, it generates structured descriptive data containing specific intentions such as "merging cells A1-C1 as the title, using a dark blue background with white text for the title, and setting column A width to 30," which is then sent to the backend server along with the table generation request. This structured style description data serves as a carrier connecting the client's code calculation logic and the backend report generation service, accurately describing the expected appearance and layout of the table, enabling the backend service to accurately generate spreadsheet files that meet the user's personalized needs.

[0025] Step 104: Parse the structured style description data, wherein the structured style description data includes at least: the definition of one or more worksheets, the cell data content in the worksheets, one or more style definition sets, the mapping relationship that associates the cell data with the style definition sets, and one or more structure definition sets.

[0026] In this step, the backend server systematically parses the structured style description data in the received table generation request to accurately understand the client's complete formatting intent for the table. This structured description data adopts an abstract description method decoupled from the specific table implementation (such as a specific Excel library). Its components may include: the definition of one or more worksheets, which details the worksheet information contained in the table, such as the worksheet name, for example, "Q3 Financial Summary" or "Monthly Sales Details"; the total number of worksheets and their logical division method, such as splitting worksheets by different business modules; and the cell data content in the worksheets, that is, the raw business data obtained after the client code performs calculations, which can be represented as actual numerical values ​​or text information such as "account name", "amount", and "year-on-year growth rate" in financial statements.

[0027] In terms of style, the data contains one or more style definition sets. These sets atomically describe the visual style rules of the table, including font attributes (such as bold, italic, and font size), color configurations (such as foreground and background colors), border styles (such as border type and color), and alignment methods (such as horizontal centering, vertical centering, and left alignment). Each style definition set corresponds to a complete set of style rules and is marked with a unique style identifier. Furthermore, this solution explicitly defines the mapping relationship between cell data and style definition sets. Through an association matrix or reference list, it accurately specifies which cell data should apply which style definition set. For example, header row cells apply the "heading style set" (with dark blue background, white font, and bold characteristics), while data row cells apply the "data style set" (with thin borders and right alignment characteristics).

[0028] In addition, the structured description data also includes one or more sets of structure definitions specifically used to describe the non-style structure rules of the table, including cell merging rules (such as explicitly specifying the range coordinates of the merged area "A1-C1" or "D3-D5"), custom column width settings (such as specifying specific parameters such as "column A width 30", "column B width 15"), and frozen window configurations (such as setting "freeze the first two rows" to ensure that the table header remains visible when scrolling). In this step, by fully parsing all of the above content, the backend server can completely obtain the client's full formatting intent regarding the table data content, style rules, and structure rules.

[0029] Step 106: Call the personalized file generation engine to translate the structured style description data. The translation process includes style translation, data filling and structure translation.

[0030] In this step, after invoking the personalized file generation engine, the engine first performs a style translation operation on the structured style description data. Specifically, the engine iterates through the style definition set contained in the structured style description data, converting each style rule, such as font type, font size, color configuration, border style, and alignment, into a specific style configuration that the target spreadsheet format can recognize. After completing the style translation, the engine then performs a data filling operation. This involves first iterating through the cell data content of the worksheet corresponding to the structured style description data, creating a corresponding cell in the table for each data entry, and then, based on the mapping relationship contained in the structured description, accurately matching and applying the previously translated style configuration to the corresponding cells, ensuring that the content of each cell corresponds to the preset style rules.

[0031] In addition to style translation and data population, this step also involves structure translation. This operation targets the structure definition set within the structured style description data. The engine iterates through these structure definition sets, extracting structure-related configurations such as cell merging rules and custom column width settings. It then uses the corresponding operation interfaces of the target table format to perform specific structural adjustments. For example, according to the defined cell merging rules, it merges cells within a specified range into a single unit, and adjusts the width of corresponding table columns based on custom column width requirements. Once these three translation operations are complete, the originally abstract structured style description data is fully translated into a spreadsheet object containing preset styles, data content, and structural rules, facilitating subsequent serialization and storage steps.

[0032] Step 108: Serialize the translated spreadsheet object into a personalized spreadsheet file and store the personalized spreadsheet file in the secure file storage system of the computing platform.

[0033] This step first converts the spreadsheet object formed in memory after translation into a persistent file format. This serialization process is implemented by calling a dedicated serialization interface provided by the spreadsheet library, encoding the spreadsheet object containing complete worksheet data, style settings, and structural layout into a standard spreadsheet file format. The serialization operation systematically converts the object state in memory and its relationships, including cell data, applied style objects, and structural information such as merged cells, into byte stream data that conforms to a specific file format specification. This process ensures that all table style features and layout structures established during the translation phase are accurately preserved in the final output file.

[0034] The serialized byte stream data is then transmitted to the computing platform's secure file storage system for persistent storage. This secure file storage system employs a tenant isolation strategy, using physical or logical isolation mechanisms to ensure that the file storage spaces of different tenants are independent of each other, preventing unauthorized access. During file storage, the system assigns a unique file identifier to each personalized spreadsheet file and stores the file in the corresponding tenant's dedicated storage area. After the storage operation is complete, the system registers the file's storage information with the metadata database, recording key metadata including the file identifier, the tenant identifier, the associated task identifier, and the file's specific path in the storage system.

[0035] Step 110: In response to an access request from the user's front end, retrieve the personalized form file from the secure file storage system and provide the corresponding service.

[0036] In this step, the backend server receives a personalized form file access request from the user's frontend. This request first undergoes an authentication and permission verification process. The system verifies the user's login credentials to confirm their legitimate identity and tenant information. After successful verification, the system queries the metadata database for the corresponding file storage path and associated tenant identifier based on the file identifier carried in the request. Once it confirms that the requesting user's tenant matches the file's tenant, the system sends a file retrieval command to the secure file storage system. The secure file storage system, based on the received storage path information, locates the target file in the storage space implementing a tenant isolation policy and returns the complete file data to the backend service module.

[0037] After retrieving the personalized form file, the system can provide corresponding service responses based on the specific type of access request. For example, for an online preview request, the system can call a dedicated format conversion component to instantly convert the original form file into an HTML5 format or standard PDF document that can be directly rendered by the browser, ensuring that users can view the form content directly through a web interface without downloading it. For a file download request, the system can directly return the original personalized form file to the user's front end in the form of a data stream, maintaining the original format characteristics and data integrity of the file.

[0038] The concept of the backend server in this solution is explained below. The backend server refers to the server entity deployed on the server side in the computing platform architecture, which is responsible for business processing. Its specific responsibilities may include receiving table generation requests from the client code execution environment, parsing the structured style description data carried in the request, calling the personalized file generation engine to perform translation processing, serializing the generated spreadsheet object into a file and storing it in a secure file storage system, and responding to access requests from the user front end and providing corresponding file retrieval and access services.

[0039] This technical solution integrates client code calculation logic with backend report generation services by receiving table generation requests from the client code execution environment on the backend server and parsing the structured style description data carried within. This design replaces the traditional fragmented workflow that requires exporting raw data first and then manually processing the format, merging the two separate steps into an automated end-to-end process. This improves the efficiency and automation of report generation and avoids errors that may be introduced by manual operation. Furthermore, this technical solution uses a personalized file generation engine to uniformly translate the structured style description data. This process encompasses three stages: style translation, data filling, and structure translation. This integrated translation mechanism ensures accurate conversion from abstract "formatting intent" to specific table files. It not only accurately fulfills complex formatting requirements such as cell merging and custom styles but also avoids inconsistencies between multiple processing stages through unified engine scheduling, guaranteeing the integrity and correctness of the final generated table in terms of style, data, and structure. Moreover, by storing the generated personalized table files in a secure file storage system with tenant isolation policies and constructing an access control mechanism based on metadata query and comparison, the entire process of generating, storing and accessing personalized reports can be managed by the security system of the computing platform.

[0040] Based on the technical solutions described above, this specification also provides some specific implementation schemes, which are described below.

[0041] In an optional embodiment, the client code execution environment is a sandboxed execution environment; the structured style description data is generated by the client code by calling the personalized report SDK provided by the computing platform.

[0042] In this embodiment, the client code execution environment is specifically a sandboxed execution environment. This execution environment is an isolated runtime environment specifically built by the computing platform for clients to host their custom business code. The sandboxing design principle is to achieve isolation between the environment and resources, preventing the execution of client code from interfering with or posing risks to other services, system resources, or other clients' execution environments on the platform. Simultaneously, the sandbox environment typically restricts the system call permissions of client code, allowing it to access only compliant resources pre-opened by the platform, thereby ensuring the security and stability of the entire computing platform from an operational perspective. In this embodiment, the structured style description data is not generated manually by the client code. Instead, it is created by the client code through calling the personalized report SDK provided by the computing platform. This personalized report SDK is a development toolkit provided by the platform for client code. It encapsulates various complex logics for generating structured style description data. This allows the client code to avoid understanding the underlying format rules of the structured description and to handle the relationship between style, structure and data itself. It only needs to call the corresponding interface provided by the SDK to pass its own formatting intent for the table, such as the table style configuration, structure rules, and data content requirements, to the SDK. The SDK automatically encapsulates these intents into structured style description data that conforms to the platform specifications and sends it to the backend server of the computing platform along with the table generation request.

[0043] In an optional embodiment, the sandboxed execution environment is a Docker container, and the structured style description data is in JSON format.

[0044] In an optional embodiment, the style definition set is used to describe at least one style attribute among font, color, border, and alignment; the structure definition set is used to describe at least one structural attribute among cell merging rules, custom column width, and frozen window.

[0045] In this embodiment, the style definition set is specifically used to define the visual presentation characteristics of the table, and can be used to describe at least one style attribute among font, color, border, and alignment. The description of the font attribute can cover the bold or italic state of the font, as well as the specific font size. The description of the color attribute can include the foreground color of the cell content and the fill color of the cell background. The description of the border attribute can include the style type of the border lines and their display color. The description of the alignment can simultaneously include the horizontal and vertical alignment directions of the content within the cell.

[0046] Meanwhile, in this embodiment, the structure definition set is used to define the layout and organization characteristics of the table, specifically describing at least one structural attribute in the cell merging rules, custom column widths, and frozen window settings. The description of the cell merging rules can accurately define the rectangular area to be merged by specifying the starting row number, ending row number, starting column number, and ending column number. The description of the custom column width can accurately control the display width of a specific column by specifying the index number of the target column and its corresponding specific width value. The description of the frozen window can achieve the visual effect of keeping specific row and column areas continuously visible during scrolling by specifying the row and column positions to be frozen.

[0047] In an optional embodiment, the personalized file generation engine is implemented based on the Apache POI or OpenXML library.

[0048] In this embodiment, the personalized file generation engine is implemented based on a spreadsheet processing library, such as Apache POI or the OpenXML library. Apache POI is an open-source Java application programming interface (API) that provides the ability to read and write Microsoft Office format files, suitable for processing .xlsx spreadsheet files. This library contains a series of classes specifically for manipulating Excel files; for example, XSSFWorkbook represents the entire workbook, XSSFSheet corresponds to a single worksheet, and XSSFRow and XSSFCell represent abstractions of rows and cells, respectively. In this embodiment, the generation engine, by calling the APIs provided by these classes, can perform structural operations such as creating workbook instances, adding worksheets to the workbook, creating rows and cells in the table, setting cell values ​​and styles, and merging cells. The OpenXML library provides the ability to perform low-level operations on Office documents based on the OpenXML standard, which is an open file format specification for Microsoft Office documents. In this embodiment, by directly manipulating these low-level XML components, the generation engine can construct spreadsheet files in a way that more closely resembles the file format itself.

[0049] It should be noted that, regardless of the underlying library used in this embodiment, the generation engine needs to build a unified adaptation layer on top of it, so as to separate the engine's translation logic from the specific library implementation details, thereby facilitating possible future library replacement or functional expansion.

[0050] In an optional embodiment, the style translation may include: traversing the style definition set and creating a specific style object in the target spreadsheet library; Establish a mapping cache from style identifiers in the style definition set to specific style objects to reuse style objects; The data filling may include: traversing the cell data and creating corresponding cells; Based on the mapping relationship, the corresponding specific style object is retrieved from the mapping cache and applied to the cell.

[0051] In this embodiment, during the style translation process, the personalized file generation engine first performs a complete traversal of the style definition set. For each independent style definition, the engine parses its atomic style attributes, including parameters such as font specifications, color configuration, border style, and alignment. Based on these parsed style parameters, the engine calls the style creation interface provided by the target spreadsheet library to generate the corresponding specific style object. Simultaneously, to optimize resource utilization, the engine establishes a style mapping cache structure. This structure uses style identifiers from the style definition set as keys and stores the already created specific style objects. This design allows the engine to directly retrieve the already created style object from the cache when encountering the same style identifier subsequently.

[0052] During the data population phase, the generation engine systematically traverses all cell data in the worksheet. Specifically, for each cell data item, the engine uses the spreadsheet library's cell creation interface to create a corresponding cell instance in the worksheet based on its row and column position information. After cell creation is complete, the engine determines the style identifier to be applied to the cell based on the preset mapping relationships in the structured style description data. Subsequently, the engine queries the established style mapping cache, retrieves the corresponding specific style object through the style identifier, and fully applies the style object to the target cell.

[0053] In an optional embodiment, the structure translation may include: traversing the structure definition set and calling the application programming interface of the target spreadsheet library to perform corresponding structure operations, including performing cell merging operations or setting column width operations.

[0054] In this embodiment, during the structure translation process, the engine parses the cell merging rules in the structure definition set item by item. Each merging rule contains explicit area coordinate parameters, including the starting row number, ending row number, starting column number, and ending column number. The engine converts these coordinate parameters into the format required by the target spreadsheet library and calls a dedicated cell merging interface to perform the actual operation. After receiving these coordinate parameters, the interface merges multiple independent cells within the corresponding range into a continuous display area in the specified worksheet object, while maintaining the style attributes and data content set before merging. This merging operation is suitable for creating table headers that span multiple columns or data category columns that need to be merged vertically.

[0055] Meanwhile, for custom column width rules in the structure definition set, the engine processes each column width setting instruction sequentially. Since each instruction contains two parameters: the target column's index and the specific width value, the engine locates the specific column in the worksheet based on the column index and then converts the width value into the internal unit representation required by the target spreadsheet library. After conversion, the engine calls the column width setting interface to apply the adjusted width value to the specified column. This custom column width feature allows the generated table to flexibly adjust the size of each column according to the content length or display requirements, thereby improving the overall readability and presentation of the table.

[0056] In an optional embodiment, after storing the personalized table file in the secure file storage system of the computing platform, it may further include: writing a record to the metadata database, the record being associated with the file identifier, tenant identifier, task identifier, and storage path of the personalized table file; Before responding to an access request from the user's front end, the method may further include: performing permission verification on the access request, including verifying the user's login credentials to confirm the user's identity and the identifier of the tenant to which they belong; The file access service queries the metadata database to obtain the tenant identifier corresponding to the personalized table file, and compares it with the tenant identifier of the currently logged-in user. If the comparison does not match, access is denied.

[0057] In this embodiment, after the personalized spreadsheet file is stored in the secure file storage system of the computing platform, a corresponding record needs to be written to the metadata database. This record needs to associate multiple pieces of information, including the file identifier, tenant identifier, task identifier, and storage path of the personalized spreadsheet file. The file identifier is a unique identifier used to distinguish different spreadsheet files; the tenant identifier corresponds to the tenant to which the user who created the spreadsheet belongs; the task identifier is used to associate the specific computing task that generated the spreadsheet; and the storage path, thus clarifying the specific location of the spreadsheet file in the secure file storage system. Writing this record in this embodiment provides basic information for subsequent file access and permission verification, allowing the system to quickly locate the spreadsheet file through these associated contents and clarify the file's ownership.

[0058] In this embodiment, before responding to an access request from the user's front end, an authorization verification operation needs to be performed on the access request. Specifically, the user's login credentials are first verified. This verification confirms the identity of the user initiating the request and also determines the tenant identifier to which the user belongs. Next, the file access service queries the metadata database to retrieve the tenant identifier associated with the personalized table file corresponding to the current access request. Then, the tenant identifier corresponding to this table is compared with the tenant identifier of the currently logged-in user. If the comparison result is inconsistent, it means that the current user is not a member of the tenant corresponding to this table file, and the system will directly reject the access request. This achieves secure file isolation in a multi-tenant environment, preventing unauthorized access to files from different tenants.

[0059] In optional embodiments, when providing the corresponding service, it may also include: calling an online preview converter to instantly convert the personalized form file into an HTML5 or PDF format readable by a browser, and returning it to the user's front end for display.

[0060] The following example illustrates the technical solution described above, using a real-world scenario where a customer wants to generate a financial statement. Specifically, the customer, within the sandboxed execution environment of the computing platform, writes Python code to call the platform's personalized reporting SDK to define the table's formatting intent. The code implementation is shown below. First, it imports the platform SDK and creates a report object. Then, it defines two different visual styles: title style and data style, including attributes such as bold font, font size, font color, background fill color, alignment, and border style. Next, the code populates the table data and associates the defined styles with the corresponding cells, including the content filling of the title row and data rows. Finally, the code defines the table's structural rules, including cell merging rules, custom column width settings, and freeze window settings, and generates structured style description data using the `build_description()` method. When the `build_description()` method is executed, the SDK's internal generator produces structured style description data in JSON format. This data includes the `styles` dictionary defining two style sets, `s_title` and `s_data`, the `sheets` list containing the `data` data matrix, the `merges` list of merging rules, and the `col_settings` column width settings and `freeze` settings. This JSON data was transmitted to the backend service through a secure internal channel.

[0061] Python # Import platform SDK from platform_sdk import PersonalizedReport # Create report object report = PersonalizedReport(filename="Financial_Report_Q3.xlsx") sheet = report.add_sheet("Q3 Summary") # Define heading styles style_title = report.define_style( font_bold=1, font_size=18, font_color="#FFFFFF",# white font fill_color="#00008B", # Dark blue background align_h="center", align_v="center" ) # Define data style style_data = report.define_style( border_all="thin"# Thin border around all four sides ) # Populate data and associate styles sheet.set_cell(row=0, col=0, value="Q3 Financial Summary", style=style_title) sheet.set_cell(row=0, col=1, style=style_title) # Apply title style to cell B1 sheet.set_cell(row=0, col=2, style=style_title) # Apply title style to cell C1 sheet.set_cell(row=1, col=0, value="subject", style=style_data) sheet.set_cell(row=1, col=1, value="amount", style=style_data) sheet.set_cell(row=1, col=2, value="YoY", style=style_data) # Define structure rules sheet.merge_cells(start_row=0, start_col=0, end_row=0, end_col=2)# Merge A1:C1 sheet.set_column_width(col=0, width=30) # Column A width 30 sheet.freeze_panes(row=2, col=0) # Freeze the first two rows # Return to structured description return report.build_description() After receiving JSON data, the backend service's description receiving and verification module first performs security verification to check the legitimacy of the request source, and then performs schema verification to ensure that the data structure conforms to predefined specifications, including verifying the legality of coordinate parameters in the merging rules. After successful verification, the parsing and scheduling module deserializes the JSON into a ReportDefinition object and distributes it to the personalized file generation engine for processing. The personalized file generation engine performs transpilation processing based on the Apache POI library, first performing style transpilation and cache establishment. This process traverses the style definition set, creates specific style objects in the target spreadsheet library, and establishes a mapping cache from style identifiers to specific style objects to reuse style objects.

[0062] After style translation, the engine performs data population, iterating through cell data content, creating corresponding cells, and retrieving the specific style object from the mapping cache based on the mapping relationship and applying it to the cell. Next, the engine performs structure translation, iterating through the structure definition set and calling the target spreadsheet library's application programming interface (API) to perform corresponding structure operations, including cell merging and column width setting. After translation, the generation engine serializes the Workbook object into a byte stream, and the secure storage module uploads this byte stream to the storage system. An example storage path is s3: / / tenant-xyz / reports / file-uuid-abc.xlsx. Simultaneously, a record is written to the metadata database, associating the file identifier, tenant identifier, task identifier, and storage path, completing persistent file storage and metadata registration.

[0063] Java Map<String, CellStyle> styleCache = new HashMap<>(); / / Parse s_title style CellStyle cs_title = wb.createCellStyle(); Font f_title = wb.createFont(); f_title.setBold(true); f_title.setFontHeightInPoints((short)18); f_title.setColor(new XSSFColor(Color.decode("#FFFFFF"))); cs_title.setFont(f_title); cs_title.setFillForegroundColor(new XSSFColor(Color.decode("#00008B"))); cs_title.setFillPattern(FillPatternType.SOLID_FOREGROUND); cs_title.setAlignment(HorizontalAlignment.CENTER); cs_title.setVerticalAlignment(VerticalAlignment.CENTER); styleCache.put("s_title", cs_title); / / Parse the s_data style CellStyle cs_data = wb.createCellStyle(); cs_data.setBorderTop(BorderStyle.THIN); cs_data.setBorderBottom(BorderStyle.THIN); / / ... Set other borders styleCache.put("s_data", cs_data); After a user initiates an access request from the front end, the integrated access service module executes the complete file access process. The platform gateway first verifies the user's token and tenant identity, confirming the user's legitimacy and their tenant information. After initial verification, the file access service queries the metadata database to obtain the tenant identifier corresponding to the requested file and strictly compares it with the tenant identifier of the currently logged-in user. If the comparison does not match, access is denied, ensuring strict tenant isolation. After successful permission verification, the system provides corresponding services based on the type of access request. For preview requests, the system calls an online preview converter to instantly convert the original .xlsx file into a browser-readable HTML5 format, specifically by using conversion technologies such as libreoffice --headless --convert-to html. For download requests, the system directly returns the original .xlsx file data stream, maintaining the file's original format characteristics and integrity. The end user can view a personalized table on the platform front end that fully conforms to the code definition intent, including correctly merged header areas, applied dark blue background with white text style effects, data cell border styles, and set column widths and frozen window layout structures. Users can preview the table content directly in the browser using the preview function, or download the original .xlsx file using the download function, realizing a complete automated process from calculation to presentation and an integrated user experience.

[0064] Java Sheet sh = wb.createSheet("Q3 Summary"); / / Traverse the data matrix and create cells Row r0 = sh.createRow(0); Cell cA1 = r0.createCell(0); cA1.setCellValue("Q3 Financial Summary"); cA1.setCellStyle(styleCache.get("s_title")); / / ...continue filling in other cell data / / Perform cell merging sh.addMergedRegion(new CellRangeAddress(0, 0, 0, 2)); / / Set column width sh.setColumnWidth(0, 30 * 256); / / POI unit conversion / / Set freeze window sh.createFreezePane(0, 2); Based on the foregoing technical solutions, this invention also provides a device for generating personalized tables for a computing platform, applied to the backend server of the computing platform, such as... Figure 2 As shown, the device, from a macroscopic perspective, may include the following modules: The description receiving module 202 is used to receive a table generation request from the client code execution environment in the computing platform, wherein the table generation request carries structured style description data; The data parsing module 204 is used to parse the structured style description data, wherein the structured style description data includes at least: the definition of one or more worksheets, the cell data content in the worksheets, one or more style definition sets, the mapping relationship that associates the cell data with the style definition sets, and one or more structure definition sets; The document generation engine module 206 is used to call the personalized document generation engine to translate the structured style description data. The translation process includes style translation, data filling and structure translation. The secure storage module 208 is used to serialize the translated spreadsheet object into a personalized spreadsheet file and store the personalized spreadsheet file in the secure file storage system of the computing platform. The integrated access service module 210 is used to retrieve the personalized form file from the secure file storage system in response to an access request from the user's front end and provide corresponding services.

[0065] It should be noted that the above modules are only for illustrating the technical solution of this application from a macro perspective. In the actual design of the technical solution of this application, the functional modules can be developed in other module division forms.

[0066] Figure 3 For Figure 2 The generation device in the diagram is a complete flowchart of the method for generating personalized tables on the computing platform provided by the technical solution of this application. The following is based on... Figure 3 The plan will be fully explained.

[0067] See Figure 3The first stage of the technical solution in this application is the table generation process, which involves multi-stage interactions between the client execution environment, the description receiving module, the data parsing module, and the file generation engine module. The process begins with the client execution environment sending a table generation request to the description receiving module (step 1). The description receiving module first performs a security verification on the request (step 2) to ensure the request's source is legitimate and its content has not been illegally tampered with. After successful verification, the description receiving module transmits the structured description data carried in the request to the data parsing module (step 3). The data parsing module then deconstructs and analyzes the composition of the structured description data (step 4), identifying core information such as worksheet definitions, cell data content, style definition sets, and structure definition sets, and then returns the complete parsing result to the description receiving module (step 5). Afterward, the description receiving module transmits the parsed data to the file generation engine module (step 6). The file generation engine module performs a translation process on this data, specifically including three sub-operations: style translation, data filling, and structure translation (step 7). Upon completion, the translated spreadsheet object is transmitted to the secure storage module (step 8).

[0068] The second part describes the storage and result feedback of the table generation process. Specifically, after receiving the spreadsheet object from the file generation engine module, the secure storage module performs a serialization operation on it, converting the spreadsheet object in memory into a persistent file format and storing the spreadsheet file (step 9). After the storage operation is completed, the secure storage module returns storage confirmation information to the description receiving module (step 10). The description receiving module then feeds back the table generation status (such as "generation successful" or "storage completed") to the client execution environment (step 11). Finally, the client execution environment obtains the processing result of the entire table generation process (step 12). At this point, the first stage of the table generation process is completely completed, and the personalized spreadsheet file has been securely stored in the system.

[0069] The third stage is the file access process, which mainly involves the interaction between the user frontend, the integrated access service module, and the secure storage module. The process begins with the user frontend sending a table access request to the integrated access service module (step 13). The integrated access service module first performs permission verification on the requesting user (step 14), verifying the user's identity and corresponding table access permissions. After successful permission verification, the integrated access service module sends a request to the secure storage module to retrieve the target file (step 15). The secure storage module retrieves the corresponding table file from its own storage system (step 16) and returns the retrieved file data to the integrated access service module (step 17). After receiving the file data, the integrated access service module prepares the corresponding service response content (step 18) and finally provides the corresponding access service to the user frontend (such as online table preview, file download, etc., step 19), completing the entire file access process.

[0070] In this application's technical solution, the "structured style description data" acts as a bridge and intermediate language connecting the formatting intent of computational logic with the specific table implementation in the backend. It defines the data, styles, and structural elements required by the final table in a standardized, abstract description that is decoupled from specific spreadsheet libraries (such as Apache POI). Specifically, in a sandboxed execution environment, client code calls the platform-provided SDK to encapsulate the developer's visual and layout intent for the table (e.g., "merge cells A1 to C1 into a single header row," "use a dark blue background and bold white font for the header row," "set the width of the first column to 30," etc.) into structured data. This data includes the original cell data content and atomically describes visual attributes such as font, color, and borders through a "style definition set." It also accurately describes layout rules such as cell merging, column width, and frozen windows through a structure definition set, and clarifies which data cells should apply which style rule through mapping relationships. Once the backend server receives this structured description, its engine performs a translation process. First, it performs style translation, converting the abstract style description into specific style objects in the target spreadsheet library and caching them for reuse. Next, it performs data population, applying the cached style objects to the corresponding cells based on mapping relationships while creating worksheet cells. Finally, it performs structure translation, calling the spreadsheet library's API to perform structural operations such as merging cells and setting column widths. This series of operations accurately translates the client's formatting intent into low-level API calls to spreadsheet objects, ultimately serializing and generating a spreadsheet file (such as a .xlsx file) that perfectly matches the user's initial design, featuring personalized styles and complex structures. This mechanism, combining structured descriptions of intent with backend engine translation, enables the automated generation of highly customized spreadsheets driven by client code within an isolated sandbox environment, bridging the semantic gap between computation and presentation.

[0071] Those skilled in the art will understand that the modules in the apparatus of the embodiments can be distributed in the apparatus of the embodiments as described in the embodiments, or they can be located in one or more devices different from this embodiment with corresponding changes. The modules of the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.

[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating a personalized table of a computing platform, applied to a back-end server of the computing platform, and characterized in that, The method comprises: receiving a table generation request from a client code execution environment in a computing platform, the table generation request carrying structured style description data; parsing the structured style description data, wherein the structured style description data at least includes: definition of one or more worksheets, cell data content in the worksheets, one or more style definition sets, mapping relationship of associating cell data with the style definition sets, and one or more structure definition sets; calling a personalized file generation engine to perform translation processing on the structured style description data, the translation processing including style translation, data filling and structure translation; serializing the translated spreadsheet object into a personalized table file, and storing the personalized table file to a secure file storage system of the computing platform; in response to an access request from a user front end, retrieving the personalized table file from the secure file storage system, and providing corresponding services.

2. The method of claim 1, wherein, The client code execution environment is a sandboxed execution environment; the structured style description data is generated by the client code by calling a personalized report SDK provided by the computing platform.

3. The method of claim 2, wherein, The sandboxed execution environment is a Docker container, and the structured style description data is in JSON format.

4. The method of claim 1, wherein, The style definition set is used to describe at least one of the following style attributes: font, color, border, and alignment; and the structure definition set is used to describe at least one of the following structure attributes: cell merging rule, custom column width, and frozen window.

5. The method of claim 1, wherein, The personalized file generation engine is implemented based on Apache POI or OpenXML library.

6. The method of claim 1, wherein, The style translation includes: traversing the style definition set to create specific style objects in the target spreadsheet library; establishing a mapping cache from the style identifiers in the style definition set to the specific style objects, to reuse the style objects; The data filling includes: traversing the cell data to create corresponding cells; according to the mapping relationship, obtaining the corresponding specific style objects from the mapping cache and applying them to the cells.

7. The method of claim 1, wherein, The structure translation includes: traversing the structure definition set, calling the application programming interface of the target spreadsheet library to perform corresponding structure operations, including performing cell merging operation or setting column width operation.

8. The method of claim 1, wherein, After storing the personalized table file to the secure file storage system of the computing platform, further comprising: writing a record to a metadata database, the record associating the file identifier, tenant identifier, task identifier and storage path of the personalized table file; Before responding to the access request from the user front end, further comprising: performing permission verification on the access request, including verifying the user's login credentials to confirm the user's identity and the tenant identifier to which the user belongs; querying the metadata database through a file access service to obtain the tenant identifier corresponding to the personalized table file, and comparing it with the tenant identifier of the currently logged-in user, and if the comparison is inconsistent, access is denied.

9. The method of claim 1, wherein, When providing corresponding services, further comprising: The online preview converter is invoked to convert the personalized table file into a browser-readable HTML5 format or a PDF format in real time and return to the user front end for display.

10. An apparatus for generating a platform personalization table, applied to a back-end server of a computing platform, comprising: The device comprises: A description receiving module is configured to receive a table generation request from a client code execution environment in a computing platform, the table generation request carrying structured style description data; A data parsing module is configured to parse the structured style description data, wherein the structured style description data at least includes: definition of one or more worksheets, cell data content in the worksheets, one or more style definition sets, mapping relationship for associating the cell data with the style definition sets, and one or more structure definition sets; A file generation engine module is configured to invoke a personalized file generation engine to perform translation processing on the structured style description data, the translation processing including style translation, data filling, and structure translation; A secure storage module is configured to serialize the translated electronic table object into a personalized table file and store the personalized table file in a secure file storage system of the computing platform; An integrated access service module is configured to retrieve the personalized table file from the secure file storage system in response to an access request from a user front end and provide corresponding services.

Citation Information

Patent Citations

  • Excel document formatting method and device, equipment and storage medium

    CN116644715A

  • Personalized autonomous spreadsheet

    CN118159960A

  • Method and device for generating report file

    CN118194837A

  • Intelligent document generation system and method for bidding document

    CN120874795A

  • Attachment, base for wig and wig

    KR1020260086655A