CN109656647B - Chart picture generation method, device and equipment and computer readable storage medium - Google Patents

Chart picture generation method, device and equipment and computer readable storage medium Download PDF

Info

Publication number
CN109656647B
CN109656647B CN201811136807.2A CN201811136807A CN109656647B CN 109656647 B CN109656647 B CN 109656647B CN 201811136807 A CN201811136807 A CN 201811136807A CN 109656647 B CN109656647 B CN 109656647B
Authority
CN
China
Prior art keywords
chart
picture
information
pixel
graph
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.)
Active
Application number
CN201811136807.2A
Other languages
Chinese (zh)
Other versions
CN109656647A (en
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811136807.2A priority Critical patent/CN109656647B/en
Publication of CN109656647A publication Critical patent/CN109656647A/en
Application granted granted Critical
Publication of CN109656647B publication Critical patent/CN109656647B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • 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

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Generation (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method, a device and equipment for generating a chart picture and a computer readable storage medium, wherein the method comprises the following steps: when chart data and a chart model selection instruction are received, the chart data are transmitted to a chart model corresponding to the chart model selection instruction, and an online chart formed by splicing a plurality of chart parts is generated on a webpage; reading chart pixel information of each chart part in the online chart, and outputting first prompt information to prompt the format of a chart picture to be generated to be set; and receiving picture format information uploaded by a user based on the first prompt information, establishing a background picture corresponding to the picture format information, and adding the chart pixel information to the background picture to generate a chart picture. Because the chart picture exists in a picture format, the included chart data forms a whole, and the use of the online chart generated by the chart data can be realized by directly calling the picture chart subsequently, so that the multiplexing of the online chart is facilitated.

Description

Chart picture generation method, device and equipment and computer readable storage medium
Technical Field
The present invention relates to the field of information technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for generating a chart and a picture.
Background
With the development of technology, the application scenes of information visualization are more and more extensive, and various abstract information is visually displayed on a webpage through a chart, such as a sales performance table, a service client table and the like of an enterprise; when the webpage is manufactured, a manufacturer can directly draw various types of information into diagrams, so that the various types of information exist on the webpage in the form of the diagrams; when the use requirement of the chart is met, the chart is drawn by various information, so that the use of the chart is substantially the use of various information; various types of information exist in the chart in a dispersed mode, and the information in the chart cannot be called in an integral mode, so that multiple operations are needed, and the chart is inconvenient to reuse.
Disclosure of Invention
The invention mainly aims to provide a method, a device and equipment for generating a chart picture and a computer readable storage medium, and aims to solve the problem that in the prior art, charts drawn by various information on a webpage are inconvenient to reuse due to the dispersity of the information in the charts.
In order to achieve the above object, the present invention provides a method for generating a chart picture, including the steps of:
when chart data and a chart model selection instruction are received, transmitting the chart data to a chart model corresponding to the chart model selection instruction, and generating an online chart formed by splicing a plurality of chart parts on a webpage;
reading the chart pixel information of each chart part in the online chart, and outputting first prompt information to prompt the format of a chart picture to be generated to be set;
and receiving picture format information uploaded by a user based on the first prompt information, establishing a background picture corresponding to the picture format information, and adding the chart pixel information to the background picture to generate a chart picture.
Preferably, the chart pixel information includes pixel coordinate data and pixel value data,
the step of adding the chart pixel information to the background picture and generating a chart picture comprises:
determining an image area in the background picture and each pixel coordinate point in the image area according to the pixel coordinate data;
and adding the pixel value data to each pixel coordinate point in the image area according to the corresponding relation between the pixel coordinate data and the pixel value data to generate a chart picture.
Preferably, the step of adding the chart pixel information to the background picture and generating a chart picture includes:
when a request instruction for adding hidden information to the chart picture is received, reading target hidden information and an adding position corresponding to the request instruction;
reading position pixel information of the adding position at the position of the graph picture, calling a preset hiding rule, and processing the position pixel information according to the preset hiding rule to generate a processing result;
and updating picture pixel information in the graph picture according to the processing result so as to add the target hidden information to the adding position in the graph picture.
Preferably, the step when receiving a request instruction for adding hidden information to the chart picture before includes:
determining a pixel specification of the graph picture according to picture pixel information of the graph picture, and determining an information specification supporting adding of hidden information in the graph picture according to the pixel specification;
and outputting the information specification to send the request instruction based on the information specification.
Preferably, when a request instruction for adding hidden information to the chart picture is received, the step of reading target hidden information and an adding position corresponding to the request instruction includes:
when a request instruction for adding hidden information to the chart picture is received, outputting second prompt information to prompt that the hidden level of the added hidden information is set;
receiving a hidden grade uploaded based on the second prompt message, reading target hidden information corresponding to the request command and adding a position, and adding the target hidden information to the adding position according to the preset hidden rule corresponding to the hidden grade.
Preferably, the chart picture generating method further includes the steps of:
when a graph picture to be detected is received, reading pixel information to be detected in the graph picture to be detected, and capturing hidden information to be detected from the pixel information to be detected;
comparing the hidden information to be detected with preset detection information, and judging whether the graph picture to be detected has tampering information;
and if the graph picture to be detected has the tampering information, improving the hiding grade of the hidden information in the graph picture to be detected.
Preferably, the chart model comprises a two-dimensional model and a three-dimensional model, and the step of generating an online chart spliced by a plurality of chart parts on the webpage comprises the following steps:
when an adjustment instruction for the online graph is received, determining the type of the graph model according to the type identifier in the graph model;
if the type is a two-dimensional model, converting the graph state in the online graph;
and if the type is a three-dimensional model, adjusting the chart orientation or the chart visual angle of the online chart.
In order to achieve the above object, the present invention further provides a chart image generation apparatus including:
the receiving module is used for transmitting the chart data to a chart model corresponding to the chart model selection instruction when the chart data and the chart model selection instruction are received, and generating an online chart formed by splicing a plurality of chart parts on a webpage;
the reading module is used for reading chart pixel information of each chart component in the online chart and outputting first prompt information to prompt the setting of the format of a chart picture to be generated;
and the generating module is used for receiving the picture format information uploaded by the user based on the first prompt information, establishing a background picture corresponding to the picture format information, and adding the chart pixel information to the background picture to generate a chart picture.
Further, to achieve the above object, the present invention also provides a chart picture generating apparatus including: the device comprises a memory, a processor, a communication bus and a chart picture generating program stored on the memory;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute the chart picture generation program to implement the steps of:
when chart data and a chart model selection instruction are received, transmitting the chart data to a chart model corresponding to the chart model selection instruction, and generating an online chart formed by splicing a plurality of chart parts on a webpage;
reading the chart pixel information of each chart part in the online chart, and outputting first prompt information to prompt the format of a chart picture to be generated to be set;
and receiving picture format information uploaded by a user based on the first prompt information, establishing a background picture corresponding to the picture format information, and adding the graph pixel information to the background picture to generate a graph picture.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors for:
when chart data and a chart model selection instruction are received, transmitting the chart data to a chart model corresponding to the chart model selection instruction, and generating an online chart formed by splicing a plurality of chart parts on a webpage;
reading the chart pixel information of each chart part in the online chart, and outputting first prompt information to prompt the format of a chart picture to be generated to be set;
and receiving picture format information uploaded by a user based on the first prompt information, establishing a background picture corresponding to the picture format information, and adding the chart pixel information to the background picture to generate a chart picture.
In the method for generating a graph picture according to this embodiment, received graph data is transmitted to a graph model corresponding to a graph model selection instruction, so as to generate an online graph formed by splicing a plurality of graph items in a web page, and then graph pixel information of each graph item in the online graph is read. The graph picture is generated by graph pixel information which is derived from an online graph, and the online graph is generated by graph data, so that the graph picture comprises all contents of the graph data; the graph picture exists in a picture format, the graph data form a whole, and the use of the online graph generated by the graph data can be realized by directly calling the picture graph subsequently, so that the reuse of the online graph is facilitated.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating a first embodiment of a method for generating a chart image according to the present invention;
FIG. 2 is a functional block diagram of a first embodiment of a chart diagram generation apparatus according to the present invention;
fig. 3 is a schematic device structure diagram of a hardware operating environment related to the method according to the embodiment of the present invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a chart picture generation method.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for generating a chart picture according to a first embodiment of the present invention. In this embodiment, the chart picture generating method includes:
step S10, when chart data and a chart model selection instruction are received, transmitting the chart data to a chart model corresponding to the chart model selection instruction, and generating an online chart formed by splicing a plurality of chart parts on a webpage;
the chart picture generation method is applied to the server, is suitable for generating an online chart in the server and converting the chart into a chart picture in a picture form. The online chart is a chart showing various information data in a webpage, such as a sales performance chart, a consumption type chart and the like. Different chart models are set according to different chart forms; models such as statistical type histograms, pie charts, donuts, scatter charts, radar charts, line charts, or relational type histograms, flow charts, thinking diagrams, etc.; and each chart model corresponds to a two-dimensional model and a three-dimensional model so as to meet different requirements. When the information data is required to generate an online chart in the webpage, the information data is input into the webpage as the chart data, and the input mode can be that the chart data is directly edited on the webpage online or a file containing the chart data is imported into the webpage. Meanwhile, a chart model is required to be selected to represent the mode of generating the chart data into the online chart; each chart model carries different model identifiers, and when a chart model selection instruction is triggered, the model identifiers of the selected chart models are added to the selection instruction. When receiving the graph data and the icon model selection instruction, determining the selected graph model according to the model identifier carried in the graph model selection instruction, transmitting the graph data to the graph model corresponding to the graph model selection instruction, and replacing the model variable therein to generate an online graph on a webpage; the online chart is formed by splicing a plurality of chart parts, wherein the chart parts are all graphic elements formed in the online chart, such as all 'column' -shaped elements in a state chart, all 'cake' -shaped elements in a cake chart and the like. The model variables are preset and are used for representing various data types in the graph model; if the chart model of the histogram has model variables of months as the X axis and model variables of sales performance as the Y axis, the model variables of the X axis and the Y axis in the histogram are respectively replaced by the month data and the sales performance data in the chart data according to the time sequence, and the online sales performance chart in the form of the histogram can be generated.
And step S20, reading the chart pixel information of each chart part in the online chart, and outputting first prompt information to prompt the setting of the format of the chart picture to be generated.
Understandably, the model data in the graph model is usually characterized by a combination of numerical values and colors, such as "columns" in a histogram that lie in different ranges of numerical values, or colors that occupy proportions in a pie chart. The generated online chart is associated with a chart model such that each chart component in the online chart also has a variety of values and colors that essentially characterize the chart data by forming a set of individual pixels. Reading the chart pixel information of each chart part in the online chart in a pixel identification mode, wherein the chart pixel information is information of other pixels which are different from the background color in the online chart, so that the chart pixel information can be conveniently generated into a chart picture in a picture format. Due to various picture formats, such as bmp, jpg, gif, svg, psd and the like; the method comprises the following steps that different users have difference in the format of chart pictures required to be generated, and the chart pictures required to be generated are used as chart pictures to be generated; after the graph pixel information is read, outputting first prompt information in a text display or voice broadcast mode to prompt the setting of the format of the graph picture to be generated, so that the graph picture can be generated by the graph pixel information according to the set format, and the user requirements are met.
And step S30, receiving picture format information uploaded by a user based on the first prompt information, establishing a background picture corresponding to the picture format information, adding the chart pixel information to the background picture, and generating a chart picture.
Further, the user selects and uploads the picture format information required to be generated according to the output first prompt information; when the picture format information is received, a background picture corresponding to the format type can be established according to the picture format type represented by the picture format information. Adding the graph pixel information into the background picture to generate a graph picture in a picture format; the essence of the addition process to the chart pixel information is to draw each image pixel corresponding to the chart pixel information in the background picture. Specifically, the chart pixel information includes pixel coordinate data and pixel value data; adding the chart pixel information to the background picture, the step of generating the chart picture comprising:
step S31, determining an image area in the background picture and each pixel coordinate point in the image area according to the pixel coordinate data;
when identifying the pixels in the online image, the identified content comprises coordinate data and pixel value data of each pixel; specifically, a coordinate system is established in the online image, a coordinate origin and a coordinate unit value are set, and then coordinates of each pixel in the online image from the coordinate origin are read, wherein each coordinate is pixel coordinate data; because different pixels have different pixel color values and pixel brightness values, the color values and the brightness values of the pixels at the positions are required to be identified while the pixels at the positions in the online image are read; and taking each color value and the brightness value as pixel value data, establishing a corresponding relation between pixel coordinate data and pixel value numerical values of each pixel, and representing the pixel coordinate and the pixel value of the same pixel. If the pixel coordinate data read to the pixel a is a1 and the pixel value data is a2, establishing a corresponding relation between a1 and a2 to represent the pixel coordinate and the pixel value of the pixel a.
Understandably, the distribution condition of each pixel in the online chart can be determined by the coordinate data of each pixel; in the XY two-dimensional coordinate system, the maximum X value from the origin of coordinates is X1, the minimum X value is X2, the maximum Y value from the origin of coordinates is Y1, and the minimum Y value is Y2, so that the pixels in the line graph are distributed in the interval formed by [ X1, Y2], [ X2, Y1], [ X2, Y2 ]. Because the length and the width of the background picture are fixed, in order to enable the generated graph picture to be located at the center position of the background picture, the image area in the background picture can be determined according to the maximum value and the minimum value of each coordinate data in the pixel coordinate data, and the image area is the area of the graph picture in the background picture. And calculating an average value between the maximum value and the minimum value of each coordinate axis in the coordinate system, taking the central position in the background picture as a coordinate origin, and extending the distance of the average value in the positive and negative directions of each axis on the basis of the coordinate origin, namely the image area. For the two-dimensional coordinate system of XY, the average value of X axis is (X1 + X2)/2,Y axis is (y 1+ y 2)/2, and the image area is the interval formed by [ (X1 + X2)/2, (y 1+ y 2)/2 ], [ - (X1 + X2)/2, - (y 1+ y 2)/2 ], [ (X1 + X2)/2, - (y 1+ y 2)/2 ]. After the image area in the background picture is determined, the pixel coordinate data of each pixel can be mapped to the pixel coordinate point of the image area, namely, each pixel coordinate point of each pixel in the image area can be determined.
And step S32, adding the pixel value data to each pixel coordinate point in the image area according to the corresponding relation between the pixel coordinate data and the pixel value data, and generating a chart picture.
The method comprises the steps that because corresponding relations exist between pixel coordinate data and pixel value data of pixels in an online graph, color values and brightness values of the pixels located at coordinate positions in the online graph are represented, and in order to enable a graph picture to completely reflect the content of the online graph, the color values and the brightness values of pixel coordinate points in the graph picture need to be correspondingly determined; and adding pixel value data to each pixel coordinate point in the background picture according to the corresponding relation between the pixel coordinate data and the pixel value data, and forming a chart picture by the background picture after adding the corresponding pixel value data to each pixel coordinate point to embody the content in the online chart.
In the method for generating a chart picture according to the embodiment, received chart data is transmitted to a chart model corresponding to a chart model selection instruction, so that an online chart formed by splicing a plurality of chart parts is generated in a webpage, the chart pixel information of each chart part in the online chart is read, a background picture corresponding to the picture format information is established when the picture format information is received, and the read chart pixel information is added to the background picture, so that the chart picture can be generated. The chart picture is generated by the chart pixel information which is derived from the online chart, and the online chart is generated by the chart data, so that the chart picture comprises all contents of the chart data; the graph picture exists in a picture format, the graph data form a whole, and the use of the online graph generated by the graph data can be realized by directly calling the picture graph subsequently, so that the reuse of the online graph is facilitated.
Further, in another embodiment of the method for generating a chart picture according to the present invention, the step of adding the chart pixel information to the background picture comprises the following steps:
step S40, when a request instruction for adding hidden information to the chart picture is received, reading target hidden information and an adding position corresponding to the request instruction;
understandably, for the generated chart picture possibly having the condition of malicious embezzlement, in order to identify the malicious embezzlement, the embodiment is provided with a mechanism for adding hidden information; the hidden information is information which is arranged in the generated chart picture and is in a hidden state, and the hidden information can be characters or pictures. When hidden information needs to be added to the graph picture, setting the content and the adding position of the hidden information needing to be added, and taking the set content of the hidden information as target hidden information and the adding position to be configured into a request instruction together for triggering; when the request instruction for adding the hidden information to the chart picture is received, the target hidden information and the adding position carried in the request instruction are read to determine the content and the position of the hidden information to be added.
Step S50, reading position pixel information of the adding position at the position of the graph picture, calling a preset hiding rule, processing the position pixel information according to the preset hiding rule, and generating a processing result;
the target hidden information is added to the graph picture as required, so that the adding position is the position in the graph picture, and in order to realize hiding, the target hidden information is added to the position originally provided with pixels in the graph picture, and the position pixel information of the adding position in the graph picture is read; the position pixel information includes a color value and a luminance value, i.e., a color value and a luminance value of a position where the adding position is located in the chart picture. And meanwhile, presetting a preset hiding rule for hiding the hidden information, calling the preset hiding rule, and processing the read position pixel information by using the preset hiding rule to generate a processing result. The preset hiding rule is used for processing the color value and the brightness value in the position pixel information, so that after the hidden information is added, the position pixel information of the added position in the chart picture and the position pixel information before the hidden information is not added have similarity, whether the hidden information is added or not is difficult to distinguish from naked eyes, and the hiding of the hidden information is realized. Specifically, the color values include R, G, B numerical values in three color channels, and the preset hiding rule may be to perform logical or operation on the numerical values in the three color channels and a chromaticity preset value, and then reduce the brightness of the three color channels by a multiple of the brightness preset value. If the numerical value M of the R color channel is subjected to logical OR operation with the chromaticity preset value 8, and then the brightness value of the R color channel is reduced by taking the brightness preset value 10 as a multiple; correspondingly, the G, B color channel is processed correspondingly, and the processing result of each color channel is obtained.
Step S60, updating the picture pixel information in the graph picture according to the processing result, so as to add the target hidden information to the adding position in the graph picture.
Furthermore, a processing result obtained by processing the position pixel information by a preset hiding rule reflects a pixel color value and a pixel brightness value of the added position after operation, namely the position pixel information of the added position after operation; the position pixel information of the added position is updated by the operation result to replace the original position pixel information. The adding position is positioned in the graph picture, the pixel coordinate point and the pixel value data of each pixel in the graph picture are picture pixel information in the graph picture, the position pixel information in the adding position is a part of the picture pixel information in the graph picture, and the essence of updating the position pixel information of the adding position is to update the picture pixel information in the graph picture. After updating, the target hidden information is added to the adding position in the graph picture, so that the position pixel information of the adding position in the graph picture and the position pixel information before the hidden information is not added have similarity, and the hidden information is hidden.
Further, in another embodiment of the method for generating a chart picture according to the present invention, the step when receiving a request instruction for adding hidden information to the chart picture includes:
step S70, determining the pixel specification of the graph picture according to the picture pixel information of the graph picture, and determining the information specification supporting adding of hidden information in the graph picture according to the pixel specification;
it is understood that the number of pixels of the graphic picture and the range of each pixel position are fixed, and when hidden information is added, the number of pixels of the added hidden information should be smaller than the number of pixels of the graphic picture and needs to be within the range of each pixel position. The number of pixels and the position range of each pixel in the graph picture are used as the pixel specification of the graph picture, and in order to add hidden information suitable for the pixels, the pixel specification of the graph picture needs to be determined before adding the hidden information. The number of pixel coordinate points of picture pixel information in a picture represents the number of pixels, one pixel coordinate point corresponds to one pixel, the number of the pixel coordinate points in the picture pixel information is counted, the number represents the number of the pixels of the picture, and meanwhile, the range of each coordinate point represents the pixel position range. The number of the pixels of the added hidden information cannot be larger than that of the pixels of the graph picture, and the hidden information needs to be added in the position range of each pixel of the graph picture; therefore, the number of pixels capable of adding hidden information and the position range can be determined according to the pixel information; and taking the pixel number and the position range of the hidden information as an information specification supporting adding of the hidden information in the chart picture so as to add the hidden information.
And step S80, outputting the information specification to send the request instruction based on the information specification.
Further, after the information specification supporting adding of the hidden information in the graph picture is determined, the information specification is output to prompt a user that the number of pixels of the added hidden information cannot be larger than that of the pixels in the information rule, the added hidden information needs to be within a position range in the information rule, the user can conveniently set target hidden information meeting the requirement of the information specification, and a request instruction is sent to carry out adding operation on the target hidden information.
Further, in another embodiment of the method for generating a chart picture according to the present invention, when a request instruction for adding hidden information to the chart picture is received, the step of reading target hidden information and an adding position corresponding to the request instruction includes:
step S41, when a request instruction for adding hidden information to the chart picture is received, outputting second prompt information to prompt the setting of the hidden level of the added hidden information;
understandably, different chart pictures have different safety, some chart pictures have higher safety, and other chart pictures have lower safety; when hidden information is added, hidden information with different hiding levels is added for graph pictures with different safety levels according to the difference of safety among the graph pictures; the graph picture with higher security corresponds to a higher hidden level, and the added hidden information is difficult to eliminate. Therefore, when the hidden information content and the adding position which need to be added are determined, the hidden grade also needs to be determined, specifically, when a request instruction for adding the hidden information to the chart picture is received and the requirement for adding the hidden information exists, second prompt information is output to prompt a user to set the hidden grade of the hidden information which needs to be added, the hidden information is conveniently hidden according to the set hidden grade, and the requirement of the user is met.
And S42, receiving the uploaded hiding level based on the second prompt message, reading target hiding information corresponding to the request command and an adding position, and adding the target hiding information to the adding position according to the preset hiding rule corresponding to the hiding level.
Further, the user selects and uploads the required hiding level according to the output second prompt message; the server receives the hidden grade, reads the target hidden information and the adding position carried in the request instruction to determine the content and the position of the hidden information to be added, and adds the target hidden information into the adding position according to the hidden grade. It should be noted that the difference of the hiding levels is reflected in the difference of the preset hiding rules; there are multiple preset hiding rules for hiding the hidden information, and different hiding levels correspond to different preset hiding rules. After the set hiding level is read, calling a preset hiding rule corresponding to the hiding level, and adding target hidden information at an adding position according to the preset hiding rule corresponding to the hiding level; the added target hidden information meets the requirement of the hidden level, and the safety of the chart picture is ensured.
Further, in another embodiment of the method for generating a chart picture of the present invention, the method for generating a chart picture further includes the steps of:
step q1, when a graph picture to be detected is received, reading pixel information to be detected in the graph picture to be detected, and grabbing hidden information to be detected from the pixel information to be detected;
understandably, since the generated chart picture may be maliciously tampered by a third party organization, in order to determine whether the chart picture is tampered, the embodiment is provided with a detection mechanism. The method comprises the steps that a graph picture which is likely to be tampered is used as a graph picture to be detected, when the graph picture to be detected is received, and the graph picture to be detected is indicated to be tampered and needs to be detected, pixel information to be detected in the graph picture to be detected is read firstly, and the pixel information to be detected is all pixel information in the graph picture to be detected; and identifying the pixel information to be detected, and judging whether hidden information exists or not. Adding hidden information, which is essentially the process of processing position pixel information in an adding position, so that whether the pixel information to be detected carries the processed pixel information or not is judged during identification; if the processed pixel information is carried, separating the pixel information from the pixel information to be detected; and carrying out pixel processing on the separated pixel information to be detected, converting the pixels of the pixel information to be pure white or pure black so as to show the processed pixel information from the pixel information to be detected, and taking the shown content as hidden information to be detected so as to show the content of the hidden information.
Step q2, comparing the hidden information to be detected with preset detection information, and judging whether the graph picture to be detected has tampering information;
further, in the process of adding hidden information to each graph picture, the target hidden information added to each graph picture is stored as preset detection information for detection. After capturing hidden information to be detected, reading the preset detection information, comparing the hidden information to be detected with the preset detection information, and judging whether the hidden information to be detected is consistent with the preset detection information; and determining whether the graph picture to be detected has tampering information or not according to the consistency of the graph picture to be detected and the graph picture to be detected, and judging whether the graph picture to be detected is tampered or not according to the judgment result of whether the graph picture has tampering information or not.
And q3, if the graph picture to be detected has the tampering information, improving the hiding grade of the hidden information in the graph picture to be detected.
Furthermore, when the hidden information to be detected is consistent with the preset detection information, it is indicated that the chart picture to be detected has no tampering information, is not tampered, and is in a safe state. When the hidden information to be detected is judged to be inconsistent with the preset detection information, the graph picture to be detected has tampering information, and the graph picture to be detected is tampered and is in an unsafe state; in order to ensure the safety of the chart picture to be detected, the hiding level of the hidden information in the chart picture to be detected is improved, and the added hidden information is prevented from being eliminated.
Further, in another embodiment of the method for generating a chart picture of the present invention, the chart model includes a two-dimensional model and a three-dimensional model, and the step of generating an online chart spliced by a plurality of chart parts on a web page includes:
step p1, when an adjustment instruction for the online graph is received, determining the type corresponding to the graph model according to the type identifier in the graph model corresponding to the online graph;
understandably, after the graph data required to generate the online graph is transmitted to the graph model to generate the online graph, the generated online graph may not meet the user requirement, and the online graph needs to be adjusted. Because the graph model for generating the online graph comprises the two-dimensional model and the three-dimensional model, the generated online graph is also divided into the two-dimensional graph and the three-dimensional graph, and the adjustment is required according to the difference between the two. When an adjustment instruction for an online chart is received, the online chart to which the adjustment instruction is directed is generated by transmitting chart data to a chart model; reading a type identifier carried in a graph model corresponding to the generated online graph, and determining the graph model type of the online graph needing to be adjusted according to the type identifier, namely determining whether the graph model is a two-dimensional model or a three-dimensional model.
Step p2, if the type is a two-dimensional model, converting the graph state in the online graph;
further, when the type of the graph model is determined to be a two-dimensional model via the type identifier, the generated online graph is a two-dimensional graph with reference to the X axis and the Y axis, and the adjustment of the online graph of the type is a transition to an image state. The image state is the presentation form of each chart data in the online chart, such as the column form of a histogram and the cake form of a pie chart, and the adjustment is to convert between different forms, so that the column form of each chart data is converted into the cake form, or the cake form is converted into the column form, so as to present the chart data in different ways.
And p3, if the type is the three-dimensional model, adjusting the diagram orientation or the diagram view angle of the online diagram.
Further, when the type of the graph model is determined to be a three-dimensional model through the type identifier, the generated online graph is a three-dimensional graph in a three-dimensional space based on the X axis, the Y axis and the Z axis, and the adjustment of the type online graph to the graph orientation or the graph view angle is performed. The chart azimuth and the chart visual angle are the display positions and the visual angles of all chart data in the stereo chart, and the chart azimuth or the chart visual angle is adjusted so that the chart data can be displayed according to the requirements of users.
In addition, referring to fig. 2, the present invention provides a chart image generating device, in a first embodiment of the chart image generating device of the present invention, the chart image generating device includes:
the receiving module 10 is configured to, when receiving chart data and a chart model selection instruction, transmit the chart data to a chart model corresponding to the chart model selection instruction, and generate an online chart formed by splicing a plurality of chart components on a webpage;
the reading module 20 is configured to read chart pixel information of each chart component in the online chart, and output first prompt information to prompt a format of a chart picture to be generated to be set;
the generating module 30 is configured to receive picture format information uploaded by a user based on the first prompt information, establish a background picture corresponding to the picture format information, add the graph pixel information to the background picture, and generate a graph picture.
The chart picture generation device of the embodiment transmits the chart data received by the receiving module 10 to the chart model corresponding to the chart model selection instruction to generate an online chart formed by splicing a plurality of chart parts in a webpage, the reading module 20 reads the chart pixel information of each chart part in the online chart, and when the picture format information is received, a background picture corresponding to the picture format information is established, and the generation module 30 adds the read chart pixel information to the background picture, so that the chart picture can be generated. The graph picture is generated by graph pixel information which is derived from an online graph, and the online graph is generated by graph data, so that the graph picture comprises all contents of the graph data; the graph picture exists in a picture format, the graph data form a whole, and the use of the online graph generated by the graph data can be realized by directly calling the picture graph subsequently, so that the reuse of the online graph is facilitated.
Further, in another embodiment of the chart picture generating apparatus of the present invention, the chart pixel information includes pixel coordinate data and pixel value data, and the generating module includes:
the determining unit is used for determining an image area in the background picture and each pixel coordinate point in the image area according to the pixel coordinate data;
a generating unit configured to add the pixel value data to each of the pixel coordinate points in the image area according to a correspondence relationship between the pixel coordinate data and the pixel value data, and generate a chart picture.
Further, in another embodiment of the chart picture generating device of the present invention, the reading module is further configured to:
when a request instruction for adding hidden information to the chart picture is received, reading target hidden information and an adding position corresponding to the request instruction;
reading position pixel information of the adding position at the position of the graph picture, calling a preset hiding rule, and processing the position pixel information according to the preset hiding rule to generate a processing result;
and updating picture pixel information in the graph picture according to the processing result so as to add the target hidden information to the adding position in the graph picture.
Further, in another embodiment of the chart picture generation apparatus of the present invention, the chart picture generation apparatus further includes:
the determining module is used for determining the pixel specification of the chart picture according to the picture pixel information of the chart picture and determining the information specification supporting adding of hidden information in the chart picture according to the pixel specification;
and the output module is used for outputting the information specification so as to send the request instruction based on the information specification.
Further, in another embodiment of the chart picture generating device of the present invention, the reading module is further configured to:
when a request instruction for adding hidden information to the chart picture is received, outputting second prompt information to prompt the setting of the hidden level of the added hidden information;
receiving a hidden grade uploaded based on the second prompt message, reading target hidden information corresponding to the request command and adding a position, and adding the target hidden information to the adding position according to the preset hidden rule corresponding to the hidden grade.
Further, in another embodiment of the chart picture generation apparatus of the present invention, the chart picture generation apparatus further includes:
the capturing module is used for reading the pixel information to be detected in the graph picture to be detected and capturing the hidden information to be detected from the pixel information to be detected when the graph picture to be detected is received;
the comparison module is used for comparing the hidden information to be detected with preset detection information and judging whether the graph picture to be detected has tampering information or not;
and the improving module is used for improving the hiding grade of the hidden information in the chart picture to be detected if the chart picture to be detected has the tampering information.
Further, in another embodiment of the apparatus for generating a chart picture according to the present invention, the chart model includes a two-dimensional model and a three-dimensional model, and the confirming module is further configured to:
when an adjustment instruction for the online graph is received, determining the type of the graph model according to the type identifier in the graph model;
the chart picture generation apparatus further includes:
the conversion module is used for converting the graphic state in the online chart if the type is a two-dimensional model;
and the adjusting module is used for adjusting the chart orientation or the chart visual angle of the online chart if the type is the three-dimensional model.
Each virtual function module of the chart image generation apparatus is stored in the memory 1005 of the chart image generation device shown in fig. 3, and when the processor 1001 executes the chart image generation program, the functions of each module in the embodiment shown in fig. 2 are realized.
Referring to fig. 3, fig. 3 is a schematic device structure diagram of a hardware operating environment related to the method according to the embodiment of the present invention.
The chart picture generating device in the embodiment of the invention can be a Personal Computer (PC), and can also be a terminal device such as a smart phone, a tablet computer, an electronic book reader, a portable computer, and the like.
As shown in fig. 3, the chart picture generating apparatus may include: a processor 1001, such as a CPU (Central Processing Unit), a memory 1005, and a communication bus 1002. The communication bus 1002 is used for realizing connection communication between the processor 1001 and the memory 1005. The memory 1005 may be a Random Access Memory (RAM) or a non-volatile memory (disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the chart picture generating device may further include a user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi (Wireless Fidelity, wireless broadband) module, and the like. The user interface may comprise a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may also comprise a standard wired interface, a wireless interface. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Those skilled in the art will appreciate that the arrangement of the chart picture generation apparatus shown in fig. 3 does not constitute a limitation of the chart picture generation apparatus and may include more or less components than those shown, or some of the components may be combined, or a different arrangement of components.
As shown in fig. 3, a memory 1005, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, and a chart picture generating program. The operating system is a program that manages and controls hardware and software resources of the chart picture generation apparatus, and supports the operation of the chart picture generation program and other software and/or programs. The network communication module is used for realizing communication among the components in the memory 1005 and communication with other hardware and software in the chart picture generation device.
In the chart picture generation apparatus shown in fig. 3, the processor 1001 is configured to execute a chart picture generation program stored in the memory 1005, and implement the steps in each embodiment of the chart picture generation method described above.
The present invention provides a computer-readable storage medium storing one or more programs, which are further executable by one or more processors for implementing the steps in the embodiments of the chart picture generating method described above.
It should also be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, and includes several instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A chart picture generation method, characterized by comprising the steps of:
when chart data and a chart model selection instruction are received, transmitting the chart data to a chart model corresponding to the chart model selection instruction, and generating an online chart formed by splicing a plurality of chart parts on a webpage;
reading the chart pixel information of each chart part in the online chart, and outputting first prompt information to prompt the format of a chart picture to be generated to be set;
receiving picture format information uploaded by a user based on the first prompt information, establishing a background picture corresponding to the picture format information, and adding the graph pixel information to the background picture to generate a graph picture;
the chart pixel information includes pixel coordinate data and pixel value data, the adding of the chart pixel information to the background picture, the generating of the chart picture includes:
determining an image area in the background picture and each pixel coordinate point in the image area according to the pixel coordinate data;
and adding the pixel value data to each pixel coordinate point in the image area according to the corresponding relation between the pixel coordinate data and the pixel value data to generate a chart picture.
2. A chart picture generating method according to claim 1, wherein said step of adding said chart pixel information to said background picture, generating a chart picture, is followed by:
when a request instruction for adding hidden information to the chart picture is received, reading target hidden information and an adding position corresponding to the request instruction;
reading position pixel information of the adding position at the position of the graph picture, calling a preset hiding rule, processing the position pixel information according to the preset hiding rule, and generating a processing result;
and updating picture pixel information in the graph picture according to the processing result so as to add the target hidden information to the adding position in the graph picture.
3. A chart picture generating method according to claim 2, wherein said step when a request instruction for adding hidden information to said chart picture is received is preceded by:
determining a pixel specification of the graph picture according to picture pixel information of the graph picture, and determining an information specification supporting adding of hidden information in the graph picture according to the pixel specification;
and outputting the information specification to send the request instruction based on the information specification.
4. The chart picture generating method according to claim 2, wherein the step of reading, when receiving a request instruction for adding hidden information to the chart picture, an addition position corresponding to the request instruction comprises:
when a request instruction for adding hidden information to the chart picture is received, outputting second prompt information to prompt the setting of the hidden level of the added hidden information;
and receiving a hidden grade uploaded based on the second prompt message, reading target hidden information corresponding to the request instruction and an adding position, and adding the target hidden information to the adding position according to the preset hidden rule corresponding to the hidden grade.
5. A chart picture generating method according to claim 4, further comprising the steps of:
when a to-be-detected graph picture is received, reading to-be-detected pixel information in the to-be-detected graph picture, and capturing to-be-detected hidden information from the to-be-detected pixel information;
comparing the hidden information to be detected with preset detection information, and judging whether the graph picture to be detected has tampering information;
and if the graph picture to be detected has the tampering information, improving the hiding grade of the hidden information in the graph picture to be detected.
6. A chart picture generation method according to any of the claims 1-5, wherein said chart model comprises a two-dimensional model and a three-dimensional model, said step of generating an online chart on a web page spliced from a plurality of chart parts comprising, after:
when an adjustment instruction for the online graph is received, determining the type of the graph model according to the type identifier in the graph model;
if the type is a two-dimensional model, converting the graph state in the online graph;
and if the type is a three-dimensional model, adjusting the diagram orientation or the diagram view angle of the online diagram.
7. A chart picture generation apparatus, characterized by comprising:
the receiving module is used for transmitting the chart data to a chart model corresponding to the chart model selection instruction when the chart data and the chart model selection instruction are received, and generating an online chart formed by splicing a plurality of chart parts on a webpage;
the reading module is used for reading chart pixel information of each chart component in the online chart and outputting first prompt information to prompt the setting of the format of a chart picture to be generated;
the generating module is used for receiving picture format information uploaded by a user based on the first prompt information, establishing a background picture corresponding to the picture format information, adding the chart pixel information to the background picture and generating a chart picture;
the chart pixel information includes pixel coordinate data and pixel value data, and the generation module includes:
the determining unit is used for determining an image area in the background picture and each pixel coordinate point in the image area according to the pixel coordinate data;
a generating unit configured to add the pixel value data to each of the pixel coordinate points in the image area according to a correspondence relationship between the pixel coordinate data and the pixel value data, and generate a chart picture.
8. A chart picture generating device, characterized by comprising: the chart picture generation device comprises a memory, a processor, a communication bus and a chart picture generation program stored on the memory;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute the chart picture generation program to implement the steps of the chart picture generation method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that a chart picture generating program is stored thereon, which when executed by a processor, realizes the steps of the chart picture generating method according to any one of claims 1 to 6.
CN201811136807.2A 2018-09-27 2018-09-27 Chart picture generation method, device and equipment and computer readable storage medium Active CN109656647B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811136807.2A CN109656647B (en) 2018-09-27 2018-09-27 Chart picture generation method, device and equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811136807.2A CN109656647B (en) 2018-09-27 2018-09-27 Chart picture generation method, device and equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109656647A CN109656647A (en) 2019-04-19
CN109656647B true CN109656647B (en) 2023-04-11

Family

ID=66109950

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811136807.2A Active CN109656647B (en) 2018-09-27 2018-09-27 Chart picture generation method, device and equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109656647B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502710A (en) * 2019-07-11 2019-11-26 平安普惠企业管理有限公司 Page generation method, device, equipment and readable storage medium storing program for executing
CN117115114B (en) * 2023-08-29 2024-01-30 南京晓庄学院 YOLO-based power electronic device production process target identification and defect detection method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107221019A (en) * 2017-03-07 2017-09-29 武汉唯理科技有限公司 Chart conversion method and device
CN107689070A (en) * 2017-08-31 2018-02-13 平安科技(深圳)有限公司 Chart data structuring extracting method, electronic equipment and computer-readable recording medium
CN107688789A (en) * 2017-08-31 2018-02-13 平安科技(深圳)有限公司 Document charts abstracting method, electronic equipment and computer-readable recording medium
CN108052495A (en) * 2017-12-28 2018-05-18 努比亚技术有限公司 data display method, terminal and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107221019A (en) * 2017-03-07 2017-09-29 武汉唯理科技有限公司 Chart conversion method and device
CN107689070A (en) * 2017-08-31 2018-02-13 平安科技(深圳)有限公司 Chart data structuring extracting method, electronic equipment and computer-readable recording medium
CN107688789A (en) * 2017-08-31 2018-02-13 平安科技(深圳)有限公司 Document charts abstracting method, electronic equipment and computer-readable recording medium
CN108052495A (en) * 2017-12-28 2018-05-18 努比亚技术有限公司 data display method, terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN109656647A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
US11425454B2 (en) Dynamic video overlays
CN108961157B (en) Picture processing method, picture processing device and terminal equipment
US10573082B2 (en) Target object display method, device and system
CN112416346B (en) Interface color scheme generation method, device, equipment and storage medium
CN106843794B (en) Split screen display method and system based on android
KR20090092035A (en) Method for generating mosaic image and apparatus for the same
CN110263301B (en) Method and device for determining color of text
CN109656647B (en) Chart picture generation method, device and equipment and computer readable storage medium
CN112965650B (en) Thermodynamic diagram visualization method, thermodynamic diagram visualization system and thermodynamic diagram visualization computer equipment
CN113126937A (en) Display terminal adjusting method and display terminal
CN113590072A (en) Split screen display method and device
CN115357179A (en) Display screen management method, display screen management device, electronic equipment and storage medium
CN113949900B (en) Live broadcast mapping processing method, system, equipment and storage medium
US12073810B2 (en) Method and apparatus for image processing, method and device for sharing displayed content on a plurality of devices
CN115934179A (en) Service function control method and equipment
CN115037905A (en) Screen recording file processing method, electronic equipment and related products
CN114724522A (en) Method and device for adjusting backlight brightness of display device, display device and medium
CN108024032A (en) Image enhancement processing method, TV, server and computer-readable recording medium
CN110337074B (en) Interactive information transmission method, system and terminal equipment
CN113988649B (en) Display function testing method of display screen and related device
CN114416619B (en) Picture display method and device based on serial port screen, storage medium and electronic equipment
KR20200023750A (en) Electronic device for providing infographics and method thereof
CN111416971B (en) Control method, control system, electronic device and readable storage medium
CN113835809B (en) Hiding method and device
CN110290483B (en) Multimedia message transmission method, system and terminal 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
GR01 Patent grant
GR01 Patent grant