A message pushing method, system and medium for instant processing of enterprise operation information
By automatically identifying and converting Web charts and Excel reports into static image files, the problem of information push process disruption caused by manual intervention in existing technologies has been solved, enabling the timely, accurate, and efficient delivery of enterprise operational information.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU XIAOMA EDUCATION TECH CO LTD
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies cannot directly recognize and render dynamic interactive web charts and complex Excel statistical reports, requiring manual intervention for screenshots and uploads, resulting in a broken and inefficient information push process.
The type analysis module automatically identifies enterprise operation information as web charts or Excel reports, uses headless browser technology and image processing tools to convert them into static image files, and uploads them to cloud storage services to generate visual push information.
It enables real-time automated delivery of interactive web charts and Excel statistical reports, avoiding manual operation, improving processing efficiency and accuracy, and ensuring the timely, accurate, and large-scale delivery of information.
Smart Images

Figure CN121924101B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of instant messaging and data analysis technology, and in particular to a message push method, system and medium for real-time processing of enterprise operational information. Background Technology
[0002] In modern enterprise operations management, delivering key performance indicators (KPIs) and other operational information in a visualized format to the mobile and desktop devices of managers or teams in real time is crucial for improving decision-making efficiency and business response speed. Existing technologies typically employ a hierarchical processing chain to achieve this information delivery, with a typical framework including: the business system as the sender, an information processing engine, a third-party push service, and the final mobile or desktop receiver.
[0003] In existing technical solutions, the information processing engine, as the core intermediate link, is responsible for formatting and converting the operational information provided by the business system into a message format recognizable by third-party push services. However, this information processing engine typically only supports processing plain text, markup languages, or pre-stored static images such as JPEGs. When enterprise operational information exists as dynamic, interactive web charts, such as charts generated using Echarts or Canvas technologies, or complex Excel statistical reports, existing technical solutions have significant limitations. Because the information processing engine cannot directly recognize and render such non-static content, manual intervention is required. Operations personnel must manually take screenshots of the web chart dashboard or Excel report interface, or save the report as an image file, and then upload the image to the system for further processing by the information processing engine. This manual operation disrupts the entire information push process. Summary of the Invention
[0004] To enable the real-time push of interactive web charts and Excel statistical reports, this application provides a message push method, system, and medium for real-time processing of enterprise operational information.
[0005] Firstly, a message push method for real-time processing of enterprise operational information is provided, the method comprising:
[0006] Obtain enterprise operation information and its corresponding information type, determine whether the information type is a static type, and if not, classify the enterprise operation information into Web chart information or Excel report information according to the information type;
[0007] When the enterprise operation information is Web chart information, the Web chart information is converted into Web chart configuration data, and the Web chart configuration data is rendered into a first static image file based on headless browser technology;
[0008] When the enterprise operation information is in the form of an Excel report, the Excel chart information is converted into a portable document format file, and the portable document format file is then converted into a second static image file.
[0009] Upload the first static image file or the second static image file to the cloud storage service to obtain the corresponding image access address;
[0010] Based on the image access address, a push notification containing visual operational information is generated and sent to the designated instant messaging platform.
[0011] In some embodiments, converting the Web chart information into Web chart configuration data includes:
[0012] Responding to the data query request contained in the Web chart information, the system retrieves the corresponding real-time Web operation data from the business database based on the query parameters in the data query request.
[0013] The real-time Web operation data is mapped and populated according to a predefined chart data structure to generate an intermediate configuration object containing data sequences, coordinate axis definitions, and visual style attributes;
[0014] The intermediate configuration object is standardized and encapsulated according to preset chart type rules to generate Web chart configuration data that conforms to the syntax specifications of the target Web chart library.
[0015] In some embodiments, rendering the Web chart configuration data into a first static image file based on headless browser technology includes:
[0016] Launch a headless browser instance based on the Web chart configuration data to create a virtual page environment;
[0017] Based on the headless browser instance, a preset HTML template page containing the target Web Chart Library rendering engine is loaded in the virtual page environment;
[0018] Based on the preset HTML template page, the Web chart configuration data is injected into the target Web chart library rendering engine to drive the target Web chart library rendering engine to generate corresponding visual charts in the virtual page environment;
[0019] Based on the virtual page after generating the visualization chart, a screenshot command is triggered to capture the current page image and output it as an image binary data stream;
[0020] Based on the image binary data stream, the first static image file is obtained by encoding and storing it according to a preset image format and a preset storage path.
[0021] In some embodiments, converting the Excel chart information into a portable document format file includes:
[0022] Obtain a predefined enterprise operation data Excel template file, wherein the enterprise operation data Excel template file contains placeholder cells for receiving real-time operation data from Excel;
[0023] Based on the data query request in the Excel chart information, retrieve the corresponding real-time operational data from the business database;
[0024] The spreadsheet processing component is used to read the Excel template file containing the company's operational data and locate the placeholder cells.
[0025] The real-time operational data from Excel is populated into the designated placeholder cells to generate a workbook file containing the updated operational data;
[0026] Based on preset file conversion rules, a custom PDF writer is invoked to perform format conversion processing on the workbook file to generate a portable document format file that contains the updated operational data and supports Chinese characters, headers and footers, and merged cell formats.
[0027] In some embodiments, converting the portable document format file into a second still image file includes:
[0028] Read the portable document format file and load it into the image processing object;
[0029] Based on the image processing object, the total number of pages of the portable document format file is obtained to determine whether the portable document format file is a single-page document or a multi-page document;
[0030] When the document is determined to be a single-page document, the portable document format file is converted into an initial PNG image and saved to a preset path. The initial PDG image is then automatically cropped with blank borders to generate a cropped PNG image as a second static image file.
[0031] When a document is determined to be a multi-page document, each page in the portable document format file is traversed to convert each page into a temporary PNG image and perform automatic blank border cropping on each temporary PNG image, while recording the width and height of each temporary PNG image;
[0032] The maximum width among all temporary PNG images is calculated based on the recorded width, and the total height of the composite image is calculated based on the recorded height, i.e., the preset page spacing adjustment value.
[0033] A blank canvas is created based on the maximum width and the total height of the composite image, and each cropped temporary PNG image is superimposed onto the corresponding vertical position of the blank canvas in sequence to generate a composite PNG image.
[0034] The synthesized PNG image is cropped with an overall blank border to output a second static image file.
[0035] In some embodiments, uploading the first or second static image file to a cloud storage service to obtain the corresponding image access address includes:
[0036] Obtain the local actual storage path and filename of the first or second static image file;
[0037] A standardized upload request containing the file and essentially a data stream is constructed based on the actual local storage path and filename.
[0038] The standardized upload request is sent to the cloud storage server by calling the pre-configured cloud storage service application interface;
[0039] Receive an upload response returned by the cloud storage server, wherein the upload response contains a publicly accessible network resource location address generated by the cloud storage service and associated with the file binary data stream;
[0040] The network resource location address is extracted and used as the image access address.
[0041] In some embodiments, generating push notifications containing visual operational information based on the image access address includes:
[0042] Construct an image embedding segment containing an accessible link identifier based on the image access address;
[0043] Initial message content is generated based on a preset message template and the image embedding segment, wherein the preset message template includes placeholders for dynamically filling the image embedding segment;
[0044] The initial message content is encapsulated in a standardized manner according to the format specifications of the target instant messaging platform to generate a standardized message;
[0045] Based on the standardized message, and with the addition of a preset message title and descriptive text, push notifications containing visual operational information are generated.
[0046] In some embodiments, sending the push notification to a designated instant messaging platform includes:
[0047] Based on the push information, construct the corresponding message object to be sent;
[0048] Based on preset parallel processing rules, the message objects to be sent are split into tasks and queues are allocated to generate multiple parallel message sending tasks.
[0049] The multiple parallel message sending tasks are implemented in parallel to synchronously send the push information to the designated instant messaging platform.
[0050] Secondly, a message push system for real-time processing of enterprise operational information is provided. The system includes: a type analysis module, a chart processing module, a report processing module, an address processing module, and a message push module; wherein,
[0051] The type analysis module is used to obtain enterprise operation information and corresponding information types, determine whether the information type belongs to a static type, and if not, classify the enterprise operation information into Web chart information or Excel report information according to the information type.
[0052] The chart processing module is used to convert the Web chart information into Web chart configuration data when the enterprise operation information is Web chart information, and to render the Web chart configuration data into a first static image file based on headless browser technology;
[0053] The report processing module is used to convert the Excel chart information into a portable document format file and the portable document format file into a second static image file when the enterprise operation information is an Excel report.
[0054] The address processing module is used to upload the first static image file or the second static image file to the cloud storage service to obtain the corresponding image access address;
[0055] The message push module is used to generate push information containing visual operational information based on the image access address, and send the push information to the designated instant messaging platform.
[0056] Thirdly, a computer-readable storage medium is provided, on which a computer program capable of running on a processor is stored, wherein when the computer program is executed by the processor, it implements a message push method for real-time processing of enterprise operational information as described in the first aspect.
[0057] By employing the above method, this application obtains enterprise operation information and its corresponding information type, determines whether the information type is static, and if not, classifies the enterprise operation information into Web chart information or Excel report information based on the information type. When the enterprise operation information is Web chart information, it is converted into Web chart configuration data and rendered as a first static image file using headless browser technology. When the enterprise operation information is Excel report information, it is converted into a portable document format file, and then the portable document format file is converted into a second static image file. The first or second static image file is uploaded to a cloud storage service to obtain the corresponding image access address. Based on the image access address, a push notification containing visualized operation information is generated and sent to a designated instant messaging platform. This enables the instant push of Web interactive charts and Excel statistical reports. Attached Figure Description
[0058] Figure 1 This application provides a flowchart of a message push method for real-time processing of enterprise operational information.
[0059] Figure 2 This is a schematic diagram of the logical flow of Web visualization rendering provided in this application.
[0060] Figure 3 This is a schematic diagram of the logical flow of the Excel report visualization rendering provided in this application.
[0061] Figure 4 This is a schematic diagram of a message push system for real-time processing of enterprise operation information provided in an embodiment of this application. Detailed Implementation
[0062] To better understand the purpose, technical solutions, and advantages of this application, it has been described and illustrated below with reference to the accompanying drawings and embodiments. However, those skilled in the art should understand that this application can be implemented without these details. It will be apparent to those skilled in the art that various modifications can be made to the embodiments disclosed in this application, and the general principles defined in this application can be applied to other embodiments and application scenarios without departing from the principles and scope of this application. Therefore, this application is not limited to the illustrated embodiments, but is consistent with the broadest scope claimed in this application.
[0063] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.
[0064] Figure 1 This is a flowchart illustrating a message push method for real-time processing of enterprise operational information provided in this application. Figure 1 As shown, a message push method for real-time processing of enterprise operational information includes the following steps:
[0065] Step S100: Obtain enterprise operation information and corresponding information types, determine whether the information type is a static type, and if not, classify the enterprise operation information into Web chart information or Excel report information according to the information type.
[0066] This application describes the process from the perspective of the push notification end. Specifically, the prevention described in this application is based on the push notification end's perspective, involving the automated identification and classification of received enterprise operational information. The push notification end first receives enterprise operational information and related metadata from the business system, which includes at least an information type identifier. The push notification end has a built-in type analyzer that parses the information type according to predefined type determination rules. If the information type identifier is a non-static type such as web_chart or excel_report, a further content differentiation process is triggered. If the information type identifier is a static content type such as text, markdown, or image, jpeg, it is determined to be a static type and directly enters the subsequent formatting stage, i.e., the static content is standardized, parsed, and encapsulated. For text or Markdown content, key data and text structure are extracted, and the content is assembled into a structured message object according to the message format specifications required by target instant messaging platforms such as DingTalk and WeChat Work, such as JSON message bodies that support limited Markdown syntax such as links, bolding, and lists. For content that is already a static image, its format and size are verified, and it is either directly treated as an image attachment or its existing storage path is encapsulated into an accessible URL link. Subsequently, the encapsulated structured message object, along with metadata such as message recipient and sending time, is packaged together to generate a standardized push request that is fully compatible with third-party push service interface specifications. This request will be sent directly to the designated instant messaging platform. This step is fast and straightforward, representing a standardized and lightweight processing path for static content. This ensures that the entire push process can handle both non-static charts and reports requiring complex transformations and existing static information seamlessly.
[0067] In the differentiation process, the type analyzer parses the structural characteristics and data format of enterprise operational information. For Web chart information, its characteristics typically include configuration objects based on JavaScript chart libraries such as ECharts and Canvas, such as option structures, or dynamic data query requests and chart rendering instructions. For Excel report information, its characteristics are reflected in the presence of Excel-specific elements such as worksheet structure, cell formulas, predefined template placeholders, and pivot tables. By matching these characteristics, the type analyzer accurately distinguishes non-static information into Web chart information or Excel report information, and passes the classification results to the corresponding subsequent processing modules, such as chart processing modules or report processing modules, thereby providing accurate input classification criteria for achieving a fully automated chart and report to image conversion process.
[0068] By achieving intelligent type identification and segmentation at the initial stage of the enterprise operational information processing chain, this application ensures that subsequent processing stages can call dedicated rendering and conversion engines for web interactive charts and Excel structured reports respectively, effectively avoiding the inefficient operations of manual identification, screenshotting, and uploading in existing technologies. This automatic classification mechanism not only eliminates the problems of information push delays and process breaks caused by manual intervention, but also lays a key preprocessing foundation for the timely, accurate, and large-scale push of enterprise operational information, significantly improving the automation level and processing timeliness of the entire message push work.
[0069] Step S200: When the enterprise operation information is Web chart information, the Web chart information is converted into Web chart configuration data, and the Web chart configuration data is rendered into a first static image file based on headless browser technology.
[0070] For the categorized Web chart information, it is necessary to first convert the raw information into standard haunt configuration data to provide a unified and compatible input foundation for subsequent headless browser rendering. The conversion of Web chart information into Web chart configuration data includes the following steps:
[0071] Step S201: Respond to the data query request contained in the Web chart information to obtain the Web real-time operation data corresponding to the Web chart information from the business database based on the query parameters in the data query request.
[0072] Step S202: Map and populate the real-time Web operation data according to a predefined chart data structure to generate an intermediate configuration object containing data sequences, coordinate axis definitions, and visual style attributes.
[0073] Step S203: Standardize and encapsulate the intermediate configuration object according to the preset chart type rules to generate Web chart configuration data that conforms to the target Web chart library syntax specification.
[0074] The web chart information includes a pre-defined data query request, which carries specific query parameters, including but not limited to the data time range, business module identifier, and metric type. Upon receiving this query request, the push client establishes an efficient connection to the business database through a pre-configured database connection pool. Based on the query parameters, it generates an optimized SQL query statement and directly extracts the corresponding real-time web operational data from the business database. During the data extraction process, a data validation mechanism is employed to verify field integrity and data format compliance in real time, ensuring the accuracy of the extracted operational data. Simultaneously, connection pool reuse reduces database connection overhead and improves data acquisition efficiency.
[0075] The predefined chart data structure comprises three core modules: data sequence, axis definition, and visual style attributes. The data sequence corresponds to the source of the chart's numerical values; the axis definition clarifies the labeling and scale rules for the horizontal and vertical axes; and the visual style attributes cover presentation specifications such as chart colors, line styles, and legend positions. The push notification platform uses the acquired real-time web operational data, according to field mapping relationships and data type matching rules, to populate the corresponding positions in the predefined chart data structure, automatically generating intermediate configuration objects. For example, daily new user count data is populated into the numerical fields of the data sequence, the date field is mapped to the horizontal axis definition, and the preset brand color scheme is configured as a visual style attribute, achieving precise adaptation between the data and the chart structure.
[0076] The pre-defined chart type rules include semantic specifications for mainstream chart types such as line charts, bar charts, and pie charts. For target web charting libraries like Echarts, the naming rules, data formats, and optional parameter ranges for each configuration item are clearly defined. Based on the chart type corresponding to the intermediate configuration object, it is standardized and encapsulated. The data sequence in the intermediate configuration object is converted into an array format supported by the target web charting library, and the axis definitions and visual style attributes are mapped to key-value pair structures conforming to the library's syntax specifications. Finally, web chart configuration data that can be directly recognized by the target web charting library is generated. This achieves a fully automated conversion from web chart information to standardized configuration data, eliminating the need for manual data processing and format adaptation, effectively avoiding the inefficiencies and format errors associated with manual operations. Connection pool reuse and query optimization in the data acquisition stage improve the extraction speed of real-time operational data. The generation of intermediate configuration objects realizes the standardized adaptation of data and chart structure. Standardized encapsulation ensures high compatibility between configuration data and target Web chart library, providing a unified and efficient input foundation for the subsequent headless browser rendering stage. This significantly improves the timeliness, accuracy and compatibility of Web chart information conversion, laying the foundation for the immediacy of the entire message push process.
[0077] After standardizing and encapsulating the Web chart configuration data, to achieve automated and high-fidelity visualization of non-static Web chart information, a headless browser technology is further employed to construct a virtual rendering environment, enabling chart rendering and image generation without manual intervention. The process of rendering the Web chart configuration data into a first static image file based on headless browser technology includes the following steps:
[0078] Step S204: Launch a headless browser instance based on the Web chart configuration data to create a virtual page environment.
[0079] Step S205: Load a preset HTML template page containing the target Web Chart Library rendering engine in the virtual page environment based on the headless browser instance.
[0080] Step S206: Based on the preset HTML template page, the Web chart configuration data is injected into the target Web chart library rendering engine to drive the target Web chart library rendering engine to generate the corresponding visual chart in the virtual page environment.
[0081] Step S207: Based on the virtual page after generating the visualization chart, a screenshot command is triggered to capture the current page image and output it as an image binary data stream.
[0082] Step S208: Based on the image binary data stream, the first static image file is obtained by encoding and storing it according to the preset image format and preset storage path.
[0083] First, the system shell command is invoked to execute the preset echarts.js script. The script carries the width and height parameters from the Web chart configuration data. It launches a headless Chrome browser instance through the launch() method of the Puppeteer library, disables the default page load waiting mechanism and configures custom timeout control and virtual memory limits, creates an independent virtual page process, achieves environment isolation when multiple tasks are concurrent, and generates a virtual page environment that retains only kernel rendering capabilities.
[0084] The default HTML template has a built-in ECharts rendering engine and basic styles, reserves DOM nodes for the chart container and binds a rendering completion callback function. The headless browser loads the local template file through the page.goto() method, disables the loading of unnecessary resources, and only retains the parsing of JavaScript scripts and CSS styles. The chart container size and style consistent with the configuration parameters are injected through the page.setContent() method.
[0085] Then, the web chart configuration data is injected into the template's global variable using the page.evaluate() method, triggering the chart initialization function. The ECharts rendering engine fills in the values according to the configuration data, sets the axes, renders the visual style, enables anti-aliasing optimization, and listens to the rendering status through a callback function. The rendering is considered complete when the DOM nodes have finished loading and the number of drawing frames has stabilized.
[0086] After rendering is complete, the page.screenshot() method is called to trigger a screenshot. The screenshot area is precisely located to the DOM node of the chart container. The PNG format and 2x pixel density are set, the default cropping function is disabled, and the image data is received through the Buffer object and directly converted into a binary data stream and returned to the main process.
[0087] After receiving the binary data stream, the main process uses Node.js's `fs` module to create a file write stream according to the preset storage path and filename. During the write process, PNG standard encoding is used to preserve the image's alpha channel, and the compression quality is set using the `setCompressionQuality()` method to control file size while ensuring image clarity. After writing is complete, file integrity is automatically verified, i.e., the file's byte count matches the length of the binary data stream, and the file storage path is returned, ultimately generating a first static image file that meets the requirements. This scripted startup and environment isolation design enables concurrent rendering of multiple charts without interference; precise size adaptation and anti-aliasing optimization ensure image consistency and clarity, allowing for viewing on mobile devices without landscape mode; direct binary data stream transmission avoids temporary file overhead; the entire process is automated without human intervention, shortening the time required to convert web charts to images, while also reducing the risk of format inconsistencies and labor costs.
[0088] Figure 2 This is a schematic diagram of the logical flow of Web visualization rendering provided in this application. For example... Figure 2 As shown, the business system initiates a data query request to retrieve real-time web operational data from the business database. The data is then organized according to predefined rules into Echarts option configuration data conforming to the target web chart library's syntax specifications and synchronously transmitted to the Node service. Upon receiving the Echarts option configuration data, the Node service invokes a system shell command to execute a pre-defined echarts.js script within the Node.js runtime environment. The script parameters include key information such as the output path, filename, configuration data, and image width and height. After starting, the Echarts.js script first receives the Echarts option configuration data and then launches a headless browser instance via the Puppeteer library, creating an independent virtual page environment. The headless browser loads a pre-defined HTML template page containing the Echarts rendering engine within the virtual page environment, injects the received Echarts option configuration data into the Echarts rendering engine, and drives the engine to generate the corresponding visual chart within the virtual page. Once the visual chart is rendered, a screenshot command is triggered to capture the chart area on the current page, generating an image binary data stream. The script writes this data stream to a PNG file at a specified path, completing the generation of the first static image file. The Node service reads the generated PNG image file and uploads it to the cloud storage server via the API interface of a third-party cloud storage service. The cloud storage server returns the accessible URL text corresponding to the image. The Node service then feeds the obtained URL text back to the information processing engine, which embeds it into subsequent message channels, providing visual resource support for the generation of push notifications.
[0089] Step S300: When the enterprise operation information is in the form of an Excel report, convert the Excel chart information into a portable document format file, and then convert the portable document format file into a second static image file.
[0090] For categorized Excel report information, it is necessary to automate the process from structured reports to standardized portable document files through template reuse, automatic data filling, and precise format conversion, avoiding the inefficiencies of manual data entry and format adjustments. Converting Excel chart information to portable document format files includes the following steps:
[0091] Step S301: Obtain a predefined enterprise operation data Excel template file, wherein the enterprise operation data Excel template file contains placeholder cells for receiving real-time operation data from Excel.
[0092] Step S302: Obtain the corresponding real-time operational data from the business database based on the data query request in the Excel chart information.
[0093] Step S303: Use the spreadsheet processing component to read the enterprise operation data Excel template file and locate the placeholder cells.
[0094] Step S304: Fill the real-time operational data from Excel into the designated placeholder cells to generate a workbook file containing the updated operational data.
[0095] Step S305: Based on preset file conversion rules, call a custom PDF writer to perform format conversion processing on the workbook file to generate a portable document format file that contains updated operational data and supports Chinese characters, headers and footers, and merged cell formats.
[0096] The enterprise operation data Excel template is preset by the business side and stored in the system template library. The template includes fixed field names, calculation formulas, table styles, and data display logic. Reserved placeholder cells are marked with unique identifiers, and each placeholder cell has a one-to-one mapping relationship with an operation data field. The mapping relationship is stored in the template configuration table. Through the template call interface, based on the template identifier parameter in the Excel report information, the corresponding template file is accurately read from the template library, and the associated placeholder cell-data field mapping relationship is loaded to provide a positioning basis for data filling.
[0097] Then, the data query requests in the Excel report are parsed to extract query parameters such as data statistical period, business dimension, and indicator range, generating optimized database query statements. A connection to the business database is established through a database connection pool. During query operations, a data caching mechanism is enabled to cache high-frequency basic data, and field filtering is used to extract only the target data fields required by the template. After the query is completed, the original data is formatted and cleaned to generate structured Excel real-time operational data that matches the format of the template placeholder cells.
[0098] Next, the PhpSpreadsheet processing component is invoked. The Excel template file obtained in step S301 is loaded via the component's read interface, and the worksheet structure, cell coordinates, and placeholder markers are parsed. Based on the loaded mapping relationship, the worksheet cell matrix is traversed, cells containing preset placeholder markers are identified, and their specific coordinates and corresponding data fields are recorded. For placeholder areas of merged cell types, their start and end coordinates are identified to determine the complete placeholder range, generating a list of placeholder cells with clearly defined fill positions.
[0099] Next, following the placeholder cell location list, the real-time operational data from Excel is matched and filled into the corresponding placeholder cells one by one. During the filling process, the data format is automatically adjusted according to the preset field data types in the template. For cells containing calculation formulas, a formula recalculation mechanism is triggered after data is filled to update the results of related cells. After the data filling is complete, a workbook file containing the updated operational data is generated through the PhpSpreadsheet component's save interface, stored in a temporary directory, and the file path and version information are recorded.
[0100] Finally, based on preset file conversion rules including format compatibility configurations, Chinese support parameters, header and footer templates, and rules for retaining merged cells, the custom MPDF_Writer tool is invoked. The tool reads the workbook file, parses its structure, data, and styles, ensures no garbled Chinese characters through its built-in Chinese font library, parses the template header and footer configurations to generate standardized headers and footers, and preserves the original state and format of merged cells. Simultaneously, it adaptively adjusts the worksheet page layout to ensure the data is completely adapted to the PDF page size, ultimately generating a standardized portable document file, storing it to the specified path, and returning a success indicator and storage address. This approach, through template reuse, automated data querying and precise filling, combined with a custom format conversion tool, achieves fully automated processing from Excel reports to PDF files without manual intervention. It solves the inefficiencies and format inconsistencies caused by manual operation, improves processing speed through data caching and field filtering, and generates PDF files compatible with complex formats such as Chinese characters and merged cells, providing a high-quality foundation for subsequent conversion to static images, significantly improving the timeliness and accuracy of enterprise operational information processing.
[0101] To achieve automated, high-quality conversion of portable document format files to standardized static images, and to solve the problems of inconvenient viewing of multi-page reports and the visual impact of redundant image borders, this application generates a second static image file through precise document parsing, intelligent single / multi-page differentiation processing, and refined image optimization. The conversion of a portable document format file to a second static image file includes the following steps:
[0102] Step S306: Read the portable document format file and load it into the image processing object.
[0103] Step S307: Obtain the total number of pages of the portable document format file based on the image processing object to determine whether the portable document format file is a single-page document or a multi-page document.
[0104] Step S308: When the document is determined to be a single-page document, convert the portable document format file into an initial PNG image and save it to a preset path. Perform automatic blank border cropping on the initial PDG image to generate a cropped PNG image as the second static image file.
[0105] Step S309: When the document is determined to be a multi-page document, traverse each page of the portable document format file to convert each page into a temporary PNG image and perform automatic blank border cropping on each temporary PNG image, while recording the width and height of each temporary PNG image.
[0106] Step S310: Calculate the maximum width among all temporary PNG images based on the recorded width, and calculate the total height of the composite image based on the recorded height, i.e., the preset page spacing adjustment value.
[0107] Step S311: Create a blank canvas based on the maximum width and the total height of the composite image, and sequentially overlay each cropped temporary PNG image onto the corresponding vertical position of the blank canvas to generate the composite PNG image.
[0108] Step S312: Perform overall blank border cropping on the synthesized PNG image to output a second static image file.
[0109] It calls the core API of the ImageMagick open-source image processing toolkit to load portable document format file data via streaming, avoiding the consumption of large amounts of memory at once. During loading, it automatically verifies file integrity, including verifying file header identifiers, cross-reference table consistency, and page object integrity; if file corruption is detected, a retry mechanism is triggered. After loading, the file data is encapsulated into a native Imagick image processing object, which contains basic metadata such as document page number, page size, and resolution.
[0110] The `getNumberImages()` method of the `Imagick` object is called to obtain the total number of pages by parsing the page count identifier in the document directory. This method is quick and accurate. The judgment rule is set as follows: if the total number of pages is equal to 1, it is considered a single-page document; if the total number of pages is greater than 1, it is considered a multi-page document. The judgment result is stored in the processing context to provide a basis for subsequent differential processing.
[0111] When processing single-page documents, the output format is set to PNG with a resolution of 300 DPI to ensure high-definition display. The `writeImage()` method is called to convert the image to an initial PNG image and save it to a preset temporary directory. The blank border cropping process is then initiated by calling the `imagecropauto()` function from the PHP GD library. This function automatically scans the image edge pixels, detects transparent or solid color border areas, determines the minimum content bounding box, and crops it, ultimately generating a second static image file without redundant borders.
[0112] Multi-page documents are processed by looping through each page, converting them into temporary PNG images according to the resolution and formatting rules of single-page documents, saving them to a temporary subdirectory and naming them with the page number_temporary. Automatic white border cropping is performed on each temporary PNG image, and the getImageWidth() and getImageHeight() methods are called to record the actual width and height of each page, storing them in a two-dimensional array.
[0113] Then, extract all width values from the size array and use the max() function to determine the uniform width of the composite image. The preset page spacing adjustment value is -2 pixels. The total height is calculated using the formula TotalHeight=Σ(PageHeight_i)+SpacingFactor×(N-1) to ensure no obvious gaps or excessive overlap after page stacking. Here, i ranges from 1 to N, where N is the total number of temporary PNG images, PageHeight_i is the height of the i-th temporary PNG image, and SpacingFactor is -2 pixels. The total height of the composite image is calculated by traversing the size array, accumulating the height of all pages, and then adding the product of the spacing adjustment value and the sum of the page height values.
[0114] Next, a light gray (RGB(245,245,245)) blank canvas is created with the maximum width and total height. The temporary PNG images are iterated through, and the vertical offset position of the current image on the canvas is calculated using OffsetY_n=Σ(PageHeight_i)+ SpacingFactor×(n-1), where n is the current image sequence number and i ranges from 1 to n-1. The compositeImage() method is called to adjust the image size using a Lanczos filter. If the current image width is less than the maximum width, it is proportionally enlarged to the maximum width to ensure consistent width. The image is then overlaid onto the corresponding vertical position on the canvas, with the overlay mode set to overlay to ensure a clear and distortion-free image. After the loop completes, a composite PNG image containing all page content is generated.
[0115] After cropping, the `setCompressionQuality(a)` method is called to set the image compression quality to `a%`, controlling the file size while ensuring image clarity. Finally, the cropped composite PNG image is saved to the final storage directory, generating a second static image file, and the file storage path is returned, completing the conversion from a multi-page portable document format file to a single static image. This fully automated conversion from portable document format files to static images is achieved through streaming reading, intelligent pagination processing, refined size calculation, and high-definition compression optimization. Single-page documents have simplified redundant borders, and multi-page documents are merged into a uniform-sized long image without manual intervention. This solves the problems of fragmented processes, poor timeliness, and unsatisfactory viewing experience in existing technologies for converting Excel reports to images. Single-document processing time is significantly reduced, and the generated static images have high clarity and uniform format, adapting to the viewing needs of mobile and desktop devices, providing efficient support for the real-time visualization and push of enterprise operational information.
[0116] Figure 3 This is a schematic diagram of the logical flow of the Excel report visualization rendering provided in this application. For example... Figure 3As shown, the business system initiates a data query request, retrieves real-time operational data from the business database using Excel based on the query parameters in the request, and synchronously transmits it to the information processing engine. The information processing engine calls the PhpSpreadsheet component to read a predefined enterprise operational data Excel template file. After locating the placeholder cells in the template, the PhpSpreadsheet component fills the corresponding positions with the real-time operational data from Excel, generating a workbook file containing the updated operational data. Subsequently, the information processing engine calls a custom MPDF_Writer tool to convert the workbook file into a portable document format file that supports Chinese characters, headers and footers, and merged cells, according to preset file conversion rules, and returns the PDF file to the information processing engine. The information processing engine then calls the ImageMagick image processing toolset to read the PDF file and load it into an Imagick image processing object. This object is used to obtain the total number of pages in the PDF file to distinguish between single-page and multi-page documents. For single-page PDFs, the image is directly converted to an initial PNG image. The `imagecropauto()` function from the PHP GD library is then used to crop the blank borders, generating a second static image file. For multi-page PDFs, each page is converted to a temporary PNG image, and the blank borders are cropped. The width and height of each page are recorded. A blank canvas is then created according to the rule that the maximum width is the width of the composite image, and the total height = the sum of the heights of each page + the spacing adjustment value × (number of pages - 1). After adjusting the image size using a Lanczos filter, all temporary images are superimposed sequentially to generate a composite PNG image. Finally, the composite image is cropped to have its blank borders cropped, resulting in the second static image file. The information processing engine uploads the generated second static image file to the cloud storage server via the API interface of a third-party cloud storage service. The cloud storage server returns the accessible URL text corresponding to the image. After receiving the URL text, the information processing engine embeds it into a subsequent message channel, assembles it into a standardized graphic message body, and pushes it to designated instant messaging platforms such as DingTalk and WeChat Work through a concurrent processing mechanism, ultimately reaching the mobile or desktop receiving end.
[0117] Step S400: Upload the first static image file or the second static image file to the cloud storage service to obtain the corresponding image access address.
[0118] After the first or second static image file is generated, it needs to be converted into a network resource accessible across the entire network through a standardized upload process and an efficient address resolution mechanism. This provides unified and stable visual resource support for subsequent cross-platform message pushes. Uploading the first or second static image file to a cloud storage service to obtain the corresponding image access address includes the following steps:
[0119] Step S401: Obtain the local actual storage path and filename of the first or second static image file.
[0120] Step S402: Based on the actual local storage path and filename, construct a standardized upload request containing the file and the data stream.
[0121] Step S403: Call the pre-configured cloud storage service application interface to send the standardized upload request to the cloud storage server.
[0122] Step S404: Receive an upload response returned by the cloud storage server, wherein the upload response contains a publicly accessible network resource location address generated by the cloud storage service and associated with the binary data stream of the file.
[0123] Step S405: Extract the network resource location address as the image access address.
[0124] The push application incorporates a file indexing service that monitors the directory where static image files are generated in real time. Once the first or second static image file is written, the file indexing service automatically captures the file generation event via a file system event callback mechanism. Based on preset file naming rules and storage directory configurations, it extracts the file's actual local storage path and filename. Simultaneously, the file indexing service performs format validation on the extracted path and filename, verifying their validity and compliance to prevent subsequent upload failures due to incorrect paths or invalid filenames. After successful validation, the path and filename are stored in a temporary cache for use in subsequent upload steps.
[0125] Then, the file reading component is invoked. Based on the actual local storage path and filename obtained in step S401, the file data is loaded using a streaming method, avoiding excessive memory consumption caused by loading large files at once. During the reading process, the MD5 checksum of the file is calculated in real time for integrity verification after the upload is completed. Simultaneously, a standardized upload request structure is automatically encapsulated. This request includes three parts: a request header, a request body, and request parameters. The request header carries cloud storage service authentication information and data format identifiers; the request body encapsulates the file's binary data stream and MD5 checksum; and the request parameters include configuration information such as the file storage directory and access permission settings. This standardized request structure ensures high compatibility with cloud storage service interfaces, eliminating the need to adjust the request format for different cloud storage service providers.
[0126] Next, the configuration center manages the application programming interface (API) information of the cloud storage service, supporting dynamic switching between different cloud storage service providers. Based on the preset cloud storage service configuration, the corresponding API interface is automatically invoked, and standardized upload requests are sent using the HTTPS protocol. During the sending process, a timeout retransmission mechanism is enabled, with a reasonable timeout threshold set. When a request times out or a connection error occurs, retransmission is automatically triggered to avoid upload failures due to network fluctuations. Simultaneously, upload tasks are managed through a thread pool, supporting concurrent uploads of multiple files, improving batch processing efficiency. The thread pool size can be dynamically adjusted according to server performance.
[0127] After receiving an upload request, the cloud storage server verifies the authentication information in the request header. If the verification is successful, it parses the file's binary data stream in the request body, writes it to the corresponding storage node, and generates a unique network resource location address. The upload response returned by the cloud storage server includes a response status code, a response message, and URL information. The response status code indicates whether the upload was successful. Upon receiving the upload response, the server first verifies the response status code. If it is a success status code, the URL information in the response body is extracted; if it is an error status code, the corresponding exception handling process is triggered according to the response message. Simultaneously, the URL information is associated with the file's MD5 checksum and local storage path, and stored in a resource mapping table for easy subsequent traceability and management.
[0128] From the upload response obtained in step S404, the network resource location address is accurately extracted. This address uses the standard HTTP / HTTPS protocol format and includes the cloud storage service domain name, file storage path, and unique resource identifier, supporting direct access on all mainstream browsers and instant messaging platforms. After extraction, the URL is validated to ensure it conforms to RFC standards, avoiding inaccessibility due to URL format errors. After successful validation, this URL is used as the image access address, stored in a temporary data storage area, and synchronously updated to the information processing engine, providing core resource support for subsequent generation of push notifications containing visualized operational information. This approach, through streaming reading and standardized request construction, achieves memory optimization and cross-platform compatibility for large file uploads, avoiding upload failures caused by file size or differences in cloud storage service providers. Timeout retransmission and concurrent upload mechanisms improve the stability and efficiency of the upload process, ensuring timeliness during batch processing of multiple files. MD5 verification and response status code verification provide dual protection, ensuring the integrity and accuracy of file uploads. The automatically generated unique URL address supports public access across the entire network and is compatible with all mainstream instant messaging platforms such as DingTalk and WeChat Work, solving the problem of poor image resource access compatibility in existing technologies. Meanwhile, the establishment of the resource mapping table facilitates the subsequent management and traceability of image resources, and provides reliable resource support for the real-time visualization and push of enterprise operation information.
[0129] Step S500: Generate push notifications containing visual operational information based on the image access address, and send the push notifications to the designated instant messaging platform.
[0130] After uploading static image files to cloud storage and obtaining the image access address, this address needs to be converted into a visual push notification that conforms to the target instant messaging platform's specifications to ensure that operational data can accurately and clearly reach the recipient. Generating push notifications containing visual operational information based on the image access address includes the following steps:
[0131] Step S501: Construct an image embedding segment containing an accessible link identifier based on the image access address.
[0132] Step S502: Generate initial message content based on a preset message template and an image embedding segment, wherein the preset message template includes placeholders for dynamically filling the image embedding segment.
[0133] Step S503: Standardize and encapsulate the initial message content according to the format specifications of the target instant messaging platform to generate a standardized message.
[0134] Step S504: Generate push notifications containing visual operational information based on standardized messages and by attaching preset message titles and description text.
[0135] First, based on the image access address, an image embedding segment containing an accessible link identifier is automatically generated. The link identifier adopts a standard format supported by the target instant messaging platform, such as the image tag format compatible with DingTalk and WeChat Work. The embedding segment contains the image access address, the preset image display size, and backup text for loading failure. The core is to ensure that the image can be loaded normally on different platforms through standardized tag encapsulation, avoiding visualization failure due to format incompatibility.
[0136] Then, a preset message template is invoked, which includes a fixed title placeholder, an image embedding placeholder, and a data description area. The system automatically fills the image embedding segment generated in step S501 into the image placeholder of the template, and at the same time extracts the metadata of the enterprise operation information and fills it into the corresponding text area of the template, quickly generating initial message content containing visual resources and basic descriptions.
[0137] Next, the initial message content is adapted according to the format specifications of the target instant messaging platform. For example, for DingTalk, the message body is encapsulated into a JSON format that supports image embedding, including fields such as msgtype and image; for WeChat Work, a summary field is added according to its graphic message specifications. The format validity is automatically verified during the encapsulation process to ensure that the message can be correctly parsed by the platform interface without requiring manual format adjustments.
[0138] Finally, based on the standardized message, a preset message title and description text are added to form a complete push notification. The title and description text are automatically matched according to the type of operational information, ensuring the accuracy of information delivery. This achieves automated conversion from image access addresses to standardized push notifications, eliminating the need for manual message content writing or format adjustment, thus improving push efficiency; standardized encapsulation ensures message compatibility with mainstream instant messaging platforms, expanding the scope of application; fixed size and clear title and description design allow recipients to quickly obtain core information, improving the data viewing experience, while avoiding information delivery failures due to formatting issues.
[0139] After generating standardized push notifications, to ensure efficient and synchronous delivery of these notifications to the designated instant messaging platform, structured object construction and parallel task decomposition and execution are necessary to guarantee rapid delivery of the information to the receiving end. Sending push notifications to the designated instant messaging platform includes the following steps:
[0140] Step S505: Construct a corresponding message object to be sent based on the push information.
[0141] Step S506: Based on the preset parallel processing rules, the message objects to be sent are split into tasks and queues are allocated to generate multiple parallel message sending tasks.
[0142] Step S507: Implement multiple parallel message sending tasks in parallel to synchronously send push information to the specified instant messaging platform.
[0143] First, the core elements of the push notification are extracted, including the access address of the visual image, the preset message title, the descriptive text, and the target platform identifier, and then encapsulated according to a predefined message object structure. The message object contains basic attributes and content attributes. The message ID uses a UUID generation rule to ensure uniqueness, the sending timestamp is accurate to the millisecond, and the receiver identifier is associated with a preset list of users / groups, achieving precise binding between the message and the receiving object.
[0144] The preset parallel processing rules include task splitting thresholds, queue priority configurations, and server resource limitation parameters. When the number of receivers associated with a message object exceeds the splitting threshold, the message is split according to the department and priority level of the receiver. Each subtask contains no more than a preset number of receiver identifiers and complete message content. Based on the queue priority configuration, message tasks corresponding to urgent operational data are assigned to higher-level queues, while ordinary data is assigned to regular queues. Thread resources are dynamically allocated through a thread pool, and the number of threads is automatically adjusted based on the number of server CPU cores and memory usage to avoid resource overload.
[0145] The system calls the corresponding API interfaces of each target instant messaging platform and sends message requests to the platform server via HTTP / HTTPS protocol. Each parallel task occupies an independent thread. During task execution, the interface response status is monitored in real time. If a request times out or a response error occurs, a retry mechanism is automatically triggered, with the number of retryes and the interval dynamically adjusted according to platform requirements. Simultaneously, a task status monitoring module tracks the execution progress of all parallel tasks in real time, recording successful and failed sender information for subsequent push processing. This approach ensures information integrity and relevance through structured message objects, optimizes resource allocation through parallel task splitting and queue allocation, significantly improves push efficiency through multi-threaded parallel sending, and guarantees push reliability through retry mechanisms and status monitoring. It effectively solves the latency problem caused by traditional serial sending, enabling operational information to be quickly and stably synchronized to the designated instant messaging platform after generation, meeting the core needs of enterprise instant push.
[0146] Figure 4 This is a schematic diagram illustrating the connection of a message push system for real-time processing of enterprise operational information, as provided in an embodiment of this application. Figure 4 As shown, a message push system for real-time processing of enterprise operation information includes: a type analysis module, a chart processing module, a report processing module, an address processing module, and a message push module.
[0147] The system comprises several modules: a type analysis module, which retrieves enterprise operational information and its corresponding information type, determines whether the information type is static, and if not, categorizes it as either Web chart information or Excel report information; a chart processing module, which converts Web chart information into Web chart configuration data and renders it as a first static image file using headless browser technology; a report processing module, which converts Excel chart information into a portable document format file and then into a second static image file; an address processing module, which uploads either the first or second static image file to a cloud storage service to obtain the corresponding image access address; and a message push module, which generates push notifications containing visualized operational information based on the image access addresses and sends these notifications to a designated instant messaging platform.
[0148] The other functions performed by the above-mentioned type analysis module, chart processing module, report processing module, address processing module, and message push module, as well as the technical details of each function, are the same as or similar to the corresponding features in the message push method for real-time processing of enterprise operation information described above, so they will not be repeated here.
[0149] This application also provides a computer storage medium storing a computer program that, when run on a computer, enables the computer to execute the steps in the message push method for real-time processing of enterprise operational information described above.
[0150] It should be understood that although the steps in the flowcharts in the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order requirement for the execution of these steps, and they can be performed in other orders.
[0151] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A message push method for real-time processing of enterprise operational information, characterized in that, The method includes: Obtain enterprise operation information and its corresponding information type, determine whether the information type is a static type, and if not, classify the enterprise operation information into Web chart information or Excel report information according to the information type; When the enterprise operation information is Web chart information, the Web chart information is converted into Web chart configuration data, and the Web chart configuration data is rendered into a first static image file based on headless browser technology; When the enterprise operation information is in the form of an Excel report, the Excel report information is converted into a portable document format file, and the portable document format file is then converted into a second static image file. Upload the first static image file or the second static image file to the cloud storage service to obtain the corresponding image access address; Based on the image access address, a push notification containing visual operational information is generated and sent to the designated instant messaging platform; The step of converting the Excel report information into a portable document format file includes: Obtain a predefined enterprise operation data Excel template file, wherein the enterprise operation data Excel template file contains placeholder cells for receiving real-time operation data from Excel; Based on the data query request in the Excel report information, retrieve the corresponding real-time Excel operation data from the business database; The spreadsheet processing component is used to read the Excel template file containing the company's operational data and locate the placeholder cells. The real-time operational data from Excel is populated into the designated placeholder cells to generate a workbook file containing the updated operational data; Based on preset file conversion rules, a custom PDF writer is invoked to perform format conversion processing on the workbook file to generate a portable document format file that contains the updated operational data and supports Chinese characters, headers and footers, and merged cell formats.
2. The method according to claim 1, characterized in that, The step of converting the Web chart information into Web chart configuration data includes: Responding to the data query request contained in the Web chart information, the system retrieves the corresponding real-time Web operation data from the business database based on the query parameters in the data query request. The real-time Web operation data is mapped and populated according to a predefined chart data structure to generate an intermediate configuration object containing data sequences, coordinate axis definitions, and visual style attributes; The intermediate configuration object is standardized and encapsulated according to preset chart type rules to generate Web chart configuration data that conforms to the syntax specifications of the target Web chart library.
3. The method according to claim 2, characterized in that, The step of rendering the Web chart configuration data into a first static image file based on headless browser technology includes: Launch a headless browser instance based on the Web chart configuration data to create a virtual page environment; Based on the headless browser instance, a preset HTML template page containing the target Web Chart Library rendering engine is loaded in the virtual page environment; Based on the preset HTML template page, the Web chart configuration data is injected into the target Web chart library rendering engine to drive the target Web chart library rendering engine to generate corresponding visual charts in the virtual page environment; Based on the virtual page after generating the visualization chart, a screenshot command is triggered to capture the current page image and output it as an image binary data stream; Based on the image binary data stream, the first static image file is obtained by encoding and storing it according to a preset image format and a preset storage path.
4. The method according to claim 1, characterized in that, The step of converting the portable document format file into a second static image file includes: Read the portable document format file and load it into the image processing object; Based on the image processing object, the total number of pages of the portable document format file is obtained to determine whether the portable document format file is a single-page document or a multi-page document; When a document is determined to be a single-page document, the portable document format file is converted into an initial PNG image and saved to a preset path. The initial PNG image is then automatically cropped with blank borders to generate a cropped PNG image as a second static image file. When a document is determined to be a multi-page document, each page of the portable document format file is traversed to convert each page into a temporary PNG image and the blank borders of each temporary PNG image are automatically cropped. The width and height of each temporary PNG image are recorded. The maximum width among all temporary PNG images is calculated based on the recorded width, and the total height of the composite image is calculated based on the recorded height, i.e., the preset page spacing adjustment value. A blank canvas is created based on the maximum width and the total height of the composite image, and each cropped temporary PNG image is superimposed onto the corresponding vertical position of the blank canvas in sequence to generate a composite PNG image; The synthesized PNG image is cropped with an overall blank border to output a second static image file.
5. The method according to claim 1, characterized in that, Uploading the first static image file or the second static image file to the cloud storage service to obtain the corresponding image access address includes: Obtain the local actual storage path and filename of the first or second static image file; A standardized upload request containing a binary data stream of the file is constructed based on the actual local storage path and filename. The standardized upload request is sent to the cloud storage server by calling the pre-configured cloud storage service application interface; Receive an upload response returned by the cloud storage server, wherein the upload response contains a publicly accessible network resource location address generated by the cloud storage service and associated with the file binary data stream; The network resource location address is extracted and used as the image access address.
6. The method according to claim 1, characterized in that, The step of generating push notifications containing visual operational information based on the image access address includes: Construct an image embedding segment containing an accessible link identifier based on the image access address; Initial message content is generated based on a preset message template and the image embedding segment, wherein the preset message template includes placeholders for dynamically filling the image embedding segment; The initial message content is encapsulated in a standardized manner according to the format specifications of the target instant messaging platform to generate a standardized message; Based on the standardized message, and with the addition of a preset message title and descriptive text, push notifications containing visual operational information are generated.
7. The method according to claim 1, characterized in that, Sending the push information to the designated instant messaging platform includes: Based on the push information, construct the corresponding message object to be sent; Based on preset parallel processing rules, the message objects to be sent are split into tasks and queues are allocated to generate multiple parallel message sending tasks. The multiple parallel message sending tasks are implemented in parallel to synchronously send the push information to the designated instant messaging platform.
8. A message push system for real-time processing of enterprise operational information, characterized in that, The system includes: a type analysis module, a chart processing module, a report processing module, an address processing module, and a message push module; among which, The type analysis module is used to obtain enterprise operation information and corresponding information types, determine whether the information type belongs to a static type, and if not, classify the enterprise operation information into Web chart information or Excel report information according to the information type. The chart processing module is used to convert the Web chart information into Web chart configuration data when the enterprise operation information is Web chart information, and to render the Web chart configuration data into a first static image file based on headless browser technology; The report processing module is used to convert the Excel report information into a portable document format file and then convert the portable document format file into a second static image file when the enterprise operation information is an Excel report. The address processing module is used to upload the first static image file or the second static image file to the cloud storage service to obtain the corresponding image access address; The message push module is used to generate push information containing visual operational information based on the image access address, and send the push information to the designated instant messaging platform. The step of converting the Excel report information into a portable document format file includes: Obtain a predefined enterprise operation data Excel template file, wherein the enterprise operation data Excel template file contains placeholder cells for receiving real-time operation data from Excel; Based on the data query request in the Excel report information, retrieve the corresponding real-time Excel operation data from the business database; The spreadsheet processing component is used to read the Excel template file containing the company's operational data and locate the placeholder cells. The real-time operational data from Excel is populated into the designated placeholder cells to generate a workbook file containing the updated operational data; Based on preset file conversion rules, a custom PDF writer is invoked to perform format conversion processing on the workbook file to generate a portable document format file that contains the updated operational data and supports Chinese characters, headers and footers, and merged cell formats.
9. A computer-readable storage medium having a computer program stored thereon that can run on a processor, characterized in that, When the computer program is executed by the processor, it implements a message push method for real-time processing of enterprise operation information as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Chart processing method and device
CN117033843A
Excel report automatic conversion and rendering method, system, equipment and medium
CN120354827A
Server-free document processing and real-time report method and system
CN121560963A