Page poster automatic generation method, device, terminal device and readable storage medium

By automatically generating html5 page posters, the problem of complex and inefficient storage of html5 page information in the prior art is solved, and efficient and complete information storage and generation is achieved.

CN114048410BActive Publication Date: 2025-04-18UBTECH ROBOTICS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111431659.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-04-18
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

The storage process of existing html5 page information is complicated and inefficient, and it is easy to miss page information, resulting in poor user experience.

Method used

A method for automatic generation of page posters is proposed. By obtaining the width, height, head width and head height of the page, the width and height of the poster are determined, and the page poster is automatically generated to avoid information omission.

Benefits of technology

It improves the efficiency of page poster generation and ensures information integrity. It is simpler and more comprehensive than traditional screenshots and download methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114048410B_ABST
    Figure CN114048410B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, terminal device and readable storage medium for automatically generating a page poster. When receiving a poster generation instruction, the method obtains the page width, page height, header width and header height of the page; determines the poster width and poster height of the page poster corresponding to the page according to the page width, page height, header width, header height and preset border width; and automatically generates the page poster corresponding to the page according to the poster width and poster height. The automatic generation method in the present application will not omit the information of the page. Compared with saving the information of the page by taking screenshots multiple times, the technical solution of the present application is simpler and the generation efficiency of the page poster is higher; compared with the method of saving by downloading the picture of the page, the page poster generated by the present application will not omit information other than the picture, and the generated page poster information is more comprehensive.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, terminal equipment and readable storage medium for automatically generating a page poster. Background Art

[0002] With the rapid development of computer technology, it has become a normal practice for people to exchange information through applications installed on terminals. For example, in an education and training system, after a teacher makes a school report, parents can view the student's study report by accessing an html (HyperText Markup Language) 5 page.

[0003] However, by accessing the HTML5 page to view information, the information on the HTML5 page cannot be quickly saved in the terminal device. The user is often required to manually download the images in the HTML5 page, or manually take a screenshot of the HTML5 page and then save the image to the terminal device.

[0004] The existing HTML5 page information preservation process is complex and inefficient. Furthermore, when the HTML5 page contains a lot of information or includes more than just pictures, necessary page information will inevitably be omitted by downloading pictures or manually taking screenshots, resulting in a poor user experience. Summary of the invention

[0005] In view of the above problems, the present application proposes a method, apparatus, terminal device and readable storage medium for automatically generating page posters, which can improve the efficiency of page poster generation and avoid information omission.

[0006] In a first aspect, an embodiment of the present application provides a method for automatically generating a page poster, the method comprising:

[0007] When receiving the poster generation instruction, obtain the page width, page height, header width and header height of the page;

[0008] Determine a poster width and a poster height of a page poster corresponding to the page according to the page width, the page height, the header width, the header height, and a preset border width;

[0009] A page poster corresponding to the page is automatically generated according to the poster width and the poster height.

[0010] The method for automatically generating a page poster according to the embodiment of the present application determines the poster width and poster height of the page poster corresponding to the page according to the page width, the page height, the header width, the header height and the preset border width, including:

[0011] Determining a width ratio between the poster width and the page width according to the page width, the header width and a preset border width;

[0012] Determine the poster width according to the width ratio and the page width;

[0013] Determining a height ratio between the poster height and the page height according to the page height, the header height and a preset border width;

[0014] The poster height is determined according to the height ratio and the page height.

[0015] The method for automatically generating a page poster according to the embodiment of the present application, before obtaining the page width, page height, header width and header height of the page, further includes:

[0016] Get the current generation status value of the generation status corresponding to the page in the page poster generation table;

[0017] If the current generation state value is a state value corresponding to a generation failure state or a state value corresponding to a generation initial state, the current generation state value is updated to a state value corresponding to a generating state, and the steps of obtaining the page width, page height, header width, and header height of the page are performed;

[0018] If the current generation status value is a status value corresponding to the generation completion status, it is determined that the page poster has been successfully generated;

[0019] If the current generation status value is the status value corresponding to the generating status, then after the current generation status value is updated, it is determined whether to execute the step of obtaining the page width, page height, header width and header height of the page according to the updated status value, or whether the page poster has been successfully generated according to the updated status value.

[0020] The method for automatically generating a page poster according to the embodiment of the present application further includes:

[0021] Determine whether the page poster is successfully generated;

[0022] If the page poster is successfully generated, the page poster is saved to the terminal device, and the relevant data of the page poster is written into the page poster upload table, and the state value of the generation state corresponding to the page in the page poster generation table is updated to the state value corresponding to the generation completion state;

[0023] If the page poster generation fails, the total number of failed generation of the page poster is updated;

[0024] Determine whether the total number of generation failures is greater than a first threshold;

[0025] If the total number of generation failures is greater than the first threshold, updating the state value of the generation state corresponding to the page in the page poster generation table to the state value corresponding to the generation failure state;

[0026] If the total number of generation failures is less than or equal to the first threshold, return to the step of automatically generating a page poster corresponding to the page according to the poster width and the poster height.

[0027] The method for automatically generating a page poster according to the embodiment of the present application further includes:

[0028] When uploading the saved page poster to the cloud platform according to the page poster upload table, obtaining the current upload status value of the upload status corresponding to the page poster to be uploaded;

[0029] If the current upload status value is a status value corresponding to the upload initial status, the current upload status value is updated to a status value corresponding to the uploading status, the cloud platform is connected, and the page poster to be uploaded is uploaded to the cloud platform;

[0030] If the current upload status value is a status value corresponding to the upload completion status, it is determined that the page poster to be uploaded has been successfully uploaded;

[0031] If the current upload status value is the status value corresponding to the uploading status, then after the current upload status value is updated, it is determined whether to upload the page poster to be uploaded to the cloud platform according to the updated status value, or it is determined whether the page poster to be uploaded has been successfully uploaded according to the updated status value.

[0032] The method for automatically generating a page poster according to the embodiment of the present application further includes:

[0033] After uploading the page poster to be uploaded to the cloud platform, determining whether the page poster to be uploaded is successfully uploaded to the cloud platform;

[0034] If the page poster to be uploaded is successfully uploaded, the page poster to be uploaded is deleted from the terminal device, and the status value of the upload status corresponding to the page poster to be uploaded in the page poster upload table is updated to the status value corresponding to the upload completion status;

[0035] If the page poster to be uploaded fails to be uploaded, the total number of upload failures of the page poster to be uploaded is updated;

[0036] Determine whether the total number of upload failures is greater than a second threshold;

[0037] If the total number of upload failures is greater than the second threshold, updating the status value of the upload status corresponding to the page to be uploaded in the page poster upload table to a status value corresponding to the upload failure status;

[0038] If the total number of upload failures is less than or equal to the second threshold, return to the step of uploading the page poster to be uploaded to the cloud platform.

[0039] The method for automatically generating a page poster according to the embodiment of the present application further includes:

[0040] After deleting the page poster to be uploaded from the terminal device, determining whether the page poster to be uploaded is successfully deleted from the terminal device;

[0041] If the deletion is successful, the status value of the upload status corresponding to the page poster to be uploaded is updated to the status value corresponding to the deletion success status;

[0042] If the deletion fails, the total number of deletion failures of the page poster to be uploaded is updated;

[0043] Determine whether the total number of deletion failures is greater than a third threshold;

[0044] If the total number of deletion failures is greater than the third threshold, the status value of the upload status corresponding to the page poster to be uploaded in the page poster upload table is updated to the status value corresponding to the deletion failure status;

[0045] If the total number of deletion failures is less than or equal to the third threshold, return to the step of deleting the page poster to be uploaded from the terminal device.

[0046] The method for automatically generating a page poster according to the embodiment of the present application further includes:

[0047] When sending the page poster saved in the cloud platform to the WeChat public account according to the page poster sending table, the current sending status value of the sending status corresponding to the page poster to be sent is obtained;

[0048] If the current sending status value is the status value corresponding to the sending initial status, the current sending status value is updated to the status value corresponding to the sending status, the WeChat public account is obtained, and the page poster to be sent is sent to the WeChat public account;

[0049] If the current sending status value is a status value corresponding to the sending completion status, it is determined that the page poster to be sent has been successfully sent;

[0050] If the current sending status value is the status value corresponding to the sending status, after the current sending status value is updated, it is determined whether to send the page poster to be sent to the WeChat public account according to the updated status value, or it is determined whether the page poster to be sent has been successfully sent according to the updated status value.

[0051] The method for automatically generating a page poster according to the embodiment of the present application further includes:

[0052] After sending the page poster to be sent to the WeChat official account, determining whether the page poster to be sent is successfully sent;

[0053] If the page poster to be sent is successfully sent, the state value of the sending state corresponding to the page poster to be sent in the page poster sending table is updated to the state value corresponding to the sending completion state;

[0054] If the page poster to be sent fails to be sent, the total number of failed sending of the page poster to be sent is updated;

[0055] Determine whether the total number of sending failures is greater than a fourth threshold;

[0056] If the total number of sending failures is greater than the fourth threshold, updating the state value of the sending state corresponding to the page to be sent in the page poster sending table to a state value corresponding to the sending failure state;

[0057] If the total number of sending failures is less than or equal to the fourth threshold, return to the step of sending the page poster to be sent to the WeChat public account.

[0058] In a second aspect, the embodiment of the present application further provides a device for automatically generating a page poster, the device comprising:

[0059] The acquisition module is used to obtain the page width, page height, header width and header height of the page;

[0060] A determination module, used to determine a poster width and a poster height of a page poster corresponding to the page according to the page width, the page height, the header width, the header height and a preset border width;

[0061] A generation module is used to automatically generate a page poster corresponding to the page according to the poster width and the poster height.

[0062] In a third aspect, an embodiment of the present application further proposes a terminal device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program runs on the processor, the method for automatically generating a page poster as described in the embodiment of the present application is executed.

[0063] In a fourth aspect, an embodiment of the present application further proposes a readable storage medium storing a computer program, which, when running on a processor, executes the method for automatically generating a page poster as described in an embodiment of the present application.

[0064] When receiving a poster generation instruction, the present application obtains the page width, page height, header width and header height of the page; determines the poster width and poster height of the page poster corresponding to the page according to the page width, the page height, the header width, the header height and the preset border width; and automatically generates the page poster corresponding to the page according to the poster width and the poster height. The automatic generation method in the present application will not omit the information of the page. Compared with saving the information of the page by taking screenshots multiple times, the technical solution of the present application is simpler and the generation efficiency of the page poster is higher; compared with the method of saving by downloading the picture of the page, the page poster generated by the present application will not omit information other than the picture, and the generated page poster information is more comprehensive. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.

[0066] Figure 1 A schematic diagram of a process for automatically generating a page poster according to an embodiment of the present application is shown;

[0067] Figure 2 A schematic diagram showing a flow chart of another method for automatically generating a page poster according to an embodiment of the present application is shown;

[0068] Figure 3 A schematic diagram of a process for uploading a page poster in a method for automatically generating a page poster proposed in an embodiment of the present application is shown;

[0069] Figure 4 A schematic flow chart of a page poster deletion method in a page poster automatic generation method proposed in an embodiment of the present application is shown;

[0070] Figure 5 A schematic diagram of a process for sharing a page poster in a method for automatically generating a page poster is shown in an embodiment of the present application;

[0071] Figure 6 A schematic diagram of the structure of a device for automatically generating a page poster is shown in an embodiment of the present application;

[0072] Figure 7A schematic diagram of the structure of a terminal device proposed in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0073] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0074] The components of the embodiments of the present invention generally described and shown in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0075] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.

[0076] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0077] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present invention belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present invention.

[0078] Example 1

[0079] See also Figure 1 In one embodiment of the present application, a method for automatically generating a page poster is provided, the method comprising the following steps:

[0080] Step S100, when receiving the poster generation instruction, obtaining the page width, page height, header width and header height of the page.

[0081] The page can be an HTML5 page corresponding to a complete learning report, or it can be an HTML5 page corresponding to a part after a complete learning report is split into multiple parts. For example, a complete learning report is pre-split into classroom performance b.html, learning content c.html, comprehensive performance d.html, teacher comments e.html, and classroom style f.html. In this embodiment, a page poster can be generated from a complete learning report according to user needs, or a part of a complete learning report (for example, classroom performance b.html) can be generated into a page poster.

[0082] In this embodiment, when the terminal device receives a poster generation instruction issued by the user, the terminal device will obtain the page width, page height, header width and header height of the HTML5 page, where the header of the HTML5 page can be used to set the title of the HTML5 page and some basic information.

[0083] Step S200, determining a poster width and a poster height of a page poster corresponding to the page according to the page width, the page height, the header width, the header height and a preset border width.

[0084] In this embodiment, when a page poster is automatically generated, a poster border is added to the page poster to prevent information at the edge of the page poster from being lost or unclear.

[0085] The border width of the poster border can be 8px, 10px, 12px, etc. Preferably, the border width is 10px. When the border width is 10px, the page poster image is clearer and more beautiful. It can be understood that px is a unit of resolution, which means pixel.

[0086] Exemplarily, the width ratio between the poster width and the page width can be determined based on the page width, the header width and the border width; the poster width can be determined based on the width ratio and the page width; the height ratio between the poster height and the page height can be determined based on the page height, the header height and a preset border width; and the poster height can be determined based on the height ratio and the page height.

[0087] Taking the border width of 10px as an example, if the page width of the html5 page is W1, the page height is H1, the header width is W2 and the header height is H2, the poster height is W, and the poster height is H, then W / W1=(W1-W2) / (W1+10), H / H1=(H1-W2) / (H1+10), among which W1, H1, W2 and H2 are all known, and the poster height and poster width can be determined according to the above formula.

[0088] Step S300: automatically generate a page poster corresponding to the page according to the poster width and the poster height.

[0089] It can be understood that in this embodiment, the generated page poster can be in the form of a long image. This generation method will not omit the information of the HTML5 page. Compared with saving the information of the HTML5 page by taking multiple screenshots, the technical solution of this embodiment is simpler and the generation efficiency of the page poster is higher. Compared with the method of saving by downloading the picture of the HTML5 page, the generated page poster of this embodiment will not omit information other than the picture, and the generated page poster information is more comprehensive.

[0090] Furthermore, considering that the automatic generation of the page poster may fail due to network or device reasons, in order to determine the generation of the page poster, this embodiment refers to Figure 2 After the above step S300, the following steps S410 to S440 are also included:

[0091] Step S410, determining whether the page poster is successfully generated.

[0092] If the page poster is generated successfully, step S420 is executed; if the page poster is generated unsuccessfully, steps S430 and S440 are executed.

[0093] Step S420, saving the page poster to the terminal device, writing the relevant data of the page poster to the page poster upload table, and updating the status value of the generation status corresponding to the page in the page poster generation table to the status value corresponding to the generation completion status.

[0094] Among them, the page poster generation table is used to record the current generation status value of the generation status corresponding to the page and other basic information of the page (for example, report type, creation time, modification time, page address, failure reason, etc.). The value of the generation status corresponding to the page can be 0, 1, 2, 3, etc., among which 0 is used to indicate the initial generation status, 1 is used to indicate the generation completion status, 2 is used to indicate the generation failure status, and 3 is used to indicate the generating status.

[0095] Step S430, updating the total number of failed generation of the page poster.

[0096] Step S440, determining whether the total number of generation failures is greater than a first threshold.

[0097] If the total number of generation failures is greater than the first threshold, step S450 is executed to update the state value of the generation state corresponding to the page in the page poster generation table to the state value corresponding to the generation failure state. If the total number of generation failures is less than or equal to the first threshold, the process returns to step S300.

[0098] Among them, the first threshold can be 3, 4, 5, etc. It can be understood that in the above implementation, when the total number of page poster generation failures is greater than the first threshold, it is determined that the generation of the current page poster has failed, which can avoid the failure of the generation of the current page poster due to occasional network disconnection, thereby effectively reducing the number of generation failures and improving generation efficiency.

[0099] It can be understood that if the current generation status value is a generation failure status, the previous generation failure may be caused by network reasons or equipment reasons. After the cause of the failure is checked and the network is restored to normal or the equipment is normal, the page poster can be automatically generated for the page with the previous generation status value of the generation failure status.

[0100] Exemplarily, on the basis of the above steps S410 to S440, it is ensured that the automatic generation of the page poster can be carried out in an orderly manner. In this embodiment, before the above step S100, it also includes: obtaining the current generation status value of the generation status corresponding to the page in the page poster generation table; if the current generation status value is the status value corresponding to the generation failure status or the status value corresponding to the generation initial status, then the current generation status value is updated to the status value corresponding to the generating status, and the step of obtaining the page width, page height, header width and header height of the page is executed; if the current generation status value is the status value corresponding to the generation completion status, it is determined that the page poster has been successfully generated; if the current generation status value is the status value corresponding to the generating status, then after the current generation status value is updated, it is determined whether to execute the step of obtaining the page width, page height, header width and header height of the page or determine whether the page poster has been successfully generated according to the updated status value.

[0101] It should be noted that, in the education and training system, through this embodiment, on the one hand, teachers and parents can save the page poster automatically generated by the html5 page in the form of a long image in their terminal devices, so that parents can view the learning report saved in the form of a long image at any time through the terminal device without relying on the network; on the other hand, teachers or teaching and training personnel can save the page poster automatically generated by the html5 page in the form of a long image on the cloud platform, so that the page poster saved on the cloud platform can be sent to the WeChat public account, so that parents and teachers who follow the WeChat public account can obtain the learning report through the WeChat public account.

[0102] The detailed steps of uploading a page poster to the cloud platform and sending a page poster to a WeChat public account will be described in detail below with specific embodiments.

[0103] Example 2

[0104] Another embodiment of the present application proposes a method for uploading a page poster to a cloud platform, the method comprising: when uploading the saved page poster to the cloud platform according to the page poster upload table, obtaining the current upload status value of the upload status corresponding to the page poster to be uploaded; if the current upload status value is the status value corresponding to the upload initial status, updating the current upload status value to the status value corresponding to the uploading status, connecting to the cloud platform, and uploading the page poster to be uploaded to the cloud platform; if the current upload status value is the status value corresponding to the upload completion status, determining that the page poster to be uploaded has been successfully uploaded; if the current upload status value is the status value corresponding to the uploading status, after the current upload status value is updated, determining whether to upload the page poster to be uploaded to the cloud platform according to the updated status value or determining whether the page poster to be uploaded has been successfully uploaded according to the updated status value.

[0105] Among them, the page poster upload table is used to record the current upload status value of the upload status corresponding to the page and other basic information of the page (for example, report type, creation time, modification time, page address, failure reason, etc.). The value of the upload status corresponding to the page can be 0, 1, 2, 3, 4, 5, etc., among which 0 is used to indicate the initial upload status, 1 is used to indicate the upload completion status, 2 is used to indicate the upload failure status, 3 is used to indicate the uploading status, 4 is used to indicate the deletion failure status, and 5 is used to indicate the deletion success status.

[0106] Furthermore, considering that the upload of the page poster may fail due to network or device reasons, in order to determine the upload status of the page poster, in this embodiment, please refer to Figure 3 , including the following steps:

[0107] Step S500, uploading the page poster to be uploaded to the cloud platform.

[0108] Step S510, determining whether the page poster to be uploaded is successfully uploaded to the cloud platform.

[0109] If the page poster to be uploaded is successfully uploaded, step S520 is executed; if the page poster to be uploaded fails to be uploaded, steps S530 and S540 are executed.

[0110] Step S520, deleting the page poster to be uploaded from the terminal device, and updating the status value of the upload status corresponding to the page poster to be uploaded in the page poster upload table to the status value corresponding to the upload completion status.

[0111] Step S530, updating the total number of upload failures of the page poster to be uploaded.

[0112] Step S540, determining whether the total number of upload failures is greater than a second threshold;

[0113] If the total number of upload failures is greater than the second threshold, step S550 is executed to update the status value of the upload status corresponding to the page to be uploaded in the page poster upload table to the status value corresponding to the upload failure status. If the total number of upload failures is less than or equal to the second threshold, the process returns to step S500.

[0114] Among them, the second threshold can be 3, 4, 5, etc. It can be understood that in the above implementation, when the total number of upload failures of the page poster is greater than the second threshold, it is determined that the upload of the current page poster has failed, which can avoid the upload failure of the current page poster due to occasional network disconnection, thereby effectively reducing the number of upload failures and improving upload efficiency.

[0115] For further information, see Figure 4 , this embodiment further includes the following steps:

[0116] Step S610, after deleting the page poster to be uploaded from the terminal device, determining whether the page poster to be uploaded is successfully deleted from the terminal device.

[0117] If the deletion is successful, step S620 is executed; if the deletion fails, steps S630 and S640 are executed.

[0118] Step S620: Update the status value of the upload status corresponding to the page poster to be uploaded to the status value corresponding to the deletion success status.

[0119] Step S630, updating the total number of deletion failures of the page poster to be uploaded.

[0120] Step S640, determining whether the total number of deletion failures is greater than a third threshold.

[0121] If the total number of deletion failures is greater than the third threshold, step S650 is executed to update the status value of the upload status corresponding to the page poster to be uploaded in the page poster upload table to the status value corresponding to the deletion failure status. If the total number of deletion failures is less than or equal to the third threshold, the process returns to step S520 to continue deleting the page poster to be uploaded from the terminal device.

[0122] Among them, the third threshold can be 3, 4, 5, etc. It can be understood that in the above implementation, when the total number of deletion failures of the page poster is greater than the third threshold, it is determined that the deletion of the current page poster has failed, which can avoid the failure of deletion of the current page poster due to occasional network disconnection, thereby effectively reducing the number of deletion failures and improving deletion efficiency.

[0123] Example 3

[0124] The third embodiment of the present application proposes a method of sending a page poster to a WeChat public account, which includes:

[0125] When sending the page poster saved in the cloud platform to the WeChat public account according to the page poster sending table, the current sending status value of the sending status corresponding to the page poster to be sent is obtained; if the current sending status value is the status value corresponding to the sending initial status, the current sending status value is updated to the status value corresponding to the sending status, and the WeChat public account is obtained, and the page poster to be sent is sent to the WeChat public account; if the current sending status value is the status value corresponding to the sending completion status, it is determined that the page poster to be sent has been successfully sent; if the current sending status value is the status value corresponding to the sending status, after the current sending status value is updated, it is determined whether to send the page poster to be sent to the WeChat public account according to the updated status value or whether the page poster to be sent has been successfully sent according to the updated status value.

[0126] Among them, the page poster sending table is used to record the current sending status value of the sending status corresponding to the page and other basic information of the page (for example, report type, creation time, modification time, page address, failure reason, etc.). The value of the sending status corresponding to the page can be 0, 1, 2, 3, etc., among which 0 is used to indicate the initial sending status, 1 is used to indicate the sending completion status, 2 is used to indicate the upload failure status, and 3 is used to indicate the sending status.

[0127] Furthermore, considering that the sending of the page poster may fail due to network or device reasons, in order to determine the sending status of the page poster, in this embodiment, please refer to Figure 5 , including the following steps:

[0128] Step S700, sending the page poster to be sent to the WeChat public account.

[0129] Step S710, determining whether the page poster to be sent is successfully sent.

[0130] If the page poster to be sent is successfully sent, step S720 is executed; if the page poster to be sent fails to be sent, steps S730 and S740 are executed.

[0131] Step S720: Update the status value of the sending status corresponding to the page poster to be sent in the page poster sending table to a status value corresponding to the sending completion status.

[0132] Step S730, updating the total number of failed sending of the page poster to be sent.

[0133] Step S740, determining whether the total number of sending failures is greater than a fourth threshold.

[0134] If the total number of failed transmissions is greater than the fourth threshold, step S750 is executed to update the state value of the transmission state corresponding to the page to be transmitted in the page poster transmission table to the state value corresponding to the failed transmission state. If the total number of failed transmissions is less than or equal to the fourth threshold, the process returns to step S700.

[0135] Among them, the fourth threshold can be 3, 4, 5, etc. It can be understood that in the above implementation, when the total number of failures in sending the page poster is greater than the fourth threshold, it is determined that the sending of the current page poster has failed, which can avoid the failure to send the current page poster due to occasional network disconnection, thereby effectively reducing the number of sending failures and improving the sending efficiency.

[0136] Example 4

[0137] See also Figure 6 The fourth embodiment of the present application proposes a device 10 for automatically generating a page poster, which includes: an acquisition module 11, a determination module 12 and a generation module 13.

[0138] The acquisition module 11 is used to obtain the page width, page height, header width and header height of the page; the determination module 12 is used to determine the poster width and poster height of the page poster corresponding to the page according to the page width, the page height, the header width, the header height and the preset border width; the generation module 13 is used to automatically generate the page poster corresponding to the page according to the poster width and the poster height.

[0139] The page poster automatic generation device 10 in this embodiment is used to execute the page poster automatic generation method described in the above embodiment through the coordinated use of the acquisition module 11, the determination module 12 and the generation module 13. The implementation scheme and beneficial effects involved in the above embodiment are also applicable to this embodiment and will not be repeated here.

[0140] Example 5

[0141] See also Figure 7 The fifth embodiment of the present application proposes a terminal device 100, including a memory 110 and a processor 120, wherein the memory 110 stores a computer program, and when the computer program runs on the processor 120, the page poster automatic generation method described in the above embodiment of the present application is executed.

[0142] Example 6

[0143] The sixth embodiment of the present application provides a readable storage medium storing a computer program, which, when running on a processor, executes the page poster automatic generation method described in the above embodiments of the present application.

[0144] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order 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, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow chart, and the combination of boxes in the structure diagram and / or the flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0145] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0146] 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 readable storage medium. Based on this understanding, the technical solution of the present invention, 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, including several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0147] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for automatically generating a page poster, characterized in that: The method comprises: When receiving the poster generation instruction, obtain the page width, page height, header width and header height of the page; Determine a poster width and a poster height of a page poster corresponding to the page according to the page width, the page height, the header width, the header height, and a preset border width; Automatically generate a page poster corresponding to the page according to the poster width and the poster height; Before getting the page width, page height, head width and head height of the page, also include: Get the current generation status value of the generation status corresponding to the page in the page poster generation table; If the current generation status value is the status value corresponding to the generation completion status, it is determined that the page poster has been successfully generated; if the current generation status value is the status value corresponding to the generating status, then after the current generation status value is updated, it is determined according to the updated status value whether to execute the step of obtaining the page width, page height, header width and header height of the page or determine whether the page poster has been successfully generated according to the updated status value.

2. The method for automatically generating a page poster according to claim 1, characterized in that: Determining a poster width and a poster height of a page poster corresponding to the page according to the page width, the page height, the header width, the header height, and a preset border width includes: Determining a width ratio between the poster width and the page width according to the page width, the header width and a preset border width; Determine the poster width according to the width ratio and the page width; Determining a height ratio between the poster height and the page height according to the page height, the header height and a preset border width; The poster height is determined according to the height ratio and the page height.

3. The method for automatically generating a page poster according to claim 1, characterized in that: Before getting the page width, page height, head width and head height of the page, also include: If the current generation status value is a status value corresponding to a generation failure status or a status value corresponding to a generation initial status, the current generation status value is updated to a status value corresponding to a generating status, and the steps of obtaining the page width, page height, header width and header height of the page are executed.

4. The method for automatically generating a page poster according to claim 1, characterized in that: Also includes: Determine whether the page poster is successfully generated; If the page poster is successfully generated, the page poster is saved to the terminal device, and the relevant data of the page poster is written into the page poster upload table, and the state value of the generation state corresponding to the page in the page poster generation table is updated to the state value corresponding to the generation completion state; If the page poster generation fails, the total number of failed generation of the page poster is updated; Determine whether the total number of generation failures is greater than a first threshold; If the total number of generation failures is greater than the first threshold, updating the state value of the generation state corresponding to the page in the page poster generation table to the state value corresponding to the generation failure state; If the total number of generation failures is less than or equal to the first threshold, return to the step of automatically generating a page poster corresponding to the page according to the poster width and the poster height.

5. The method for automatically generating a page poster according to claim 1, characterized in that: Also includes: When uploading the saved page poster to the cloud platform according to the page poster upload table, obtaining the current upload status value of the upload status corresponding to the page poster to be uploaded; If the current upload status value is a status value corresponding to the upload initial status, the current upload status value is updated to a status value corresponding to the uploading status, the cloud platform is connected, and the page poster to be uploaded is uploaded to the cloud platform; If the current upload status value is a status value corresponding to the upload completion status, it is determined that the page poster to be uploaded has been successfully uploaded; If the current upload status value is the status value corresponding to the uploading status, then after the current upload status value is updated, it is determined whether to upload the page poster to be uploaded to the cloud platform according to the updated status value, or it is determined whether the page poster to be uploaded has been successfully uploaded according to the updated status value.

6. The method for automatically generating a page poster according to claim 5, characterized in that: Also includes: After uploading the page poster to be uploaded to the cloud platform, determining whether the page poster to be uploaded is successfully uploaded to the cloud platform; If the page poster to be uploaded is successfully uploaded, the page poster to be uploaded is deleted from the terminal device, and the status value of the upload status corresponding to the page poster to be uploaded in the page poster upload table is updated to the status value corresponding to the upload completion status; If the page poster to be uploaded fails to be uploaded, the total number of upload failures of the page poster to be uploaded is updated; Determine whether the total number of upload failures is greater than a second threshold; If the total number of upload failures is greater than the second threshold, updating the status value of the upload status corresponding to the page to be uploaded in the page poster upload table to a status value corresponding to the upload failure status; If the total number of upload failures is less than or equal to the second threshold, return to the step of uploading the page poster to be uploaded to the cloud platform.

7. The method for automatically generating a page poster according to claim 6, characterized in that: Also includes: After deleting the page poster to be uploaded from the terminal device, determining whether the page poster to be uploaded is successfully deleted from the terminal device; If the deletion is successful, the status value of the upload status corresponding to the page poster to be uploaded is updated to the status value corresponding to the deletion success status; If the deletion fails, the total number of deletion failures of the page poster to be uploaded is updated; Determine whether the total number of deletion failures is greater than a third threshold; If the total number of deletion failures is greater than the third threshold, the status value of the upload status corresponding to the page poster to be uploaded in the page poster upload table is updated to the status value corresponding to the deletion failure status; If the total number of deletion failures is less than or equal to the third threshold, return to the step of deleting the page poster to be uploaded from the terminal device.

8. The method for automatically generating a page poster according to claim 1, characterized in that: Also includes: When sending the page poster saved in the cloud platform to the WeChat public account according to the page poster sending table, the current sending status value of the sending status corresponding to the page poster to be sent is obtained; If the current sending status value is the status value corresponding to the sending initial status, the current sending status value is updated to the status value corresponding to the sending status, the WeChat public account is obtained, and the page poster to be sent is sent to the WeChat public account; If the current sending status value is a status value corresponding to the sending completion status, it is determined that the page poster to be sent has been successfully sent; If the current sending status value is the status value corresponding to the sending status, after the current sending status value is updated, it is determined whether to send the page poster to be sent to the WeChat public account according to the updated status value, or it is determined whether the page poster to be sent has been successfully sent according to the updated status value.

9. The method for automatically generating a page poster according to claim 8, characterized in that: Also includes: After sending the page poster to be sent to the WeChat official account, determining whether the page poster to be sent is successfully sent; If the page poster to be sent is successfully sent, the state value of the sending state corresponding to the page poster to be sent in the page poster sending table is updated to the state value corresponding to the sending completion state; If the page poster to be sent fails to be sent, the total number of failed sending of the page poster to be sent is updated; Determine whether the total number of sending failures is greater than a fourth threshold; If the total number of sending failures is greater than the fourth threshold, updating the state value of the sending state corresponding to the page to be sent in the page poster sending table to a state value corresponding to the sending failure state; If the total number of sending failures is less than or equal to the fourth threshold, return to the step of sending the page poster to be sent to the WeChat public account.

10. A device for automatically generating page posters, characterized in that: The device comprises: The acquisition module is used to obtain the page width, page height, header width and header height of the page; A determination module, used to determine a poster width and a poster height of a page poster corresponding to the page according to the page width, the page height, the header width, the header height and a preset border width; A generation module, used for automatically generating a page poster corresponding to the page according to the poster width and the poster height; Before getting the page width, page height, head width and head height of the page, also include: Get the current generation status value of the generation status corresponding to the page in the page poster generation table; If the current generation status value is the status value corresponding to the generation completion status, it is determined that the page poster has been successfully generated; if the current generation status value is the status value corresponding to the generating status, then after the current generation status value is updated, it is determined according to the updated status value whether to execute the step of obtaining the page width, page height, header width and header height of the page or determine whether the page poster has been successfully generated according to the updated status value.

11. A terminal device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is run on the processor, the method for automatically generating a page poster according to any one of claims 1 to 9 is executed.

12. A readable storage medium, characterized in that: It stores a computer program, which, when running on a processor, executes the page poster automatic generation method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Page generating and display method based on JSON (java script object notation) format

    CN104765760A

  • Web technology-based webpage screen capture method

    CN107885848A

  • Log file complete collection confirmation method and device and equipment

    CN109861843A