CN113516729A - Chart drawing method and device and computer readable storage medium - Google Patents
Chart drawing method and device and computer readable storage medium Download PDFInfo
- Publication number
- CN113516729A CN113516729A CN202011318303.XA CN202011318303A CN113516729A CN 113516729 A CN113516729 A CN 113516729A CN 202011318303 A CN202011318303 A CN 202011318303A CN 113516729 A CN113516729 A CN 113516729A
- Authority
- CN
- China
- Prior art keywords
- data
- chart
- processed
- service platform
- component
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/206—Drawing of charts or graphs
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application discloses a chart drawing method, a chart drawing device and a computer readable storage medium, wherein the method comprises the following steps: acquiring a chart drawing request submitted by a service platform, analyzing to-be-processed data carried by the chart drawing request to obtain an analysis result, and determining a target plotting diagram component from a plurality of front-end plotting components packaged based on a non-interface browser frame according to the analysis result; and generating chart data corresponding to the data to be processed by using the target drawing component and the analysis result, and sending the chart data to the service platform so that the service platform displays the chart data in a non-webpage mode through the terminal equipment. By the method, the universality and the scene applicability of chart drawing can be improved, and strong dependence on a browser interface can be avoided.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for drawing a chart, and a computer-readable storage medium.
Background
In this big data age today, charts are an indispensable statistical tool for various industries. The chart can visually display the statistical information attributes (timeliness, numerosity and the like), and is a good means for visually and vividly visualizing the object attribute data. Reasonable diagram data can reflect the relation among the data more intuitively, and is clearer and easier to understand than data and text description. The data in the worksheet are converted into the chart to be presented, so that the proportion relation and the change trend among the data can be better known, and reasonable inference and prediction can be made on the research object. Therefore, the drawing of the chart becomes a research hotspot of people.
At present, methods for drawing a diagram can be divided into two major categories, one category is to draw the diagram by using different background languages (such as Java, go, Python, and the like) and combining different diagram libraries (such as a Java diagram library, a go diagram library, a Python diagram library, and the like), and the other category is to draw the diagram by using a front-end drawing component and display the diagram by using a front-end page. The two methods for drawing the chart have certain problems, the former method has higher cost and poorer universality because each background language needs to be independently accessed into a corresponding graphic library, and the latter method needs to rely on the rendering of a browser interface to open the drawn chart only under the support of the browser interface, so that the dependency on the browser interface is stronger and the supported scene is single.
Disclosure of Invention
The embodiment of the application provides a chart drawing method, a chart drawing device and a computer readable storage medium, which can improve the universality and the scene applicability of chart drawing and can be free from strong dependence on a browser interface.
The embodiment of the application discloses a chart drawing method on one hand, and the method comprises the following steps:
acquiring a chart drawing request submitted by a service platform, wherein the chart drawing request carries data to be processed;
obtaining an analysis result by analyzing the data to be processed, and determining a target plotting graph component from a plurality of front-end plotting components based on the package of the non-interface browser frame according to the analysis result;
generating chart data corresponding to the data to be processed by using the eye plot component and the analysis result, and sending the chart data to the service platform, so that the service platform displays the chart data in a non-webpage mode through terminal equipment.
The embodiment of the application discloses a chart drawing method on one hand, and the method comprises the following steps:
submitting a chart drawing request to a server, wherein the chart drawing request carries data to be processed, and the chart drawing request is used for instructing the server to determine a target plotting component from a plurality of front-end plotting components packaged based on a non-interface browser frame according to an analysis result of the data to be processed, and generating chart data corresponding to the data to be processed by using the target plotting component and the analysis result;
receiving the chart data sent by the server;
and sending the chart data to a terminal device so that the terminal device displays the chart data in a non-webpage mode, wherein the non-webpage mode comprises one or more of a mail page, a notification message and a report document.
An aspect of an embodiment of the present application discloses a chart drawing apparatus, including:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a chart drawing request submitted by a service platform, and the chart drawing request carries data to be processed;
the processing unit is used for obtaining an analysis result by analyzing the data to be processed;
a determining unit, configured to determine a target plot component from multiple front-end plot components packaged based on the non-interface browser frame according to the parsing result;
the processing unit is further used for generating chart data corresponding to the data to be processed by utilizing the eye plotting component and the analysis result;
and the sending unit is used for sending the chart data to the service platform so that the service platform displays the chart data in a non-webpage mode through terminal equipment.
An aspect of an embodiment of the present application discloses a chart drawing apparatus, including:
the system comprises a sending unit, a receiving unit and a processing unit, wherein the sending unit is used for submitting a chart drawing request to a server, the chart drawing request carries data to be processed, the chart drawing request is used for indicating the server to determine a target plotting component from a plurality of front end plotting components packaged based on a non-interface browser frame according to an analysis result of the data to be processed, and chart data corresponding to the data to be processed is generated by using the target plotting component and the analysis result;
the receiving unit is used for receiving the chart data sent by the server;
the sending unit is further configured to send the chart data to a terminal device, so that the terminal device displays the chart data in a non-webpage manner, where the non-webpage manner includes one or more of a mail page, a notification message, and a report document.
An embodiment of the present application discloses a server, in one aspect, the server includes a memory and a processor: the memory for storing a computer program; the processor runs the computer program to realize the chart drawing method.
An embodiment of the present application discloses a service platform on one hand, where the service platform includes a memory and a processor: the memory for storing a computer program; the processor runs the computer program to realize the chart drawing method.
In one aspect, an embodiment of the present invention discloses a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the computer program performs the graph drawing method.
An aspect of an embodiment of the present application discloses a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the graph drawing method described above.
In the embodiment of the application, a server acquires a chart drawing request submitted by a service platform, analyzes to-be-processed data carried by the chart drawing request to obtain an analysis result, and determines a target plotting graph component from a plurality of front-end plotting components packaged based on a non-interface browser frame according to the analysis result; and generating chart data corresponding to the data to be processed by using the target drawing component and the analysis result, and sending the chart data to the service platform so that the service platform displays the chart data in a non-webpage mode through the terminal equipment. According to the method, on one hand, the target plotting component is determined from various front-end plotting components packaged based on the non-interface browser frame, the universality and the scene applicability of diagram drawing can be improved, and on the other hand, diagram data can be displayed in a non-webpage mode, so that the strong dependence on a browser interface can be avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a block diagram of a charting system according to an embodiment of the present disclosure;
FIG. 2a is a schematic diagram of a scene of a charting system as disclosed in embodiments of the present application;
FIG. 2b is a schematic diagram of a diagram showing a scene disclosed in an embodiment of the present application;
FIG. 2c is a schematic view of another diagram illustration disclosed in the embodiments of the present application;
FIG. 3 is a schematic flow chart diagram of a charting method disclosed in an embodiment of the present application;
FIG. 4a is a functional schematic diagram of a diagramming component package as disclosed in an embodiment of the present application;
FIG. 4b is a schematic diagram of a hierarchical architecture of a diagramming component enclosure as disclosed in an embodiment of the present application;
FIG. 5 is a schematic flow chart diagram of another charting method disclosed in embodiments of the present application;
FIG. 6 is a schematic flow chart diagram of yet another charting method disclosed in embodiments of the present application;
FIG. 7 is an architectural diagram of a hierarchical charting system as disclosed in embodiments of the present application;
FIG. 8a is a functional diagram of a service layer of a diagramming system as disclosed in an embodiment of the present application;
FIG. 8b is a schematic diagram of a graph data processing disclosed in an embodiment of the present application;
FIG. 9 is a schematic flow chart diagram of yet another charting method disclosed in embodiments of the present application;
FIG. 10 is a schematic diagram of a schematic diagram drawing apparatus according to an embodiment of the present disclosure;
FIG. 11 is a schematic diagram of another diagramming apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a computer device disclosed in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a chart drawing system disclosed in an embodiment of the present application, and as shown in fig. 1, an architecture diagram 100 of the chart drawing system may include a server 101, a service platform 102, and a terminal device 103, where the server 101, the service platform 102, and the terminal device 103 may be in communication connection. The server 101 is mainly configured to process a chart drawing request sent by the service platform 102, and specifically includes: determining a target plotting component from a plurality of front-end plotting components packaged based on a non-interface browser frame according to a chart drawing request, generating corresponding chart data by using the target plotting component and the chart drawing request, and sending the chart data to the service platform 102; the service platform 102 is mainly configured to send a chart drawing request to the server 101 and receive chart data generated by the server 101, and further, the service platform 102 is further configured to send the chart data to the terminal device 103, so that the terminal device 103 displays the chart data in a non-web page manner. The number of the service platforms 102 and the terminal devices 103 may include a plurality, and the number is not particularly limited.
In a possible implementation manner, the service platform 102 sends a chart drawing request to the server 101, where the chart drawing request carries data to be processed (mainly used for drawing a chart); the server 101 analyzes the data to be processed to obtain an analysis result, wherein the analysis of the data to be processed is to determine whether a data format which is the same as that of the data to be processed exists in a data format which is configured in advance by the server 101; the server 101 determines a target drawing component from a plurality of front-end drawing components packaged based on the non-interface browser frame according to the analysis result (in the case that the data format identical to the data to be processed is determined in the pre-configured data formats); and generating chart data corresponding to the data to be processed by using the target drawing component and the analysis result. Further, the server 101 sends the graph data to the service platform 101, the service platform 102 sends the graph data to the terminal device 103, and the terminal device 103 displays the graph data in a non-web manner. According to the method, on one hand, the target plotting graph component is determined from various front-end plotting components packaged based on the non-interface browser frame, the universality and the scene applicability of the graph plotting method can be improved, and on the other hand, the graph data is displayed in a non-webpage mode, so that the strong dependence on the browser interface can be separated.
In a possible implementation manner, specific work of the server 101, the service platform 102, and the terminal device 103 may be divided into two parts with fig. 2a, where one part is background work, and the other part is scene display (front-end display) of a chart, as shown in fig. 2a, the scene schematic diagram of the chart drawing system disclosed in the embodiment of the present application is shown, a process of generating chart data for the server 101 and the service platform 102 may include a data preparation part and a general chart drawing function part, and after the terminal device 103 receives the chart data, an application scene displayed may include a mail notification, a short message notification, a report display, and a timing function display with a chart. When the chart data is displayed in the application scene, the chart can be opened without the assistance of a webpage (a webpage supported by a browser interface). For example, the mail notification is to show the chart data in the form of a picture on a body page of the mail, the short message notification is to show the chart data in the form of a picture on a social page directly by using a social application, and the report presentation is to insert the chart data directly into a document of the work summary. For example, the presentation of the graph data is illustrated, for example, if the graph data is directly presented on a social page in a form of a picture by using a social application, as shown in fig. 2b, the presentation is a scene schematic diagram of the graph presentation disclosed in the embodiment of the present application, and a chat interface of a specific social application is presented, the service platform may present the graph data in a system prompt manner, so that a user sees the graph data as a picture, as shown in 20 in fig. 2 b. As shown in fig. 2c, the diagram is another diagram of a diagram display scenario disclosed in the embodiment of the present application, in which diagram data is displayed on a mail page, and as shown in fig. 2c, the work performance is directly displayed on the mail page, so that when an employee receives a mail, the employee can directly view the mail without any other redundant operations. The timing function with the chart can be applied to the email and the short message notification, and the service platform 102 mainly utilizes a timer and the like to realize the function.
The server 101, the service platform 102 and the terminal device 103 are further explained: the server 101 in this embodiment of the present application may be an independent physical server, a server cluster or a distributed system formed by multiple physical servers, or a cloud server providing cloud computing services, which is not limited herein. In the technical solution provided in the embodiment of the present application, a server is taken as an example to describe the technical solution provided in the embodiment of the present application.
The service platform 102 in this embodiment may also be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud computing services. Meanwhile, the service platform 102 may also be a server corresponding to different terminal devices.
The terminal device 103 in the embodiment of the present application includes, but is not limited to, a user device, a handheld device with a wireless communication function, an in-vehicle device, a wearable device, or a computing device. Illustratively, the terminal device 103 may be a mobile phone (mobile phone), a tablet computer or a computer with wireless transceiving function. The terminal 103 may also be a Virtual Reality (VR) terminal, an Augmented Reality (AR) terminal, a wireless terminal in industrial control, a wireless terminal in unmanned driving, a wireless terminal in telemedicine, a wireless terminal in a smart grid, a wireless terminal in a smart city (smart city), a wireless terminal in a smart home (smart home), and so on. In the embodiment of the present application, the apparatus for implementing the function of the terminal device may be a terminal; it may also be an apparatus, such as a system-on-chip, capable of supporting the terminal device to implement the function, and the apparatus may be installed in the terminal device. In the technical solution provided in the embodiment of the present application, a terminal device is taken as an example to describe the technical solution provided in the embodiment of the present application.
Referring to fig. 3, fig. 3 is a schematic flow chart diagram of a chart drawing method disclosed in an embodiment of the present application, where the flow chart is mainly explained by using a server as an execution subject, and the server may be the server 101 shown in fig. 1, and mainly includes the following steps:
s301, the server obtains a chart drawing request submitted by the service platform, wherein the chart drawing request carries data to be processed.
The server obtains a chart drawing request submitted by the service platform, wherein the chart drawing request is actively sent by the service platform, and the purpose of sending the chart drawing request by the service platform is to want the server to return drawn chart data.
In a possible implementation manner, after the server obtains the graph drawing request, preprocessing data to be processed carried in the graph drawing request, specifically including: and acquiring a flow threshold and authority configuration information of the service platform. The traffic threshold is constraint value information of the data volume in the configuration of the server itself, and may be set globally, that is, the limitation on the number of data sent by all service platforms is the same, or may be set according to a specific service platform, that is, the limitation on the number of data sent by different service platforms is different. The authority configuration information of the service platform is specifically an identifier recorded in the server and used for identifying the service platform. And limiting the current and authenticating the data to be processed according to the flow threshold value and the authority configuration information of the service platform. The specific way of the current limiting treatment is as follows: if the data volume of the to-be-processed data sent by the service platform is greater than the flow threshold, the server may set an interval time to receive the data in a time-sharing manner, because the server may process a plurality of chart drawing requests sent by the service platform at the same time, the current limiting processing is performed on the data, so as to improve the processing efficiency. The specific way of authentication processing is as follows: the server compares the identifier carried by the data to be processed with the acquired authority configuration information of the service platform, detects whether the identifier carried by the data to be processed is consistent with the identifier of the service platform, if so, the data is proved to be safe, and if not, the data is proved to be possibly malicious data, the server is possibly attacked, and the subsequent processing is refused.
In a possible implementation manner, before the server obtains a chart drawing request submitted by the service platform, the server further performs encapsulation of multiple front-end drawing components, which specifically includes: the server acquires a drawing component set, wherein the drawing component set comprises a plurality of front-end drawing components, the drawing components mainly refer to efficient front-end drawing components including highcharts drawing components, echarts drawing components, D3 drawing components and the like, and the drawing components are not listed in the application one by one. Further, the server imports the source codes of the various front-end drawing components into a component configuration file based on the non-interface browser frame so as to package the various front-end drawing components and complete the packaging. In the embodiment of the application, the non-interface browser frame mainly utilizes a puppeteer frame, the puppeteer is a browser controlled by a devtools protocol opened by Google, and interface automation and advanced crawler with or without interfaces (headless) can be performed. The puppeteer is used as an operating environment, the functions of browser rendering and screenshot without an interface are provided, and the whole drawing is operated more efficiently. For more concise use and better extensibility, a function supporting multiple layouts, such as HTML (Hyper Text Markup Language) layout, is packaged based on puppeteer, and a function of component configuration (packaging of multiple front-end drawing components) is also provided, as shown in fig. 4 a. The layout setting mainly includes rendering colors, sizes, backgrounds and the like of a diagram in the background, and the encapsulation of various front-end drawing components mainly aims to improve the universality of drawing, specifically, as shown in fig. 4b, the component configuration may be described in a form of a layered architecture, in this embodiment of the present application, the component configuration may be divided into an interface layer, a business logic layer and a configuration layer, and in some feasible embodiments, the component configuration may also be divided into two layers, that is, the interface layer and the configuration layer. In the embodiment of the present application, a plurality of front-end drawing components are mainly configured in a configuration layer, so as to provide a plurality of optional drawing components for a business logic layer, and enrich the types of drawing, that is, a source code (JavaScript source code) related to the front-end drawing component is imported into a configuration file, a source code of the drawing component 1, a source code of the drawing component 2, and a source code of the drawing component 3 are exemplarily marked in fig. 4b, and the drawing components may be highcharts drawing components, echarts drawing components, D3 drawing components, and the like, and then, the calling of the related drawing components can be realized through three steps of the business logic layer, where the three steps include: firstly, setting data, namely transmitting an analysis result into a target plotting graph component through a target plotting interface; rendering, namely rendering the analysis result through an adaptive eye plot component to quickly provide a drawing function; and thirdly, storing, namely performing screenshot processing on the generated chart data and storing. The interface layer only needs to provide corresponding drawing component interfaces according to the drawing rule configuration information, such as a line drawing interface, a bar chart interface and the like. The multi-drawing component is functionally encapsulated, so that the drawing platform is clear in hierarchy, convenient and quick to access, and can provide various drawing functions for a service platform.
The highcharts is a diagram library written by pure JavaScript, can be added with interactive diagrams on a front-end website or a front-end application program simply and conveniently, and can be freely provided for personal study, personal websites and non-commercial use. The chart styles supported by highhards are graphs, area charts, histograms, pie charts, scatter plots, and comprehensive charts. ECharts (Enterprise Charts, business-level data Charts), a pure Javascript chart library, can be smoothly operated on computers and mobile devices, is compatible with most of current browsers, and the bottom layer relies on a lightweight Canvas class library to provide an intuitive, vivid, interactive and highly personalized customized data visualization chart. The D3(Data Drive Document) drawing component, a JavaScript library similar to jQuery, provides a number of useful methods for visualization of Data.
S302, the server obtains an analysis result by analyzing the data to be processed, and determines a target plotting graph component from a plurality of front-end plotting components based on the encapsulation of the non-interface browser frame according to the analysis result.
In a possible implementation manner, after the server performs the current limiting and authentication processing on the data to be processed, the server analyzes the data to be processed to obtain an analysis result, mainly analyzes the format of the data to be processed to obtain a target data format, and the target data format obtained after the analysis is suitable for the server, so that the server can be further protected. Further, the server acquires a plurality of predefined data formats, wherein the plurality of data formats are data formats supported by the plurality of front-end drawing components, and judges whether the plurality of data formats include a target data format, if the plurality of data formats include the target data format, the server determines a target drawing component from the plurality of front-end drawing components according to an analysis result, and the target drawing component is a drawing component corresponding to the target data format. Among them, the various front-end drawing components are packaged based on the non-interface browser framework, that is, the puppeteer framework described in step S301.
In one possible implementation manner, if it is detected that the target data format is not present in the multiple data formats, the server ends the execution flow and returns the chart data requested by the chart drawing request which cannot be generated to the service platform. Further, the developer optimizes the server according to the task that cannot be completed, so as to realize more functional charting.
And S303, generating diagram data corresponding to the data to be processed by the server by using the target drawing component and the analysis result, and sending the diagram data to the service platform so that the service platform displays the diagram data in a non-webpage mode through the terminal equipment.
In a possible implementation manner, before the server generates the chart data corresponding to the data to be processed by using the target drawing component and the analysis result, it is further required to obtain drawing rule configuration information corresponding to the data to be processed, where the drawing rule configuration information is a style and a chart layout of a chart expected by the service platform. In the implementation of the present application, the drawing rule configuration information obtained by the server may be divided into two categories: one type is acquired from configuration information pre-submitted by a service platform, so-called pre-submitted configuration information is sent to a server in some cases when the service platform and the server are connected for the first time, the service platform sends the configuration information for convenience or in order to unify the pattern of a chart, such as attendance statistical data of some enterprises, if the pattern of each statistical chart is the same, the management is facilitated, and meanwhile, the server does not need to go to the service platform again each time to acquire drawing rule configuration information of the chart, so that the time can be saved to a certain extent, and the generation rate of the chart data can be improved; the other type of the service platform is obtained from the chart drawing request, namely the chart drawing request carries drawing rule configuration information, namely a set of drawing rule configuration information is customized in the chart drawing request every time the service platform sends the chart drawing request, most of the conditions are that the requirements of clients corresponding to the service platform are different, and personalized customization is more prone to be carried out, if an individual wants to customize certain chart data. In any case, the server needs to detect whether drawing rule configuration information exists in the chart drawing request, if so, the rules in the set of drawing rule configuration information are adopted, and if not, the rules of the corresponding drawing rule configuration information in the configuration information pre-submitted by the service platform are adopted. Furthermore, if the configuration information pre-submitted by the service platform does not have the drawing rule configuration information, the server draws by adopting the set rule of the default drawing rule configuration information, and most of the default drawing rule configuration information set by the server is a set of universal rules obtained according to the historical statistical information.
In a possible implementation manner, after obtaining drawing rule configuration information corresponding to data to be processed, a server determines a target drawing interface from multiple drawing interfaces according to the drawing rule configuration information, where the target drawing interface may be more than one, and sometimes, a service platform may want different chart styles for a set of data, where each drawing interface corresponds to one chart style, where the chart styles are various, such as a broken line chart, a bar chart, a ring chart, a pie chart, and the like, and are not listed one by one. Further, the server calls the target plotting component through the target plotting interface to plot the analysis result so as to generate chart data corresponding to the data to be processed, more specifically, the server transmits the analysis result into the target plotting component through the target plotting interface, and then the target plotting component is used for rendering a chart corresponding to the analysis result, wherein the specific rendering chart comprises rendering of the style and layout (including chart color, background color, font size, color and the like) of the chart, and the specific chart style of the chart obtained through rendering is the chart style corresponding to the target plotting interface. And finally, the server performs screenshot processing on the chart to obtain chart data corresponding to the data to be processed, stores the chart data, and generates a plurality of pictures according to the requirement of the chart drawing request. In the implementation of the present application, a Cloud Object Service (cos storage) that is commonly used in the industry and is efficient may be used to store the chart data. The screenshot processing is carried out on the chart, so that the chart data are conveniently sent to the terminal equipment by the service platform, and the terminal equipment can be conveniently displayed in a non-webpage mode. By means of cos storage, chart storage support can be provided for different application scenes (e-mails, messages, reports and the like), various chart display scenes are adapted, and the extensibility is high. The screenshot data includes not only the diagram of the screenshot, but also data information corresponding to some diagrams, such as the screenshot time, the total data size of the diagram, and the like.
In a possible implementation manner, in the process of generating graph data by a server for data to be processed, whether a service platform requires the server to return a process message generated by the graph data is judged, if yes, the server returns a process to the service platform in real time, and if not, the server completes processing of all data to be processed and then returns a result to the service platform.
In a possible implementation manner, the server can also store the generated chart data in the bottom layer (storage layer) of the server, and the storage can provide an effective basis for later verification of the data. It is also possible that in some cases, errors may occur in generating the chart data, and storing the data for each execution step allows the cause of the error to be quickly found.
In one possible implementation, the server may process chart drawing requests from different service platforms at the same time. In the implementation of the present application, according to the test on 15 actual samples (data cycle of 30 days, data is collected every 0.5 days), if 5 bar graphs and line graphs are drawn in series, the average time consumption is 2.7 seconds; if the concurrent processing capacity of the server is increased, the average consumed time is found to be reduced by about 1 second. Therefore, the method provided by the application is suitable for concurrent processing, namely, the chart drawing requests of a plurality of service platforms can be processed simultaneously, and the efficiency is high.
In the embodiment of the application, a server acquires a chart drawing request submitted by a service platform, analyzes to-be-processed data carried by the chart drawing request to obtain an analysis result, and determines a target plotting graph component from a plurality of front-end plotting components packaged based on a non-interface browser frame according to the analysis result; and generating chart data corresponding to the data to be processed by using the target drawing component and the analysis result, and sending the chart data to the service platform so that the service platform displays the chart data in a non-webpage mode through the terminal equipment. According to the method, on one hand, the target plotting component is determined from various front-end plotting components packaged based on the non-interface browser frame, the universality and the scene applicability of diagram drawing can be improved, and on the other hand, diagram data can be displayed in a non-webpage mode, so that the strong dependence on a browser interface can be avoided.
Referring to fig. 5, fig. 5 is a schematic flow chart diagram of another chart drawing method disclosed in the embodiment of the present application, where the flow chart is mainly explained by using a service platform as an execution subject, and the service platform may be the service platform 102 shown in fig. 1, and mainly includes the following steps:
s501, the service platform submits a chart drawing request to the server, and the chart drawing request is used for indicating the server to draw chart data.
In a possible implementation manner, the service platform submits a chart drawing request to the server at regular time, or submits the chart drawing request to the server in real time (i.e., submits the chart drawing request once if necessary), and the chart drawing request may be set by a user, that is, the user submits data and requirements to the server corresponding to the service platform according to the user's own requirements. For example, a statistical table of attendance data of company staff required by a certain enterprise, or a statistical table of various indexes of a person who wants to know the body of the person can be sent to the service platform through a chart drawing request.
The graph drawing request is used for instructing the server to draw the graph data, specifically: the chart drawing request carries data to be processed, and is used for instructing the server to determine a target drawing component from a plurality of front-end drawing components packaged based on a non-interface browser frame according to an analysis result of the data to be processed, and generating the chart data corresponding to the data to be processed by using the target drawing component and the analysis result. The specific generation process has been set forth in detail in fig. 3.
S502, the service platform receives the chart data sent by the server.
In a possible implementation manner, after the server generates the graph data, the graph data is sent to the service platform, and the service platform correspondingly receives the graph data. The graph data is stored in a server of the service platform, the service platform can send the graph data to the terminal device in real time and also can send the graph data to the terminal device when a trigger condition is met, the trigger condition can be a trigger timer function, a scene corresponding to the timer function can be a weekly report, a monthly report and the like, namely, a set time is reached, and the service platform is sent to the terminal device in a mail and message mode, so that users corresponding to different terminal devices can know the recent working condition of the users.
S503, the service platform sends the chart data to the terminal equipment, so that the terminal equipment displays the chart data in a non-webpage mode.
In a possible implementation manner, the service platform may send the graph data to the terminal device, so that the terminal device displays the graph data in a non-web manner, and the terminal device may be a terminal device directly connected to the service platform or a terminal device connected to the service platform in an indirect manner.
In another possible implementation manner, the server may directly send the chart data to the terminal device, so that the terminal device displays the chart data in a non-webpage manner. In this case, when the service platform sends the chart drawing request, the service platform carries the IP address of the corresponding terminal device, so that the server can send the chart data according to the IP address from the terminal device.
The non-web page may include one or more of a mail page, a notification message, and a report document. Namely, when a user opens the mail page, the user can visually see the chart data, and the user does not need to click a link and then jump to a browser page to see the chart data.
In the implementation of the application, the embodiment of the application is explained through the angle of the service platform, the service platform submits the chart drawing request to the server, receives the chart data which is sent by the server and generated according to the chart drawing request, and then sends the chart data to the terminal equipment, so that the terminal equipment displays the chart data in a non-webpage mode.
Referring to fig. 6, fig. 6 is a flowchart of another chart drawing method disclosed in the embodiment of the present application, where the flowchart mainly explains the present application in a manner of interaction between a server, a service platform, and a terminal device, and a related execution subject includes the server, the service platform, and the terminal device (such as the server 101, the service platform 102, and the terminal device 103 shown in fig. 1), and the flowchart of the interaction may include the following steps:
s601, the terminal equipment sends a chart drawing request to the service platform.
S602, the service platform sends a chart drawing request to the server.
And S603, the server receives the chart drawing request, processes the chart drawing request and generates chart data.
S604, the server sends the chart data to the service platform.
S605, the service platform sends the chart data to the terminal equipment.
In a possible implementation manner, for an enterprise, the terminal device that sends the chart drawing request may be a terminal device corresponding to an enterprise administrator, and for an individual, the terminal device that sends the chart drawing request may be any individual terminal device. The chart drawing request can be adjusted differently according to the requirements of the user. Specifically, after receiving the chart drawing request, the service platform forwards the chart drawing request to the server. And the server receives the chart drawing request and processes the chart drawing request to generate chart data corresponding to the data to be processed carried by the chart drawing request. The specific processing steps are shown in fig. 3, and are not further described here. Further, the server sends the chart data to the service platform, and then the server sends the chart data to the terminal equipment according to the corresponding requirements of the terminal equipment.
In the embodiment of the application, the chart drawing method provided by the embodiment of the application is explained in a server, service platform and terminal device interaction mode, so that the processing steps of the server, the service platform and the terminal device can be seen more intuitively, and the universality and scene applicability of the method are embodied through the mode.
Referring to fig. 7, fig. 7 is a schematic diagram of an architecture of a layered graph drawing system disclosed in the embodiment of the present application, and mainly illustrates a server-side layered architecture, as shown in fig. 7, in the implementation of the present application, the graph drawing system may be divided into an application layer, a service layer, and a storage layer, and the logic thereof is from top to bottom, that is, from the application layer to the service layer, and from the service layer to the storage layer:
the application layer is mainly oriented to a service platform and mainly comprises a service calling module and a data input module, wherein the service calling refers to calling of the service platform to the method provided by the server and comprises timing calling, real-time calling and the like, the data input refers to data transmitted by the service platform, and the data input refers to a chart drawing request, configuration information submitted in advance and the like.
The service layer is mainly a core layer of the server for processing the service called by the service platform, and further, in order to provide better expansibility, depending on a single service principle, the service layer can be split into an upper part and a lower part as shown in fig. 7, wherein the upper part can comprise function triggering, data asynchronous sampling, preprocessing, data sorting and data reporting, and the lower part can comprise data receiving, data analyzing, data drawing, screenshot processing and picture storage. Correspondingly, the specific functional division realized by the upper and lower parts can be as shown in fig. 8a, and the upper part of the service layer in fig. 7 realizes a chart data processing function (which can be realized by configuration according to different service requirements), and can provide functions such as data acquisition and data arrangement, so that the external service can be more flexibly and conveniently provided; the lower part of the service layer of fig. 7 implements a render screenshot function with good extensibility to support drawing functions. The function triggering refers to receiving a chart drawing request sent by the service platform, the data asynchronous sampling refers to receiving data from the data sent by the service platform (when the data volume is large), and the preprocessing and the data sorting both perform a preliminary processing on the data, including a current limiting processing, a security processing, and the like, as described in step S302. After the data is sorted, the data is reported to the next layer, i.e. the lower part of the service layer corresponding to fig. 7, and the specific processing is described in detail in fig. 3. The implementation logic of the graph data processing function corresponding to fig. 8a may be illustrated with fig. 8b, that is, the server receives data sent by the service platform through a communication protocol interface (such as interfaces of RPC, HTTP, and the like), performs configuration, authentication, and current limiting processing on the sent data, and meanwhile, the server also performs sorting on front-end drawing components (highcharts data, ECharts, and the like) called through the interface, including sorting and packaging of formats. Further, the service layer shown in fig. 7 further includes a notification platform service module and a cos storage module, where the notification platform service module is configured to send notification information to the service platform, and the cos storage module is configured to store a graph, and can provide graph storage support for different application scenarios (e.g., mail, message, report, etc.), and is adaptive to various graph display scenarios, and strong in extensibility.
In a possible implementation manner, functions implemented by the service layer may be described by using a flowchart shown in fig. 9, where the flowchart shown in fig. 9 is also a core flow of the present application, and the sequence includes: the method comprises the steps of function triggering, business data acquisition, data arrangement, data analysis, judgment of whether a drawing component is supported or not, functional packaging of the drawing component, chart acquisition and storage and judgment of whether a touch notification is needed or not. The method comprises the steps of judging whether a drawing component is supported or not, namely judging whether the drawing component provided by a server is supported or not in the data to be processed, if so, directly calling the function of the packaged front-end drawing component to draw a diagram, and after the diagram is obtained, carrying out screenshot processing to obtain diagram data, and if the data to be processed does not support the drawing component provided by the server, directly finishing the processing flow by the server. And further, judging whether the touch notification is needed or not, namely judging whether the service platform needs the server to return to the chart drawing process or not, if so, sending process information to the server once when the server processes data once, and ending the process information until the end, if the service platform does not require the server to return to the chart drawing process, finishing the process after the server processes all the data to be processed.
The storage layer is mainly used for storing data, and in the embodiment of the present application, the stored database format is a relational database in an mdb (message driver bean) format, which is mainly used for facilitating use of data.
The architecture also comprises a gateway module and a monitoring module, wherein the gateway module is mainly used for establishing communication connection with the service platform, and the monitoring module is mainly used for monitoring each stage of the server and generating log information corresponding to each stage.
Referring to fig. 10, fig. 10 is a schematic structural diagram of a chart drawing apparatus disclosed in an embodiment of the present application, where the chart drawing apparatus 1000 may include: an acquisition unit 1001, a processing unit 1002, a determination unit 1003, and a transmission unit 1004, wherein:
an obtaining unit 1001, configured to obtain a chart drawing request submitted by a service platform, where the chart drawing request carries data to be processed;
the processing unit 1002 is configured to obtain an analysis result by analyzing the data to be processed;
a determining unit 1003, configured to determine a target plot component from multiple front-end plot components packaged based on the non-interface browser framework according to the parsing result;
the processing unit 1002 is further configured to generate chart data corresponding to the data to be processed by using the eye plot component and the analysis result;
a sending unit 1004, configured to send the chart data to the service platform, so that the service platform displays the chart data in a non-web manner through a terminal device.
In a possible implementation manner, the processing unit 1002 generates, by using the eye plot component and the parsing result, graph data corresponding to the data to be processed, and is used to:
acquiring drawing rule configuration information corresponding to the data to be processed;
determining a target drawing interface from a plurality of drawing interfaces according to the drawing rule configuration information, wherein each drawing interface corresponds to a chart style;
and calling the target plotting drawing component through the target plotting interface to plot the analysis result so as to generate chart data corresponding to the data to be processed.
In a possible implementation manner, the processing unit 1002 calls the target plot component through the target plot interface to plot the parsing result, so as to generate chart data corresponding to the to-be-processed data, and is configured to:
passing the parsed results through the target drawing interface into the target drawing component;
rendering a chart corresponding to the analysis result by using the eye plot component, wherein the chart style of the chart is a chart style corresponding to the target drawing interface;
and performing screenshot processing on the chart to obtain chart data corresponding to the data to be processed.
In a possible implementation manner, the obtaining unit 1001 obtains drawing rule configuration information corresponding to the to-be-processed data, and is configured to:
acquiring drawing rule configuration information corresponding to the data to be processed from configuration information pre-submitted by the service platform; or,
and obtaining drawing rule configuration information corresponding to the data to be processed from the chart drawing request, wherein the chart drawing request also carries the drawing rule configuration information.
In a possible implementation manner, the obtaining unit 1001 is further configured to obtain a traffic threshold and permission configuration information of the service platform;
the processing unit 1002 is further configured to:
performing current limiting and authentication processing on data to be processed according to the flow threshold and the authority configuration information of the service platform;
and after the current limiting and the authentication are passed, executing the step of obtaining an analysis result by analyzing the data to be processed.
In a possible implementation manner, the obtaining unit 1001 is further configured to obtain a drawing component set, where the drawing component set includes multiple front-end drawing components;
the processing unit 1002 is further configured to import source codes of the multiple front-end drawing components into a component configuration file based on an interface-free browser frame, so as to encapsulate the multiple front-end drawing components.
In a possible implementation manner, the obtaining unit 1001 is further configured to obtain a plurality of predefined data formats and a target data format included in the parsing result, where the plurality of data formats are data formats supported by the plurality of front end drawing components;
the processing unit 1002 is further configured to:
judging whether the plurality of data formats comprise the target data format or not;
and if so, executing the step of determining a target plotting graph component from a plurality of front-end plotting components packaged based on the non-interface browser frame according to the analysis result.
In the embodiment of the application, an obtaining unit 1001 obtains a chart drawing request submitted by a service platform, a processing unit 1002 obtains an analysis result by analyzing to-be-processed data carried in the chart drawing request, and a determining unit 1003 determines a target plotting diagram component from a plurality of front-end plotting components packaged based on a frame of a non-interface browser according to the analysis result; the processing unit 1002 generates diagram data corresponding to the data to be processed by using the target drawing component and the analysis result, and finally, sends the diagram data to the service platform through the sending unit 1004, so that the service platform displays the diagram data in a non-webpage manner through the terminal device. According to the method, on one hand, the target plotting component is determined from various front-end plotting components packaged based on the non-interface browser frame, the universality and the scene applicability of diagram plotting can be improved, and on the other hand, diagram data can be displayed in a non-webpage mode, so that the strong dependence on a browser interface can be avoided.
Referring to fig. 11, fig. 11 is a schematic structural diagram of a chart drawing apparatus disclosed in an embodiment of the present application, where the chart drawing apparatus 1100 may include: a transmitting unit 1101 and a receiving unit 1102, wherein:
a sending unit 1101, configured to submit a chart drawing request to a server, where the chart drawing request carries data to be processed, and the chart drawing request is used to instruct the server to determine a target plot component from multiple front-end plot components packaged based on a frame of a non-interface browser according to an analysis result of the data to be processed, and generate chart data corresponding to the data to be processed by using the target plot component and the analysis result;
a receiving unit 1102, configured to receive the chart data sent by the server;
the sending unit 1101 is further configured to send the chart data to a terminal device, so that the terminal device displays the chart data in a non-web page manner, where the non-web page manner includes one or more of an email page, a notification message, and a report document.
In the embodiment of the application, a sending unit 1101 submits a chart drawing request to a server, and a receiving unit 1102 receives chart data generated according to the chart drawing request and sent by the server, and sends the chart data to a terminal device through the sending unit 1101, so that the terminal device displays the chart data in a non-webpage mode.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a computer device disclosed in an embodiment of the present application, where the computer device 1200 may implement steps executed by a server or steps executed by a service platform, and the computer device 1200 at least includes a processor 1201, a memory 1202, and a communication device 1203. The processor 1201, the memory 1202, and the communication device 1203 may be connected by a bus or other means. The communication device 1203 is used for transceiving data. The memory 1202 may comprise a computer-readable storage medium, the memory 1202 for storing a computer program comprising computer instructions, the processor 1201 for executing the computer instructions stored by the memory 1202. The processor 1201 (or CPU) is a computing core and a control core of the computer device 1200, and is adapted to implement one or more computer instructions, and in particular, is adapted to load and execute the one or more computer instructions so as to implement a corresponding method flow or a corresponding function.
The embodiment of the present application also discloses a computer readable storage medium (Memory), which is a Memory device in the computer device 1200 and is used for storing programs and data. It is understood that the memory 1202 may comprise a built-in storage medium of the computer device 1200, and may also comprise an extended storage medium supported by the computer device 1200. The computer-readable storage medium provides storage space that stores an operating system for the computer device 1200. Also stored in the memory space are one or more computer instructions, which may be one or more computer programs (including program code), suitable for loading and execution by the processor 1201. Here, the Memory 1202 may be a high-speed RAM Memory, or a Non-Volatile Memory (Non-Volatile Memory), such as at least one disk Memory; optionally, at least one computer readable storage medium may be located remotely from the processor 1201.
In one implementation, computer device 1200 may be server 101 in the diagramming system shown in FIG. 1; the memory 1202 having stored therein first computer instructions; the first computer instructions stored in the memory 1202 are loaded and executed by the processor 1201 to implement the corresponding steps in the method embodiments shown in fig. 3 and 6; in a specific implementation, the first computer instruction in the memory 1202 is loaded by the processor 1201 and performs the following steps:
acquiring a chart drawing request submitted by a service platform, wherein the chart drawing request carries data to be processed;
obtaining an analysis result by analyzing the data to be processed, and determining a target plotting graph component from a plurality of front-end plotting components based on the package of the non-interface browser frame according to the analysis result;
generating chart data corresponding to the data to be processed by utilizing the eye plotting component and the analysis result;
and sending the chart data to the service platform so that the service platform displays the chart data in a non-webpage mode through terminal equipment.
In one possible implementation, the processor 1201 generates, by using the eye plot component and the parsing result, graph data corresponding to the data to be processed, and is used to:
acquiring drawing rule configuration information corresponding to the data to be processed;
determining a target drawing interface from a plurality of drawing interfaces according to the drawing rule configuration information, wherein each drawing interface corresponds to a chart style;
and calling the target plotting drawing component through the target plotting interface to plot the analysis result so as to generate chart data corresponding to the data to be processed.
In a possible implementation manner, the processor 1201 invokes the target plot component through the target plot interface to plot the parsing result, so as to generate chart data corresponding to the to-be-processed data, and is configured to:
passing the parsed results through the target drawing interface into the target drawing component;
rendering a chart corresponding to the analysis result by using the eye plot component, wherein the chart style of the chart is a chart style corresponding to the target drawing interface;
and performing screenshot processing on the chart to obtain chart data corresponding to the data to be processed.
In a possible implementation manner, the processor 1201 obtains drawing rule configuration information corresponding to the data to be processed, and is configured to:
acquiring drawing rule configuration information corresponding to the data to be processed from configuration information pre-submitted by the service platform; or,
and obtaining drawing rule configuration information corresponding to the data to be processed from the chart drawing request, wherein the chart drawing request also carries the drawing rule configuration information.
In a possible implementation manner, the processor 1201 is further configured to:
acquiring a flow threshold and authority configuration information of the service platform;
performing current limiting and authentication processing on data to be processed according to the flow threshold and the authority configuration information of the service platform;
and after the current limiting and the authentication are passed, executing the step of obtaining an analysis result by analyzing the data to be processed.
In a possible implementation manner, the processor 1201 is further configured to:
acquiring a drawing component set, wherein the drawing component set comprises a plurality of front-end drawing components;
and importing the source codes of the various front-end drawing components into a component configuration file based on the interface-free browser frame so as to encapsulate the various front-end drawing components.
In a possible implementation manner, the processor 1201 is further configured to:
acquiring multiple predefined data formats and target data formats included in the analysis result, wherein the multiple data formats are data formats supported by the multiple front-end drawing components;
judging whether the plurality of data formats comprise the target data format or not;
and if so, executing the step of determining a target plotting graph component from a plurality of front-end plotting components packaged based on the non-interface browser frame according to the analysis result.
In the embodiment of the application, a processor 1201 acquires a chart drawing request submitted by a service platform, analyzes data to be processed carried by the chart drawing request to obtain an analysis result, and determines a target plotting graph component from a plurality of front-end plotting components based on the frame encapsulation of a non-interface browser according to the analysis result; and generating chart data corresponding to the data to be processed by using the target drawing component and the analysis result, and finally sending the chart data to the service platform so that the service platform displays the chart data in a non-webpage mode through the terminal equipment. According to the method, on one hand, the target plotting component is determined from various front-end plotting components packaged based on the non-interface browser frame, the universality and the scene applicability of diagram plotting can be improved, and on the other hand, diagram data can be displayed in a non-webpage mode, so that the strong dependence on a browser interface can be avoided.
In one implementation, the computer device 1200 may be the service platform 102 in the diagramming system shown in FIG. 1; the memory 1202 having stored therein first computer instructions; the first computer instructions stored in the memory 1202 are loaded and executed by the processor 1201 to implement the corresponding steps in the method embodiments shown in fig. 5 and 6; in a specific implementation, the first computer instruction in the memory 1202 is loaded by the processor 1201 and performs the following steps:
submitting a chart drawing request to a server, wherein the chart drawing request carries data to be processed, and the chart drawing request is used for instructing the server to determine a target plotting component from a plurality of front-end plotting components packaged based on a non-interface browser frame according to an analysis result of the data to be processed, and generating chart data corresponding to the data to be processed by using the target plotting component and the analysis result;
receiving the chart data sent by the server;
and sending the chart data to a terminal device so that the terminal device displays the chart data in a non-webpage mode, wherein the non-webpage mode comprises one or more of a mail page, a notification message and a report document.
In the embodiment of the application, a processor of a service platform submits a chart drawing request to a server, receives the chart data generated according to the chart drawing request and sent by a server, and sends the chart data to a terminal device, so that the terminal device displays the chart data in a non-webpage mode.
According to an aspect of the application, a computer program product or a computer program is also disclosed, comprising computer instructions, which are stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and executes the computer instruction, so that the computer device can execute the method in the embodiment corresponding to the flowcharts in fig. 3, 5, and 6, which will not be described herein again.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the above-described modules is merely a logical division, and other divisions may be realized in practice, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. A method of charting, the method comprising:
acquiring a chart drawing request submitted by a service platform, wherein the chart drawing request carries data to be processed;
obtaining an analysis result by analyzing the data to be processed, and determining a target plotting graph component from a plurality of front-end plotting components based on the package of the non-interface browser frame according to the analysis result;
generating chart data corresponding to the data to be processed by using the eye plot component and the analysis result, and sending the chart data to the service platform, so that the service platform displays the chart data in a non-webpage mode through terminal equipment.
2. The method of claim 1, wherein the generating of the graph data corresponding to the data to be processed using the eye plot component and the parsing result comprises:
acquiring drawing rule configuration information corresponding to the data to be processed;
determining a target drawing interface from a plurality of drawing interfaces according to the drawing rule configuration information, wherein each drawing interface corresponds to a chart style;
and calling the target plotting drawing component through the target plotting interface to plot the analysis result so as to generate chart data corresponding to the data to be processed.
3. The method of claim 2, wherein the invoking the eye plot component through the target plot interface to plot the parsing result to generate the chart data corresponding to the data to be processed comprises:
passing the parsed results through the target drawing interface into the target drawing component;
rendering a chart corresponding to the analysis result by using the eye plot component, wherein the chart style of the chart is a chart style corresponding to the target drawing interface;
and performing screenshot processing on the chart to obtain chart data corresponding to the data to be processed.
4. The method according to claim 2 or 3, wherein the obtaining of the drawing rule configuration information corresponding to the data to be processed includes:
acquiring drawing rule configuration information corresponding to the data to be processed from configuration information pre-submitted by the service platform; or,
and obtaining drawing rule configuration information corresponding to the data to be processed from the chart drawing request, wherein the chart drawing request also carries the drawing rule configuration information.
5. The method according to claim 1, wherein before the parsing the data to be processed to obtain a parsing result, the method further comprises:
acquiring a flow threshold and authority configuration information of the service platform;
performing current limiting and authentication processing on data to be processed according to the flow threshold and the authority configuration information of the service platform;
and after the current limiting and the authentication are passed, executing the step of obtaining an analysis result by analyzing the data to be processed.
6. The method of claim 1, wherein prior to obtaining the charting request submitted by the service platform, the method further comprises:
acquiring a drawing component set, wherein the drawing component set comprises a plurality of front-end drawing components;
and importing the source codes of the various front-end drawing components into a component configuration file based on the interface-free browser frame so as to encapsulate the various front-end drawing components.
7. The method according to claim 1, wherein after obtaining the parsing result by parsing the data to be processed, the method further comprises:
acquiring multiple predefined data formats and target data formats included in the analysis result, wherein the multiple data formats are data formats supported by the multiple front-end drawing components;
judging whether the plurality of data formats comprise the target data format or not;
and if so, executing the step of determining a target plotting graph component from a plurality of front-end plotting components packaged based on the non-interface browser frame according to the analysis result.
8. A method of charting, the method comprising:
submitting a chart drawing request to a server, wherein the chart drawing request carries data to be processed, and the chart drawing request is used for instructing the server to determine a target plotting component from a plurality of front-end plotting components packaged based on a non-interface browser frame according to an analysis result of the data to be processed, and generating chart data corresponding to the data to be processed by using the target plotting component and the analysis result;
receiving the chart data sent by the server;
and sending the chart data to a terminal device so that the terminal device displays the chart data in a non-webpage mode, wherein the non-webpage mode comprises one or more of a mail page, a notification message and a report document.
9. A chart plotting apparatus, said apparatus comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a chart drawing request submitted by a service platform, and the chart drawing request carries data to be processed;
the processing unit is used for obtaining an analysis result by analyzing the data to be processed;
a determining unit, configured to determine a target plot component from multiple front-end plot components packaged based on the non-interface browser frame according to the parsing result;
the processing unit is further used for generating chart data corresponding to the data to be processed by utilizing the eye plotting component and the analysis result;
and the sending unit is used for sending the chart data to the service platform so that the service platform displays the chart data in a non-webpage mode through terminal equipment.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to execute the chart drawing method according to any one of claims 1 to 7 or the chart drawing method according to claim 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011318303.XA CN113516729A (en) | 2020-11-20 | 2020-11-20 | Chart drawing method and device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011318303.XA CN113516729A (en) | 2020-11-20 | 2020-11-20 | Chart drawing method and device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113516729A true CN113516729A (en) | 2021-10-19 |
Family
ID=78060914
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011318303.XA Pending CN113516729A (en) | 2020-11-20 | 2020-11-20 | Chart drawing method and device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113516729A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114358645A (en) * | 2022-01-13 | 2022-04-15 | 武汉睿创天地科技有限公司 | A visualized intelligent integrated business processing system based on the Internet of Things |
CN114896954A (en) * | 2022-04-27 | 2022-08-12 | 湖南正宇软件技术开发有限公司 | Method, device, equipment and medium for automatically generating graphic and text reports for proposals |
CN114968238A (en) * | 2022-05-30 | 2022-08-30 | 北京火山引擎科技有限公司 | Chart drawing method, apparatus, device, and computer-readable storage medium |
CN115131006A (en) * | 2022-08-29 | 2022-09-30 | 云账户技术(天津)有限公司 | Data chart mail sending method and device |
CN115438287A (en) * | 2022-11-04 | 2022-12-06 | 平安银行股份有限公司 | Method for generating chart without browser mode, electronic device and readable storage medium |
-
2020
- 2020-11-20 CN CN202011318303.XA patent/CN113516729A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114358645A (en) * | 2022-01-13 | 2022-04-15 | 武汉睿创天地科技有限公司 | A visualized intelligent integrated business processing system based on the Internet of Things |
CN114896954A (en) * | 2022-04-27 | 2022-08-12 | 湖南正宇软件技术开发有限公司 | Method, device, equipment and medium for automatically generating graphic and text reports for proposals |
CN114896954B (en) * | 2022-04-27 | 2025-01-07 | 湖南正宇软件技术开发有限公司 | Method, device, equipment and medium for automatically generating graphic and text reports from proposals |
CN114968238A (en) * | 2022-05-30 | 2022-08-30 | 北京火山引擎科技有限公司 | Chart drawing method, apparatus, device, and computer-readable storage medium |
CN115131006A (en) * | 2022-08-29 | 2022-09-30 | 云账户技术(天津)有限公司 | Data chart mail sending method and device |
CN115438287A (en) * | 2022-11-04 | 2022-12-06 | 平安银行股份有限公司 | Method for generating chart without browser mode, electronic device and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20220294850A1 (en) | Cloud storage methods and systems | |
CN113516729A (en) | Chart drawing method and device and computer readable storage medium | |
CN109684054B (en) | Information processing method and device, electronic equipment and memory | |
US8898796B2 (en) | Managing network data | |
EP2669801B1 (en) | Mapping messages between web services | |
US8543972B2 (en) | Gateway data distribution engine | |
US9098314B2 (en) | Systems and methods for web based application modeling and generation | |
US20210304142A1 (en) | End-user feedback reporting framework for collaborative software development environments | |
US9934007B2 (en) | Method for operating tool in working environment and machine using such method | |
US11240291B2 (en) | Content snip capture and sharing | |
JP2011118879A (en) | Location independent execution of user interface operations | |
CN104317570B (en) | The apparatus and method of dynamic analysis Web applications | |
JP2021064388A (en) | Automatic operation detection on protected field with support for federated search | |
US20130174118A1 (en) | Optimizing Source Code | |
CN104270443B (en) | A kind of cloud computing system and method for being capable of dynamic analysis Web applications | |
EP3001334A1 (en) | Systems and methods to repackage web site resources | |
US12047465B1 (en) | Optimized discovery system to support embedded webpages | |
CN113553123A (en) | Data processing method and device, electronic equipment and storage medium | |
US9542171B2 (en) | Managing an application modification process | |
CN113704814B (en) | Information management method and device | |
CN114035792A (en) | Page generation method and device, electronic equipment and storage medium | |
US20120233536A1 (en) | Web display program conversion system, web display program conversion method and program for converting web display program | |
KR102526622B1 (en) | Home system establishing method | |
US12360785B2 (en) | Inter-platform control interface | |
JP2018132838A (en) | Information processing apparatus and program for information processing apparatus |
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 |