CN117640736A - Report pushing method, report pushing device, computer equipment and storage medium - Google Patents

Report pushing method, report pushing device, computer equipment and storage medium Download PDF

Info

Publication number
CN117640736A
CN117640736A CN202210988877.0A CN202210988877A CN117640736A CN 117640736 A CN117640736 A CN 117640736A CN 202210988877 A CN202210988877 A CN 202210988877A CN 117640736 A CN117640736 A CN 117640736A
Authority
CN
China
Prior art keywords
report
pushing
pushed
target
mail
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210988877.0A
Other languages
Chinese (zh)
Inventor
张云
许国彪
孙冬冬
陈岩
陈辉
宫娟
梁伟亮
肖宇
叶志明
陈继远
武卉
陈新江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SF Technology Co Ltd
Original Assignee
SF Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SF Technology Co Ltd filed Critical SF Technology Co Ltd
Priority to CN202210988877.0A priority Critical patent/CN117640736A/en
Publication of CN117640736A publication Critical patent/CN117640736A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a report pushing method, a report pushing device, computer equipment and a storage medium, wherein a target report pushing task which needs to be executed currently is acquired, and the target report pushing task corresponds to a target report pushing object; acquiring report real-time information corresponding to the target report pushing task; generating a report to be pushed based on the report real-time information and a preset report template; generating a report mail to be pushed according to the report to be pushed; the report mail to be pushed is pushed to the target report pushing object, the problem that the report is difficult to share mail is solved, the target report pushing object can receive the report to be pushed in real time without a browser, and timeliness and convenience in checking the report by a user are improved.

Description

Report pushing method, report pushing device, computer equipment and storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a report pushing method, a report pushing device, a computer device, and a storage medium.
Background
The report is file information with timeliness. The existing report viewing mode is usually to view in a web-based data analysis and visualization platform, namely, a user must log in the report platform to search a target report, on one hand, the operation is complicated, the web report can only be viewed on a browser, and certain limitations exist, on the other hand, in an actual application scene, the user is difficult to ensure that the user can view the report at proper time, such as an early report, a late report, a weekly report, a monthly report and the like, and the timeliness and convenience of viewing the report by the user are reduced.
Disclosure of Invention
The embodiment of the application provides a report pushing method, a report pushing device, computer equipment and a storage medium, which are used for solving the technical problem that in the prior art, a user needs to log in a browser to process a report, and report checking is complicated.
In one aspect, the present application provides a report pushing method, where the report pushing method includes:
acquiring a target report pushing task which is required to be executed currently, wherein the target report pushing task corresponds to a target report pushing object;
acquiring report real-time information corresponding to the target report pushing task, wherein the report real-time information comprises a report name, a report theme and a report type;
generating a report to be pushed based on the report real-time information and a preset report template;
generating a report mail to be pushed according to the report to be pushed;
and pushing the report mail to be pushed to the target report pushing object.
In some embodiments of the present application, the report real-time information is associated with an accessible report network address in advance, and the generating a report to be pushed based on the report real-time information and a preset report template includes:
accessing a report network address corresponding to the report real-time information to locate a webpage text of the report real-time information;
And rendering the preset report template according to the webpage text to generate the report to be pushed.
In some embodiments of the present application, the generating a report mail to be pushed according to the report to be pushed includes:
converting the report to be pushed into a file in a portable document format through a preset mode of a preset browser, wherein the preset mode is a headless mode;
determining the mail content and mail attachment of the report mail to be pushed according to the portable document format file;
and generating the report mail to be pushed according to the mail content and the mail attachment.
In some embodiments of the present application, the converting the report to be pushed into a portable document format file through a preset mode of a preset browser includes:
acquiring a file template with a portable document format for loading report picture formats;
starting a screenshot tool in the browser in the headless mode to screenshot the report to be pushed to obtain a report picture;
and inserting the report picture into the portable document format file template to generate the portable document format file.
In some embodiments of the present application, the obtaining a target report pushing task that needs to be executed currently, where the target report pushing task corresponds to a target report pushing object includes:
The method comprises the steps of polling a to-be-pushed task in a preset mail pushing task queue, and determining a target report pushing task to be executed currently, wherein the mail pushing task queue comprises a plurality of to-be-pushed report tasks marked with pushing time and pushing objects, and the target report pushing task marked with target pushing objects and target pushing time of the target report pushing task.
In some embodiments of the present application, the pushing the report mail to be pushed to the target report pushing object includes:
and if the current time is detected to be consistent with the pushing time, calling a mail sending interface to send the report mail to a mailbox account corresponding to the target pushing object.
In some embodiments of the present application, the pushing the report mail to be pushed to the target report pushing object includes:
extracting a first network address of the report to be pushed;
splicing the identification of the target push object with the first network address to obtain a second network address, wherein the identification of each target push object is associated with report viewing authority;
determining an updated report to be pushed according to the second network address, wherein the updated report to be pushed comprises hidden contents which are displayed in a hidden manner and do not have report viewing authority;
Generating a report mail to be pushed according to the updated report to be pushed;
and pushing the report mail to be pushed to the target report pushing object according to the target pushing time.
On the other hand, the application provides a report pushing device, the report pushing device includes:
the first acquisition module is used for acquiring a target report pushing task which needs to be executed currently, wherein the target report pushing task corresponds to a target report pushing object;
the second acquisition module is used for acquiring report real-time information corresponding to the target report pushing task, wherein the report real-time information comprises a report name, a report theme and a report type;
the first generation module is used for generating a report to be pushed based on the report real-time information and a preset report template;
the second generation module is used for generating a report mail to be pushed according to the report to be pushed;
and the pushing module is used for pushing the report mail to be pushed to the target report pushing object.
In some embodiments of the present application, the report real-time information is pre-associated with an accessible report network address, and the first generating module is specifically configured to:
accessing a report network address corresponding to the report real-time information, and positioning a webpage text of the report real-time information;
And rendering the preset report template according to the webpage text to generate the report to be pushed.
In some embodiments of the present application, the second generating module is specifically configured to:
converting the report to be pushed into a file in a portable document format through a preset mode of a preset browser, wherein the preset mode is a headless mode;
determining the mail content and mail attachment of the report mail to be pushed according to the portable document format file;
and generating the report mail to be pushed according to the mail content and the mail attachment.
In some embodiments of the present application, the second generating module is specifically further configured to:
acquiring a file template with a portable document format for loading report picture formats;
starting a screenshot tool in the browser in the headless mode to screenshot the report to be pushed to obtain a report picture;
and inserting the report picture into the portable document format file template to generate the portable document format file.
In some embodiments of the present application, the first obtaining module is specifically configured to:
polling a mail pushing task queue, and determining a target report pushing task to be executed currently, wherein the mail pushing task queue comprises a plurality of report tasks to be pushed, wherein the report tasks to be pushed are marked with pushing time and pushing objects;
And determining the target pushing object and pushing time according to the target report pushing task.
In some embodiments of the present application, the pushing module is specifically configured to:
and if the current time is detected to be consistent with the pushing time, calling a mail sending interface to send the report mail to a mailbox account corresponding to the target pushing object.
In some embodiments of the present application, the pushing module is specifically further configured to:
extracting a first network address of the report to be pushed;
splicing the identification of the target push object with the first network address to obtain a second network address, wherein the identification of each target push object is associated with report viewing authority;
determining an updated report to be pushed according to the second network address, wherein the updated report to be pushed comprises hidden contents which are displayed in a hidden manner and do not have report viewing authority;
generating a report mail to be pushed according to the updated report to be pushed;
and pushing the report mail to be pushed to the target report pushing object according to the target pushing time.
In another aspect, the present application also provides a computer device, including:
One or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the report pushing method of any of the first aspects.
In a fourth aspect, the present application further provides a computer readable storage medium having stored thereon a computer program to be loaded by a processor for performing the steps of the report pushing method according to any of the first aspects.
The method comprises the steps that a target report pushing task which is required to be executed currently is obtained, and the target report pushing task corresponds to a target report pushing object; acquiring report real-time information corresponding to the target report pushing task; generating a report to be pushed based on the report real-time information and a preset report template; generating a report mail to be pushed according to the report to be pushed; the report mail to be pushed is pushed to the target report pushing object, the problem that the report is difficult to share mail is solved, the target report pushing object can receive the report to be pushed in real time without a browser, and timeliness and convenience in checking the report by a user are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a report pushing device provided in an embodiment of the present application;
FIG. 2 is a flowchart of an embodiment of a report pushing method provided in an embodiment of the present application;
FIG. 3 is a schematic flow chart of one embodiment of step 303 in the embodiments of the present application;
FIG. 4 is a schematic flow chart of one embodiment of step 304 in the embodiments of the present application;
FIG. 5 is a schematic structural diagram of an embodiment of a report pushing device provided in an embodiment of the present application;
FIG. 6 is a schematic diagram of one embodiment of a computer device provided in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
In the description of the present application, it should be understood that the terms "center," "longitudinal," "transverse," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like indicate an orientation or positional relationship based on that shown in the drawings, merely for convenience of description and to simplify the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be configured and operated in a particular orientation, and thus should not be construed as limiting the present application. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In this application, the term "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for purposes of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes have not been shown in detail to avoid obscuring the description of the present application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
It should be noted that, since the method in the embodiment of the present application is executed in a computer device, the processing object of each computer device exists in the form of data or information, for example, time, which is substantially time information, it can be understood that in the subsequent embodiment, if the size, the number, the position, etc. are all corresponding data, so that the electronic device performs processing, which is not described herein in detail.
The embodiment of the application provides a report pushing method, a report pushing device, computer equipment and a storage medium, and the report pushing method, the report pushing device, the computer equipment and the storage medium are respectively described in detail below.
Referring to fig. 1, fig. 1 is a schematic view of a report pushing device provided in an embodiment of the present application, where the report pushing device may include a computer device 100, and the computer device 100 is integrated with the report pushing device, such as the computer device in fig. 1.
The computer device 100 in this embodiment of the present application is mainly configured to obtain a target report pushing task that needs to be executed currently, where the target report pushing task corresponds to a target report pushing object; acquiring report real-time information corresponding to the target report pushing task; generating a report to be pushed based on the report real-time information and a preset report template; generating a report mail to be pushed according to the report to be pushed; and pushing the report mail to be pushed to the target report pushing object, wherein when the computer equipment 100 receives a report pushing task, the high-efficiency pushing of the report is automatically realized, so that the target report pushing object can receive the report to be pushed in real time without a browser, and the timeliness and convenience of viewing the report by a user are improved.
In the embodiment of the present application, the computer device 100 may be an independent server, or may be a server network or a server cluster formed by servers, for example, the computer device 100 described in the embodiment of the present application includes, but is not limited to, a computer, a network host, a single network server, a plurality of network server sets, or a cloud server formed by a plurality of servers. Wherein the Cloud server is composed of a large number of computers or web servers based on Cloud Computing (Cloud Computing).
It is understood that the terminal 100 used in the embodiments of the present application may be a device including both receiving and transmitting hardware, i.e., a device having receiving and transmitting hardware capable of performing bi-directional communication over a bi-directional communication link. Such a device may include: a cellular or other communication device having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. The terminal 100 may be a desktop terminal or a mobile terminal, and the terminal 100 may be one of a mobile phone, a tablet computer, a notebook computer, and the like.
It will be understood by those skilled in the art that the application environment shown in fig. 1 is merely an application scenario of the present application, and is not limited to the application scenario of the present application, and other application environments may further include more or fewer computer devices than those shown in fig. 1, for example, only 1 computer device is shown in fig. 1, and it will be understood that the report pushing apparatus may further include one or more other services, which is not limited herein.
In addition, as shown in fig. 1, the report pushing device may further include a memory 200, for storing data, such as storing report data, for example, various data of a report in a business system, such as report information of various periods that different users need to view, specifically, quarter report data, month report data, week report data, and so on.
It should be noted that, the schematic view of the report pushing device shown in fig. 1 is only an example, and the report pushing device and the scene described in the embodiments of the present application are for more clearly describing the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application, and as one of ordinary skill in the art can know, along with the evolution of the report pushing device and the appearance of a new service scenario, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
Firstly, in the embodiment of the present application, a report pushing method is provided, an execution subject of the report pushing method is a report pushing device, the report pushing device is applied to a computer device, and the report pushing method includes: acquiring a target report pushing task which is required to be executed currently, wherein the target report pushing task corresponds to a target report pushing object; acquiring report real-time information corresponding to the target report pushing task; generating a report to be pushed based on the report real-time information and a preset report template; generating a report mail to be pushed according to the report to be pushed; and pushing the report mail to be pushed to the target report pushing object.
As shown in fig. 2, which is a schematic flow chart of an embodiment of a report pushing method in the embodiment of the present application, the report pushing method may include the following steps 301 to 305, which are specifically as follows:
301. and acquiring a target report pushing task which is required to be executed currently, wherein the target report pushing task corresponds to a target report pushing object.
The target report pushing task is a task triggered by the computer equipment at the current moment and used for pushing a report, and the target report pushing task is identified with a target report pushing object, and the target report pushing object is a user for receiving the report. For example, for a push task of a report of a financial class, its corresponding target report push object may be a financial person. Specifically, the computer device can acquire a target report pushing task which needs to be executed currently, and the target report pushing task corresponds to a target report pushing object, so that a report is automatically pushed to the target report pushing object in the follow-up process.
302. And acquiring report real-time information corresponding to the target report pushing task, wherein the report real-time information comprises report names, report topics and report types.
The report real-time information comprises report names, report topics and report types, wherein the report types refer to reports of different time periods, such as annual reports, monthly reports, weekly reports and the like.
The target report pushing task carries report query conditions, including data table identifiers and report type identifiers, the report real-time information is report content updated in real time based on the report query conditions, in this embodiment, the report real-time information of the report system can be imported into a big data platform by adopting a timing ETL task, and different report real-time information stores are respectively stored in the data tables with different identifiers, so that the report real-time information is updated in a timing manner, for daily reports, the report real-time information can be updated in a daily fixed time, for weekly reports, the report real-time information can be updated in a weekly fixed time, and for monthly reports, the report real-time information can be updated in a monthly fixed time, so that the computer equipment can acquire the report content updated in real time from the big data platform in communication connection with the report real-time information, thereby guaranteeing timeliness of the report to be pushed later.
Specifically, according to the data table identifier in the report query condition, positioning the report real-time information from the large data platform to the target data table, and according to the time period in the report type identifier, extracting the report real-time information from the target data table.
303. And generating a report to be pushed based on the report real-time information and a preset report template.
The report to be pushed refers to a report needing to be pushed. The preset report template is a pre-configured report template, and is used for realizing a report display effect, wherein the report template comprises report elements, layout of the report elements, patterns of the report elements and the like, for example, the report template comprises layout of elements such as filters, charts, pictures and the like in a report in an instrument panel, and characters, sizes and colors in the elements, patterns, legends, marks, prompt windows and the like in the charts. For different business types, different reporting templates can be set, for example, for business statistics in a logistics platform, a corresponding reporting template can be set as an instrument panel, and for financial analysis, a corresponding reporting template can be set as an ECharts table.
Specifically, the report template is rendered according to the report real-time information, the report to be pushed is generated, the report to be pushed can be realized through some web automatic testing tools in an automatic testing framework, such as a selenium tool, specifically, the report real-time information can be input into the selenium tool, the report template to be pushed is rendered, and the report to be pushed is generated.
In a specific embodiment, as shown in fig. 3, in step 303, the report real-time information is pre-associated with an accessible report network address, and the generating a report to be pushed based on the report real-time information and a preset report template may include the following steps 401 to 402, which are specifically as follows:
401. accessing a report network address corresponding to the report real-time information to locate a webpage text of the report real-time information;
402. and rendering the preset report template according to the webpage text to generate the report to be pushed.
The report network address refers to a network address of report real-time information, and may be, for example, URL (uniform resource locator, uniform resource location system), so as to improve the processing efficiency of the report real-time information. The web page text refers to web page content which is obtained after accessing the report network address and is used for reflecting the report real-time information, and the web page content can be explanatory text, graphics, animation, sound, tables, links and the like.
Specifically, the preset report template is rendered according to the webpage text, so that the report real-time information is filled into the preset report template, and the report to be pushed is generated. It can be appreciated that in this embodiment, the selenium tool may be used to render the preset report template to generate the report to be pushed, which avoids the complexity of obtaining the report to be pushed through the browser, improves the obtaining efficiency of the report to be pushed, and is beneficial to improving the pushing efficiency of the subsequent report.
304. And generating a report mail to be pushed according to the report to be pushed.
The report mail to be pushed refers to a mail containing report information to be pushed, namely a report to be pushed in a mail format, so that the report to be pushed in a mail form can be pushed later.
The preset browser can be a Chrome browser or a Firefox browser, the preset browser comprises a headless mode and a headless mode, the preset browser is a lightweight browser without an identifiable graphical interface, the headless mode of the preset browser refers to a mode which can be operated under the condition of the graphical interface, and the headless browser can be controlled to automatically execute a webpage screen capturing task through programming. Specifically, the report to be pushed can be converted into the report mail to be pushed by rendering the report to be pushed. For the report to be pushed in the form of the dashboard, after the screen capturing task of the webpage in the headless mode is executed, the dashboard rendering is carried out, and the mail of the report to be pushed is generated according to the rendered dashboard. It can be appreciated that in this embodiment, by converting the report to be pushed into the report mail to be pushed, the user can be automatically reminded to view the report through the computer device, so that the report processing efficiency of the user is improved.
In a specific embodiment, as shown in fig. 4, the generating the report mail to be pushed according to the report to be pushed in step 304 may include the following steps 501 to 503, which are specifically as follows:
501. converting the report to be pushed into a file in a portable document format through a preset mode of a preset browser, wherein the preset mode is a headless mode;
502. determining the mail content and mail attachment of the report mail to be pushed according to the portable document format file;
503. and generating the report mail to be pushed according to the mail content and the mail attachment.
The portable document format file refers to a file in a format suitable for sending report mail to be pushed, and includes, but is not limited to, PDF files, EXCEL files, WORD files, or the like, and is preferred in this embodiment, PDF files are selected, so that the advantage of efficiently creating PDF files by using an ItextPDF tool is improved, and format conversion efficiency of the report to be pushed is improved.
The headless mode of the browser is the headless mode of the browser, namely the browser is operated under the condition that the browser interface is not opened, and can be a Chrome browser or a Firefox browser.
305. And pushing the report mail to be pushed to the target report pushing object.
Specifically, the computer equipment pushes the report mail to be pushed to the target report pushing object, so that the target report pushing object receives the report mail to be pushed, and real-time processing of the report mail to be pushed is realized. The problem that the report is difficult to share by mail is solved, so that a target report pushing object can receive the report to be pushed in real time without a browser, and timeliness and convenience in checking the report by a user are improved.
In a specific embodiment, in step 501, the step of converting the report to be pushed into a file in a portable document format through a preset mode of a preset browser may include the following steps 601 to 603, which are specifically as follows:
601. acquiring a file template with a portable document format for loading report picture formats;
the portable document format file template is a file template for loading report picture format, illustratively a PDF file template. The report picture refers to the screenshot of the report to be pushed.
602. Starting a screenshot tool in the browser in the headless mode to screenshot the report to be pushed to obtain a report picture;
Specifically, the computer equipment starts a headless mode of the browser, and captures a report to be pushed through a screenshot tool in the browser to obtain a report picture.
603. And inserting the report picture into the portable document format file template to generate the portable document format file.
Specifically, after the report picture is determined, the report picture is stored locally, and the report picture is written into a portable document format file template, specifically, the picture position can be pre-configured in the portable document format file template, and the picture is written into the portable document format file template according to the picture position, so that the portable document format file is generated.
In a specific embodiment, in step 301, the obtaining a target report pushing task that needs to be executed currently, where the target report pushing task corresponds to a target report pushing object may include the following step 701, which is specifically as follows:
701. the method comprises the steps of polling a to-be-pushed task in a preset mail pushing task queue, and determining a target report pushing task to be executed currently, wherein the mail pushing task queue comprises a plurality of to-be-pushed report tasks marked with pushing time and pushing objects, and the target report pushing task marked with target pushing objects and target pushing time of the target report pushing task.
The to-be-pushed tasks are timing push tasks stored in the computer equipment in advance, the plurality of timing push tasks are combined into a mail push task queue, namely the mail push tasks comprise a plurality of to-be-pushed tasks to be executed, each mail push task at least comprises push time and a push object, and the target report push task is one to-be-pushed task in the mail push task queue. Specifically, in order to ensure timeliness of report pushing and improve the intelligentization degree of report pushing, the pushing frequency and pushing time of report mail can be flexibly set, for example: the daily report can set the pushing frequency as daily and the pushing time as fixed time; the weekly report can set the pushing frequency to be weekly, and the pushing time is a fixed time from the designated monday to the sunday; the month report may set the push frequency to be monthly with push time being a specified fixed time of N days (N is one of 1-31). After the timing setting is completed, the report receiver needs to be selected to update the report mail configuration. The computer equipment calculates the pushing time of the next report mail according to the timing setting of the user, generates a timing task, and writes the timing task into a report mail task data table to form a mail pushing task queue.
The computer equipment analyzes the target report pushing task and determines a target pushing object and pushing time so as to facilitate real-time and accurate pushing of the report according to the target pushing object and pushing time, so that the real-time of a user for checking the report is improved, and further user experience is improved.
It should be noted that, before polling the mail pushing task queue, a plurality of mail pushing tasks are constructed and combined into a mail pushing task queue, for example, according to the timing setting of the user, the execution time of the mail pushing task is calculated to generate the mail pushing task, then the mail pushing task is stored, that is, the mail pushing task is stored in a data table of a database for persistence data, for example, a data table named as email_task_table in a mysql database, and the security of the data can be ensured by querying and updating the database table through a distributed lock by adopting a plurality of nodes, wherein the mail pushing task which is not executed and has the execution time less than the current time is taken out from the database table and inserted into the redis queue through the timing polling of the schedule task of spring (framework of a service layer). In a specific embodiment, the pushing the report mail to be pushed to the target report pushing object in step 305 may include the following step 801, which is specifically described below:
801. And if the current time is detected to be consistent with the pushing time, calling a mail sending interface to send the report mail to a mailbox account corresponding to the target pushing object.
Each target pushing object is provided with a corresponding mailbox account for checking the pushed report through the mailbox APP. And when the current time is consistent with the pushing time, indicating that the report mail to be pushed needs to be pushed to a mailbox account corresponding to the target pushing object at fixed time.
It should be noted that, in order to improve the reliability of pushing the report mail to be pushed, the mail sending interface is tested to ensure that the report mail to be pushed is not missed and repeated; after the report mail to be pushed is pushed, the next mail pushing time and pushing frequency can be calculated, a new mail pushing task is generated, and the next triggering execution is waited.
It should be further described that, in order to ensure that the target push object receives the report mail to be pushed, after the mail sending interface is called to send the report mail to the mailbox account corresponding to the target push object, the push result is recorded and detected, if the push result is abnormal, the cause of the abnormality is analyzed, if the cause of the abnormality is no network, after the network is repaired, the mail sending interface can be called again to send the report mail to the mailbox account corresponding to the target push object, so that the report pushing efficiency is further improved.
In a specific embodiment, the pushing the report mail to be pushed to the target report pushing object in step 305 may include the following steps 802 to 806, which are specifically as follows:
802. extracting a first network address of the report to be pushed;
803. splicing the identification of the target push object with the first network address to obtain a second network address, wherein the identification of each target push object is associated with report viewing authority;
804. determining an updated report to be pushed according to the second network address, wherein the updated report to be pushed comprises hidden contents which are displayed in a hidden manner and do not have report viewing authority;
805. generating a report mail to be pushed according to the updated report to be pushed;
806. and pushing the report mail to be pushed to the target report pushing object according to the target pushing time.
The first network address may refer to a URL of a report to be pushed, when a target report pushing object is obtained, an identifier of the target report pushing object, that is, an id of the target report pushing object is obtained, the id is spliced with the first network address to obtain a second network address, an updated report to be pushed can be determined by accessing the second network address, information which does not have viewing authority in the updated report to be pushed is displayed in a hidden manner, and then the updated report to be pushed is generated in a manner of steps 501-503 to generate report mail to be pushed, so that report mail to be pushed is obtained, and report pushing efficiency is improved.
In order to better implement the report pushing method in the embodiment of the present application, on the basis of the report pushing method, a report pushing device is further provided in the embodiment of the present application, as shown in fig. 5, where the report pushing device 900 includes:
the first obtaining module 901 is configured to obtain a target report pushing task that needs to be executed currently, where the target report pushing task corresponds to a target report pushing object;
the second obtaining module 902 is configured to obtain report real-time information corresponding to the target report pushing task;
the first generation module 903 is configured to generate a report to be pushed based on the report real-time information and a preset report template;
the second generating module 904 is configured to generate a report mail to be pushed according to the report to be pushed;
and the pushing module 905 is configured to push the report mail to be pushed to the target report pushing object.
In the embodiment of the application, the target report pushing task which needs to be executed currently is acquired, and the target report pushing task corresponds to a target report pushing object; acquiring report real-time information corresponding to the target report pushing task; generating a report to be pushed based on the report real-time information and a preset report template; generating a report mail to be pushed according to the report to be pushed; the report mail to be pushed is pushed to the target report pushing object, the problem that the report is difficult to share mail is solved, the target report pushing object can receive the report to be pushed in real time without a browser, and timeliness and convenience in checking the report by a user are improved.
In some embodiments of the present application, the report real-time information is pre-associated with an accessible report network address, and the first generating module 903 is specifically configured to:
accessing a report network address corresponding to the report real-time information, and positioning a webpage text of the report real-time information;
and rendering the preset report template according to the webpage text to generate the report to be pushed.
In some embodiments of the present application, the second generating module 904 is specifically configured to:
converting the report to be pushed into a file in a portable document format through a preset mode of a preset browser, wherein the preset mode is a headless mode;
determining the mail content and mail attachment of the report mail to be pushed according to the portable document format file;
and generating the report mail to be pushed according to the mail content and the mail attachment.
In some embodiments of the present application, the second generating module 904 is specifically further configured to:
acquiring a file template with a portable document format for loading report picture formats;
starting a screenshot tool in the browser in the headless mode to screenshot the report to be pushed to obtain a report picture;
And inserting the report picture into the portable document format file template to generate the portable document format file.
In some embodiments of the present application, the first obtaining module 901 is specifically configured to:
polling a mail pushing task queue, and determining a target report pushing task to be executed currently, wherein the mail pushing task queue comprises a plurality of report tasks to be pushed, wherein the report tasks to be pushed are marked with pushing time and pushing objects;
and determining the target pushing object and pushing time according to the target report pushing task.
In some embodiments of the present application, the pushing module 905 is specifically configured to:
and if the current time is detected to be consistent with the pushing time, calling a mail sending interface to send the report mail to a mailbox account corresponding to the target pushing object.
In some embodiments of the present application, the pushing module 905 is specifically further configured to:
extracting a first network address of the report to be pushed;
splicing the identification of the target push object with the first network address to obtain a second network address, wherein the identification of each target push object is associated with report viewing authority;
determining an updated report to be pushed according to the second network address, wherein the updated report to be pushed comprises hidden contents which are displayed in a hidden manner and do not have report viewing authority;
Generating a report mail to be pushed according to the updated report to be pushed;
and pushing the report mail to be pushed to the target report pushing object according to the target pushing time.
The embodiment of the application also provides a computer device, which integrates any report pushing device provided by the embodiment of the application, and the computer device comprises:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to perform the steps of the report pushing method described in any of the report pushing method embodiments above by the processor.
The embodiment of the application also provides computer equipment, which integrates any report pushing device provided by the embodiment of the application. As shown in fig. 6, a schematic structural diagram of a computer device according to an embodiment of the present application is shown, specifically:
the computer device may include one or more processors 1001 of a processing core, one or more memories 1002 of a computer readable storage medium, a power supply 1003, and an input unit 1004, among other components. Those skilled in the art will appreciate that the computer device structure shown in FIG. 6 is not limiting of the computer device and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components. Wherein:
The processor 1001 is a control center of the computer device, connects respective portions of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 1002 and calling data stored in the memory 1002, thereby performing overall monitoring of the computer device. Optionally, the processor 1001 may include one or more processing cores; preferably, the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 1001.
The memory 1002 may be used to store software programs and modules, and the processor 1001 executes various functional applications and data processing by executing the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 1002 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.
The computer device also includes a power supply 1003 for powering the various components, preferably, the power supply 1003 is logically connected to the processor 1001 by a power management system, such that charge, discharge, and power consumption management functions are performed by the power management system. The power supply 1003 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The computer device may also include an input unit 1004, which input unit 1004 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 1001 in the computer device loads executable files corresponding to the processes of one or more application programs into the memory 1002 according to the following instructions, and the processor 1001 executes the application programs stored in the memory 1002, so as to implement various functions as follows:
Acquiring a target report pushing task which is required to be executed currently, wherein the target report pushing task corresponds to a target report pushing object;
acquiring report real-time information corresponding to the target report pushing task;
generating a report to be pushed based on the report real-time information and a preset report template;
generating a report mail to be pushed according to the report to be pushed;
and pushing the report mail to be pushed to the target report pushing object.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium, which may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like. On which a computer program is stored, which is loaded by a processor to perform the steps of any of the report pushing methods provided in the embodiments of the present application. For example, the loading of the computer program by the processor may perform the steps of:
Acquiring a target report pushing task which is required to be executed currently, wherein the target report pushing task corresponds to a target report pushing object;
acquiring report real-time information corresponding to the target report pushing task;
generating a report to be pushed based on the report real-time information and a preset report template;
generating a report mail to be pushed according to the report to be pushed;
and pushing the report mail to be pushed to the target report pushing object.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and the portions of one embodiment that are not described in detail in the foregoing embodiments may be referred to in the foregoing detailed description of other embodiments, which are not described herein again.
In the implementation, each unit or structure may be implemented as an independent entity, or may be implemented as the same entity or several entities in any combination, and the implementation of each unit or structure may be referred to the foregoing method embodiments and will not be repeated herein.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
The foregoing describes in detail a report pushing method, device, computer equipment and storage medium provided in the embodiments of the present application, and specific examples are applied to illustrate the principles and embodiments of the present application, where the foregoing description of the embodiments is only used to help understand the method and core idea of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. The report pushing method is characterized by comprising the following steps of:
acquiring a target report pushing task which is required to be executed currently, wherein the target report pushing task corresponds to a target report pushing object;
acquiring report real-time information corresponding to the target report pushing task, wherein the report real-time information comprises a report name, a report theme and a report type;
generating a report to be pushed based on the report real-time information and a preset report template;
generating a report mail to be pushed according to the report to be pushed;
and pushing the report mail to be pushed to the target report pushing object.
2. The report pushing method according to claim 1, wherein the report real-time information is associated with an accessible report network address in advance, and the generating a report to be pushed based on the report real-time information and a preset report template includes:
accessing a report network address corresponding to the report real-time information to locate a webpage text of the report real-time information;
and rendering the preset report template according to the webpage text to generate the report to be pushed.
3. The report pushing method according to claim 2, wherein the generating the report mail to be pushed according to the report to be pushed includes:
Converting the report to be pushed into a file in a portable document format through a preset mode of a preset browser, wherein the preset mode is a headless mode;
determining the mail content and mail attachment of the report mail to be pushed according to the portable document format file;
and generating the report mail to be pushed according to the mail content and the mail attachment.
4. The report pushing method according to claim 3, wherein the converting the report to be pushed into a portable document format file through a preset mode of a preset browser includes:
acquiring a file template with a portable document format for loading report picture formats;
starting a screenshot tool in the browser in the headless mode to screenshot the report to be pushed to obtain a report picture;
and inserting the report picture into the portable document format file template to generate the portable document format file.
5. The report pushing method according to claim 1, wherein the obtaining a target report pushing task that needs to be executed currently, the target report pushing task corresponding to a target report pushing object, includes:
the method comprises the steps of polling a to-be-pushed task in a preset mail pushing task queue, and determining a target report pushing task to be executed currently, wherein the mail pushing task queue comprises a plurality of to-be-pushed report tasks marked with pushing time and pushing objects, and the target report pushing task marked with target pushing objects and target pushing time of the target report pushing task.
6. The report pushing method according to claim 5, wherein the pushing the report mail to be pushed to the target report pushing object includes:
and if the current time is detected to be consistent with the target pushing time, calling a preset mail sending interface to send the report mail to a mailbox account corresponding to the target pushing object.
7. The report pushing method according to claim 5, wherein the pushing the report mail to be pushed to the target report pushing object includes:
extracting a first network address of the report to be pushed;
splicing the identification of the target push object with the first network address to obtain a second network address, wherein the identification of each target push object is associated with report viewing authority;
determining an updated report to be pushed according to the second network address, wherein the updated report to be pushed comprises hidden contents which are displayed in a hidden manner and do not have report viewing authority;
generating a report mail to be pushed according to the updated report to be pushed;
and pushing the report mail to be pushed to the target report pushing object according to the target pushing time.
8. The utility model provides a report pusher which characterized in that, report pusher includes:
the first acquisition module is used for acquiring a target report pushing task which needs to be executed currently, wherein the target report pushing task corresponds to a target report pushing object;
the second acquisition module is used for acquiring report real-time information corresponding to the target report pushing task, wherein the report real-time information comprises a report name, a report theme and a report type;
the first generation module is used for generating a report to be pushed based on the report real-time information and a preset report template;
the second generation module is used for generating a report mail to be pushed according to the report to be pushed;
and the pushing module is used for pushing the report mail to be pushed to the target report pushing object.
9. A computer device, the computer device comprising:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the report pushing method of any of claims 1 to 7.
10. A computer readable storage medium, having stored thereon a computer program, the computer program being loaded by a processor to perform the steps of the report pushing method of any of claims 1 to 7.
CN202210988877.0A 2022-08-17 2022-08-17 Report pushing method, report pushing device, computer equipment and storage medium Pending CN117640736A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210988877.0A CN117640736A (en) 2022-08-17 2022-08-17 Report pushing method, report pushing device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210988877.0A CN117640736A (en) 2022-08-17 2022-08-17 Report pushing method, report pushing device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117640736A true CN117640736A (en) 2024-03-01

Family

ID=90025747

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210988877.0A Pending CN117640736A (en) 2022-08-17 2022-08-17 Report pushing method, report pushing device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117640736A (en)

Similar Documents

Publication Publication Date Title
CN106933722B (en) Webpage application monitoring method, server and system
CA2841815C (en) Method for associating third party content with online document signing
KR101863981B1 (en) Using text messages to interact with spreadsheets
US10650101B2 (en) Context based document analysis
CN111476015A (en) Document processing method and device, electronic equipment and storage medium
CN109582317B (en) Method and apparatus for debugging hosted applications
CN111767229A (en) Performance test method, device and equipment
CN114444478A (en) Voucher visualization method and device, electronic equipment and storage medium
CN109460365A (en) A kind of system performance testing method, apparatus, equipment and storage medium
US9104573B1 (en) Providing relevant diagnostic information using ontology rules
CN111090976B (en) Method and device for generating inspection document based on dynamic data
CN117640736A (en) Report pushing method, report pushing device, computer equipment and storage medium
CN115905397A (en) Visual display method, device, system and medium for business data
CN108959222A (en) List management system writes terminal, controlling terminal, method and medium
CN115130442A (en) Report generation method and device, storage medium and computer equipment
CN114282760A (en) Workflow generation method and device combining dynamic form and dynamic flow
CN115686506A (en) Data display method and device, electronic equipment and storage medium
CN112528184A (en) Sending method and device of rich text mail, computer equipment and storage medium
CN113779117A (en) Data monitoring method and device, storage medium and electronic equipment
CN112328668A (en) Data visualization implementation method, device, equipment and storage medium
CN111026466A (en) File processing method and device, computer readable storage medium and electronic equipment
CN113821202B (en) Method, device and equipment for generating management software file and readable storage medium
CN115904572B (en) Template creation method, calling method, program product, system and device
CN112989770B (en) Form generation method, device and system, electronic equipment and storage medium
CN112291329B (en) Information display method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination