Table picture automatic drawing method, automatic pushing method and storage medium

Drawing and pushing table pictures to DingTalk work group through C# programs, solving the problem of automated generation and pushing table pictures in the existing technology, achieving efficient and accurate table pictures generation and pushing, and improving the information transmission efficiency of the work group.

CN120510244APending Publication Date: 2025-08-19VICTORY GIANT TECH HUIZHOU CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510380034.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

It is difficult for the prior art to automatically generate and push table pictures that meet visual clarity and work needs to DingTalk work groups, especially in terms of dynamic data processing, graphics generation and DingTalk interface docking.

Method used

Draw table pictures through C# programs, use Graphics' DrawLine method to determine the table borders and column rows, automatically fill the content with the data source, and automatically push it through DingTalk API robot.

Benefits of technology

It improves the efficiency and accuracy of table image generation, reduces human errors, ensures the timeliness and reliability of information, and improves the collaboration efficiency of work groups.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120510244A_ABST
    Figure CN120510244A_ABST
Patent Text Reader

Abstract

The invention relates to a table picture automatic drawing and pushing method. And automatically drawing a table picture through a C # program. The method comprises the following specific steps: determining a form picture style, selecting a data source, and setting the length and height of the form picture according to the style and the data source; and drawing a frame of the table picture by using a Graphics DrawLine method, determining the width of each column, drawing a row end horizontal line, and filling data at each row and each column. And then, the table picture is pushed to a nailing work group through an automatic pushing robot. The specific pushing step comprises the steps of creating a console project and configuring a development environment, building robot pushing configuration and binding nailing interface parameters, generating and storing a table picture, uploading the table picture to a nailing server, obtaining a unique identifier, and pushing the table picture and reminding content to a specified work group through a nailing API. And finally, creating a database log table, and storing a push record. According to the method, automatic drawing and pushing of the table picture are realized, and the work group information transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of automatic drawing and pushing of table images, and specifically to a method for automatic drawing of table images, an automatic pushing method and a storage medium. Background Art

[0002] Pushing text messages or images to a DingTalk work group is relatively simple. However, pushing table images presents a significant increase in complexity. Manually pushing table images is relatively straightforward: simply take a screenshot and send it. However, requiring a program to automatically generate and push specific table images based on work needs presents multiple challenges.

[0003] First, automatically generating tables and images involves processing data through a program and converting it into a suitable table or image format. This typically requires the system to dynamically generate tables and images based on different work scenarios, such as generating different table images based on variables such as date, project, and task. The data source may be a database, Excel spreadsheet, or other business system, and the program must have effective data extraction, conversion, and formatting capabilities.

[0004] Secondly, generating table images involves more than simply displaying content; it also involves typesetting and visual design. The program must ensure that each cell's layout, font, border, and other aspects meet standards to ensure visual clarity and readability. This step requires precise control of layout and style to avoid formatting errors or unclear information during automatic table generation.

[0005] Finally, pushing the generated table image to the DingTalk work group requires integration with the DingTalk open platform API to ensure the smooth completion of automated push. This includes determining the push time, frequency, and specific target groups. The program must ensure that the image is successfully sent according to the predetermined conditions and time point.

[0006] In summary, the difficulty in automatically generating and pushing table images through a program lies in converting dynamic data into standardized table images and implementing scheduled and targeted push. This process involves data processing, image generation, layout design, and effective integration with the DingTalk interface, requiring high technical implementation requirements. Summary of the Invention

[0007] In order to solve the above technical problems, the present application proposes a method for automatically drawing table images, an automatic push method and a storage medium.

[0008] In the first aspect, the present application proposes a method for automatically drawing a table image, which specifically includes the following steps: S1: Determine the table image style; S2: Select the table image data source; S3: Use C# program to draw table pictures; Wherein, the step S3 further includes: S31: setting the overall length and overall height of the table image according to the table image style and the table image data source; S32: Find the four vertices of the table image and connect them with straight lines using the DrawLine method of Graphics; S33: Based on the straight line connection of the four vertices, gradually determine the width of each column, and complete the drawing of each column of the table image; S34: On the basis of connecting the four vertices with straight lines, draw the end horizontal lines of each row, and complete the drawing of each row of the table image; S35: Loop through each row of the table image and fill each column with data using a dedicated field.

[0009] The automated table image drawing proposed in this application greatly improves work efficiency and avoids the tedious process of manually drawing table images. By using the C# program, combined with the determined table image style and data source, table images that meet the requirements are automatically generated, reducing the occurrence of human errors. Secondly, precise graphics drawing technology is used in the method, such as the DrawLine method in "Graphics", which makes the boundaries of the table image and the division of columns and rows clearer and more standardized. The size and layout of each column and row can be dynamically adjusted according to actual needs to ensure the beauty and practicality of the table image. In addition, the filling of table image data is also completed automatically, which further improves efficiency.

[0010] This automated approach not only saves time on manually creating tables and images, but also improves the accuracy and consistency of data presentation. This approach is highly practical for work environments that require regular or large-scale generation of table and image reports.

[0011] Furthermore, the step S1 specifically includes: determining the number of columns of the table image, the content and name of each column, and setting the row and column merging status of the table header according to actual work needs.

[0012] By determining the number of columns, column content and names, and the merging of rows and columns in the table image according to actual work needs, customized table images can be generated according to different business needs, improving the applicability and accuracy of table images. Depending on the data source, the number of columns in the table image and the specific content of each column can be flexibly set, so that the generated table image is both concise and can fully display the required information. It allows the rows and columns of the header to be merged as needed, making the header clearer and easier to understand. Especially when dealing with multi-level headers, this function can effectively improve the readability of the table image. This flexible setting allows table images to adapt to different business scenarios, such as financial statements, project schedules, etc., and can meet the generation of table images with different formats and display requirements.

[0013] Furthermore, the step S2 specifically includes: selecting a required data source, and determining the data table field in the database corresponding to each column according to the table image style.

[0014] By determining the corresponding database table fields for each column based on the table image style, we ensure that the content of each column accurately matches the actual data. This data mapping not only reduces the need for manual intervention, but also ensures that the data displayed in the table image is consistent with the source data, avoiding data errors or incompleteness.

[0015] Once the data source and table image style are determined, the program can automatically extract the corresponding field data from the database and fill it into the corresponding table image columns. This automated data filling greatly improves efficiency, especially in work scenarios that require frequent updates and generation of table images.

[0016] By binding to database fields, the table and image generation process becomes more systematic and structured. This not only improves data management efficiency but also simplifies complex data integration and presentation processes. Especially when dealing with large amounts of data, automated data extraction and filling can significantly reduce the workload of manual processing.

[0017] This step allows for flexible data source selection based on the table image style, adapting to varying data structures and database design requirements. Whether it's a simple data table or a complex multi-table association, the system can generate the required table image through appropriate mapping.

[0018] Furthermore, the step S2 further includes: determining the number of rows of the table image according to the maximum number of rows in the data table field in the database corresponding to each column.

[0019] Dynamically determining the number of rows in a table image based on the maximum number of rows in the database table field ensures that the generated table image always matches the data volume. This avoids issues with insufficient or overflowing table images and ensures that data is not lost or truncated when displayed.

[0020] By automatically calculating the required number of rows, the layout and typesetting of table images are more scientific and reasonable. Generating table images based on the actual number of rows of data can improve the visual effect and user experience of table images, ensuring that users can clearly see all data without excessive blank rows or overcrowded data.

[0021] The design in step S2 that automatically determines the number of rows in the table image based on the maximum number of rows in the field greatly simplifies the process of manually setting the number of rows, making table image generation more efficient. The system can quickly calculate and generate the appropriate table image size, saving time in designing and adjusting the table image format.

[0022] This method automatically adjusts the size of the table image based on the actual data volume in the data source, adapting to datasets of varying sizes. Whether processing small or large data sets, the table image generation process is flexible and ensures that each generated table image fully displays all data.

[0023] By determining the number of rows in a table image based on the maximum number of rows, redundant blank rows caused by a fixed number of rows are avoided. This makes the table image presentation more concise and improves the readability and practicality of the table image.

[0024] Furthermore, the step S33 includes: the four vertices are: an X-axis starting point, a Y-axis starting point, a maximum X-axis coordinate point, and a maximum Y-axis coordinate point.

[0025] Furthermore, the maximum X-axis coordinate point is the X-axis starting point plus the overall length of the table image; the maximum Y-axis coordinate point is the Y-axis starting point plus the overall width of the table image.

[0026] By defining the starting points of the X and Y axes and then adding the overall length and width of the table image to calculate the maximum coordinate point, we avoid complex coordinate calculation steps, reduce the amount of calculation, and improve image processing efficiency. This method of directly obtaining the maximum coordinate through a simple addition operation can accelerate the entire image processing process.

[0027] Specify the maximum X-axis and Y-axis coordinates to ensure that the table image is fully displayed. Regardless of how the actual content of the table image changes, the calculated maximum coordinates ensure that the display area of the table image will not be truncated or exceed the expected range.

[0028] Furthermore, the table image also includes drawing time and server.

[0029] By including the drawing time in table images, you can accurately record the exact time each table image was generated. This is particularly important for data tracking, historical record querying, and data analysis. With timestamps, users can clearly understand the time when data was generated or table images were updated, allowing for effective time comparison and analysis.

[0030] The addition of server information allows each table image generation process to be traced back to the specific server or generation environment. This is extremely helpful for system debugging, troubleshooting, and data tracing. If a problem occurs during table image generation, developers can quickly locate the problem and fix it by viewing the corresponding server information.

[0031] In a second aspect, the present application proposes a table image, which is drawn by the automatic drawing method of the table image described in the first aspect.

[0032] In a third aspect, the present application proposes a method for automatically pushing table images, which adds a push robot to the DingTalk work group that requires automatic push, for automatically pushing the table images described in the second aspect; the robot is configured with a HookUrl and a push text key; the method for automatically pushing table images includes: D1: Create a console project and configure the development environment; D2: Set up the robot push configuration and bind the DingTalk interface parameters; D3: Call the assembly to dynamically generate a table image and save it to the specified directory on the server; D4: Upload the table image to the DingTalk server through the DingTalk API and obtain a unique identifier for the table image; D5: Call the DingTalk robot interface to push the reminder content and the unique identifier to the designated work group, so that the work group can immediately display the table image effect; D6: Create a database log table to store detailed information about each robot push.

[0033] The method of automatically pushing table images based on DingTalk has significant advantages. By automatically pushing table images, work efficiency is improved, manual operations are reduced, and the timeliness and accuracy of information are ensured. The system automatically sends the table image content to the designated work group through the DingTalk API, delivering data in real time, reducing waiting and communication time. Secondly, the push process reduces human errors, simplifies operations, and improves data reliability. This method supports flexible configuration and can customize the push method according to needs to meet different work scenarios. Table images are stored on the DingTalk server for centralized management and ensure high data accessibility. Detailed log records are generated for each push, enhancing the traceability of the system. By storing data in a designated directory, the server burden is reduced and performance is improved.

[0034] The automatic push method of DingTalk table images not only improves the team's collaboration efficiency and simplifies the data sharing process, but also strengthens data management and system scalability.

[0035] Furthermore, the method for automatically pushing the table image includes: setting a preset time length, and regularly pushing the table image according to the preset time length.

[0036] By setting a preset time, the system can automatically push table images at fixed intervals without manual intervention, ensuring continuous data updates and sharing. This is especially important for data that requires regular reporting or follow-up, as it avoids the tedious manual push operation.

[0037] In summary, the present invention relates to a method for automatically drawing and pushing table images. The method first automatically generates a table image through a C# program. The specific steps are as follows: determine the table image style, select the data source, and set the length and height of the table image according to the style and data source. Then, use the DrawLine method of "Graphics" to draw the border of the table image, determine the width of each column, draw the horizontal line at the end of the row, and fill in the data in each cell position. Then, the table image is pushed to the DingTalk work group through an automatic push robot. The push process includes: creating a console project and configuring the development environment, building a robot push configuration and binding the DingTalk interface parameters, generating and saving the table image, uploading it to the DingTalk server, obtaining a unique identifier, and finally pushing the table image and reminder content to the specified work group through the DingTalk API. Finally, a database log table is also created to store push records.

[0038] Compared with the prior art, this application has at least the following beneficial effects: This method uses automated processing to quickly draw and push tables and images in real time, effectively reducing manual operation time and error rates. It also improves the efficiency of information transfer within work groups, ensures data accuracy and consistency, and promotes workflow optimization and collaborative efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Attachment Figure 1 This is a flow chart of a method for automatically drawing a table image according to an embodiment of the present invention.

[0040] Attachment Figure 2 This is a flow chart of a method for drawing a table image using a C# program, shown in an embodiment of the present invention.

[0041] Attachment Figure 3 This is a flow chart of a method for automatically pushing table images according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0043] Example 1: As attached Figure 1 As shown, this application proposes a method for automatically drawing a table image, which specifically includes the following steps: S1: Determine the table image style; S2: Select the table image data source; S3: Use C# program to draw table pictures; Among them, as attached Figure 2 As shown, the step S3 further includes: S31: setting the overall length and overall height of the table image according to the table image style and the table image data source; S32: Find the four vertices of the table image and connect them with straight lines using the DrawLine method of "Graphics"; S33: Based on the straight line connection of the four vertices, gradually determine the width of each column, and complete the drawing of each column of the table image; S34: On the basis of connecting the four vertices with straight lines, draw the end horizontal lines of each row, and complete the drawing of each row of the table image; S35: Loop through each row of the table image and fill each column with data using a dedicated field.

[0044] This embodiment proposes a method for automatically drawing and pushing table images, aiming to improve the efficiency of automatically generating and pushing table image data and reduce manual operations and errors. The specific steps include determining the table image style, selecting a data source, and drawing the table image using a C# program.

[0045] First, determining the table image style is the first step in this method. Table image styles include the number of rows and columns, border thickness, header style, row and column alignment, and more. Based on these style requirements, the program can automatically generate a table image that meets your needs in subsequent steps.

[0046] Next, you need to select a suitable data source, which can be data from a database, an Excel file, or data retrieved through an API. This selection determines the content displayed in the table image. Ensure that the data source matches the table image style to display the data correctly.

[0047] Next, use a C# program to automatically draw a table image. First, calculate the overall dimensions of the table image, including length and height. This dimension is dynamically adjusted based on the number of columns and rows in the table image, as well as the amount of content. Then, using the "Graphics" class in C#, determine the four vertices of the table image and connect them with straight lines to form the table image's outer border.

[0048] After drawing the outer border, the program continues drawing the internal structure of the table image. Based on the number of columns in the table image, the program determines the width of each column and gradually draws the vertical lines of each column. Simultaneously, based on the number of rows, the program draws horizontal lines within the table image to separate each row of data. During this process, the program automatically calculates the column width and row height based on the number of rows and columns to ensure that the table image content can be fully displayed.

[0049] Finally, the program loops through each row of data and populates the corresponding cells with the data from the data source. As the data is populated, the program automatically adapts to the field type and format requirements to ensure that each data item is correctly displayed in the table image.

[0050] After completing the above steps, the generated table image can be automatically pushed to the DingTalk work group via the DingTalk push robot. This method not only improves the automation level of table image data generation, but also significantly improves the efficiency of information transmission and reduces potential errors in manual operations.

[0051] In an embodiment of the present invention, optionally, the step S1 specifically includes: determining the number of columns of the table image, the content and name of each column, and setting the row and column merging status of the table header according to actual work needs.

[0052] As a preferred embodiment, according to actual work needs, the number of columns of the table image, the content and name of each column, and the merging of rows and columns in the table header are determined. The specific operations are as follows: For example, in a company's financial report, the user selected three columns based on the report's requirements: the first column is "Date," the second column is "Income," and the third column is "Expenses." Based on actual needs, the header rows are merged, combining the "Income" and "Expenses" columns into a single header, "Financial Data," while the "Date" column remains a separate header. This approach allows for clearer presentation of table content and adapts to specific report requirements.

[0053] In addition, depending on the content of the report, you can also choose different column merging situations. For example, in a multi-dimensional data report, you can set more row and column merging to display relevant information more compactly.

[0054] In an embodiment of the present invention, optionally, the step S2 specifically includes: selecting a required data source, and determining the data table field in the database corresponding to each column according to the table image style.

[0055] As a preferred embodiment, in a sales report generation system, a user needs to generate a sales data table image containing three columns: "Product Name," "Quantity Sold," and "Sales Amount." First, the user selects a database as the data source. Then, based on the table image style, the system automatically identifies the corresponding data table fields for each column. Specifically, the "Product Name" column corresponds to the "product_name" field in the database, the "Quantity Sold" column corresponds to the "quantity_sold" field, and the "Sales Amount" column corresponds to the "sales_amount" field.

[0056] Through this operation, the system can automatically extract relevant data from the database and layout it according to the preset table and picture style, thereby generating a sales report that meets the needs.

[0057] In an embodiment of the present invention, optionally, step S2 further includes: determining the number of rows of the table image according to the maximum number of rows in the data table field in the database corresponding to each column.

[0058] As a preferred embodiment, in an employee attendance report generation system, a user needs to generate a report containing employee names, attendance dates, and attendance status. The user selects a database as the data source and specifies a three-column table image format: "Employee Name," "Attendance Date," and "Attendance Status." Assume that the database contains 100 rows for the "Employee Name" field, 90 rows for the "Attendance Date" field, and 100 rows for the "Attendance Status" field.

[0059] In this case, the system determines the number of rows in the table image based on the maximum number of rows in these fields (i.e., 100). The system automatically adjusts the number of rows in the table image to 100 to ensure that the content of each column can be fully displayed. Therefore, the final report will have 100 rows of data, each showing the attendance information of one employee.

[0060] In this way, the system can automatically adjust the number of rows in the table image according to the maximum number of rows in the data table field, ensuring that each column in the table image can display all data completely and aligned.

[0061] In an embodiment of the present invention, optionally, step S33 includes: the four vertices are: an X-axis starting point, a Y-axis starting point, a maximum X-axis coordinate point, and a maximum Y-axis coordinate point.

[0062] In an embodiment of the present invention, optionally, the maximum X-axis coordinate point is the X-axis starting point plus the entire length of the table image; the maximum Y-axis coordinate point is the Y-axis starting point plus the entire width of the table image.

[0063] By defining the starting points of the X and Y axes and then adding the overall length and width of the table image to calculate the maximum coordinate point, we avoid complex coordinate calculation steps, reduce the amount of calculation, and improve image processing efficiency. This method of directly obtaining the maximum coordinate through a simple addition operation can accelerate the entire image processing process.

[0064] Specify the maximum X-axis and Y-axis coordinates to ensure that the table image is fully displayed. Regardless of how the actual content of the table image changes, the calculated maximum coordinates ensure that the display area of the table image will not be truncated or exceed the expected range.

[0065] In an embodiment of the present invention, optionally, the table image also includes drawing time and server.

[0066] As a preferred embodiment, first, set the overall width of the table image to 800 pixels and the overall height to 175 pixels (assuming there are 7 rows of records, each row is 25 pixels high, and the total height is 7 rows × 25 pixels = 175 pixels). Using the X-axis and Y-axis as the starting points, calculate the maximum X coordinate (20 + 800 = 820) and maximum Y coordinate (20 + 175 = 195) of the table image based on its length and height. Thus, the coordinates of the four vertices of the table image are: (20, 20), (820, 20), (20, 195), and (820, 195).

[0067] Use the DrawLine method of "Graphics" to draw straight lines connecting the four vertices of the table image: (20,20) ->(820,20) (top border) (20,20) ->(20,195) (left border) (820,20) ->(820,195) (right border) (20,195) ->(820,195) (bottom border) On the four vertex frames above, gradually calculate and draw the width of each column. Assuming the first column is 100 pixels wide, the X-axis coordinate of the first column's end point is 20 + 100 = 120, so draw a vertical line from (120, 20) to (120, 195). Similarly, if the second column is 80 pixels wide, the X-axis coordinate of the second column's end point is 120 + 80 = 200, so draw a vertical line from (200, 20) to (200, 195). Continue drawing the vertical lines for each column one by one in this way until all the vertical dividers for each column are complete.

[0068] Next, draw the horizontal lines for each row one by one. Each row is 25 pixels high. The first row's end point has a Y coordinate of 20 + 25 = 45, so a horizontal line is drawn from (20, 45) to (820, 45). The second row is also 25 pixels high, and its end point has a Y coordinate of 45 + 25 = 70, so a horizontal line is drawn from (20, 70) to (820, 70). Once all the horizontal lines are drawn, the row portion of the table image is complete.

[0069] Then, fill the data into the table image in the order of columns and rows. Specifically: The horizontal starting position of each column of data is the ending X-axis coordinate of the previous column (that is, the position of the vertical dividing line). The horizontal starting position of the data in the first column is 20 on the X-axis.

[0070] The vertical starting position of each row of data is the ending Y-axis coordinate of the previous row. The vertical starting position of the first row of data is 20 on the Y axis. To avoid overlapping of text and lines, the starting position of the text can be slightly offset.

[0071] Finally, in order to improve the recognizability of the table image data, you can add some information at the bottom of the table image, such as drawing time, server information, etc. This will help users understand the timeliness of the table image.

[0072] Example 2: The present application proposes a table image, which is drawn by the table image automatic drawing method described in Example 1.

[0073] Example 3: As attached Figure 3As shown, this application proposes a method for automatically pushing table images. A push robot is added to the DingTalk work group that needs to automatically push the table images described in Example 2. The robot is configured with a HookUrl and a push text key. The method for automatically pushing table images includes: D1: Create a console project and configure the development environment; D2: Set up the robot push configuration and bind the DingTalk interface parameters; D3: Call the assembly to dynamically generate a table image and save it to the specified directory on the server; D4: Upload the table image to the DingTalk server through the DingTalk API and obtain a unique identifier for the table image; D5: Call the DingTalk robot interface to push the reminder content and the unique identifier to the designated work group, so that the work group can immediately display the table image effect; D6: Create a database log table to store detailed information about each robot push.

[0074] This example demonstrates how to implement automatic push notifications based on DingTalk spreadsheet images, covering all steps from creating a console project to pushing information and logging it. The following is the main implementation process: First, developers need to create a new console project and configure the development environment. This includes installing the required programming language SDK (such as Java or Python), the DingTalk SDK, and libraries for processing HTTP requests (such as Java's HttpClient or Python's requests library). Once the development environment is set up, the next step is to configure the push parameters for the DingTalk bot.

[0075] On the DingTalk Open Platform, developers create a group bot and obtain a webhook URL and push key. This information will be used to configure push messages. In your project, add the webhook URL and push key to the configuration file (such as config.properties or config.json) to ensure that push messages can be sent via the API.

[0076] Next, the system needs to generate an image containing the table image content. Libraries such as Apache POI (Java) or Pandas (Python) can be used to dynamically create table image data and render the table image as an image. To generate a visual table image, developers can use a graphics rendering library (such as Java's Graphics2D or Python's Pillow), save the table image content as an image format, and store it in a designated directory on the server.

[0077] Once the table image is generated, the next step is to upload it to the DingTalk server. Through the DingTalk API, developers can upload images and obtain a unique identifier (media_id), which is used to reference the image in subsequent message pushes.

[0078] The developer then calls the DingTalk bot's API to push the reminder message and the image's media_id to the DingTalk work group. The message can include a text description and a table image. The data sent is typically in Markdown format and includes the image URL. The pushed message then appears in the DingTalk group chat, displaying the automatically generated table image.

[0079] Finally, to ensure push traceability, the system records detailed information about each push in a database. By creating a log table (e.g., in MySQL or SQLite), you can record the time of each push, message content, image media_id, and push status (e.g., success or failure). After each push is completed, the system stores this information in the database for easy query and analysis.

[0080] This example provides an automatic push solution for table images. By integrating functions such as table image generation, image upload, message push, and logging, it enables automated push and data storage. This solution is suitable for scenarios where regular sending of table images or reports is required, such as team collaboration and project progress tracking.

[0081] In an embodiment of the present invention, optionally, the method for automatically pushing a table image includes: setting a preset time length, and regularly pushing the table image once according to the preset time length.

[0082] By setting a preset time, the system can automatically push table images at fixed intervals without manual intervention, ensuring continuous data updates and sharing. This is especially important for data that requires regular reporting or follow-up, as it avoids the tedious manual push operation.

[0083] In summary, the present invention relates to a method for automatically drawing and pushing table images. The method first automatically generates a table image through a C# program. The specific steps are as follows: determine the table image style, select the data source, and set the length and height of the table image according to the style and data source. Then, use the DrawLine method of "Graphics" to draw the border of the table image, determine the width of each column, draw the horizontal line at the end of the row, and fill in the data in each cell position. Then, the table image is pushed to the DingTalk work group through an automatic push robot. The push process includes: creating a console project and configuring the development environment, building a robot push configuration and binding the DingTalk interface parameters, generating and saving the table image, uploading it to the DingTalk server, obtaining a unique identifier, and finally pushing the table image and reminder content to the specified work group through the DingTalk API. Finally, a database log table is also created to store push records.

[0084] This method realizes the automatic drawing and pushing of table images, significantly improving the efficiency of information transmission in work groups.

[0085] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a part of a module, program segment or code, and the part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which depends on the functions involved.

[0086] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling an electronic device to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0087] The specific embodiments described above further illustrate the objectives, technical solutions, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the scope of protection of this application. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this application by those skilled in the art should be included in the scope of protection of this application.

Claims

1. A method for automatically drawing a table picture, characterized in that: The following steps are involved: S1: Determine the table image style; S2: Select the table image data source; S3: Use C# program to draw table pictures; Wherein, the step S3 further includes: S31: setting the overall length and overall height of the table image according to the table image style and the table image data source; S32: Find the four vertices of the table image and connect them with straight lines using the DrawLine method of Graphics; S33: Based on the straight line connection of the four vertices, gradually determine the width of each column, and complete the drawing of each column of the table image; S34: On the basis of connecting the four vertices with straight lines, draw the end horizontal lines of each row, and complete the drawing of each row of the table image; S35: Loop through each row of the table image and fill each column with data.

2. The method for automatically drawing a table picture according to claim 1, characterized in that: The step S1 specifically includes: determining the number of columns of the table image, the content and name of each column, and setting the row and column merging status of the table header according to actual work needs.

3. The method for automatically drawing a table picture according to claim 1, characterized in that: The step S2 specifically includes: selecting a required data source, and determining the data table field in the database corresponding to each column according to the table image style.

4. The method for automatically drawing a table picture according to claim 3, characterized in that: The step S2 further includes: determining the number of rows of the table image according to the maximum number of rows in the data table field in the database corresponding to each column.

5. The method for automatically drawing a table picture according to claim 1, characterized in that: The step S33 includes: the four vertices are: an X-axis starting point, a Y-axis starting point, a maximum X-axis coordinate point, and a maximum Y-axis coordinate point.

6. The method for automatically drawing a table image according to claim 5, characterized in that: The maximum X-axis coordinate point is the X-axis starting point plus the overall length of the table image; the maximum Y-axis coordinate point is the Y-axis starting point plus the overall width of the table image.

7. The method for automatically drawing a table picture according to claim 1, characterized in that: The table image also includes the drawing time and server.

8. A table image, characterized in that: The table image is drawn by the automatic table image drawing method described in any one of claims 1-7.

9. A method for automatically pushing table images, characterized in that: A push robot is added to the work group for pushing the table image according to claim 8; the robot is configured with a HookUrl and a push text key; the table image automatic push method includes: D1: Create a console project and configure the development environment; D2: Set up the robot push configuration and bind the DingTalk interface parameters; D3: Call the assembly to dynamically generate a table image and save it to the specified directory on the server; D4: Upload the table image to the DingTalk server through the DingTalk API and obtain a unique identifier for the table image; D5: Call the DingTalk robot interface to push the reminder content and the unique identifier to the designated work group, so that the work group can immediately display the table image effect; D6: Create a database log table to store detailed information about each robot push.

10. The method for automatically pushing a table image according to claim 9, characterized in that: The method for automatically pushing a table image includes: setting a preset time length, and regularly pushing the table image according to the preset time length.