CN108153845A - Method and device derived from a kind of realization backstage image data - Google Patents

Method and device derived from a kind of realization backstage image data Download PDF

Info

Publication number
CN108153845A
CN108153845A CN201711377489.4A CN201711377489A CN108153845A CN 108153845 A CN108153845 A CN 108153845A CN 201711377489 A CN201711377489 A CN 201711377489A CN 108153845 A CN108153845 A CN 108153845A
Authority
CN
China
Prior art keywords
file
page
target
drawing object
static page
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.)
Granted
Application number
CN201711377489.4A
Other languages
Chinese (zh)
Other versions
CN108153845B (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.)
Beijing Tianyuan Creative Technology Ltd
Original Assignee
Beijing Tianyuan Creative Technology 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 Beijing Tianyuan Creative Technology Ltd filed Critical Beijing Tianyuan Creative Technology Ltd
Priority to CN201711377489.4A priority Critical patent/CN108153845B/en
Publication of CN108153845A publication Critical patent/CN108153845A/en
Application granted granted Critical
Publication of CN108153845B publication Critical patent/CN108153845B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Embodiment of the invention discloses that a kind of method and device derived from realization backstage image data, this method will be in the corresponding static page storage to predetermined server of each Drawing Object by access path, and generate the instruction for exporting the static page, predetermined server can render the first file in each static page according to the instruction, the second file is obtained, the second file is exported.First file is obtained according to the data source and graphical format information of Drawing Object, second file is rendered to obtain to the first file, it ensure that the information integrity of Drawing Object so that the export effect and the display effect of the page to be exported of the second file derived from predetermined server are consistent.On the other hand, the batch for realizing the second file by instruction exports, and improves the export efficiency of image object.

Description

Method and device derived from a kind of realization backstage image data
Technical field
The present embodiments relate to computer graphic sheet data administrative skill field, more particularly, to a kind of realization backstage image Method and device derived from data.
Background technology
Performance management system (performance management system, abbreviation PM) manages a large amount of NE network elements Equipment, the performance data acquired daily are also all magnanimity ranks, in order to monitor the index performance with statistical analysis network, Yong Huhui Customize multiple monitoring windows and a large amount of report timed task.From the aspect of pattern and visual effect, PM draws in initial stage of development Fusionchart components are entered, foreground can meet operation maintenance personnel multiple business by the way that the flexible expansion with program is quickly configured Use demand under scene.Because PM is related to many backstage scheduler tasks, how to be directly generated and the exhibition of foreground interface in server end Show one of the problem of consistent destination file of effect is just studied into us.
PM systems are generally used for the performance monitoring of communication network, by EMS (Element Management System, Element management system) system and NE (Network element, network element device) network element performance data acquisition, parse, enter Library is summarized and is showed, and the overall performance and development trend to telecommunication carrier networks provide intuitive display.Largely make in PM systems Show form, such as line chart, column figure, column figure, pie chart, area-graph, bubble diagram, instrument board etc. with fusionchart charts More than 20 kinds of chart style.If these figures are exported in browser client, using the API of fusionchart offers It carries out.But system also requires to generate the Study documents such as report in server end by timed task, i.e., backstage will utilize java journeys Sequence is performed and is generated as a result, the picture pattern and foreground that can not achieve in file show pattern and exactly match automatically.Although Jfreechart is a graph making class libraries on java platforms, supports the displaying and output of a variety of graphic styles, but it is painted Effect processed and the effect of fusionchart are far from each other, finally can not also meet user demand.
During the embodiment of the present invention is realized, inventor has found that existing server can not will be in the figure of page presentation Shape object, the pattern according to the Drawing Object and the exhibition method export in the page so that server end can not carry out the page Effective monitoring.
Invention content
The technical problems to be solved by the invention be how to solve existing server can not will be in the figure of page presentation Object, the pattern according to the Drawing Object and the exhibition method export in the page so that server end can not have the page The problem of effect monitoring.
For more than technical problem, method derived from the image data of backstage is realized the embodiment provides a kind of, Including:
Create the access path by page access predetermined server to be exported, and the figure described in acquisition on the page to be exported Object for each Drawing Object, obtains the data source of the Drawing Object and graphical format information;
According to the data source and graphical format information generation corresponding to the first file of the Drawing Object, obtain The static page of first file is included, the static page is stored, and generate export according to the access path The instruction of the static page;
First file in the static page is rendered according to described instruction, obtains the second file, and root Second file is exported for storing the storage path of second file according in described instruction;
Wherein, the graphical format information includes pattern, size and the length-width ratio of the Drawing Object, and the order includes The graphical format information, the storage path and about the spatial cue rendered to first file.
Optionally, it is described to create by page access predetermined server access path to be exported, and page to be exported described in acquisition Drawing Object on face for each Drawing Object, obtains the data source of the Drawing Object and graphical format information, packet It includes:
The access path is created by the wkhtmltox being mounted in the predetermined server, and is passed through described The corresponding data source of each Drawing Object and graphical format letter described in wkhtmltox acquisitions on the page to be exported Breath.
Optionally, it is described according to the data source and graphical format information generation corresponding to the of the Drawing Object One file, obtains including the static page of first file, and the static page is stored according to the access path, And the instruction for exporting the static page is generated, including:
First file is generated according to the data source and the graphical format information, obtains containing first text The static page of part;
Static page storage is passed through to the preset memory locations of the predetermined server according to the access path The wkhtmltox generations export the cmd orders of the static page, as the instruction for exporting the static page;
Wherein, first file is html files.
Optionally, it is described that first file in the static page is rendered according to described instruction, obtain Two files, and exporting second file for storing the storage path of second file in described instruction, are wrapped It includes:
Cycle performs file export operation, until exporting corresponding first file of each Drawing Object, wherein, it is described File export operation includes:
Any static page is obtained from the preset memory locations, as the target quiescent page, and is obtained corresponding to described The cmd orders of the target quiescent page, as target cmd orders;
Whether the first file of target in the target quiescent page is rendered according to the cmd command determinations, if It is that first file of target is rendered, obtains the second file of target corresponding to first file of target, otherwise, Using first file of target as second file of target;
The storage path for being used to store second file of target in the target cmd orders, by the target Second file is exported in preset Excel file, and the target quiescent page is deleted from the preset memory locations;
Wherein, the form of second file is image file or pdf document.
Second aspect realizes device derived from the image data of backstage the embodiment provides a kind of, including:
Creation module for creating the access path by page access predetermined server to be exported, and is waited to lead described in acquisition Drawing Object on page-out for each Drawing Object, obtains the data source of the Drawing Object and graphical format letter Breath;
Memory module, for corresponding to the Drawing Object according to the data source and graphical format information generation First file, obtains including the static page of first file, and the static page is deposited according to the access path Storage, and generate the instruction for exporting the static page;
Export module for being rendered according to described instruction to first file in the static page, obtains Second file, and exporting second file for storing the storage path of second file in described instruction;
Wherein, the graphical format information includes pattern, size and the length-width ratio of the Drawing Object, and the order includes The graphical format information, the storage path and about the spatial cue rendered to first file.
Optionally, the creation module is additionally operable to create institute by the wkhtmltox being mounted in the predetermined server Access path is stated, and passes through the corresponding number of each Drawing Object described in the wkhtmltox acquisitions on the page to be exported According to source and the graphical format information.Optionally, the memory module is additionally operable to according to the data source and the graphical format Information generates first file, obtains containing the static page of first file;It will according to the access path The static page storage is generated by the wkhtmltox described in export to the preset memory locations of the predetermined server The cmd orders of static page, as the instruction for exporting the static page;Wherein, first file is html files.
Optionally, the export module is additionally operable to cycle and performs file export operation, until exporting each figure pair As corresponding first file, wherein, the file export operation includes:
Any static page is obtained from the preset memory locations, as the target quiescent page, and is obtained corresponding to described The cmd orders of the target quiescent page, as target cmd orders;
Whether the first file of target in the target quiescent page is rendered according to the cmd command determinations, if It is that first file of target is rendered, obtains the second file of target corresponding to first file of target, otherwise, Using first file of target as second file of target;
The storage path for being used to store second file of target in the target cmd orders, by the target Second file is exported in preset Excel file, and the target quiescent page is deleted from the preset memory locations;
Wherein, the form of second file is image file or pdf document.
The third aspect, the embodiment provides a kind of electronic equipment, including:
At least one processor, at least one processor, communication interface and bus;Wherein,
The processor, memory, communication interface complete mutual communication by the bus;
The communication interface is used between the electronic equipment and the communication equipment of server or the communication equipment of terminal Information is transmitted;
The memory is stored with the program instruction that can be performed by the processor, and the processor calls described program to refer to Order is able to carry out the process described above.
Fourth aspect, the embodiment provides a kind of non-transient computer readable storage medium storing program for executing, which is characterized in that The non-transient computer readable storage medium storing program for executing stores computer instruction, and the computer instruction makes more than the computer execution The method.
The embodiment provides method and device, this method establishments derived from a kind of realization backstage image data to treat The access path of the page and predetermined server is exported, each Drawing Object of the page to be exported will be obtained by the access path Data source and graphical format information.Correspond to the static page of Drawing Object according to data source and the generation of graphical format information, and It is stored according to access path into predetermined server, while generates the instruction that predetermined server exports the static page.Default clothes Device be engaged in by when the Drawing Object for exporting the page exports, according to the instruction to corresponding to the of the Drawing Object in static page One file is rendered, and obtains the second file, then exports the second file according to the storage path in order.This method passes through Access path stores the corresponding static page of each Drawing Object into predetermined server, and generates and export the static page Instruction, predetermined server can render the first file in each static page according to the instruction, obtain the second file, will Second file exports.First file is obtained according to the data source and graphical format information of Drawing Object, and the second file is to the first text Part is rendered to obtain, and ensure that the information integrity of Drawing Object so that the export of the second file derived from predetermined server Effect and the display effect of the page to be exported are consistent.On the other hand, the batch for realizing the second file by instruction exports, and carries The high export efficiency of image object.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair Some bright embodiments, for those of ordinary skill in the art, without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow diagram of method derived from realization backstage image data provided by one embodiment of the present invention;
Fig. 2 is the schematic diagram of the Drawing Object on the page to be exported that another embodiment of the present invention provides;
Fig. 3 be another embodiment of the present invention provide according to method provided in this embodiment, derived from predetermined server The schematic diagram of Drawing Object;
Fig. 4 is the structure diagram for realizing device derived from the image data of backstage that another embodiment of the present invention provides;
Fig. 5 is the structure diagram for the electronic equipment that another embodiment of the present invention provides.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art All other embodiments obtained without making creative work shall fall within the protection scope of the present invention.
Fig. 1 is a kind of flow diagram for realizing method derived from the image data of backstage provided in this embodiment, referring to figure 1, this method includes:
101:The access path by page access predetermined server to be exported is created, and described in acquisition on the page to be exported Drawing Object for each Drawing Object, obtains the data source of the Drawing Object and graphical format information;
102:Correspond to the first file of the Drawing Object according to the data source and graphical format information generation, It obtains including the static page of first file, the static page is stored, and generate according to the access path Export the instruction of the static page;
103:First file in the static page is rendered according to described instruction, obtains the second file, And second file being exported for storing the storage path of second file in described instruction;
Wherein, the graphical format information includes pattern, size and the length-width ratio of the Drawing Object, and the order includes The graphical format information, the storage path and about the spatial cue rendered to first file.
It should be noted that method provided in this embodiment is performed by server.Access path can be pre- by being mounted on If the wkhtmltox plug-in units on server realize that the present embodiment is not particularly limited this.Drawing Object is waited to export to be shown in Figure on the page, for example, including four width Drawing Objects in the page to be exported shown in Figure 2.Data source is for restoring The data of Drawing Object, for example, data source is the value of each pixel of Drawing Object.Graphical format information includes Drawing Object Graphic style, Aspect Ratio etc..
Present embodiments provide it is a kind of realization backstage image data derived from method, this method create page export and in advance If the access path of server, the data source and figure of each Drawing Object of the page to be exported will be obtained by the access path Format information.Correspond to the static page of Drawing Object according to data source and the generation of graphical format information, and according to access path It stores in predetermined server, while generates the instruction that predetermined server exports the static page.Predetermined server will be waited to lead During the Drawing Object export of page-out, wash with watercolours is carried out to the first file for corresponding to the Drawing Object in static page according to the instruction Dye, obtains the second file, then exports the second file according to the storage path in order.This method will be every by access path In the corresponding static page storage to predetermined server of one Drawing Object, and the instruction for exporting the static page is generated, preset clothes Business device can render the first file in each static page according to the instruction, obtains the second file, the second file is led Go out.First file is obtained according to the data source and graphical format information of Drawing Object, and the second file renders the first file It obtains, ensure that the information integrity of Drawing Object so that the export effect of the second file derived from predetermined server is led with waiting The display effect of page-out is consistent.On the other hand, the batch for realizing the second file by instruction exports, and improves image pair The export efficiency of elephant.
Further, on the basis of above-described embodiment, described create is accessed by page access predetermined server to be exported Path, and the Drawing Object described in acquisition on the page to be exported, for each Drawing Object, obtain the Drawing Object Data source and graphical format information, including:
The access path is created by the wkhtmltox being mounted in the predetermined server, and is passed through described The corresponding data source of each Drawing Object and graphical format letter described in wkhtmltox acquisitions on the page to be exported Breath.
Wkhtmltox is a kind of powerful Open-Source Tools, can in a browser render any one Conversion of page, in backstage independent operating, ensures front and back export into image or pdf files, and by cmd order batch processings As a result it is consistent.According to the operating system of predetermined server, installed in predetermined server matched with the operating system wkhtmltox。
A kind of method derived from realization backstage image data is present embodiments provided, this method is realized by wkhtmltox The foundation of access path and the acquisition of the data source of Drawing Object and graphical format information.This method makes all kinds of figures in backstage Pattern export process normalizes.Using wkhtmltox tools, the figure on the page can will be directly rendered with similar screenshotss Mode export, do not need to individually handle each graphic style, saved development cost, just can be complete with less code line It realizes the export of all graphic styles, greatly improves export efficiency.
Further, it is described according to the data source and the graphical format information on the basis of the various embodiments described above Generation obtains including the static page of first file, by the static page corresponding to the first file of the Drawing Object Face is stored according to the access path, and generates the instruction for exporting the static page, including:
First file is generated according to the data source and the graphical format information, obtains containing first text The static page of part;
Static page storage is passed through to the preset memory locations of the predetermined server according to the access path The wkhtmltox generations export the cmd orders of the static page, as the instruction for exporting the static page;
Wherein, first file is html files.
It should be noted that when predetermined server performs cmd orders the second file of export, start new process.
A kind of method derived from realization backstage image data is present embodiments provided, this method passes through cmd command strings Realize the export of static page, operation is simpler easy, and has very big promotion on export efficiency, picture quality.
Further, on the basis of the various embodiments described above, it is described according to described instruction to the institute in the static page It states the first file to be rendered, obtains the second file, and the storage for being used to store second file in described instruction Path exports second file, including:
Cycle performs file export operation, until exporting corresponding first file of each Drawing Object, wherein, it is described File export operation includes:
Any static page is obtained from the preset memory locations, as the target quiescent page, and is obtained corresponding to described The cmd orders of the target quiescent page, as target cmd orders;
Whether the first file of target in the target quiescent page is rendered according to the cmd command determinations, if It is that first file of target is rendered, obtains the second file of target corresponding to first file of target, otherwise, Using first file of target as second file of target;
The storage path for being used to store second file of target in the target cmd orders, by the target Second file is exported in preset Excel file, and the target quiescent page is deleted from the preset memory locations;
Wherein, the form of second file is image file or pdf document.
A kind of method derived from realization backstage image data is present embodiments provided, this method is by using wkhtmltox Method derived from plug-in unit realization background picture, effectively prevents the result difference brought by different drafting mechanism, makes timed task The file of generation can also be accomplished to keep the bandwagon effect of " What You See Is What You Get " with foreground interface, so as to ensure that front and back export effect The consistency of fruit.This method using wkhtmltox plug-in units realize background picture derived from method, this extension can be adapted to very well, Even if subsequent customization more graphic style again, it is not required that increase additional code, show good versatility and adaptability.
As one kind, more specifically embodiment, method provided in this embodiment include:
(1) wkhtmltox tools are installed in predetermined server.
Specifically, wkhtmltox kits are downloaded to official, and is installed in predetermined server.Pay attention to different Operating system need to download different installation kits.The path that a web can be accessed is created on the server, as specified path (accessing road path), for storing the html files that program generates temporarily.
(2) each Drawing Object on interface is decomposed, obtain respective data source and obtains showing for each Drawing Object Form, such as graphic style, Aspect Ratio.
(3) background program (program in predetermined server) generates an interim static html page under specified path (static page) only renders a figure in the page, and the pattern and data source of the figure are all consistent with system foreground interface.
(4) the cmd command strings to be performed are generated.
(5) start new process and call cmd orders.
(6) the generation export picture under specified path, deletes the interim html pages.
(7) cycle (3)-(6) step operation is multiple, until all images in export interface.
(8) Excel file is generated, all images derived under specified path are write in Excel files.
Equally, pdf files or alternative document form can be generated using same way.
Alternatively, method as described below exports the image object in the page to be exported, specifically include:
(1) wkhtmltox kits are downloaded to official, and is installed on server (predetermined server).Pay attention to not Same operating system need to download different installation kits.
(2) path that a web (page to be exported) can be accessed is created on the server, is given birth to temporarily for storing program Into html files (the first file).
(3) start specific export operation.Assuming that there are one report timed task, foreground (page to be exported) Preview results As shown in Figure 2.The report result of (predetermined server) timed task generation also will be consistent with Fig. 2 effects from the background.Recycle interface On each graphic assembly, record its pattern, size (graphical format information) and data source.
(4) interim html files are generated.It will derived figure, the data source obtained in utilization (3) and sample for each Formula is individually rendered in a static page.The page programming automatic generation, is stored under the temporary path created in advance Face is named as the form of specific elementid+.html.
(5) command string of generation wkhtmltox tools export picture includes derived form, deposits in order The path put, the length and width size of picture, if delay such as renders at the parameters, is exported to rendering the picture in static page.
(6) background program enables the order that new process performs the generation of (5) step.
(7) cycle exports each pictures, after all pictures export, then by these pictures according on the page In sequence integration to Excel file.Derived picture is fig. 3, it is shown that the realization backstage provided through this embodiment Method derived from image data, file derived from predetermined server is maintained consistent with the page to be exported in Fig. 2 very well in Fig. 3 Property.
(8) after Excel file is successfully generated, all html files under temporary path are deleted.
Method provided in this embodiment makes all kinds of graphic style export process normalization in backstage.Because being related to a variety of figures in system Shape pattern, such as line chart, column figure, column figure, pie chart, area-graph, if realized using the class libraries of similar Jfreechart, each Figure will write corresponding derivation program, and code is cumbersome and realizes complicated.Using wkhtmltox tools, can will directly render Figure on the page is exported in a manner of similar screenshotss, does not need to individually handle each graphic style, saved exploitation into This, the export of all graphic styles just can be completely realized with less code line, greatly improves export efficiency.
It ensure that the consistency of front and back export effect.Fusionchart components provide the user good visual impression By, but it does not support backstage to export, and can not all be accomplished using the backstage export of other class bank interfaces realization complete with showing interface Complete consistent, display styles are also far from each other.By using method derived from wkhtmltox plug-in units realization background picture, effectively keep away The result difference brought by different drafting mechanism is exempted from, has made the file that timed task generates that can also accomplish to keep with foreground interface The bandwagon effect of " What You See Is What You Get ".
The customized extension of chart in follow-up system can be adapted to very well.PM systems, which have cured, realizes a variety of common charts, The most of business scenario of covering, but in order to meet the different business demand of overseas each operator, system has also reserved expansion interface, Support the customized extension of chart.Using method derived from wkhtmltox plug-in units realization background picture, this expansion can be adapted to very well Exhibition, even if subsequent customization more graphic style again, it is not required that increase additional code, show good versatility and adaptation Property.
Fig. 4 shows a kind of structural frames for realizing device derived from the image data of backstage that the embodiment of the present invention provides Figure, referring to Fig. 4, device derived from realization backstage image data provided in this embodiment, including creation module 401, memory module 402 and export module 403, wherein,
Creation module 401 for creating the access path by page access predetermined server to be exported, and is treated described in acquisition The Drawing Object on the page is exported, for each Drawing Object, obtains the data source and graphical format of the Drawing Object Information;
Memory module 402, for corresponding to the figure pair according to the data source and graphical format information generation The first file of elephant obtains including the static page of first file, by the static page according to the access path into Row storage, and generate the instruction for exporting the static page;
Export module 403 for being rendered according to described instruction to first file in the static page, obtains To the second file, and leading second file for storing the storage path of second file in described instruction Go out;
Wherein, the graphical format information includes pattern, size and the length-width ratio of the Drawing Object, and the order includes The graphical format information, the storage path and about the spatial cue rendered to first file.
The realization provided in this embodiment realized device derived from the image data of backstage and provided suitable for above-described embodiment Method derived from the image data of backstage, details are not described herein.
The embodiment provides device, the devices derived from a kind of realization backstage image data to create page to be exported Face and the access path of predetermined server will obtain the data source of each Drawing Object of the page to be exported by the access path With graphical format information.Correspond to the static page of Drawing Object according to data source and the generation of graphical format information, and according to visit In diameter of asking the way storage to predetermined server, while generate the instruction that predetermined server exports the static page.Predetermined server will By wait export the page Drawing Object export when, according to the instruction in static page correspond to the Drawing Object the first file It is rendered, obtains the second file, then exported the second file according to the storage path in order.The device is by accessing road Diameter stores the corresponding static page of each Drawing Object into predetermined server, and generates the instruction for exporting the static page, Predetermined server can render the first file in each static page according to the instruction, the second file be obtained, by second File exports.First file is obtained according to the data source and graphical format information of Drawing Object, the second file to the first file into Row is rendered and is obtained, and ensure that the information integrity of Drawing Object so that the export effect of the second file derived from predetermined server It is consistent with the display effect of the page to be exported.On the other hand, the batch for realizing the second file by instruction exports, and improves The export efficiency of image object.
The third aspect, Fig. 5 are the structure diagrams for showing electronic equipment provided in this embodiment.
With reference to Fig. 5, the electronic equipment includes:Processor (processor) 501, memory (memory) 502, communication Interface (Communications Interface) 503 and bus 504;
Wherein,
The processor 501, memory 502, communication interface 503 complete mutual communication by the bus 504;
The communication interface 503 is for the letter between the electronic equipment and the communication equipment of the corresponding equipment of the page to be exported Breath transmission;
The processor 501 is used to call the program instruction in the memory 502, to perform above-mentioned each method embodiment The method provided, such as including:The access path by page access predetermined server to be exported is created, and waits to lead described in acquisition Drawing Object on page-out for each Drawing Object, obtains the data source of the Drawing Object and graphical format letter Breath;Correspond to the first file of the Drawing Object according to the data source and graphical format information generation, comprising The static page of first file stores the static page, and generate described in export according to the access path The instruction of static page;First file in the static page is rendered according to described instruction, obtains the second text Part, and exporting second file for storing the storage path of second file in described instruction;Wherein, institute Pattern, size and length-width ratio that graphical format information includes the Drawing Object are stated, the order includes the graphical format letter Breath, the storage path and about the spatial cue rendered to first file.
Fourth aspect, the present embodiment provides a kind of non-transient computer readable storage medium storing program for executing, and the non-transient computer can Storage medium storage computer instruction is read, the computer instruction is provided the above-mentioned each method embodiment of the computer execution Method, such as including:Create the access path by page access predetermined server to be exported, and the page to be exported described in acquisition On Drawing Object, for each Drawing Object, obtain the data source of the Drawing Object and graphical format information;According to The data source and graphical format information generation are obtained corresponding to the first file of the Drawing Object comprising described first The static page of file stores the static page according to the access path, and generates the export static page Instruction;First file in the static page is rendered according to described instruction, obtains the second file, and according to Second file being exported for storing the storage path of second file in described instruction;Wherein, the figure lattice Formula information includes pattern, size and the length-width ratio of the Drawing Object, and the order includes the graphical format information, described deposits Put path and about the spatial cue rendered to first file.
The present embodiment discloses a kind of computer program product, and the computer program product includes being stored in non-transient calculating Computer program on machine readable storage medium storing program for executing, the computer program include program instruction, when described program instruction is calculated When machine performs, computer is able to carry out the method that above-mentioned each method embodiment is provided, it may for example comprise:It creates by page to be exported The access path of predetermined server, and the Drawing Object described in acquisition on the page to be exported are asked in interview, for each figure Object obtains the data source of the Drawing Object and graphical format information;According to the data source and the graphical format information Generation obtains including the static page of first file, by the static page corresponding to the first file of the Drawing Object Face is stored according to the access path, and generates the instruction for exporting the static page;According to described instruction to described quiet First file in the state page is rendered, and obtains the second file, and in described instruction for storing described the The storage path of two files exports second file;Wherein, the graphical format information includes the sample of the Drawing Object Formula, size and length-width ratio, the order include the graphical format information, the storage path and about to first files The spatial cue rendered.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through The relevant hardware of program instruction is completed, and aforementioned program can be stored in a computer read/write memory medium, the program When being executed, step including the steps of the foregoing method embodiments is performed;And aforementioned storage medium includes:ROM, RAM, magnetic disc or light The various media that can store program code such as disk.
The embodiments such as electronic equipment described above are only schematical, illustrate wherein described as separating component Unit may or may not be physically separate, and the component shown as unit may or may not be object Manage unit, you can be located at a place or can also be distributed in multiple network element.It can select according to the actual needs Some or all of module therein is selected to realize the purpose of this embodiment scheme.Those of ordinary skill in the art are not paying wound In the case of the labour for the property made, you can to understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can It is realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Based on such understanding, on Technical solution is stated substantially in other words to embody the part that the prior art contributes in the form of software product, it should Computer software product can store in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including several fingers It enables and (can be personal computer, server or the network equipment etc.) so that computer equipment is used to perform each implementation Method described in certain parts of example or embodiment.
Finally it should be noted that:The above various embodiments is only to illustrate the technical solution of the embodiment of the present invention rather than right It is limited;Although the embodiment of the present invention is described in detail with reference to foregoing embodiments, the ordinary skill of this field Personnel should understand that:It can still modify to the technical solution recorded in foregoing embodiments or to which part Or all technical features carries out equivalent replacement;And these modifications or replacement, it does not separate the essence of the corresponding technical solution The range of each embodiment technical solution of the embodiment of the present invention.

Claims (10)

1. a kind of method derived from realization backstage image data, which is characterized in that including:
Create the access path by page access predetermined server to be exported, and the figure pair described in acquisition on the page to be exported As for each Drawing Object, obtaining the data source of the Drawing Object and graphical format information;
Correspond to the first file of the Drawing Object according to the data source and graphical format information generation, comprising The static page of first file stores the static page, and generate described in export according to the access path The instruction of static page;
First file in the static page is rendered according to described instruction, obtains the second file, and according to institute State second file is exported for storing the storage path of second file in instruction;
Wherein, the graphical format information includes pattern, size and the length-width ratio of the Drawing Object, and the order includes described Graphical format information, the storage path and about the spatial cue rendered to first file.
2. according to the method described in claim 1, it is characterized in that, described create is visited by page access predetermined server to be exported It asks the way diameter, and the Drawing Object on the page to be exported described in obtaining, for each Drawing Object, obtains the Drawing Object Data source and graphical format information, including:
The access path is created, and pass through the wkhtmltox by the wkhtmltox being mounted in the predetermined server The corresponding data source of each Drawing Object and the graphical format information on the page to be exported described in acquisition.
It is 3. according to the method described in claim 2, it is characterized in that, described according to the data source and the graphical format information Generation obtains including the static page of first file, by the static page corresponding to the first file of the Drawing Object Face is stored according to the access path, and generates the instruction for exporting the static page, including:
First file is generated according to the data source and the graphical format information, obtains containing first file The static page;
According to the access path by the static page store to the predetermined server preset memory locations, by described Wkhtmltox generations export the cmd orders of the static page, as the instruction for exporting the static page;
Wherein, first file is html files.
4. according to the method described in claim 3, it is characterized in that, it is described according to described instruction to the institute in the static page It states the first file to be rendered, obtains the second file, and the storage for being used to store second file in described instruction Path exports second file, including:
Cycle performs file export operation, until exporting corresponding first file of each Drawing Object, wherein, the file Export operation includes:
Any static page is obtained from the preset memory locations, as the target quiescent page, and obtains and corresponds to the target The cmd orders of static page, as target cmd orders;
Whether the first file of target in the target quiescent page is rendered according to the cmd command determinations, if so, right First file of target is rendered, and obtains the second file of target corresponding to first file of target, otherwise, by described in The first file of target is as second file of target;
The storage path for being used to store second file of target in the target cmd orders, by the target second File is exported in preset Excel file, and the target quiescent page is deleted from the preset memory locations;
Wherein, the form of second file is image file or pdf document.
5. a kind of device derived from realization backstage image data, which is characterized in that including:
Creation module, for creating the access path by page access predetermined server to be exported, and page to be exported described in acquisition Drawing Object on face for each Drawing Object, obtains the data source of the Drawing Object and graphical format information;
Memory module, for corresponding to the first of the Drawing Object according to the data source and graphical format information generation File, obtains including the static page of first file, and the static page is stored according to the access path, and Generation exports the instruction of the static page;
Export module for being rendered according to described instruction to first file in the static page, obtains second File, and exporting second file for storing the storage path of second file in described instruction;
Wherein, the graphical format information includes pattern, size and the length-width ratio of the Drawing Object, and the order includes described Graphical format information, the storage path and about the spatial cue rendered to first file.
6. device according to claim 5, which is characterized in that the creation module is additionally operable to described default by being mounted on Wkhtmltox on server creates the access path, and passes through described in the wkhtmltox acquisitions on the page to be exported Each corresponding data source of Drawing Object and the graphical format information.
7. device according to claim 6, which is characterized in that the memory module is additionally operable to according to the data source and institute It states graphical format information and generates first file, obtain containing the static page of first file;According to described The static page is stored the preset memory locations to the predetermined server by access path, is given birth to by the wkhtmltox Into the cmd orders for exporting the static page, as the instruction for exporting the static page;Wherein, first file is Html files.
8. device according to claim 7, which is characterized in that the export module is additionally operable to cycle and performs file export behaviour Make, until exporting corresponding first file of each Drawing Object, wherein, the file export operation includes:
Any static page is obtained from the preset memory locations, as the target quiescent page, and obtains and corresponds to the target The cmd orders of static page, as target cmd orders;
Whether the first file of target in the target quiescent page is rendered according to the cmd command determinations, if so, right First file of target is rendered, and obtains the second file of target corresponding to first file of target, otherwise, by described in The first file of target is as second file of target;
The storage path for being used to store second file of target in the target cmd orders, by the target second File is exported in preset Excel file, and the target quiescent page is deleted from the preset memory locations;
Wherein, the form of second file is image file or pdf document.
9. a kind of electronic equipment, which is characterized in that including:
At least one processor, at least one processor, communication interface and bus;Wherein,
The processor, memory, communication interface complete mutual communication by the bus;
The communication interface is for the information between the electronic equipment and the communication equipment of server or the communication equipment of terminal Transmission;
The memory is stored with the program instruction that can be performed by the processor, and the processor calls described program instruction energy It is enough to perform method according to any one of claims 1 to 4.
10. a kind of non-transient computer readable storage medium storing program for executing, which is characterized in that the non-transient computer readable storage medium storing program for executing is deposited Computer instruction is stored up, the computer instruction makes the computer perform claim require the method described in any one of 1 to 4.
CN201711377489.4A 2017-12-19 2017-12-19 Method and device for exporting background image data Active CN108153845B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711377489.4A CN108153845B (en) 2017-12-19 2017-12-19 Method and device for exporting background image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711377489.4A CN108153845B (en) 2017-12-19 2017-12-19 Method and device for exporting background image data

Publications (2)

Publication Number Publication Date
CN108153845A true CN108153845A (en) 2018-06-12
CN108153845B CN108153845B (en) 2020-06-16

Family

ID=62463960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711377489.4A Active CN108153845B (en) 2017-12-19 2017-12-19 Method and device for exporting background image data

Country Status (1)

Country Link
CN (1) CN108153845B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815645A (en) * 2019-01-25 2019-05-28 浪潮天元通信信息系统有限公司 A method of realizing that background server exports foreground interface
CN113361235A (en) * 2021-06-30 2021-09-07 北京百度网讯科技有限公司 HTML file generation method and device, electronic equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105955730A (en) * 2016-04-26 2016-09-21 浪潮电子信息产业股份有限公司 Method for managing platform report forms in ssr (service support manager) centralized manner
US20160342577A1 (en) * 2015-05-20 2016-11-24 Mitsuo Ando Information processing apparatus, information processing system, and information processing method
CN107341005A (en) * 2017-06-20 2017-11-10 东软集团股份有限公司 Chart generation method and its device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160342577A1 (en) * 2015-05-20 2016-11-24 Mitsuo Ando Information processing apparatus, information processing system, and information processing method
CN105955730A (en) * 2016-04-26 2016-09-21 浪潮电子信息产业股份有限公司 Method for managing platform report forms in ssr (service support manager) centralized manner
CN107341005A (en) * 2017-06-20 2017-11-10 东软集团股份有限公司 Chart generation method and its device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
STANZHAI: "Highcharts结合PhantomJS在服务端生成高质量的图表图片", 《HTTPS://WWW.CNBLOGS.COM/JASONDAN/P/3504120.HTM1》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815645A (en) * 2019-01-25 2019-05-28 浪潮天元通信信息系统有限公司 A method of realizing that background server exports foreground interface
CN113361235A (en) * 2021-06-30 2021-09-07 北京百度网讯科技有限公司 HTML file generation method and device, electronic equipment and readable storage medium
CN113361235B (en) * 2021-06-30 2024-03-22 北京百度网讯科技有限公司 HTML file generation method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN108153845B (en) 2020-06-16

Similar Documents

Publication Publication Date Title
WO2021218327A1 (en) Page processing method and related device
CN106339226B (en) A kind of methods of exhibiting and page presentation device of Webpage
CN107092625B (en) Data configuration method, data processing method and device
CN108876121A (en) Worksheet method, apparatus, computer equipment and storage medium
CN110109659A (en) A kind of system that realizing front end applications scaffold and server
CN112633691A (en) Method and device for generating custom approval process
CN103530338B (en) Frame for carrying out page rendering on calculation equipment and page generation method
CN108491195A (en) Equipment controls page generation method and system
CN109981322A (en) The method and apparatus of cloud resource management based on label
CN109948103A (en) Web-based image edit method, image editing apparatus and electronic equipment
CN110008195A (en) A kind of dynamic configuration html turns the method, apparatus and system of pdf
CN108153845A (en) Method and device derived from a kind of realization backstage image data
CN108228596A (en) A kind of dynamic data methods of exhibiting
CN111651966A (en) Data report file generation method and device and electronic equipment
CN105912324A (en) Method and device for generating Web page
CN112083926A (en) Web user interface generation method and device
CN105094857B (en) Method and system for application load
CN115437608A (en) Intelligent research and development assisting method and device
CN113885745A (en) Visual flow chart arranging method and device, readable medium and computer equipment
CN113568614A (en) Task issuing method, electronic device and storage medium
CN111125581B (en) Picture loading method and device
CN112346774A (en) Method and device for generating application installation package
CN116301813A (en) Low-code platform development method and system
CN115292169A (en) UI automation test method and system
CN114911541A (en) Configuration information processing method and device, electronic equipment and storage medium

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