Method and device for generating mobile report
By determining the component storage format and using hypertext markup language, the problem that mobile reports do not support graphical display and complex report conversion is solved, and similar display and cross-platform convenient viewing of mobile reports and report web pages are achieved.
Patent Information
- Application Number
- CN201810481544.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-05-18
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2038-05-18
AI Technical Summary
The existing technology has problems such as not supporting graphic display, complex report conversion, large template gaps, high development difficulty, and long development cycle when generating mobile reports.
By determining the storage format of components, mobile reports are generated based on report web page information. Hypertext markup language is used to support independent storage and introduction of tables, graphics and text. Navigation script processing is used to obtain component information to achieve similar display of mobile reports and report web pages. .
It achieves the same form diversity of mobile reports as report web pages, supports the conversion of complex reports, shortens the development cycle, and improves the convenience of terminal cross-platform viewing.
Smart Images

Figure CN110502730B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for generating a mobile report. Background Art
[0002] Nowadays, more and more report systems support subscription functions. Users hope to view reports on time through various terminal devices at any time and anywhere, without logging into the report system. Since the presentation of the report body is often complex and diverse, including titles, texts, tables, bar charts, pie charts, line charts, etc., ensuring accurate and timely extraction of report data and ensuring that mobile reports are as diverse as report web pages are key factors in measuring mobile reports.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0004] 1. Some existing technologies require preset templates for generating mobile reports, which only support the display of tables in reports but not graphics;
[0005] 2. Some existing technologies only support the display of static reports, but not complex reports or reports that require page jumps;
[0006] 3. Some existing technologies are suitable for calling third-party resource libraries, but since most third-party resource libraries are non-open source libraries, development is difficult and reports with scroll bars cannot be processed.
[0007] 4. Some existing technologies have a long development cycle when processing graphics in reports, and there is a big gap between the graphics in the reporting system. Summary of the invention
[0008] In view of this, an embodiment of the present invention provides a method and device for generating mobile reports, which can: achieve the technical effect of accurately extracting information of components in web page reports, so that mobile reports are as diverse in form as reports viewed in report web pages; achieve the technical effect of completely converting complex reports into mobile reports; achieve the technical effect that the generated mobile report is highly similar to the report web page and the generated mobile report is more flexible; achieve the technical effect that reports can be viewed on multiple terminals anytime and anywhere without logging into the report system.
[0009] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for generating a mobile report is provided, comprising:
[0010] Determine the storage format of the component based on the component information on the report web page;
[0011] According to the storage format of the component, storing the component in the storage format;
[0012] Generate mobile reports based on information about stored components and components on the report web page.
[0013] Optionally, determine the storage format of the component, including:
[0014] When the type of the component is a table, storing the component in a text file format; and / or,
[0015] When the type of the component is a graphic, storing the component in a format of an image file; and / or,
[0016] When the type of the component is title or text, the component is stored in the format of a text or image file.
[0017] Optionally, generate a mobile report, including:
[0018] The table component is introduced into the mobile report in the format of a text file;
[0019] and / or, the graphic component is introduced into the mobile report in the format of an image file;
[0020] And / or, the title component or the text component is introduced into the mobile report in the format of a text or image file.
[0021] Optionally, it also includes:
[0022] According to the report webpage, obtain the information of the components on the report webpage;
[0023] The information of the components on the report web page includes: the order of obtaining the component information, the type of the component, the unique identifier of the component, the width of the component, and the height of the component.
[0024] Optionally, according to the report webpage, before obtaining the information of the components on the report webpage, the following steps are included:
[0025] According to the unique identifier of the report, open the report web page in the background.
[0026] Optionally, before obtaining the information of the components on the report webpage according to the report webpage, the method further includes:
[0027] On the system generating mobile reports, install navigation script processing and testing plugins for obtaining information about components on the report web pages, and / or define environment variables.
[0028] Optionally, the language used to generate the mobile report is Hypertext Markup Language.
[0029] According to another aspect of an embodiment of the present invention, there is provided an apparatus for generating a mobile report, comprising:
[0030] A component storage format determination module is used to determine the storage format of a component based on the component information on the report web page;
[0031] A component storage module, used for storing the component in the storage format according to the storage format of the component;
[0032] The mobile report generation module is used to generate mobile reports based on the stored components and the information of the components on the report web page.
[0033] Optionally, determine the storage format of the component, including:
[0034] When the type of the component is a table, storing the component in a text file format; and / or,
[0035] When the type of the component is a graphic, storing the component in a format of an image file; and / or,
[0036] When the type of the component is title or text, the component is stored in the format of a text or image file.
[0037] Optionally, generate a mobile report, including:
[0038] The table component is introduced into the mobile report in the format of a text file;
[0039] and / or, the graphic component is introduced into the mobile report in the format of an image file;
[0040] And / or, the title component or the text component is introduced into the mobile report in the format of a text or image file.
[0041] Optionally, it also includes:
[0042] According to the report webpage, obtain the information of the components on the report webpage;
[0043] The information of the components on the report web page includes: the order of obtaining the component information, the type of the component, the unique identifier of the component, the width of the component, and the height of the component.
[0044] Optionally, according to the report webpage, before obtaining the information of the components on the report webpage, the following steps are included:
[0045] According to the unique identifier of the report, open the report web page in the background.
[0046] Optionally, before obtaining the information of the components on the report webpage according to the report webpage, the method further includes:
[0047] On the system generating mobile reports, install navigation script processing and testing plugins for obtaining information about components on the report web pages, and / or define environment variables.
[0048] Optionally, the language used to generate the mobile report is Hypertext Markup Language.
[0049] According to another aspect of an embodiment of the present invention, there is provided an electronic device for generating a mobile report, including:
[0050] one or more processors;
[0051] a storage device for storing one or more programs,
[0052] When one or more programs are executed by one or more processors, the one or more processors implement the method for grouping items of the present invention.
[0053] According to another aspect of an embodiment of the present invention, there is provided a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the method for grouping items of the present invention is implemented.
[0054] One embodiment of the above invention has the following advantages or beneficial effects:
[0055] Because the storage format of the components is determined, and the technical means of storing the components separately according to the determined component storage format is adopted, the technical defects of some existing mobile reports that do not support the display of graphics, or the generated graphics are very different from the graphics in the report system, or the tables with scroll bars in the mobile report cannot be fully displayed are overcome, thereby achieving the technical effect of accurately extracting the information of the components in the web report and making the mobile report as diverse in form as the reports viewed on the report web page.
[0056] Because the technical means of opening the report webpage in the background and saving the components separately is adopted, the technical problem that some existing technologies do not support the generation of mobile reports for complex reports that require page jumps is overcome, thereby achieving the technical effect of completely converting complex reports into mobile reports.
[0057] Because the technical means of obtaining the information of the components on the report web page is adopted, when generating the mobile report, the mobile report can be set according to the information of the components on the report web page, thereby overcoming the technical problem that some existing technologies require the preset generation of mobile report templates, resulting in a large gap between the generated mobile report and the report web page, thereby achieving the technical effect that the generated mobile report is highly similar to the report web page and the generated mobile report is more flexible.
[0058] Because the technical means of generating mobile reports using Hypertext Markup Language is adopted, the technical problems of some existing technologies that use third-party non-open source resource libraries to generate mobile reports, resulting in high development difficulty and long development cycle when processing graphic components in reports, are overcome, thereby achieving the technical effect of being able to view reports on multiple terminals anytime and anywhere without logging into the reporting system.
[0059] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0061] Figure 1 is a schematic diagram of the main process of the method for generating a mobile report according to an embodiment of the present invention;
[0062] Figure 2 is a screenshot of a report page in a specific embodiment of a method for generating a mobile report according to an optional embodiment of the present invention;
[0063] FIG3 is a screenshot of component file saving in a specific embodiment of a method for generating a mobile report according to an optional embodiment of the present invention, wherein FIG3(a) is a screenshot of a file saving of a title component, FIG3(b) is a screenshot of the content in a title component file, FIG3(c) is a screenshot of a file saving of a graphic component, FIG3(d) is a screenshot of the content in a graphic component file, and FIG3(e) is a screenshot of a file saving of a table component;
[0064] FIG4 is a screenshot of HTML code in a specific embodiment of a method for generating a mobile report according to an optional embodiment of the present invention, wherein FIG4(a) is a screenshot of HTML code spliced into a whole, FIG4(b) is a screenshot of HTML code corresponding to a title; FIG4(c) is a screenshot of HTML code introduced by a picture; and FIG4(d) is a screenshot of HTML code introduced by a table;
[0065] Figure 5 is an overall flow chart of a specific embodiment of a method for generating a mobile report according to an optional embodiment of the present invention;
[0066] Figure 6 This is a screenshot of the report email effect implemented in a specific embodiment of the method for generating a mobile report according to an optional embodiment of the present invention;
[0067] Figure 7 is a schematic diagram of main modules of an apparatus for generating a mobile report according to an embodiment of the present invention;
[0068] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0069] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0070] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0071] Figure 1 is a schematic diagram of the main process of the method for generating a mobile report according to an embodiment of the present invention, such as Figure 1 As shown,
[0072] Step 101, determining the storage format of the component according to the information of the component on the report web page;
[0073] Step 102, according to the storage format of the component, storing the component in the storage format;
[0074] Step 103: Generate a mobile report based on the stored components and the information of the components on the report webpage.
[0075] The mobile report refers to a report generated by sending the report content that originally required logging into the report system to be viewed to various terminals of the user. Mobile reports include, but are not limited to, sending by email or push. The mobile report generated by this embodiment allows users to view the report accurately and timely, and the report is as diverse as the web page report viewed in the report system.
[0076] The report component information includes, for example, component type, component size, component color, etc. The components are re-set on the mobile report using the component information so that the component display effect on the mobile report is closer to the component display effect on the report web page.
[0077] The report webpage mainly displays data in the form of tables, graphics, text, and titles. Each table, graphic, text, and title used to display data is called a component. The information of each component can be obtained through the original code of the report webpage. The information of the components on the report webpage is obtained and used to generate a mobile report, so that the generated mobile report has a smaller gap with the report display effect of the report webpage.
[0078] In this embodiment, the component types of the report can be divided into tables, graphics, text, and titles. Since each component has different characteristics, if the same storage method is used during storage, the resulting mobile report will be quite different from the web page report viewed in the report system. For example, if a table with a scroll bar is stored in the form of a screenshot, part of the table data will be lost; if the graphics are stored in the format of a text file, the graphic report re-formed in the mobile report will be quite different from the graphic report on the report web page. Therefore, storing different types of components in the same format is not conducive to generating mobile reports with high similarity. Similarly, if the display format of the text and title on the report web page is a special style, it is more suitable to be stored in the form of a screenshot rather than in the format of a text file.
[0079] After determining the storage format of each component, it can be stored according to the storage format of each component. The storage is stored separately, that is, not stored in the original location. After the component is saved separately, the information of the saved component and the component on the web page report is used to generate a mobile report, which can overcome the defect of the prior art that the page size and / or zoom level cannot be controlled, thereby achieving the technical effect of fully displaying each report.
[0080] Optionally, determine the storage format of the component, including:
[0081] When the type of the component is a table, storing the component in a text file format; and / or,
[0082] When the type of the component is a graphic, storing the component in a format of an image file; and / or,
[0083] When the type of the component is title or text, the component is stored in the format of a text or image file.
[0084] When the component type is a graphic, the graphics that need to be considered include, for example, but not limited to: column charts, bar charts, scatter charts, bubble charts, and line charts. Each type of graphic can be divided into many types. For example, bar charts can be divided into 3D bar charts, gradient bar charts, stacked bar charts, etc. In the system that actually generates mobile reports, it is impossible to save the templates of each type of graphic in the system that generates mobile reports. Even if it is assumed that the templates of each type of graphic are saved in the system that generates mobile reports, when the graphic component is regenerated, the format of the generated component will not be exactly the same as the original format. Therefore, all the graphics in the graphic component can be saved as screenshots, so that no matter what graphics are used when generating mobile reports, they will not be affected by the generation of reports. Among them, the formats of image files include but are not limited to: bmp, jpg, png, tiff, gif.
[0085] In some embodiments, the table is large and / or the data in the table is large. Storing the table component in the form of a screenshot may result in the table not being fully displayed on the same page. In particular, when there is a scroll bar in the table, the table transfer should not be stored in the form of a screenshot. This embodiment stores the table in the format of a text file, thereby achieving the technical effect of saving the memory occupied by the table component, facilitating the call, and avoiding the incomplete display caused by the screenshot of the table, and can be applied to various tables of inconsistent sizes. Optionally, the storage format of the table can also be in the form of a spreadsheet or the like. Optionally, when the table is small or can be displayed on one page, it is also possible to choose to store the table component in the form of a screenshot.
[0086] When the format of the component is a title or text, the system generating the mobile report needs to judge the status of the component. Specifically, when the format of the title or text is a regular text format and there is no special or difficult to obtain format, the title component or text component is stored in the form of a text file; when the format of the title component or text component is a special format, resulting in a large difference between the storage in the form of a text file and the report web page, the report is stored in the form of a screenshot.
[0087] Optionally, generate a mobile report including:
[0088] The table component is introduced into the mobile report in the format of a text file;
[0089] and / or, the graphic component is introduced into the mobile report in the format of an image file;
[0090] And / or, the title component or the text component is introduced into the mobile report in the format of a text or image file.
[0091] Since each component is stored in a text file and / or in a picture file, when generating a mobile report, generating the mobile report in a storage format can achieve the beneficial effect of protecting the original format of the component and simplifying the mobile report code. Specifically, since the storage format of the table file can be a text file, when introducing the table component, the table component can be introduced in the format of a text file. Similarly, the graphic component can be introduced into the mobile report in the format of a picture file; and / or, the title component or the text component can be introduced into the mobile report in the format of a text or picture file.
[0092] Optionally, it also includes:
[0093] According to the report webpage, obtain the information of the components on the report webpage;
[0094] The information of the components on the report web page includes: the order of obtaining the component information, the type of the component, the unique identifier of the component, the width of the component, and the height of the component.
[0095] Specifically, in the code of the report web page, each component is placed on a level (DIVision, abbreviated as DIV), and these components include, for example: title, text, table, various graphics (such as curve charts, bubble charts, bar charts, pie charts, radar charts, etc.). The information of the placed component will be marked on each DIV, including the type of component, the size of the component, the color of the component, etc. The component information can be obtained by traversing the DIV of each component on the report web page. Information such as the type of component, the size of the component, and the color of the component is the information of the component on the report web page. Use the information of these components to re-set the components on the mobile report so that the display effect of the components on the mobile report is closer to the component effect on the report web page.
[0096] Specifically, by utilizing the order of obtaining component information, the components are arranged according to the component order on the report web page when generating a mobile report, so that the component arrangement order of the mobile report and the report web page is consistent, thereby achieving the beneficial effect of improving the similarity between the mobile report and the report web page; by utilizing the type of the component, the type of component saved can be directly determined, thereby achieving the beneficial effect of storing each component according to the type of the component; by utilizing the unique identifier of the component, each component has unique identification information, thereby facilitating the positioning of the component in the generated mobile report; by determining the width and height of the component, the size of the component can be limited when generating a mobile report, so that the component size displayed in the mobile report is the same as that displayed in the report web page, thereby achieving the beneficial effect of improving the similarity between the generated mobile report and the report web page.
[0097] For example, for a graphic component, the width and height of the component are necessary conditions for measuring the size of the component. If the width and height of each component are not obtained and each component is set to a uniform size, it may cause the larger component to be unable to clearly display all data within the specified size, and it may also cause the original component to be deformed due to size restrictions.
[0098] Obtaining the type of component is also an important step in obtaining report information, because the report extracted from the report webpage needs to determine the storage format based on the report type. For example, when the type of the component is a table, it can be determined that the storage format of the component is a text file.
[0099] Obtaining the order of components and their unique identifiers helps to arrange the order when introducing components and forming mobile reports, so that the order of components in the mobile report is consistent with the order of components in the report web page.
[0100] The above-mentioned component information can achieve the effect of displaying the generated mobile report almost the same as that of the report web page. Optionally, when there are other requirements for the presentation of the report, the generation of the mobile report can be further controlled by obtaining other component information. Optionally, other component information can be added / reduced according to requirements, such as: component color, component memory size.
[0101] Optionally, according to the report webpage, before obtaining the information of the components on the report webpage, the following steps are included:
[0102] According to the unique identifier of the report, open the report web page in the background.
[0103] Opening the report webpage in the background can easily obtain the information of the components on the report webpage, and because the information of each component is stored in one level (DIV), opening the report webpage in the background can easily obtain the information for generating mobile reports, thereby achieving the beneficial effect of obtaining component information without opening the report webpage foreground.
[0104] Optionally, before obtaining the information of the components on the report webpage according to the report webpage, the method further includes:
[0105] On the system generating mobile reports, install navigation script processing and testing plugins for obtaining information about components on the report web pages, and / or define environment variables.
[0106] Installing the open source navigation script processing and testing plug-in (CasperJS plug-in for short) can dynamically obtain the information of components on the web page report. Specifically, when the component is a table with a scroll wheel, the plug-in can convert the static page into a dynamic page, making it easier to obtain the component information, thus overcoming the technical defect of the prior art of processing long table components with scroll wheels, which is cumbersome.
[0107] Defining environment variables refers to defining objects with specific names used in the process of generating mobile reports, for example, setting some parameters and paths that can be used. By setting environment variables, it is convenient to obtain and use component information when generating mobile reports. Specifically, in some embodiments, it is necessary to obtain the color of the component, so the environment variable "color" is defined. The environment variable "color" can be used to obtain the color of the component and to set the color of the corresponding component when generating mobile reports.
[0108] Optionally, the language used to generate the mobile report is Hypertext Markup Language.
[0109] The Hypertext Markup Language (HTML for short) is an open-source, extensible, and widely used universal language. HTML can be used to write emails, various mobile phone software push notifications, WeChat applets, etc. Using HTML to generate mobile reports can not only solve the defects of some existing technologies that use non-open-source resource libraries to generate mobile reports, such as high development difficulty, incomplete data display, and difficulty in controlling page size, but also achieve the beneficial effect that mobile reports can be applied to various terminals and are convenient for users to view anytime and anywhere.
[0110] The method is described in detail below with reference to a specific embodiment.
[0111] When a user subscribes to a report webpage's email mobile report, the system that generates the mobile report can obtain the ID of the report webpage that the user subscribes to. Based on the ID of the report webpage, the CasperJS plug-in that calls the component information in the background is used. Figure 2 As shown in the screenshot of the web page report, the report web page contains a title, an icon, and a table. After opening the web page in the background, in the process of obtaining the information of the web page report, the order information, type information, unique identification information, width information, height information, etc. of each component can be obtained in the type="hidden" on the DIV of each component.
[0112] Secondly, determine the storage method of each report in the report webpage. Figure 2 As shown in FIG. 3 , the format of the title component is a conventional text format, and there is no special format that is not easy to obtain. Therefore, the title component is stored in the form of a text file (.txt). The resulting file save screenshot of the title component is shown in FIG. 3 (a). After determining the storage format of the title component, the title component is saved in the background as a text file. As shown in FIG. 3 (b), it is a screenshot of the content in the title component file.
[0113] The report webpage also includes a graphic component. The system can take a screenshot of the graphic component without judging the graphic component and save it in a picture file. This specific embodiment uses .jpg format for storage. As shown in Figure 3(c), it is a screenshot of the file saving of the graphic component in this embodiment. Specifically, Figure 3(d) is a screenshot of the content in the graphic component file. Similarly, the report webpage also includes a table component. The system saves the table component in a text file (.txt). The file saving screenshot of the table component is shown in Figure 3(e).
[0114] Then, according to the information of the stored components and the obtained components, the stored components are introduced to form a complete HTML code, as shown in Figure 4(a). Specifically, the code snippet of the title introducing HTML is shown in Figure 4(b); the code snippet of the picture introducing HTML is shown in Figure 4(c); the code snippet of the table introducing HTML is shown in Figure 4(d).
[0115] In summary, in this specific embodiment, the main flow chart for generating HTML emails is as follows: Figure 5 The screenshot of the report email effect implemented according to the specific embodiment of the present invention is as follows Figure 6 shown.
[0116] Figure 7 is a schematic diagram of main modules of an apparatus for generating a mobile report according to an embodiment of the present invention;
[0117] like Figure 7 As shown, a device 700 for generating a mobile report according to an embodiment of the present invention includes:
[0118] The component storage format determination module 701 is used to determine the storage format of the component according to the component information on the report web page;
[0119] The component storage module 702 is used to store the component in the storage format according to the storage format of the component;
[0120] The mobile report generation module 703 is used to generate a mobile report according to the stored components and the information of the components on the report webpage.
[0121] Optionally, determine the storage format of the component, including:
[0122] When the type of the component is a table, storing the component in a text file format; and / or,
[0123] When the type of the component is a graphic, storing the component in a format of an image file; and / or,
[0124] When the type of the component is title or text, the component is stored in the format of a text or image file.
[0125] Optionally, generate a mobile report including:
[0126] The table component is introduced into the mobile report in the format of a text file;
[0127] and / or, the graphic component is introduced into the mobile report in the format of an image file;
[0128] And / or, the title component or the text component is introduced into the mobile report in the format of a text or image file.
[0129] Optionally, it also includes:
[0130] According to the report webpage, obtain the information of the components on the report webpage;
[0131] The information of the components on the report web page includes: the order of obtaining the component information, the type of the component, the unique identifier of the component, the width of the component, and the height of the component.
[0132] Optionally, according to the report webpage, before obtaining the information of the components on the report webpage, the following steps are included:
[0133] According to the unique identifier of the report, open the report web page in the background.
[0134] Optionally, before obtaining the information of the components on the report webpage according to the report webpage, the method further includes:
[0135] On the system generating mobile reports, install navigation script processing and testing plugins for obtaining information about components on the report web pages, and / or define environment variables.
[0136] Optionally, the language used to generate the mobile report is Hypertext Markup Language.
[0137] Figure 8 An exemplary system architecture 800 is shown to which the method for generating a mobile report or the device for generating a mobile report according to the embodiment of the present invention can be applied.
[0138] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0139] Users can use terminal devices 801, 802, and 803 to interact with server 805 through network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0140] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0141] The server 805 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 801, 802, and 803. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0142] It should be noted that the method for generating a mobile report provided in the embodiment of the present invention is generally executed by the server 805 , and accordingly, the device for generating a mobile report is generally disposed in the server 805 .
[0143] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0144] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0145] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0146] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.
[0147] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.
[0148] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0149] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a 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 a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession 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 block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0150] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes a module, an acquisition module, a determination module, and a first processing module. The names of these modules do not, in some cases, constitute a limitation on the unit itself. For example, the sending module may also be described as a "unit that sends a picture acquisition request to the connected server."
[0151] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0152] Determine the storage format of the component based on the component information on the report web page;
[0153] According to the storage format of the component, storing the component in the storage format;
[0154] Generate mobile reports based on information about stored components and components on the report web page.
[0155] According to the technical solution of the embodiment of the present invention, the following beneficial effects are achieved:
[0156] 1. Because the storage format of the components is determined and the components are stored separately according to the determined storage format, the technical defects of some existing mobile reports that do not support the display of graphics, and / or the generated graphics are very different from the graphics in the report system, and / or the tables with scroll bars in the mobile reports cannot be fully displayed are overcome, thereby achieving the technical effect of accurately extracting the information of the components in the web report and making the mobile report as diverse as the reports viewed on the report web page.
[0157] 2. Because the technical means of opening the report webpage in the background and saving the components separately is adopted, the technical problem that some existing technologies do not support the generation of mobile reports for complex reports that require page jumps is overcome, thereby achieving the technical effect of being able to completely convert complex reports into mobile reports.
[0158] 3. Because the technical means of obtaining the information of the components on the report web page is adopted, when generating a mobile report, the mobile report can be set according to the information of the components on the report web page, thereby overcoming the technical problem that some existing technologies require preset generation of mobile report templates, resulting in a large gap between the generated mobile report and the report web page, thereby achieving the technical effect that the generated mobile report is highly similar to the report web page and the generated mobile report is more flexible.
[0159] 4. Because the technical means of generating mobile reports using Hypertext Markup Language is adopted, the technical problems of some existing technologies that use third-party non-open source resource libraries to generate mobile reports, resulting in high development difficulty and long development cycle when processing graphic components in reports, are overcome, thereby achieving the technical effect of being able to view reports on multiple terminals anytime and anywhere without logging into the reporting system.
[0160] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for generating a mobile report, It is characterized in that include: According to the report webpage, obtain the information of the components on the report webpage; The information of the components on the report webpage includes: the order of obtaining component information, the type of the component, the unique identifier of the component, the width of the component, and the height of the component; each component has unique identification information; the components are arranged according to the order of the components on the report webpage when generating a mobile report; the size of the components is limited according to the width and height of the components when generating a mobile report; the storage format of the components is determined according to the information of the components on the report webpage; According to the storage format of the component, the component is stored in the storage format; the storage is additional storage; Generate mobile reports in a storage format based on information of stored components and components on the report web page; Wherein, determining the storage format of the component includes: when the type of the component is a table, storing the component in the format of a text file; and / or, when the type of the component is a graphic, storing the component in the format of a picture file; and / or, when the type of the component is a title or text, storing the component in the format of a text or picture file; Generate a mobile report, including: introducing a table component into the mobile report in the format of a text file; and / or introducing a graphic component into the mobile report in the format of an image file; and / or introducing a title component or a text component into the mobile report in the format of a text or image file.
2. The method according to claim 1, It is characterized in that According to the report web page, before obtaining the information of the components on the report web page, include: According to the unique identifier of the report, open the report web page in the background.
3. The method according to claim 2, It is characterized in that According to the report web page, before obtaining the information of the components on the report web page, it also includes: On the system generating mobile reports, install navigation script processing and testing plugins for obtaining information about components on the report web pages, and / or define environment variables.
4. The method according to any one of claims 1 to 3, It is characterized in that The language used to generate mobile reports is Hypertext Markup Language.
5. A device for generating a mobile report, It is characterized in that include: A component storage format determination module is used to determine the storage format of a component based on the component information on the report web page; A component storage module, used for storing the component in the storage format according to the storage format of the component; The storage is additional storage; A mobile report generation module is used to generate a mobile report in a storage format according to information of the stored components and components on the report web page; Wherein, determining the storage format of the component includes: when the type of the component is a table, storing the component in the format of a text file; and / or, when the type of the component is a graphic, storing the component in the format of a picture file; and / or, when the type of the component is a title or text, storing the component in the format of a text or picture file; Generating a mobile report, including: introducing a table component into the mobile report in a text file format; and / or introducing a graphic component into the mobile report in a picture file format; and / or introducing a title component or a text component into the mobile report in a text or picture file format; The device is also used to obtain information about components on the report webpage based on the report webpage; the information about components on the report webpage includes: the order of obtaining component information, the type of component, the unique identifier of the component, the width of the component, and the height of the component; each component has unique identification information; when generating a mobile report, the components are arranged according to the order of the components on the report webpage; when generating a mobile report, the size of the component is limited according to the width and height of the component.
6. The device according to claim 5, It is characterized in that According to the report web page, before obtaining the information of the components on the report web page, include: According to the unique identifier of the report, open the report web page in the background.
7. The device according to claim 6, It is characterized in that According to the report web page, before obtaining the information of the components on the report web page, it also includes: On the system generating mobile reports, install navigation script processing and testing plugins for obtaining information about components on the report web pages, and / or define environment variables.
8. The device according to any one of claims 5 to 7, It is characterized in that The language used to generate mobile reports is Hypertext Markup Language.
9. An electronic device for generating a mobile report, It is characterized in that include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
10. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
